/* ============================================================
   İnşaat Takip Sistemi — Tema
   Şantiye estetiği: kağıt zemin, mürekkep koyu, baret sarısı vurgu.
   İmza öğesi: "ikaz bandı" (hazard stripe) diyagonal şerit.
   ============================================================ */
:root {
  --paper:      #F6F5F1;
  --paper-2:    #FFFFFF;
  --panel:      #FFFFFF;
  --ink:        #171D24;
  --ink-2:      #1C232B;
  --muted:      #5B6472;
  --muted-2:    #8A929E;
  --line:       #E2E0D8;
  --line-2:     #D3D0C6;
  --accent:     #F5B301;  /* baret sarısı */
  --accent-ink: #4A3B00;
  --info:       #2456A6;
  --ok:         #2E7D46;
  --bad:        #C1352B;
  --warn:       #C77A0A;
  --shadow:     0 1px 2px rgba(23,29,36,.06), 0 6px 20px rgba(23,29,36,.06);
  --shadow-lg:  0 12px 40px rgba(23,29,36,.18);
  --radius:     10px;
  --radius-sm:  7px;
  --mono:       ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans:       system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.center { text-align: center; }

/* ---------- ikaz bandı (imza öğe) ---------- */
.hazard-under { position: relative; }
.hazard-under::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 4px;
  background: repeating-linear-gradient(-45deg,
    var(--accent) 0 10px, var(--ink) 10px 20px);
  opacity: .9;
}

/* ---------- açılış ekranı ---------- */
.boot-screen {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; color: var(--muted);
}
.boot-mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--ink);
  position: relative; overflow: hidden;
}
.boot-mark::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, transparent 8px 16px);
  animation: slide 1s linear infinite;
}
@keyframes slide { to { background-position: 22px 0; } }

/* ============================================================
   Uygulama iskeleti
   ============================================================ */
.app-shell { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px; height: 56px; flex: 0 0 56px;
  background: var(--ink); color: #fff;
  position: relative; z-index: 30;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, var(--ink-2) 12px 24px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  display: grid; place-items: center; color: var(--ink); flex: 0 0 26px;
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted-2); letter-spacing: 0; }
.topbar-spacer { flex: 1; }
.top-user { text-align: right; line-height: 1.15; }
.top-user strong { font-size: 13px; }
.top-user span { font-size: 11px; color: var(--muted-2); }
.top-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.14);
  padding: 7px 11px; border-radius: var(--radius-sm); font-size: 12.5px; transition: background .15s;
}
.top-btn:hover { background: rgba(255,255,255,.16); }
.top-btn.accent { background: var(--accent); color: var(--ink); border-color: transparent; font-weight: 600; }
.top-btn.accent:hover { filter: brightness(1.05); }

.workspace {
  flex: 1; display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 0; position: relative;
}
.tree-panel {
  display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--line); background: var(--paper-2);
}
.detail-col { min-height: 0; overflow: auto; background: var(--paper); }
.feed-panel {
  display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid var(--line); background: var(--paper-2);
}
/* mobil çekmece perdesi ve yüzen buton — masaüstünde gizli */
.scrim { display: none; }
.feed-fab { display: none; }

.panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.panel-head .icon-btn { margin-left: auto; }
.panel-head .feed-notify-toggle { margin-left: auto; }
.feed-notify-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  cursor: pointer; user-select: none;
  padding: 4px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--paper);
}
.feed-notify-toggle input {
  width: 14px; height: 14px; accent-color: var(--ink); margin: 0; cursor: pointer;
}
.feed-notify-toggle:has(input:checked) {
  color: var(--ink); border-color: transparent; background: var(--accent);
}
.panel-head .live-dot { margin-left: 8px; }

