/* TaskCRM — koyu tema + açık tema (Kontrol Odası tasarım dilinden, çivit vurgulu)
   Tema: <html data-theme="light|dark">; öznitelik yoksa sistem tercihi (prefers-color-scheme). */
:root {
  --bg: #0a0b10;
  --bg-2: #0e1016;
  --panel: #12141b;
  --panel-2: #171a22;
  --panel-3: #1d2029;
  --line: #222632;
  --line-2: #2d3241;
  --line-3: #414859;
  --text: #e8eaf2;
  --text-2: #b6bccb;
  --muted: #747b8f;
  --placeholder: #545b6d;
  --accent: #818cf8;
  --accent-2: #6366f1;
  --accent-glow: rgba(129, 140, 248, .18);
  --on-accent: #ffffff;
  --claude: #e07a55;
  --bad: #f43f5e;
  --warn: #f59e0b;
  --good: #34d399;
  --info: #60a5fa;
  --t-bad: #fecdd3;
  --t-warn: #fde68a;
  --t-good: #a7f3d0;
  --t-info: #bfdbfe;
  --t-accent: #c7d2fe;
  --t-claude: #fdba9a;
  --side-bg: linear-gradient(180deg, rgba(18, 20, 27, .92), rgba(14, 16, 22, .96));
  --card-bg: linear-gradient(180deg, #12141b, rgba(18, 20, 27, .86));
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 20px 40px -30px rgba(0, 0, 0, .8);
  --btn-hover: #232735;
  --row-hover: rgba(255, 255, 255, .015);
  --glow-1: rgba(129, 140, 248, .08);
  --glow-2: rgba(224, 122, 85, .05);
  --login-bg: linear-gradient(180deg, rgba(23, 26, 34, .94), rgba(14, 16, 21, .96));
  --login-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  --grid-line: rgba(129, 140, 248, .05);
  /* durum renkleri */
  --st-turn: #f59e0b;
  --st-run: #818cf8;
  --st-queue: #e07a55;
  --st-wait: #60a5fa;
  --st-review: #34d399;
  --st-failed: #f43f5e;
  --st-done: #8b93a7;

  --radius: 14px;
  --radius-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f9; --bg-2: #fbfbfd; --panel: #ffffff; --panel-2: #f6f7fa; --panel-3: #eceef4;
    --line: #e4e6ee; --line-2: #d3d7e2; --line-3: #b9bfcf;
    --text: #12141f; --text-2: #363b4d; --muted: #6a7085; --placeholder: #9aa0b2;
    --accent: #4f46e5; --accent-2: #4338ca; --accent-glow: rgba(79, 70, 229, .14); --claude: #c2562f;
    --bad: #e11d48; --warn: #d97706; --good: #059669; --info: #2563eb;
    --t-bad: #be123c; --t-warn: #92400e; --t-good: #047857; --t-info: #1d4ed8; --t-accent: #4338ca; --t-claude: #b4471f;
    --side-bg: linear-gradient(180deg, #ffffff, #f8f9fc);
    --card-bg: #ffffff;
    --card-shadow: 0 1px 2px rgba(18, 20, 31, .04), 0 12px 32px -24px rgba(18, 20, 31, .25);
    --btn-hover: #e6e8ef; --row-hover: rgba(18, 20, 31, .025);
    --glow-1: rgba(79, 70, 229, .06); --glow-2: rgba(194, 86, 47, .04);
    --login-bg: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 249, 252, .97));
    --login-shadow: 0 30px 80px -30px rgba(18, 20, 31, .35);
    --grid-line: rgba(79, 70, 229, .07);
    --st-turn: #d97706; --st-run: #4f46e5; --st-queue: #c2562f; --st-wait: #2563eb; --st-review: #059669; --st-failed: #e11d48; --st-done: #8b93a7;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5f9; --bg-2: #fbfbfd; --panel: #ffffff; --panel-2: #f6f7fa; --panel-3: #eceef4;
  --line: #e4e6ee; --line-2: #d3d7e2; --line-3: #b9bfcf;
  --text: #12141f; --text-2: #363b4d; --muted: #6a7085; --placeholder: #9aa0b2;
  --accent: #4f46e5; --accent-2: #4338ca; --accent-glow: rgba(79, 70, 229, .14); --claude: #c2562f;
  --bad: #e11d48; --warn: #d97706; --good: #059669; --info: #2563eb;
  --t-bad: #be123c; --t-warn: #92400e; --t-good: #047857; --t-info: #1d4ed8; --t-accent: #4338ca; --t-claude: #b4471f;
  --side-bg: linear-gradient(180deg, #ffffff, #f8f9fc);
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(18, 20, 31, .04), 0 12px 32px -24px rgba(18, 20, 31, .25);
  --btn-hover: #e6e8ef; --row-hover: rgba(18, 20, 31, .025);
  --glow-1: rgba(79, 70, 229, .06); --glow-2: rgba(194, 86, 47, .04);
  --login-bg: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 249, 252, .97));
  --login-shadow: 0 30px 80px -30px rgba(18, 20, 31, .35);
  --grid-line: rgba(79, 70, 229, .07);
  --st-turn: #d97706; --st-run: #4f46e5; --st-queue: #c2562f; --st-wait: #2563eb; --st-review: #059669; --st-failed: #e11d48; --st-done: #8b93a7;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--glow-2), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link, .md a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; }
