/* ==================================================================
   Ajansly örnek UI · layout.css
   Tam ekran düzen (ortalanmış container yok): her sayfa ekranın
   tamamını kullanır, 1920x1080'de sayfa düzeyinde kaydırma olmaz;
   uzun içerik panel içinde kayar. Detay sayfaları, Bugün paneli.
================================================================== */
.page { padding: 20px 24px 24px; }
.page.fill { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex: none; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; letter-spacing: -.02em; margin: 0; }
.page-head p { margin: 2px 0 0; color: var(--text-2); }
.page-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Detay kabuğu: modal ve tam sayfa aynı iskeleti kullanır */
.pm-inner.full { width: 100%; height: 100%; border-radius: 0; box-shadow: none; animation: none; }
.pm-inner.full .pm-top { padding: 18px 24px 16px; }
.pm-inner.full .pm-tabs { padding-left: 24px; }
.pm-inner.full .pm-scroll { padding: 22px 28px 32px; }
.pm-inner.full .pm-aside { width: 340px; padding: 22px 24px; }
.pm-inner.full .pm-title { font-size: 1.75rem; }
.crumb { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: var(--text-2); }
.crumb a { color: var(--text-2); text-decoration: none; border-radius: 4px; white-space: nowrap; }
.crumb a:hover { color: var(--text); }
.crumb strong { color: var(--text); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb svg.i { width: 14px; height: 14px; color: var(--text-3); flex: none; }

/* Yorum / not akışı: liste kayar, yazma alanı hep en altta */
.pm-scroll.flow { display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }
.flow-list { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 12px; display: flex; flex-direction: column; }
.flow-list > .empty-state { margin: auto; }
.flow-list > .comments { margin: 0; }
.flow-compose { flex: none; padding: 12px 22px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.pm-inner.full .flow-list { padding: 22px 28px 12px; }
.pm-inner.full .flow-compose { padding: 12px 28px 18px; }

/* Anahtar-değer ve özet şeridi */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 9px 12px; font-size: 13px; align-items: center; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; min-width: 0; }
.strip { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: var(--surface-2); border-radius: var(--r-l); overflow: hidden; flex: none; }
.strip > * { all: unset; box-sizing: border-box; display: grid; gap: 2px; padding: 14px 18px; cursor: pointer; transition: background-color 120ms ease; min-width: 0; }
.strip > * + * { box-shadow: inset 1px 0 0 var(--line); }
.strip > *:hover { background: var(--hover); }
.strip > *:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.strip b { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.strip span { font-size: 13px; font-weight: 600; }
.strip small { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip .red b { color: var(--red); } .strip .orange b { color: var(--orange); } .strip .accent b { color: var(--accent); } .strip .green b { color: var(--green); }
.strip.static > * { cursor: default; }
.strip.static > *:hover { background: none; }

/* Panel */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.panel-head .n { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.panel-head .tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.panel-head .segmented button { height: 24px; font-size: 12px; padding: 0 10px; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; }
.panel-empty { padding: 28px 16px; text-align: center; color: var(--text-2); font-size: 13px; }

/* Bugün */
.dash { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 16px; padding: 20px 24px 24px; overflow: hidden; }
.dash-head { display: flex; align-items: flex-end; gap: 12px; }
.dash-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.dash-head p { margin: 3px 0 0; color: var(--text-2); }
.dash-head .tools { margin-left: auto; display: flex; gap: 8px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, .9fr); gap: 16px; min-height: 0; }
.dash-col { display: grid; gap: 16px; min-height: 0; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.dash-col.auto-first { grid-template-rows: auto minmax(0, 1fr); }
.ag-group + .ag-group { border-top: 1px solid var(--line); }
.ag-gh { position: sticky; top: 0; z-index: 1; display: flex; gap: 6px; align-items: baseline; padding: 10px 16px 5px; font-size: 12px; font-weight: 650; color: var(--text-2); background: var(--surface); }
.ag-gh.red { color: var(--red); }
.ag-gh span { font-weight: 500; color: var(--text-3); }
.ag-row { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 44px 8px minmax(0, 1fr) auto auto 50px; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; transition: background-color 100ms ease; }
.ag-row:hover, .li-row:hover { background: var(--hover); }
.ag-row:focus-visible, .li-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ag-time { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ag-main { min-width: 0; }
.ag-main strong { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-main span { display: block; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row .due { font-size: 12.5px; text-align: right; }
.ag-row .avatars { justify-content: flex-end; }
.li-row { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; cursor: pointer; transition: background-color 100ms ease; }
.li-row + .li-row { border-top: 1px solid var(--line); }
.li-row .ag-main { flex: 1; }
.li-row .thumb { grid-row: auto; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px 12px 12px; }
.week button { all: unset; box-sizing: border-box; display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; cursor: pointer; transition: background-color 100ms ease; }
.week button:hover { background: var(--hover); }
.week button:focus-visible { outline: 2px solid var(--accent); }
.week .wd { font-size: 11px; color: var(--text-3); font-weight: 600; }
.week .dn { font-size: 15px; font-weight: 650; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.week .today .dn { background: var(--accent); color: var(--on-accent); }
.week .past { opacity: .5; }
.week .cnt { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.week .pips { min-height: 8px; flex-wrap: wrap; justify-content: center; max-width: 40px; }
.load { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; padding: 10px 16px; }
.load + .load { border-top: 1px solid var(--line); }
.load .who strong { font-size: 13px; font-weight: 600; display: block; }
.load .who span { font-size: 12px; color: var(--text-2); }
.load .meter { grid-column: 2 / 4; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; display: flex; gap: 1px; }
.load .meter i { display: block; height: 100%; }
.load .cnt { font-size: 12.5px; color: var(--text-2); text-align: right; white-space: nowrap; }
.load .cnt b { color: var(--text); font-size: 14px; }

/* Ekranı dolduran takvim */
.page.fill .month { flex: 1; min-height: 0; grid-template-rows: auto repeat(6, minmax(0, 1fr)); }
.page.fill .month .day { min-height: 0; overflow: hidden; }
.month .day .evs { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; min-height: 0; }

/* Tablo sayfaları */
.grid tbody tr.click { cursor: pointer; transition: background-color 100ms ease; }
.grid tbody tr.click:hover { background: var(--hover); }
.grid tbody tr.click:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.grid .excerpt { color: var(--text-2); font-size: 12.5px; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid td .row-actions { justify-content: flex-end; }
.grid .cell-inline { display: inline-flex; align-items: center; gap: 7px; }
.page.fill .table-wrap { padding: 0; flex: 1; min-height: 0; }
.tile.click { cursor: pointer; border: 1px solid transparent; transition: border-color 120ms ease, background-color 120ms ease; display: flex; flex-direction: column; }
.tile.click:hover { border-color: var(--line-strong); }
.tile.click:focus-visible { outline: 2px solid var(--accent); }
.page.fill .cards-grid { overflow-y: auto; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-content: start; }

/* Detay içi parçalar */
.big-quota { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.contact { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; }
.contact + .contact { border-top: 1px solid var(--line); }
.contact .main-txt strong { display: inline; font-size: 13.5px; }
.contact .c-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact .c-sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.contact .main-txt a { color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }
.contact .main-txt a:hover { color: var(--accent); }
.contact .main-txt svg.i { width: 12px; height: 12px; }
.callout { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-m); background: var(--surface-2); flex-wrap: wrap; }
.callout .txt { flex: 1; min-width: 200px; font-size: 13px; }
.callout .txt strong { display: block; font-size: 13.5px; }
.callout .txt span { color: var(--text-2); }
.form-row { display: grid; grid-template-columns: 170px 90px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.form-row.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.aside-btn { width: 100%; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

/* "i" ipucu ikonu ve tooltip: açıklamalar burada, ekranda değil */
.hint-i { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; margin-left: 2px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: help; vertical-align: -3px; transition: color 120ms ease; }
.hint-i svg.i { width: 15px; height: 15px; }
.hint-i:hover, .hint-i:focus-visible { color: var(--accent); }
.tip { position: fixed; z-index: 3000; max-width: 300px; padding: 8px 11px; border-radius: 9px; background: var(--toast-bg); color: var(--toast-text); font-size: 12.5px; line-height: 1.45; font-weight: 450; box-shadow: var(--shadow-lift); pointer-events: none; animation: tip-in 120ms var(--ease-out); }
@keyframes tip-in { from { opacity: 0; transform: translateY(-2px); } }
.tip.instant { animation: none; }

/* ------------------------------------------------------------------
   Renk tonları: etiket, avatar, sektör ve durum rozetleri için yumuşak,
   iki temada da göz yormayan tonlar. JS her .tag / .avatar'a data-tone verir.
------------------------------------------------------------------- */
:root {
  --t-blue-bg: #e7effd;   --t-blue: #1d55c0;
  --t-purple-bg: #f0eafc; --t-purple: #6a3dc0;
  --t-pink-bg: #fbe8f0;   --t-pink: #b02566;
  --t-teal-bg: #e0f3f0;   --t-teal: #0e6f67;
  --t-amber-bg: #fcf0d9;  --t-amber: #925600;
  --t-green-bg: #e4f4e8;  --t-green: #1a7536;
  --t-red-bg: #fce7e5;    --t-red: #b42318;
  --t-gray-bg: #ededf0;   --t-gray: #55555c;
}
:root[data-theme="dark"] {
  --t-blue-bg: rgba(110,150,255,.17);  --t-blue: #a6bfff;
  --t-purple-bg: rgba(167,139,250,.17); --t-purple: #c8b8fd;
  --t-pink-bg: rgba(244,114,182,.16);  --t-pink: #f6a9cf;
  --t-teal-bg: rgba(45,212,191,.14);   --t-teal: #6ee0cf;
  --t-amber-bg: rgba(251,191,36,.14);  --t-amber: #f5cf6b;
  --t-green-bg: rgba(74,222,128,.14);  --t-green: #8fe3a8;
  --t-red-bg: rgba(248,113,113,.16);   --t-red: #fca5a5;
  --t-gray-bg: rgba(255,255,255,.09);  --t-gray: #c7c7cc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t-blue-bg: rgba(110,150,255,.17);  --t-blue: #a6bfff;
    --t-purple-bg: rgba(167,139,250,.17); --t-purple: #c8b8fd;
    --t-pink-bg: rgba(244,114,182,.16);  --t-pink: #f6a9cf;
    --t-teal-bg: rgba(45,212,191,.14);   --t-teal: #6ee0cf;
    --t-amber-bg: rgba(251,191,36,.14);  --t-amber: #f5cf6b;
    --t-green-bg: rgba(74,222,128,.14);  --t-green: #8fe3a8;
    --t-red-bg: rgba(248,113,113,.16);   --t-red: #fca5a5;
    --t-gray-bg: rgba(255,255,255,.09);  --t-gray: #c7c7cc;
  }
}
[data-tone="blue"] { --tone-bg: var(--t-blue-bg); --tone: var(--t-blue); }
[data-tone="purple"] { --tone-bg: var(--t-purple-bg); --tone: var(--t-purple); }
[data-tone="pink"] { --tone-bg: var(--t-pink-bg); --tone: var(--t-pink); }
[data-tone="teal"] { --tone-bg: var(--t-teal-bg); --tone: var(--t-teal); }
[data-tone="amber"] { --tone-bg: var(--t-amber-bg); --tone: var(--t-amber); }
[data-tone="green"] { --tone-bg: var(--t-green-bg); --tone: var(--t-green); }
[data-tone="red"] { --tone-bg: var(--t-red-bg); --tone: var(--t-red); }
[data-tone="gray"] { --tone-bg: var(--t-gray-bg); --tone: var(--t-gray); }
.avatar[data-tone], .tag[data-tone] { background: var(--tone-bg); color: var(--tone); }
.tag[data-tone] { border-color: transparent; }
.tag[data-tone] button { color: inherit; opacity: .7; }
.tag[data-tone] button:hover { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.badge.accent { background: var(--t-blue-bg); color: var(--t-blue); }
.badge.green { background: var(--t-green-bg); color: var(--t-green); }
.badge.orange { background: var(--t-amber-bg); color: var(--t-amber); }
.badge.red { background: var(--t-red-bg); color: var(--t-red); }
.badge.purple { background: var(--t-purple-bg); color: var(--t-purple); }
.badge.muted { background: var(--t-gray-bg); color: var(--t-gray); }

/* Başlıktaki görünüm/durum seçicileri */
.seg-n { min-width: 18px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--t-blue-bg); color: var(--t-blue); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.segmented button[aria-pressed="false"] .seg-n { background: var(--t-gray-bg); color: var(--t-gray); }
.toolbar .status-switch { margin-left: 4px; }
.toolbar .view-switch + .status-switch { margin-left: 2px; padding-left: 2px; }
.segmented.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }

/* ------------------------------------------------------------------
   Yarı koyu tema: menü (kenar çubuğu) koyu, içerik açık
------------------------------------------------------------------- */
:root[data-chrome="dark"] .sidebar {
  color-scheme: dark;
  --bg: #18181b; --sidebar: #18181b; --surface: #26262a; --field: #222226; --thumb: #36363b;
  --hover: rgba(255,255,255,.07); --selected: rgba(110,150,255,.20);
  --line: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.16);
  --text: #f2f2f4; --text-2: #a9a9b0; --text-3: #8b8b92;
  --accent: #8aaaff; --on-accent: #0b1a3d;
  --t-blue-bg: rgba(110,150,255,.20);  --t-blue: #a6bfff;
  --t-purple-bg: rgba(167,139,250,.20); --t-purple: #c8b8fd;
  --t-pink-bg: rgba(244,114,182,.18);  --t-pink: #f6a9cf;
  --t-teal-bg: rgba(45,212,191,.16);   --t-teal: #6ee0cf;
  --t-amber-bg: rgba(251,191,36,.16);  --t-amber: #f5cf6b;
  --t-gray-bg: rgba(255,255,255,.10);  --t-gray: #c7c7cc;
  background: var(--sidebar); color: var(--text); border-right-color: rgba(0,0,0,.4);
}

@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .dash-grid > :first-child { grid-row: span 2; }
}
@media (max-width: 760px) {
  .toolbar { overflow-x: auto; scrollbar-width: none; }
  .toolbar .status-switch .seg-n, .toolbar > .hint-i { display: none; }
  /* Dar ekranda düğmeler ezilmez (yuvarlak + düğmesi oval olmasın); yer kalmazsa yalnız sekme grubu kendi içinde kayar */
  .toolbar > * { flex-shrink: 0; }
  .dash { height: auto; overflow: visible; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .content:has(.dash) { overflow-y: auto; }
  .dash-grid, .dash-col { grid-template-columns: 1fr; grid-template-rows: none; }
  .dash-grid > :first-child { grid-row: auto; }
  .panel-body { max-height: 420px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > * + * { box-shadow: none; }
  .dash-head .tools { display: none; }
  .page.fill { overflow-y: auto; }
  .page.fill .month { flex: none; }
  .big-quota, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .pm-inner.full .pm-aside { width: 100%; }
  .pm-inner.full .pm-scroll { padding: 18px 16px 24px; }
  .grid .excerpt { max-width: 200px; }
  .ag-row { grid-template-columns: 40px 8px minmax(0, 1fr) auto; }
  .ag-row .avatars, .ag-row .prio { display: none; }
}

/* Bildirim zili ve kategori sekmeli panel */
.notif-btn { position: relative; }
.bell-n { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.pop.notif-pop { width: 420px; max-width: min(440px, calc(100vw - 16px)); }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 6px 14px; }
.notif-head strong { flex: 1; font-size: 14px; }
.notif-tabs { display: flex; gap: 2px; padding: 4px 8px 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.notif-tabs button { border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.notif-tabs button:hover { background: var(--hover); color: var(--text); }
.notif-tabs button[aria-selected="true"] { background: var(--selected); color: var(--accent); font-weight: 600; }
.notif-list { max-height: 420px; overflow-y: auto; padding: 4px; }
.notif { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 8px 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.4; }
.notif:hover { background: var(--hover); }
.notif:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.notif .ndot { width: 7px; height: 7px; border-radius: 50%; margin-top: 11px; }
.notif.unread .ndot { background: var(--accent); }
.notif:not(.unread) .ntext { color: var(--text-2); }
.notif .ncat { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); }
.notif time { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.notif-foot { border-top: 1px solid var(--line); padding: 6px 8px; display: flex; justify-content: flex-end; }
/* Talep sınıflandırma */
.cls-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 150px; gap: 12px; }
@media (max-width: 760px) { .cls-grid { grid-template-columns: 1fr; } }

/* ---------- Katalog ve paket hakları ---------- */
.bar.thin { height: 4px; margin: 0; gap: 1px; }
.sub-groups { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding-bottom: 24px; }
.sub-group .block-head { margin-bottom: 10px; }
.sub-group .block-head h3 { font-size: 14px; }
.page.fill .sub-group .cards-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sub-lines { display: grid; gap: 8px; margin-top: 12px; }
.sub-line { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 4px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.sub-line .bar { grid-column: 1 / -1; }
.sub-line .num { color: var(--text); font-weight: 600; }
.pkg-cell { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.pkg-chip { display: grid !important; gap: 4px; width: 100%; height: auto !important; text-align: left; padding: 4px 6px !important; }
.pkg-chip .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deliv-top .tag { flex: none; }
.pkg-chip { justify-content: stretch !important; justify-items: stretch; align-items: stretch !important; width: 100% !important; max-width: 280px; }
.sub-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.sub-group:first-child { border-top: 0; padding-top: 2px; }
.sub-group > .block-head { flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; }
.sub-group > .block-head .meta { margin: 0; }
.sub-group > .block-head .btn { margin: 8px 0 0 -8px !important; }
@media (max-width: 760px) { .sub-group { grid-template-columns: 1fr; gap: 10px; } }
.img-thumb { width: 44px; height: 44px; border-radius: var(--r-s, 8px); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--text-3); }
.img-thumb img { width: 100%; height: 100%; object-fit: contain; }
.img-thumb.sm { width: 26px; height: 26px; border-radius: 6px; }

/* ---------- Social ---------- */
.plat { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; flex: none; background: var(--tone-bg); color: var(--tone); }
.plat.lg { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding-bottom: 20px; }
.wk-day { display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); border-radius: var(--r-m); overflow: hidden; }
.wk-day > header { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px 12px; font-size: 12.5px; color: var(--text-2); }
.wk-day > header b { font-size: 17px; color: var(--text); font-weight: 600; }
.wk-day > header .n { color: var(--text-3); font-size: 12px; }
.wk-day > header .wk-add { margin-left: auto; opacity: 0; transition: opacity 120ms ease; }
.wk-day:hover > header .wk-add, .wk-day > header .wk-add:focus-visible { opacity: 1; }
.wk-day.today > header b { color: #fff; background: var(--accent); border-radius: 999px; min-width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0 6px; font-size: 15px; }
.wk-day.past { opacity: .82; }
.wk-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.wk-empty { margin: 4px 4px; font-size: 12.5px; color: var(--text-3); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; display: grid; gap: 6px; cursor: pointer; text-align: left; transition: border-color 120ms ease; }
.post-card:hover { border-color: var(--line-strong); }
.post-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.post-card p { margin: 0; font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.pc-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; }
.pc-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--tone); flex: none; display: inline-block; }
.pc-acc { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; min-width: 0; }
.pc-acc span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-foot { display: flex; align-items: center; gap: 6px; font-size: 11.5px; min-width: 0; }
.pc-foot .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-grid tr.grp th { background: transparent; padding: 18px 10px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.acc-grid tr.grp th > .cell-inline { gap: 8px; }
.acc-grid tr.grp th .btn { float: right; margin-top: -2px; }
.acc-grid tr.grp:first-child th { padding-top: 4px; }
.stats-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.stats-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.stats-grid .panel { min-height: 0; display: flex; flex-direction: column; }
.stats-grid .panel-body { flex: 1; min-height: 0; overflow-y: auto; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.spark i { flex: 1; background: var(--accent); opacity: .55; border-radius: 2px 2px 0 0; min-height: 2px; }
.spark.lg { height: 90px; gap: 8px; }
.spark.lg i { opacity: .7; border-radius: 4px 4px 0 0; }
.post-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.post-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); position: sticky; top: 0; }
.pp-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; }
.pp-head .muted { margin-left: auto; font-size: 12px; }
.pp-media { background: var(--surface-2); display: grid; place-items: center; align-content: center; gap: 6px; color: var(--text-3); font-size: 12px; max-height: 380px; text-align: center; padding: 10px; }
.pp-media .i { width: 28px; height: 28px; }
.pp-text { margin: 0; padding: 10px 12px 12px; font-size: 13px; white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto; }
.pp-text .hash { color: var(--accent); }
.post-edit .textarea { width: 100%; min-height: 150px; }
.callout.is-red { background: var(--t-red-bg); }
.acc-mini { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.acc-chip { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 3px 6px; border-radius: 8px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.acc-chip:hover { background: var(--surface-2); }
.acc-chip span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-chip .pc-dot { --tone: var(--t-red); }
.li-btn { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.li-btn:hover { background: var(--surface-2); }
.plat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plat-opt { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.plat-opt:hover { border-color: var(--line-strong); }
.plat-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.auth-wait { display: grid; justify-items: center; gap: 8px; padding: 36px 10px; text-align: center; }
.check-row { cursor: pointer; gap: 10px; }
.check-row.is-off { cursor: default; opacity: .6; }
.box-off { width: 16px; height: 16px; border-radius: 4px; background: var(--line); flex: none; }
.perm-grid td, .perm-grid th { white-space: nowrap; }
@media (max-width: 760px) {
  .week-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .wk-day { min-height: auto; }
  .wk-list { overflow: visible; }
  .stats-grid, .post-layout { grid-template-columns: 1fr; }
  .post-preview { position: static; }
  .plat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pm-due:has(input[type=time]) { grid-template-columns: minmax(0, 1fr) 92px; }
.pm-due input[type=time] { min-width: 0; width: 100%; }
@media (max-width: 760px) {
  .week-grid { grid-auto-rows: auto; align-content: start; }
  .wk-day { overflow: visible; flex: none; }
  .wk-list { flex: none; }
  #toolbar [data-sw="0"], #toolbar .chip-like, #toolbar [data-act="perm"], #toolbar [data-act="export"] { display: none; }
}
@media (max-width: 760px) {
  #toolbar .status-switch { min-width: 64px; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
  #toolbar .status-switch::-webkit-scrollbar { display: none; }
  #toolbar .status-switch button { white-space: nowrap; flex: none; }
}

/* ---------- Otomatik teslim planlama ---------- */
.deliv > .dl-plan, .deliv > .deliv-actions { grid-column: 2; }
.thumb { grid-row: span 4; }
.dl-plan { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; padding: 3px 6px; margin-left: -6px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; justify-self: start; }
.dl-plan:hover { background: var(--surface-2); }
.dl-plan .sep { color: var(--text-3); }
.dl-plan .avatar { width: 20px; height: 20px; font-size: 9px; }
.auto-due { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.dm-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.req-plan:empty { display: none; }
.req-plan { margin-top: -4px; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.plan-rows { display: grid; }
.plan-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.2fr) 88px minmax(150px, 1.4fr); gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.plan-row .pr-name { font-weight: 500; }
.pr-h { display: flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12px; }
.pr-h .input { height: 32px; width: 58px; text-align: center; padding: 0 4px; }
.pr-when { font-size: 12.5px; color: var(--text-2); }
.plan-sum { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); font-size: 13px; flex-wrap: wrap; }
.plan-sum .i { width: 15px; height: 15px; color: var(--text-2); }
.plan-sum b { font-weight: 600; }
.plan-sum .due { margin-left: auto; }
.plan-tbl td, .plan-tbl th { padding: 6px 8px; }
.plan-tbl .input { height: 32px; }
.plan-tbl input[type=number] { width: 80px; }
.plan-tbl input[type=time] { width: 104px; }
.tp-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.tp-head, .tp-row { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; }
.tp-axis { position: relative; height: 40px; }
.tp-day { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding-left: 8px; }
.tp-day b { display: block; font-size: 12.5px; font-weight: 600; }
.tp-day.today b { color: var(--accent); }
.tp-day span { position: absolute; left: 0; right: 0; bottom: 2px; height: 14px; }
.tp-day span i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 10.5px; color: var(--text-3); }
.tp-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: 6px; }
.tp-row { align-items: stretch; }
.tp-who { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 0; }
.tp-who .main-txt { flex: 1; min-width: 0; }
.tp-who .main-txt span { font-size: 12px; }
.tp-row.off .tp-who .main-txt { opacity: .7; }
.tp-track { position: relative; height: 56px; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.tp-row.off .tp-track { background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, transparent 8px 16px); }
.tp-work { position: absolute; top: 0; bottom: 0; background: var(--surface); opacity: .9; }
.tp-sep { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tp-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--t-red); z-index: 2; }
.tp-block { position: absolute; top: 7px; bottom: 7px; border: 0; border-radius: 6px; padding: 3px 6px; background: var(--tone-bg); color: var(--tone); font: inherit; font-size: 11px; text-align: left; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: center; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 25%, transparent); z-index: 1; }
.tp-block b, .tp-block span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-block span { opacity: .8; }
.tp-block:hover { filter: brightness(.97); }
.tp-block:focus-visible { outline: 2px solid var(--accent); }
.tp-miss { min-height: 0; overflow-y: auto; flex: 1; }
@media (max-width: 760px) {
  .plan-row { grid-template-columns: 1fr 1fr; }
  .tp-head, .tp-row { grid-template-columns: 1fr; }
  .tp-head > div:first-child { display: none; }
  .tp-wrap { overflow-x: auto; }
  .tp-axis, .tp-track { min-width: 900px; }
}
.plan-row { grid-template-columns: minmax(0, 1fr) 180px 84px; row-gap: 2px; }
.plan-row .pr-when { grid-column: 1 / -1; font-size: 12px; }
.tp-who .main-txt { display: flex; flex-direction: column; min-width: 0; }
.tp-who .main-txt strong, .tp-who .main-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-who .main-txt span { color: var(--text-2); }
.auto-ass { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; }
.auto-ass[hidden] { display: none; }
.plan-row.off { grid-template-columns: minmax(0, 1fr) 220px; }