/* ---------- kullanıcı kartı (proje yapısının üstünde) ---------- */
.user-bar {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
}
.user-avatar {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--ink);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(23,29,36,.14);
}
.user-id { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.user-id strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-id span { font-size: 11px; color: var(--muted-2); }

/* ---------- filtrele & listele ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px 4px; }
.filter-bar select, .filter-bar .filter-q {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px;
  background: #fff; color: var(--ink); outline: none; flex: 1 1 170px; min-width: 150px;
}
.filter-bar select:focus, .filter-bar .filter-q:focus { border-color: var(--info); }
.filter-bar .filter-kind-sel { flex: 0 0 auto; min-width: 128px; max-width: 160px; font-weight: 600; }
.filter-bar .filter-q { flex: 2 1 200px; }
.filter-count { padding: 4px 24px 8px; }
.filter-results { padding: 0 24px 40px; }
.comp-link { cursor: pointer; }

/* ---------- içindekiler (klasör/blok görünümü) ---------- */
.child-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin-top: 12px;
}
.child-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-2); box-shadow: var(--shadow); cursor: pointer;
}
.child-card:active { transform: scale(.985); }
.child-name { font-weight: 600; font-size: 14px; word-break: break-word; }
.child-card small { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.child-grid.compact { margin: 0 0 16px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.child-grid.compact .child-card { padding: 10px; flex-direction: row; align-items: center; gap: 8px; }
.child-grid.compact .child-card small { display: none; }

/* ---------- form: yan yana alanlar ---------- */
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

/* ---------- segment kontrolü (radio) ---------- */
.radio-group {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  padding: 4px; background: var(--paper); border: 1px solid var(--line-2);
  border-radius: 11px; width: 100%;
}
.radio-pill {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; background: transparent; color: var(--muted);
  padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px;
  white-space: nowrap; transition: background .13s, color .13s;
}
.radio-pill .ic { flex: 0 0 auto; }
.radio-pill:hover { color: var(--ink); }
.radio-pill.on {
  background: var(--accent); color: var(--ink);
  box-shadow: 0 1px 2px rgba(23,29,36,.15);
}

/* ---------- slider ---------- */
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider {
  -webkit-appearance: none; appearance: none; height: 8px; flex: 1;
  border-radius: 20px; outline: none;
  background: linear-gradient(90deg, var(--accent) var(--fill,0%), var(--line) var(--fill,0%));
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--accent); cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--ink);
  border: 3px solid var(--accent); cursor: pointer;
}
.slider-val { min-width: 46px; text-align: right; font-weight: 700; font-size: 15px; }

/* ---------- fotoğraf ---------- */
.hidden-file { display: none; }
.box-hidden { display: none; }
.photo-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-thumb { position: relative; width: 74px; height: 74px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.row-photos { display: flex; gap: 5px; margin-top: 6px; }
.row-photo { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.photo-full { text-align: center; }
.photo-full img { max-width: 100%; max-height: 78vh; border-radius: 8px; }

/* ---------- kayıt bildirimi (akış) ---------- */
.post.record { border-left: 4px solid var(--muted); }
.post.record.sc-ok { border-left-color: var(--ok); }
.post.record.sc-bad { border-left-color: var(--bad); }
.post.record.sc-warn { border-left-color: var(--warn); }
.post.record.sc-info { border-left-color: var(--info); }
.post.record.sc-muted { border-left-color: var(--muted); }
.rec-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700;
  color: var(--info); background: rgba(36,86,166,.12); padding: 2px 7px; border-radius: 4px;
}
.brand { cursor: pointer; }

/* ---------- birleşik liste: hizalama + tıklanabilir satır ---------- */
.data-table td { vertical-align: middle; }
.combined-table .act-col { white-space: nowrap; width: 1%; text-align: right; }
.combined-table .row-tools { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.combined-table th, .combined-table td { white-space: nowrap; }
.combined-table .title-cell strong { font-weight: 600; }
.comp-tag { display: inline-flex; align-items: center; gap: 5px; }
.combined-table .desc-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.row-clickable { cursor: pointer; }
.xlsx-btn { background: var(--accent); border-color: transparent; color: var(--ink); font-weight: 600; }
.xlsx-btn:hover:not(:disabled) { background: var(--accent); filter: brightness(1.05); border-color: transparent; }
.chk-col { width: 34px; text-align: center; }
.chk-col input { width: 16px; height: 16px; accent-color: var(--info); cursor: pointer; }
.scroll-arrows { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 6px; }

/* ---------- Genel Bakış: kayan kart şeridi ---------- */
.dash-shelf { display: flex; align-items: stretch; gap: 6px; padding: 4px 24px 8px; }
.shelf-arrow {
  flex: 0 0 auto; width: 34px; border: 1px solid var(--line-2); background: #fff; color: var(--muted);
  border-radius: 10px; display: grid; place-items: center; cursor: pointer; align-self: center; height: 44px;
}
.shelf-arrow:hover { color: var(--ink); border-color: var(--muted-2); }
.dash-carousel {
  display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; padding: 6px 2px;
  scrollbar-width: none;
}
.dash-carousel::-webkit-scrollbar { display: none; }
.dash-card {
  flex: 0 0 auto; width: 200px; min-height: 132px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 4px; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper-2);
  box-shadow: 0 1px 3px rgba(23,29,36,.06); position: relative; transition: transform .12s, box-shadow .12s, border-color .12s;
}
.dash-card.clickable { cursor: pointer; }
.dash-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(23,29,36,.12); }
.dash-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, 0 6px 18px rgba(23,29,36,.12); }
.dash-card .dc-ic {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--paper); color: var(--muted-2); margin-bottom: 4px;
}
.dash-card.accent-imalat .dc-ic { background: rgba(245,179,1,.16); color: #8A6D1F; }
.dash-card.accent-bad .dc-ic { background: rgba(197,48,48,.13); color: var(--bad); }
.dash-card.accent-ok .dc-ic { background: rgba(46,125,70,.13); color: var(--ok); }
.dash-card.accent-info .dc-ic { background: rgba(36,86,166,.13); color: var(--info); }
.dc-big { font-size: 26px; line-height: 1.1; }
.dc-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.dc-sub { font-size: 11.5px; color: var(--muted); }
.dc-bar { height: 6px; border-radius: 20px; background: var(--line); overflow: hidden; margin-top: 6px; }
.dc-bar-fill { height: 100%; background: var(--accent); border-radius: 20px; }
.dc-hint { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted-2); }
.dash-card.info { opacity: .96; }