a.link:hover, .md a:hover { text-decoration-color: var(--accent); }
.md a { overflow-wrap: anywhere; }
code, .mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
code { background: var(--panel-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 26px; letter-spacing: -.02em; }
h2 { font-size: 15px; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.txt-bad { color: var(--bad); }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent-glow); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- iskelet */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px; border-right: 1px solid var(--line);
  background: var(--side-bg);
}
.main { padding: 28px 36px 60px; max-width: 1480px; width: 100%; min-width: 0; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 16px; font-size: 17px; letter-spacing: -.01em; color: var(--text-2); }
.brand b { color: var(--text); font-weight: 750; }
.brand-lg { font-size: 23px; padding: 0; justify-content: center; }
/* Logo: kartın üstünde onay işareti */
.brand-mark {
  position: relative; flex: none; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(145deg, #8b93ff, #6366f1); box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .7);
}
.brand-mark::after {
  content: ""; position: absolute; left: 8px; top: 6px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.6px 2.6px 0; transform: rotate(45deg);
}
.brand-mark.sm { width: 22px; height: 22px; border-radius: 7px; }
.brand-mark.sm::after { left: 7px; top: 4.5px; width: 5px; height: 10px; border-width: 0 2.3px 2.3px 0; }
.btn-new { justify-content: center; margin: 0 2px 12px; }

.side-label { display: flex; align-items: center; justify-content: space-between; margin: 16px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side-label a { font-size: 16px; line-height: 1; letter-spacing: 0; color: var(--muted); padding: 0 4px; border-radius: 6px; }
.side-label a:hover { color: var(--accent); background: var(--panel-2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); border: 1px solid transparent; transition: background .15s, border-color .15s; min-width: 0; }
.nav a:hover { background: var(--panel-2); }
.nav a.is-active { background: var(--panel-3); border-color: var(--line-2); color: var(--text); }
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a .pill:first-of-type { margin-left: auto; }
.nav-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.proj-nav a { padding: 7px 10px; }
.pdot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); margin: 0 3px; }
.pdot.is-run { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 30%, transparent); animation: tpulse 1.6s ease-in-out infinite; }
.side-empty { margin: 4px 10px; font-size: 12.5px; }
.side-foot { margin-top: auto; padding: 14px 6px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { display: flex; align-items: center; gap: 9px; color: var(--text-2); min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: 2px; }
.avatar {
  --h: 230; display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 70% 55%)); color: #fff; font-weight: 700; font-size: 12px; font-style: normal;
}
.avatar.sm { width: 22px; height: 22px; font-size: 10.5px; }

.worker-line { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.worker-line span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.worker-line b { font-size: 12.5px; font-weight: 650; }
.worker-line small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--muted); }
.dot-good, .ws-on .dot { background: var(--good); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15), 0 0 10px rgba(52, 211, 153, .45); }
.ws-off .dot { background: var(--muted); box-shadow: 0 0 0 3px rgba(116, 123, 143, .15); }
.ws-paused .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }

/* tema seçici */
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.theme-switch button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 550; cursor: pointer; transition: all .15s; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button.is-on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.theme-switch svg { width: 14px; height: 14px; }
.login-theme { position: fixed; top: 16px; right: 16px; width: 210px; }