/* liste bölümü */
.dash-list { padding: 0 24px; }
.dash-list-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; }
.dash-list-head h2 { font-size: 16px; margin: 0; }
.record-table .rt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.record-table .filter-count { padding: 0; }

@media (max-width: 480px) {
  .dash-shelf { padding-left: 12px; padding-right: 12px; }
  .dash-list { padding-left: 12px; padding-right: 12px; }
  .dash-card { width: 168px; min-height: 120px; padding: 14px; }
  .dc-big { font-size: 22px; }
}
.filter-kinds { margin: 0 24px; width: auto; }

/* yönetim: kullanıcı işlem hücresi hizası */
.user-actions { vertical-align: middle; white-space: nowrap; text-align: right; }
.ua-wrap { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- filtre komponent seçici (ağaç) ---------- */
.picker-wrap { position: relative; flex: 1 1 240px; min-width: 200px; }
.picker-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 11px; background: #fff; color: var(--ink); text-align: left;
}
.picker-btn .picker-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column;
  max-height: 340px;
}
.picker-panel.box-hidden { display: none; }
.picker-search-wrap {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); color: var(--muted); flex: 0 0 auto;
}
.picker-search { flex: 1; border: none; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.picker-tree { overflow-y: auto; padding: 6px; }
.picker-row { display: flex; align-items: center; gap: 2px; padding-left: var(--pd, 0); }
.picker-tw, .picker-tw-sp { width: 22px; height: 28px; flex: 0 0 22px; display: grid; place-items: center; border: none; background: transparent; color: var(--muted); border-radius: 5px; }
.picker-tw { cursor: pointer; transition: transform .12s; }
.picker-tw:hover { background: rgba(0,0,0,.05); }
.picker-tw.open { transform: rotate(90deg); }
.picker-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: none; background: transparent; color: var(--ink); padding: 7px 8px; border-radius: 6px; cursor: pointer;
}
.picker-opt.flex1 { flex: 1; min-width: 0; }
.picker-opt span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-opt small { margin-left: auto; color: var(--muted-2); font-size: 11px; flex: 0 0 auto; }
.picker-opt:hover { background: rgba(36,86,166,.08); }
.picker-opt.on { background: rgba(245,179,1,.16); font-weight: 600; }
.picker-empty { padding: 12px; text-align: center; }
.row-clickable:hover td { background: rgba(36,86,166,.05); }

/* ---------- kayıt detay penceresi (birleşik yapı) ---------- */
.rd { display: flex; flex-direction: column; gap: 14px; }
.rd-title { font-size: 20px; margin: 0; line-height: 1.25; word-break: break-word; }
.rd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: -6px; font-size: 12.5px; color: var(--muted); }
.rd-crumb { background: var(--paper); border: 1px solid var(--line); padding: 2px 8px; border-radius: 5px; }
.rd-crumb-sep { color: var(--muted-2); }
.rd-desc { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; line-height: 1.5; }
.rd-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rd-badge-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.rd-progress { display: flex; align-items: center; gap: 12px; }
.rd-progress .bar { flex: 1; }
.rd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.rd-photo { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--paper); }
.rd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 12px;
}
.rd-meta b { color: var(--ink-2); font-weight: 600; }
.rd-actions { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 0; }

/* fotoğraf büyütme katmanı (kayıt detayının üstünde) */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(10,13,17,.86);
  display: grid; place-items: center; padding: 24px; animation: fade .15s;
}
.lightbox-img { max-width: 96vw; max-height: 92vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: fixed; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.28); }

@media (max-width: 480px) {
  .rd-title { font-size: 18px; }
  .rd-gallery { grid-template-columns: repeat(3, 1fr); }
  .rd-meta { flex-direction: column; gap: 4px; }
}

/* ---------- puantaj (aylık çizelge) ---------- */
.puantaj-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.puantaj-month { min-width: 110px; text-align: center; font-size: 14px; }
.puantaj-note { margin: -6px 0 10px; }
.flip-h { display: inline-grid; transform: rotate(180deg); }

.puantaj-scroll { max-width: 100%; cursor: grab; }
.puantaj-scroll.grabbing { cursor: grabbing; user-select: none; }
.puantaj-grid th, .puantaj-grid td { padding: 7px 8px; }
.puantaj-actions { display: flex; align-items: center; gap: 6px; }
.puantaj-grid th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.puantaj-grid th.sortable:active { color: var(--ink); }