/* ---------------------------------------------------------------- başlık */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.eyebrow .pchip { text-transform: none; letter-spacing: 0; }
.lead { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; max-width: 760px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--muted); font-size: 13px; align-items: center; }
.meta > span { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.meta > span + span::before { content: ""; position: absolute; left: -10px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.meta b { font-family: var(--mono); font-size: 15px; color: var(--text); }
.meta .c-turn { color: var(--st-turn); } .meta .c-run { color: var(--st-run); } .meta .c-queue { color: var(--st-queue); }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.proj-title { display: flex; align-items: center; gap: 12px; }
.psq { flex: none; display: inline-block; width: 16px; height: 16px; border-radius: 5px; background: var(--pc, var(--accent)); }
.head-link { margin-left: auto; font-weight: 600; }

/* ---------------------------------------------------------------- butonlar & form */
.btn, .btn-ghost, .chip { font: inherit; cursor: pointer; border-radius: var(--radius-sm); transition: all .15s; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; background: var(--panel-3); color: var(--text); border: 1px solid var(--line-2); font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--line-3); background: var(--btn-hover); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, #8b93ff, #6366f1); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 20px -8px rgba(99, 102, 241, .7); }
.btn-primary:hover { filter: brightness(1.07); background: linear-gradient(180deg, #8b93ff, #6366f1); border-color: transparent; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn:disabled { opacity: .65; cursor: default; }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--text-2); padding: 7px 11px; }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.sm { font-size: 12.5px; }
.btn.sm, .btn-ghost.sm { padding: 6px 11px; }
.danger { color: var(--bad) !important; }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 44px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-glow); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row > input { flex: 1; }
.row > select { width: auto; flex: 1; min-width: 0; }
.row > .btn { margin-left: auto; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field small { font-weight: 500; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.radio-set, .color-set { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.radio-set legend, .color-set legend { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg-2); }
.radio:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); }
.radio input { margin-top: 3px; }
.radio span { display: flex; flex-direction: column; gap: 2px; }
.radio b { font-weight: 600; font-size: 13.5px; }
.color-set { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.color-set legend { width: 100%; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 28px; height: 28px; border-radius: 8px; background: var(--sw); cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--panel); }
.swatch input:checked + span { border-color: var(--text); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-2); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.is-on { background: var(--accent-glow); border-color: var(--accent); color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cdot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.chip-mine { margin-left: 4px; }

.pill { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; background: var(--panel-3); color: var(--text-2); }
.pill-turn { background: color-mix(in srgb, var(--st-turn) 20%, transparent); color: var(--t-warn); }
.pill-run { background: color-mix(in srgb, var(--st-run) 20%, transparent); color: var(--t-accent); }
.pill-warn { background: rgba(245, 158, 11, .18); color: var(--t-warn); }
.pill-bad { background: rgba(244, 63, 94, .16); color: var(--t-bad); }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line-2); font-weight: 600; }
.tag-bad { color: var(--t-bad); border-color: rgba(244, 63, 94, .35); background: rgba(244, 63, 94, .1); }
.tag-warn { color: var(--t-warn); border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .1); }
.pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 1px 8px 1px 6px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pchip i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
a.pchip:hover { border-color: var(--line-2); color: var(--text); }

.state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--panel-3); color: var(--text-2); }
.state-good { color: var(--t-good); background: rgba(52, 211, 153, .12); }
.state-bad { color: var(--t-bad); background: rgba(244, 63, 94, .12); }

/* ---------------------------------------------------------------- bildirim kutuları */
.flash { padding: 11px 15px; border-radius: 11px; margin-bottom: 16px; border: 1px solid; font-size: 13.5px; animation: slide .25s ease-out; }
.flash-ok { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .35); color: var(--t-good); }
.flash-info { background: var(--accent-glow); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--t-accent); }
.flash-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); color: var(--t-warn); }
.flash-bad { background: rgba(244, 63, 94, .09); border-color: rgba(244, 63, 94, .35); color: var(--t-bad); }
@keyframes slide { from { opacity: 0; transform: translateY(-4px); } }

/* ---------------------------------------------------------------- kartlar */
.card { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--card-shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .muted { font-size: 12.5px; }
.sub-head { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.card-new { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: radial-gradient(420px 200px at 100% 0%, var(--accent-glow), transparent 70%), var(--panel); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2.tight { gap: 10px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.col { min-width: 0; }
.col-side { position: sticky; top: 20px; }
.empty { text-align: center; color: var(--muted); padding: 44px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 12px; }
.empty.sm { padding: 16px; font-size: 13px; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sm-kv { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.sub-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.sub-details summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; width: fit-content; }
.sub-details summary::-webkit-details-marker { display: none; }
.sub-details summary::before { content: "▸ "; }
.sub-details[open] summary::before { content: "▾ "; }
.sub-details summary:hover { color: var(--accent); }
.log { font: 11.5px/1.6 var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; overflow-x: auto; color: var(--text-2); margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
.plain { margin: 0 0 12px; padding-left: 18px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.plain-ol { margin: 0; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.small-note { font-size: 12.5px; line-height: 1.55; margin: 10px 0 8px; }

/* ---------------------------------------------------------------- KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; box-shadow: var(--card-shadow); }
.kpi-label { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.kpi-val { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.kpi-val.sm { font-size: 15px; overflow-wrap: anywhere; }
.kpi-sub { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- tablolar */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl.sm td { padding: 6px 8px; font-size: 12.5px; }
.tbl tr.is-off td { opacity: .5; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell > div { display: flex; flex-direction: column; line-height: 1.3; }
.users-tbl td:nth-child(2) { display: table-cell; }
.users-tbl .pchip { margin: 2px 4px 2px 0; }
.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline-block; }

/* ---------------------------------------------------------------- ticket listesi */
.ttabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.ttab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font-weight: 600; font-size: 13px; box-shadow: var(--card-shadow); white-space: nowrap; }
.ttab b { font-family: var(--mono); font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--panel-3); color: var(--text); }
.ttab:hover { border-color: var(--line-2); }
.ttab.is-on { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.ttab-turn b { background: color-mix(in srgb, var(--st-turn) 22%, transparent); }
.ttab-run b { background: color-mix(in srgb, var(--st-run) 22%, transparent); }
.ttab-queue b { background: color-mix(in srgb, var(--st-queue) 22%, transparent); }
.ttab-wait b { background: color-mix(in srgb, var(--st-wait) 22%, transparent); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; }
.tsec { margin-bottom: 22px; }
.tsec-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.tsec-head b { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tsec-head small { font-weight: 500; font-size: 12.5px; }
.tsec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--st-done); flex: none; }
.tsec-turn .tsec-dot { background: var(--st-turn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-turn) 20%, transparent); }
.tsec-run .tsec-dot { background: var(--st-run); animation: tpulse 1.6s ease-in-out infinite; }
.tsec-queue .tsec-dot { background: var(--st-queue); }
.tsec-wait .tsec-dot { background: var(--st-wait); }
@keyframes tpulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--st-run) 25%, transparent); } }
.tsec-fold > summary { cursor: pointer; list-style: none; }
.tsec-fold > summary::-webkit-details-marker { display: none; }
.tsec-fold > summary::after { content: "▸"; color: var(--muted); margin-left: 2px; }
.tsec-fold[open] > summary::after { content: "▾"; }
.tlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trow a { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 12px 15px; border-radius: var(--radius); border: 1px solid var(--line);
  border-left: 4px solid var(--st-done); background: var(--panel); box-shadow: var(--card-shadow); transition: border-color .15s; }
.trow a:hover { border-color: var(--line-2); }
.trow-turn a { border-left-color: var(--st-turn); background: color-mix(in srgb, var(--st-turn) 5%, var(--panel)); }
.trow-run a { border-left-color: var(--st-run); }
.trow-queue a { border-left-color: var(--st-queue); }
.trow-wait a { border-left-color: var(--st-wait); }
.trow-done a { opacity: .8; }
.trow.prio-urgent .task-title::before { content: "● "; color: var(--bad); }
.trow-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.trow-top time { margin-left: auto; }
.task-title { font-size: 15px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.trow-msg { margin: 0; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; line-height: 1.45; }
.trow-lead { font-weight: 700; color: var(--muted); }
.trow-turn .trow-lead { color: var(--t-warn); }
.act { color: var(--t-accent); font-weight: 550; }
.trow-foot { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.tsearch-empty { margin: 10px 2px; }

.tstate { display: inline-block; width: fit-content; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; white-space: nowrap; color: var(--text-2); background: var(--panel-3); }
.tstate-queued { color: var(--t-claude); background: color-mix(in srgb, var(--st-queue) 16%, transparent); }
.tstate-running { color: var(--t-accent); background: color-mix(in srgb, var(--st-run) 18%, transparent); }
.tstate-waiting { color: var(--t-warn); background: color-mix(in srgb, var(--st-turn) 18%, transparent); }
.tstate-review { color: var(--t-good); background: color-mix(in srgb, var(--st-review) 16%, transparent); }
.tstate-failed { color: var(--t-bad); background: color-mix(in srgb, var(--st-failed) 16%, transparent); }
.tstate-hold { color: var(--text-2); background: var(--panel-3); }
.tstate-done { color: var(--muted); background: var(--panel-3); }
.tstate-cancelled { color: var(--muted); background: var(--panel-3); text-decoration: line-through; }
.tbadge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.tb-run { color: var(--t-accent); background: color-mix(in srgb, var(--st-run) 16%, transparent); }
.tb-run::before { content: "⚙ "; }

/* ---------------------------------------------------------------- projeler */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.proj-card { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--card-shadow); position: relative; overflow: hidden; transition: border-color .15s, transform .15s; }
.proj-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--pc); }
.proj-card:hover { border-color: color-mix(in srgb, var(--pc) 55%, var(--line)); transform: translateY(-1px); }
.proj-card-top { display: flex; align-items: center; gap: 9px; }
.proj-card-top .psq { background: var(--pc); width: 12px; height: 12px; border-radius: 4px; }
.proj-card-top b { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-card p { margin: 0; color: var(--text-2); font-size: 13px; }
.proj-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin-top: auto; }
.proj-stats b { font-family: var(--mono); color: var(--text); }
.proj-stats .muted { margin-left: auto; }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.member-list li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.member-list li > span:not(.avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-list li.is-off { opacity: .55; }
.member-role select { width: auto; padding: 4px 8px; font-size: 12.5px; }
.add-member { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-feed li + li { border-top: 1px solid var(--line); }
.mini-feed a { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; font-size: 13px; }
.mini-feed a:hover b { color: var(--accent); }
.mf-top { display: flex; gap: 6px; align-items: baseline; }
.mf-top time { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.usage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.usage-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.usage-list span { color: var(--muted); }

/* ---------------------------------------------------------------- ticket sayfası */
.ticket-head h1 { overflow-wrap: anywhere; }
.meta-badges { gap: 6px; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 20px; border-radius: var(--radius);
  border: 1px solid var(--line-2); border-left: 4px solid var(--st-done); background: var(--panel); box-shadow: var(--card-shadow); }
.callout-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 320px; font-size: 13.5px; color: var(--text-2); }
.callout-text b { font-size: 14.5px; color: var(--text); }
.callout-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.callout-queued { border-left-color: var(--st-queue); }
.callout-running { border-left-color: var(--st-run); background: radial-gradient(500px 120px at 0% 50%, var(--accent-glow), transparent 70%), var(--panel); }
.callout-running b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--st-run); margin-left: 8px; vertical-align: 2px; animation: tpulse 1.6s ease-in-out infinite; }
.callout-waiting { border-left-color: var(--st-turn); background: color-mix(in srgb, var(--st-turn) 6%, var(--panel)); }
.callout-review { border-left-color: var(--st-review); background: color-mix(in srgb, var(--st-review) 6%, var(--panel)); }
.callout-failed { border-left-color: var(--st-failed); background: color-mix(in srgb, var(--st-failed) 5%, var(--panel)); }
.callout form { margin: 0; }