/* sabit sütunlar: isim + dal, ayırt edici koyu zemin */
.puantaj-grid .sticky-col {
  position: sticky; left: 0; z-index: 2;
  background: #ECEAE3; min-width: 160px; max-width: 160px;
}
.puantaj-grid .sticky-col2 {
  position: sticky; left: 160px; z-index: 2;
  background: #ECEAE3; min-width: 100px; max-width: 100px;
  box-shadow: 1px 0 0 var(--line-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.puantaj-grid thead .sticky-col,
.puantaj-grid thead .sticky-col2 { z-index: 3; background: #E5E3DB; }

/* satır hover'ında sabit sütunlar asla saydamlaşmasın */
.puantaj-grid tbody tr:hover td { background: transparent; }
.puantaj-grid tbody tr:hover .sticky-col,
.puantaj-grid tbody tr:hover .sticky-col2 { background: #E7E5DD; }
.puantaj-grid tbody tr:hover td.wend { background: rgba(23,29,36,.04); }
.puantaj-grid tbody tr:hover td.today { background: rgba(245,179,1,.1); }

@media (max-width: 600px) {
  .puantaj-grid .sticky-col { min-width: 124px; max-width: 124px; }
  .puantaj-grid .sticky-col2 { left: 124px; min-width: 78px; max-width: 78px; }
}
.puantaj-grid .pj-not { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puantaj-grid .pj-alan { white-space: nowrap; }

.puantaj-grid .day-col { min-width: 34px; padding: 5px 2px; text-align: center; }
.day-num { font-size: 12px; }
.day-name { font-size: 9px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .03em; }
.puantaj-grid th.wend, .puantaj-grid td.wend { background: rgba(23,29,36,.04); }
.puantaj-grid th.today { background: rgba(245,179,1,.3); }
.puantaj-grid td.today { background: rgba(245,179,1,.1); }

.pj-cell {
  text-align: center; min-width: 34px; height: 36px;
  color: var(--ok); font-weight: 700; font-size: 14px; cursor: default;
}
.pj-cell.editable { cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 5px; }
.pj-cell.editable.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pj-cell.on.editable { box-shadow: inset 0 0 0 1px rgba(46,125,70,.4); }

.pj-line { padding: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- ikonlar / butonlar ---------- */
.ic { display: block; flex: 0 0 auto; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink-2);
  transition: all .13s;
}
.icon-btn:hover { border-color: var(--muted-2); background: #fff; }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 6px; }
.icon-btn.accent { background: var(--accent); border-color: transparent; color: var(--ink); }
.icon-btn.accent:hover { filter: brightness(1.05); }
.icon-btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: rgba(0,0,0,.05); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink);
  font-weight: 550; transition: all .13s;
}
.btn:hover { border-color: var(--muted-2); background: #fff; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #000; }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.danger:hover { filter: brightness(1.05); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   Ağaç (proje yapısı)
   ============================================================ */
.tree-search-wrap {
  display: flex; align-items: center; gap: 7px;
  margin: 10px 12px 6px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--paper-2); color: var(--muted);
}
.tree-search {
  flex: 1; border: none; background: transparent; outline: none;
  padding: 8px 0; color: var(--ink);
}
.tree-list { flex: 1; overflow: auto; padding: 10px 10px 16px; background: var(--paper); }

.tree-node { position: relative; }
.tree-row {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 5px calc(var(--depth, 0) * 14px);
  padding: 8px 8px;
  border: 1px solid var(--line); border-left: 3px solid var(--tc, var(--line-2));
  border-radius: 8px; background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(23,29,36,.05);
  position: relative; user-select: none;
}
.tree-row.selected {
  background: rgba(245,179,1,.12);
  border-color: var(--accent); border-left-color: var(--accent);
}
.tree-row:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.tree-row.dragging { opacity: .4; }
.tree-row.drop-inside { background: rgba(36,86,166,.12); border-color: var(--info); }
.tree-row.drop-before::before,
.tree-row.drop-after::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--info);
}
.tree-row.drop-before::before { top: -4px; }
.tree-row.drop-after::after { bottom: -4px; }

.twisty {
  width: 18px; height: 18px; flex: 0 0 18px; border: none; background: transparent;
  color: var(--muted); display: grid; place-items: center; border-radius: 4px;
  transition: transform .13s;
}
.twisty:hover { background: rgba(0,0,0,.06); }
.twisty.open { transform: rotate(90deg); }
.twisty.hidden { visibility: hidden; }
.type-ic { display: inline-grid; place-items: center; flex: 0 0 auto; }
.type-ic.lg { width: 30px; height: 30px; }
.tree-name {
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500;
}
.lock { color: var(--muted-2); display: inline-grid; place-items: center; }
.row-actions {
  display: flex; gap: 2px; align-items: center;
}
.root-drop {
  margin: 8px 4px 0; padding: 12px; text-align: center; font-size: 12px; color: var(--muted-2);
  border: 1.5px dashed var(--line-2); border-radius: 8px; transition: all .13s;
}
.root-drop.over { border-color: var(--info); color: var(--info); background: rgba(36,86,166,.06); }

.empty-note { padding: 26px 18px; text-align: center; color: var(--muted); }
.empty-note p { margin: 4px 0; }

/* ============================================================
   Akış (feed)
   ============================================================ */
.live-dot {
  margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(46,125,70,.5); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,125,70,.45); }
  70% { box-shadow: 0 0 0 7px rgba(46,125,70,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,125,70,0); }
}
.feed-list { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.post {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; box-shadow: var(--shadow);
}
.post.announcement {
  border-color: rgba(245,179,1,.55); background: linear-gradient(0deg, #fffdf5, #fffbe9);
  position: relative; overflow: hidden; padding-left: 16px;
}
.post.announcement::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--ink) 6px 12px);
}
.post-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.post-head strong { color: var(--ink); font-size: 12.5px; }
.post-head time { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.post.announcement .post-head time { margin-left: 8px; }
.ann-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; color: var(--accent-ink); background: var(--accent);
  padding: 2px 6px; border-radius: 4px;
}
.post-body { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; }
.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

.feed-composer { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 10px 12px; background: var(--paper-2); position: relative; }
.tag-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tag-bar.hidden { display: none; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(36,86,166,.1); color: var(--info); border: 1px solid rgba(36,86,166,.25);
  padding: 2px 7px; border-radius: 20px; font-size: 12px;
}
.tag-chip.clickable { cursor: pointer; }
.tag-chip.clickable:hover { background: rgba(36,86,166,.18); }
.chip-x { border: none; background: transparent; color: inherit; display: grid; place-items: center; padding: 0; }
.composer-row { display: flex; align-items: flex-end; gap: 7px; position: relative; }
.feed-input {
  flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 8px 10px; outline: none; background: #fff; color: var(--ink); min-height: 38px;
}
.feed-input:focus { border-color: var(--info); }