.thread { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; background: var(--panel); box-shadow: var(--card-shadow); min-width: 0; }
.msg-claude { border-color: color-mix(in srgb, var(--claude) 32%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--claude) 6%, transparent), transparent 120px), var(--panel); }
.msg-note { border-style: dashed; background: var(--bg-2); }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.msg-head time { margin-left: auto; font-size: 12px; }
.claude-mark { color: var(--claude); font-weight: 700; }
.msg-sys { display: flex; align-items: flex-start; gap: 10px; padding: 4px 14px; font-size: 12.5px; color: var(--muted); }
.msg-sys > div { flex: 1; }
.msg-sys time { font-size: 11.5px; white-space: nowrap; }
.msg-sys-ico { color: var(--accent); }
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 4px; }
.md h4 { font-size: 14px; margin: 12px 0 6px; color: var(--text); }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; overflow-x: auto; font: 12.5px/1.55 var(--mono); margin: 8px 0; }
.md pre code { background: none; border: 0; padding: 0; }
.md .gap { height: 6px; }
.md .tbl { margin: 8px 0; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-img { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); }
.att-img img { display: block; max-width: 260px; max-height: 200px; object-fit: cover; }
.att-file { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13px; }
.att-file:hover { border-color: var(--line-3); }
.msg-compose { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 80px; }
.msg-compose textarea { border: 0; background: transparent; box-shadow: none; padding: 4px 6px; }
.compose-foot { flex-wrap: wrap; }
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.file-pick .btn { cursor: pointer; }
.drop-hint { font-size: 12px; }
/* eklenen dosyalar: görsellerde küçük önizleme, × ile kaldır */
.file-thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.file-thumbs li { position: relative; display: flex; align-items: center; max-width: 100%; min-width: 0; padding: 7px 34px 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); font-size: 12px; }
.file-thumbs li.is-img { flex-direction: column; align-items: stretch; gap: 4px; width: 116px; padding: 4px; }
.file-thumbs img { display: block; width: 100%; height: 78px; object-fit: cover; border-radius: 7px; background: var(--panel-3); }
.ft-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.is-img .ft-name { font-size: 10.5px; padding: 0 2px 1px; }
.ft-x { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .62); color: #fff; font: 600 15px/22px var(--font); cursor: pointer; }
.ft-x:hover { background: var(--bad); }
.file-msg { margin: 0; font-size: 12.5px; color: var(--t-bad); }
/* sürükle-bırak: dosya sayfaya getirilince hedef form vurgulanır */
[data-file-form] { position: relative; }
[data-file-form].is-drop::after {
  content: "Bırak, eklensin"; position: absolute; inset: -8px; z-index: 5; pointer-events: none;
  display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, color-mix(in srgb, var(--panel) 88%, transparent));
  color: var(--text); font-size: 16px; font-weight: 700; backdrop-filter: blur(2px);
}
.prio-form { margin-top: 14px; }
.side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.runs li + li { padding-top: 12px; border-top: 1px solid var(--line); }
.run-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.run-out { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--panel-3); color: var(--text-2); white-space: nowrap; }
.run-replied, .run-result { color: var(--t-good); background: rgba(52, 211, 153, .12); }
.run-failed, .run-timeout { color: var(--t-bad); background: rgba(244, 63, 94, .12); }
.run-live { color: var(--t-accent); background: var(--accent-glow); }
.file-changes { margin: 6px 0 0; padding-left: 16px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }

/* ---------------------------------------------------------------- bildirimler */
.icon-btn.bell { position: relative; }
.icon-btn.bell .badge { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #e11d48; color: #fff; font: 700 10px/17px var(--mono); font-style: normal; text-align: center; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.notif a { display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--card-shadow); }
.notif a:hover { border-color: var(--line-2); }
.notif.is-unread a { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.notif-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--line-2); }
.notif.is-unread .notif-dot { background: var(--accent); }
.notif-turn.is-unread .notif-dot { background: var(--st-turn); }
.notif-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.notif-body p { margin: 0; color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; }
.notif-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.notif-top time { margin-left: auto; }
.notif-kind { font-weight: 700; color: var(--text); }
.notif-claude .notif-kind { color: var(--claude); }
.push-msg { margin: 10px 0 0; font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- davet / kopyalama */
.card-invite { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: color-mix(in srgb, var(--good) 6%, var(--panel)); }
.copy-row input { font-family: var(--mono); font-size: 12.5px; }

/* ---------------------------------------------------------------- giriş */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.login-grid {
  position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0, transparent 70%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0, transparent 70%);
}
.login-card { position: relative; width: 100%; max-width: 390px; display: flex; flex-direction: column; gap: 14px; padding: 34px 30px 26px; border-radius: 20px; border: 1px solid var(--line-2);
  background: var(--login-bg); box-shadow: var(--login-shadow), 0 0 80px -30px var(--accent-glow); }