.tag-picker {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 40; padding: 8px; max-height: 300px; display: flex; flex-direction: column;
}
.tag-search { border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px; outline: none; margin-bottom: 6px; }
.tag-search:focus { border-color: var(--info); }
.tag-results { overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.tag-option {
  display: flex; align-items: center; gap: 8px; text-align: left;
  border: none; background: transparent; padding: 7px 8px; border-radius: 6px; color: var(--ink);
}
.tag-option:hover { background: rgba(36,86,166,.1); }
.tag-option small { margin-left: auto; color: var(--muted-2); font-size: 11px; }

/* ============================================================
   Detay paneli
   ============================================================ */
.detail-head { padding: 20px 24px 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin: 12px 0 0; }
.crumb {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink-2);
  padding: 4px 10px; border-radius: 5px; font-weight: 500;
}
button.crumb:hover { border-color: var(--info); color: var(--info); background: #fff; }
.crumb.current { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.crumb-sep { color: var(--muted-2); }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h1 { font-size: 22px; }
.type-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid; padding: 2px 8px; border-radius: 20px;
}

.tabs {
  display: flex; gap: 2px; padding: 16px 24px 0; border-bottom: 1px solid var(--line);
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent; color: var(--muted); font-weight: 550;
  padding: 9px 12px; border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  white-space: nowrap; flex: 0 0 auto;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count {
  font-size: 11px; background: var(--line); color: var(--muted); padding: 1px 6px; border-radius: 10px;
}
.tab.active .count { background: var(--accent); color: var(--ink); }
.tab-body { padding: 16px 24px 40px; }
.tab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

/* ---------- tablo ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--paper);
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(23,29,36,.02); }
.row-tools { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.row-tools .meta { color: var(--muted-2); font-size: 11px; margin-right: 4px; }
.row-muted { opacity: .55; }
.progress-cell { min-width: 130px; }
.progress-cell .bar { display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; }
.bar { height: 7px; background: var(--line); border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #ffca3a); border-radius: 20px; transition: width .3s; }
.bar.big { height: 10px; margin: 8px 0; }

/* ---------- durum çipleri ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap;
}
.chip-ok { background: rgba(46,125,70,.13); color: var(--ok); }
.chip-bad { background: rgba(193,53,43,.12); color: var(--bad); }
.chip-warn { background: rgba(199,122,10,.14); color: var(--warn); }
.chip-info { background: rgba(36,86,166,.12); color: var(--info); }
.chip-muted { background: rgba(91,100,114,.12); color: var(--muted); }

/* ============================================================
   Genel bakış (dashboard)
   ============================================================ */
.dashboard { padding-bottom: 40px; }
.dash-title { font-size: 24px; margin-bottom: 6px; }
.detail-head .hint { max-width: 640px; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; padding: 20px 24px;
}
.stat-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.stat-card strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-card.wide { grid-column: span 2; }
.stat-card.alert { border-color: rgba(193,53,43,.4); background: linear-gradient(0deg, #fff8f7, #fff); }

.activity { padding: 4px 24px 0; }
.activity h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.activity-list li {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.activity-list time { color: var(--muted-2); font-size: 11px; flex: 0 0 auto; min-width: 60px; }
.act-detail { color: var(--muted); }

/* ============================================================
   Modal
   ============================================================ */
.overlay {
  position: fixed; inset: 0; background: rgba(23,29,36,.5);
  display: grid; place-items: center; padding: 20px; z-index: 100;
  animation: fade .15s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--paper-2); border-radius: 14px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; animation: pop .18s;
}
.modal-wide { max-width: 860px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper-2);
}
.modal-head h3 { font-size: 16px; }
.modal > div:not(.modal-head), .modal > form { padding: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirm-text { margin: 0 0 4px; }

/* ---------- form ---------- */
.gen-form, .field { display: flex; flex-direction: column; gap: 5px; }
.field { margin-bottom: 13px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-label em { color: var(--bad); font-style: normal; }
.field input, .field select, .field textarea,
.gen-form input, .gen-form select, .gen-form textarea {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px;
  outline: none; background: #fff; color: var(--ink); width: 100%; transition: border-color .13s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.gen-form input:focus, .gen-form select:focus, .gen-form textarea:focus { border-color: var(--info); }
textarea { resize: vertical; }
.check-line { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.check-line input { width: auto; }
.role-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 13px; background: var(--paper); }
.role-box.hidden { display: none; }
.role-add { display: flex; gap: 8px; margin-bottom: 14px; }
.role-add input { flex: 1; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; outline: none; }
.role-add input:focus { border-color: var(--info); }
.role-list { list-style: none; margin: 0; padding: 0; }
.role-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.role-list li span:first-of-type { flex: 1; }
.admin-body { min-height: 300px; }

/* ---------- giriş / kurulum ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--paper); }
.auth-card {
  width: 100%; max-width: 400px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-head { padding: 26px 28px 22px; position: relative; }
.auth-head.hazard-under { padding-bottom: 24px; }
.auth-brand {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.auth-logo {
  width: 44px; height: 44px; border-radius: 12px; background: var(--ink);
  display: grid; place-items: center; color: var(--accent);
  flex: 0 0 44px;
}
.auth-head h1 {
  font-size: 20px; margin: 0; line-height: 1.25;
  flex: 1 1 auto; min-width: 0;
}
.auth-head p { color: var(--muted); margin: 10px 0 0; font-size: 13px; }
.auth-body { padding: 22px 28px 28px; }
.auth-body .btn.primary { width: 100%; margin-top: 6px; padding: 11px; }
.auth-error {
  background: rgba(193,53,43,.1); color: var(--bad); border: 1px solid rgba(193,53,43,.3);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 14px;
}
.remember-line { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.remember-line input { width: auto; }
.auth-consent { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.auth-consent a { color: var(--info); font-weight: 600; text-decoration: underline; }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted-2); padding: 0 28px 22px; }

/* ============================================================
   Toast
   ============================================================ */
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 22px;
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500; animation: toastin .2s;
  border-left: 4px solid var(--muted);
}
.toast-ok { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--bad); }
.toast-info { border-left-color: var(--info); }
.toast.out { animation: toastout .3s forwards; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } }
@keyframes toastout { to { transform: translateY(12px); opacity: 0; } }

/* ============================================================
   Duyarlı (responsive)
   ============================================================ */
/* Hamburger yalnızca mobilde görünür */
.hamburger { display: none; }

/* --- orta genişlik: proje ağacını biraz daralt --- */
@media (max-width: 1200px) {
  .workspace { grid-template-columns: 300px minmax(0, 1fr); }
}

/* --- masaüstü: günlük akış açılır-kapanır sağ panel (topbar butonuyla) --- */
@media (min-width: 961px) {
  .feed-panel {
    position: fixed; top: 56px; right: 0; bottom: 0;
    width: min(400px, 92vw); z-index: 45;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .28s ease; will-change: transform;
  }
  .app-shell.feed-open .feed-panel { transform: translateX(0); }

  .scrim {
    display: block; position: fixed; inset: 56px 0 0; z-index: 40;
    background: rgba(23,29,36,.35); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .app-shell.feed-open .scrim { opacity: 1; pointer-events: auto; }

  .app-shell.feed-open .feed-toggle-btn {
    background: var(--accent); color: var(--ink); border-color: transparent;
  }
}

/* --- mobil / tablet: tek sütun + çekmece + akış balonu --- */
@media (max-width: 960px) {
  .hamburger { display: inline-grid; place-items: center; }
  /* mobilde akış yüzen FAB ile açılır; topbar butonu gizli */
  .feed-toggle-btn { display: none; }

  /* yatay taşmayı kökten engelle */
  html, body { overflow-x: hidden; }

  /* topbar sıkıştırma */
  .topbar { gap: 6px; padding: 0 8px; flex-wrap: nowrap; min-width: 0; }
  .top-user { display: none; }
  .brand small { display: none; }
  .brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .topbar-spacer { display: none; }
  .top-btn { padding: 7px 8px; flex: 0 0 auto; }
  .top-btn .btn-label { display: none; }
  /* eski app.js ile bile çalışsın: buton içi metni tamamen gizle, ikon (sabit px) kalır */
  .top-btn.accent { font-size: 0; gap: 0; }

  /* detay ana içerik olur, tek sütun */
  .workspace { display: block; }
  .detail-col { height: 100%; overflow: auto; }

  /* proje ağacı: soldan açılır çekmece */
  .tree-panel {
    position: fixed; top: 56px; left: 0; bottom: 0; width: min(86vw, 340px);
    z-index: 45; border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .app-shell.tree-open .tree-panel { transform: translateX(0); }

  /* günlük akış: sağ alttan açılan panel (canlı destek tarzı) */
  .feed-panel {
    position: fixed; z-index: 45; border: 1px solid var(--line);
    right: 12px; bottom: 12px; left: 12px; top: 68px;
    max-width: 460px; margin-left: auto;
    border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg);
    transform: translateY(calc(100% + 24px)); opacity: 0;
    transition: transform .28s ease, opacity .2s ease; pointer-events: none;
  }
  .app-shell.feed-open .feed-panel { transform: translateY(0); opacity: 1; pointer-events: auto; }

  /* perde */
  .scrim {
    display: block; position: fixed; inset: 56px 0 0; z-index: 40;
    background: rgba(23,29,36,.4); opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .app-shell.tree-open .scrim,
  .app-shell.feed-open .scrim { opacity: 1; pointer-events: auto; }

  /* yüzen akış butonu */
  .feed-fab {
    display: inline-grid; place-items: center;
    position: fixed; right: 18px; bottom: 18px; z-index: 46;
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--accent); color: var(--ink); border: none;
    box-shadow: 0 6px 20px rgba(23,29,36,.28);
  }
  .app-shell.feed-open .feed-fab { background: var(--ink); color: #fff; }
  .feed-fab:active { transform: scale(.94); }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; padding: 14px; }
  .stat-card.wide { grid-column: span 2; }
  .detail-head { padding: 16px 16px 0; }
  .tabs, .tab-body { padding-left: 16px; padding-right: 16px; }
  .filter-bar, .filter-count, .filter-results { padding-left: 16px; padding-right: 16px; }
  .filter-kinds { margin-left: 16px; margin-right: 16px; }
  .feed-panel { left: 8px; right: 8px; bottom: 8px; }
  .field-row { flex-direction: column; gap: 0; }
  .child-grid { grid-template-columns: 1fr 1fr; }

  /* araç çubukları taşmasın */
  .tab-toolbar { flex-wrap: wrap; gap: 8px; }
  .tab-toolbar .btn { flex: 0 0 auto; }

  /* modal butonları sığsın (kayıt detayı vb.) */
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 auto; justify-content: center; }
  .detail-photo { width: 84px; height: 84px; }
  .detail-key { min-width: 74px; }
}

/* akış açıkken yüzen buton üste taşınır (gönder butonuna binmez, kapatma görevi görür) */
@media (max-width: 960px) {
  .app-shell.feed-open .feed-fab {
    top: 64px; bottom: auto; right: 20px;
    background: var(--ink); color: #fff;
  }
}
.post { cursor: pointer; }

/* ---------- akış mesaj balonu ---------- */
.post.bubble {
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2);
  padding: 10px 12px; box-shadow: 0 1px 2px rgba(23,29,36,.05);
}
.post.bubble.record { border-left: 4px solid var(--muted); }
.post.bubble.record.sc-ok { border-left-color: var(--ok); }
.post.bubble.record.sc-bad { border-left-color: var(--bad); }
.post.bubble.record.sc-warn { border-left-color: var(--warn); }
.post.bubble.record.sc-info { border-left-color: var(--info); }
.post.bubble.record.sc-muted { border-left-color: var(--muted); }
.post.bubble .post-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.post.bubble .post-head::-webkit-scrollbar { display: none; }
.post-user { display: inline-flex; align-items: center; gap: 5px; color: var(--info); flex: 0 1 auto; min-width: 0; }
.post-user strong { color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.post.bubble time { margin-left: auto; color: var(--muted-2); font-size: 11px; font-family: var(--mono); flex: 0 0 auto; }
.post-del { flex: 0 0 auto; }
.post.bubble .post-body { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; line-height: 1.45; font-weight: 600; }
.post-desc { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; line-height: 1.45; color: var(--muted); font-size: 13px; }
.feed-filter { display: flex; width: auto; margin: 10px 12px 0; flex-wrap: nowrap; padding: 3px; gap: 2px; }
.feed-filter .radio-pill { flex: 1 1 0; min-width: 0; padding: 6px 4px; font-size: 12px; border-radius: 7px; overflow: hidden; text-overflow: ellipsis; }
.post-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.pc-item { font-size: 11.5px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; }
.pc-sep { color: var(--muted-2); font-size: 11px; }