.login-sub { margin: -4px 0 6px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field input { padding: 11px 13px; font-size: 14.5px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.login-back { text-align: center; font-size: 13px; color: var(--muted); }
.login-back:hover { color: var(--text); }
.btn-passkey { gap: 8px; }
.btn-passkey svg { width: 18px; height: 18px; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-pk-err { margin: 0; font-size: 13px; color: var(--bad); text-align: center; }
.login-pk-hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

/* güvenlik: QR, OTP, passkey */
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 18px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.steps b { display: block; margin-bottom: 8px; }
.qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr { width: 184px; height: 184px; border-radius: 12px; background: #fff; padding: 6px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font-size: 14px; letter-spacing: .08em; padding: 6px 10px; word-break: break-all; user-select: all; }
.otp { font: 600 22px var(--mono); letter-spacing: .35em; text-align: center; max-width: 220px; }
.login-card .otp { max-width: none; }
.pk-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pk-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pk-list li > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pk-add { flex-wrap: wrap; }
.pk-add input { flex: 1; min-width: 200px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- duyarlı */
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1020px) {
  .grid-2, .grid-main { grid-template-columns: 1fr; }
  .col-side { position: static; }
}

/* mobil öğeler (masaüstünde gizli) */
.topbar, .tabbar, .scrim { display: none; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; padding: 0; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  input, select, textarea { font-size: 16px; }   /* iOS: 16px altı girişte yakınlaştırır */
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .topbar-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
  .topbar-title > span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .topbar-title b { font-size: 15px; }
  .topbar-title small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); height: 100%;
    padding-top: calc(22px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: var(--panel); box-shadow: 20px 0 60px -20px rgba(0, 0, 0, .5);
    transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  }
  .drawer-open .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
  .scrim[hidden] { display: none; }
  .drawer-open { overflow: hidden; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--panel) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); border-radius: 10px; -webkit-tap-highlight-color: transparent; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--accent); }
  .tabbar .badge { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--st-turn); color: #fff; font: 700 10px/17px var(--mono); font-style: normal; text-align: center; }
  .tabbar .tab-new span { display: grid; place-items: center; width: 48px; height: 48px; margin-top: -18px; border-radius: 16px; background: linear-gradient(180deg, #8b93ff, #6366f1); color: #fff; box-shadow: 0 8px 22px -8px rgba(99, 102, 241, .8); }
  .tabbar .tab-new svg { width: 24px; height: 24px; stroke-width: 2.4; }

  .main { padding: 16px max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left)); }
  h1 { font-size: 22px; }
  .page-head { margin-bottom: 16px; gap: 12px; align-items: flex-start; }
  .card { padding: 14px; border-radius: 12px; margin-bottom: 14px; }
  .meta { gap: 4px 12px; }
  .meta > span + span::before { display: none; }
  .col-first-mobile { order: -1; }
  .grid-main { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .grid-2 { gap: 0; }
  .grid-2.tight { gap: 10px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }

  .toolbar { gap: 8px; }
  .search { min-width: 0; max-width: none; flex-basis: 100%; }
  .chips, .ttabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .chips::-webkit-scrollbar, .ttabs::-webkit-scrollbar { display: none; }
  .chip { padding: 7px 13px; }
  .trow a { padding: 12px 13px 12px 12px; }
  .callout { padding: 12px 14px; }
  .callout-actions { width: 100%; }
  .callout-actions .btn { flex: 1; justify-content: center; }
  .callout-actions form { flex: 1; display: flex; }
  .msg { padding: 12px 14px; }
  .att-img img { max-width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; font-size: 12px; }
  .qr-wrap { justify-content: center; }
  .login-theme { position: static; width: 100%; max-width: 390px; margin: 0 auto 16px; }
  .login-body { place-items: start center; padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: 24px; }
  .users-tbl thead { display: none; }
  .users-tbl tr { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .users-tbl td { border: 0; padding: 0; }
  .actions-cell { white-space: normal; }
}

/* ana ekrandan açılınca (standalone) üstte durum çubuğu payı */
@media (display-mode: standalone) and (min-width: 861px) {
  .side { padding-top: calc(22px + env(safe-area-inset-top)); }
}
