/* ==========================================================================
   Görev Yönetim Sistemi
   Yön: otobüs hat tabelası dili. Proje kodları koyu zeminde amber "hat plakası"
   olarak görünür (tek vurgu); geri kalan arayüz sakin, soğuk gri-mavi.
   Dış kaynak yok: yazı tipi sistem fontları, simgeler satır içi SVG.
   ========================================================================== */

:root {
    --bg: #e8edf1;
    --surface: #ffffff;
    --surface-2: #f3f6f8;
    --ink: #10202d;
    --muted: #566777;
    --line: #d2dae1;
    --primary: #0a5c9e;
    --primary-strong: #084a80;
    --on-primary: #ffffff;
    --danger: #b92525;
    --danger-bg: #fbe9e9;
    --ok: #17724a;

    --plate-bg: #10202d;
    --plate-fg: #ffc21a;

    --st-5: #0c7580;   /* işleme alındı */
    --st-2: #0a5c9e;   /* başladı */
    --st-1: #856400;   /* beklemede */
    --st-3: #17724a;   /* tamamlandı */
    --st-4: #667483;   /* iptal */

    --z-late: #b92525;   --z-late-bg: #fbe9e9;
    --z-today: #a65200;  --z-today-bg: #fff0d9;
    --z-week: #0a5c9e;   --z-week-bg: #e2effa;
    --z-later: #566777;  --z-later-bg: #edf1f4;

    --shadow: 0 8px 28px rgba(16, 32, 45, .18);
    --font: system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --topbar-h: 56px;
    --nav-h: 60px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b141c;
        --surface: #13202b;
        --surface-2: #192836;
        --ink: #e7eef4;
        --muted: #93a5b5;
        --line: #25384a;
        --primary: #5db1f5;
        --primary-strong: #8cc8fa;
        --on-primary: #06151f;
        --danger: #ff8a8a;
        --danger-bg: #3a1c1f;
        --ok: #5fd39a;
        --plate-bg: #04080c;
        --st-5: #4fc3cf; --st-2: #5db1f5; --st-1: #e0b73c; --st-3: #5fd39a; --st-4: #93a5b5;
        --z-late: #ff8a8a;  --z-late-bg: #3a1c1f;
        --z-today: #ffb866; --z-today-bg: #3a2a14;
        --z-week: #8cc8fa;  --z-week-bg: #14293b;
        --z-later: #93a5b5; --z-later-bg: #1b2a38;
        --shadow: 0 8px 28px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0b141c;
    --surface: #13202b;
    --surface-2: #192836;
    --ink: #e7eef4;
    --muted: #93a5b5;
    --line: #25384a;
    --primary: #5db1f5;
    --primary-strong: #8cc8fa;
    --on-primary: #06151f;
    --danger: #ff8a8a;
    --danger-bg: #3a1c1f;
    --ok: #5fd39a;
    --plate-bg: #04080c;
    --st-5: #4fc3cf; --st-2: #5db1f5; --st-1: #e0b73c; --st-3: #5fd39a; --st-4: #93a5b5;
    --z-late: #ff8a8a;  --z-late-bg: #3a1c1f;
    --z-today: #ffb866; --z-today-bg: #3a2a14;
    --z-week: #8cc8fa;  --z-week-bg: #14293b;
    --z-later: #93a5b5; --z-later-bg: #1b2a38;
    --shadow: 0 8px 28px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

/* ---------- temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.45 var(--font);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 84px);
}
body.lock { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
.ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.noscript { padding: 24px; text-align: center; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------- hat plakası ---------- */
.plate {
    display: inline-block;
    background: var(--plate-bg);
    color: var(--plate-fg);
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .04em;
    padding: 4px 6px 3px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 194, 26, .38);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.plate-lg { font-size: 22px; padding: 9px 12px 7px; border-radius: 6px; }

/* ---------- üst çubuk ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    height: var(--topbar-h);
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 17px; }
.brand-name { letter-spacing: -.01em; }

.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tab {
    display: flex; align-items: center; gap: 8px;
    border: 0; background: transparent; padding: 8px 12px; border-radius: 8px;
    color: var(--muted); font-weight: 600;
}
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--plate-fg); border-radius: 8px 8px 0 0; }

.search { position: relative; margin-left: auto; width: min(320px, 30vw); }
.search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input[type="search"] {
    width: 100%; height: 38px; padding: 0 12px 0 36px;
    border: 1px solid var(--line); border-radius: 19px; background: var(--surface-2);
}
.search input[type="search"]:focus { background: var(--surface); }

.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px;
    border: 0; border-radius: 50%; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 8px 4px 4px; border-radius: 22px; }
.user-btn:hover { background: var(--surface-2); }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 14px; }
.user-name { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; z-index: 40;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px;
}
.menu form { margin: 0; }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; }
.menu-item:hover { background: var(--surface-2); }
.menu-danger { color: var(--danger); }
.menu-label { padding: 8px 12px 4px; color: var(--muted); font-size: 13px; }

/* ---------- kapsam çubuğu (grup/proje/süre) ---------- */
.scope {
    position: sticky; top: var(--topbar-h); z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.sel { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sel span { color: var(--muted); font-size: 13px; }
select, input[type="text"], input[type="password"], input[type="search"], input[type="datetime-local"], textarea {
    border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 10px; min-width: 0;
}
select { height: 40px; padding-right: 28px; }
textarea { width: 100%; resize: vertical; min-height: 84px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary); outline-offset: 0; }
.scope select { max-width: 220px; }

.chips { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
    border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* ---------- ana alan ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 16px; outline: none; }
.view-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.view-head h2 { font-size: 20px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- pano ---------- */
.seg { display: none; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 4px; font-weight: 600; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 32, 45, .18); }
.seg .count { margin-left: 4px; font-variant-numeric: tabular-nums; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.col-head h3 { font-size: 15px; font-weight: 700; }
.col-head .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.s5 .dot, .dot.s5 { background: var(--st-5); }
.s2 .dot, .dot.s2 { background: var(--st-2); }
.s1 .dot, .dot.s1 { background: var(--st-1); }
.dot.s3 { background: var(--st-3); }
.dot.s4 { background: var(--st-4); }
.col-body { display: grid; gap: 10px; }

.card {
    position: relative;
    display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: start;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 12px 12px 12px 16px; cursor: pointer;
}
.card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line); }
.card.z-gecikti::before { background: var(--z-late); }
.card.z-bugun::before { background: var(--z-today); }
.card.z-buhafta::before { background: var(--z-week); }
.card:hover { border-color: var(--muted); }
.card-title { grid-column: 1; text-align: left; border: 0; background: transparent; padding: 0; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.card-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.crumb { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.crumb .ico { width: 14px; height: 14px; }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.adv {
    grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: 4px;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
    border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.adv:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.adv .ico { width: 16px; height: 16px; }

.due { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.due.z-gecikti { background: var(--z-late-bg); color: var(--z-late); }
.due.z-bugun { background: var(--z-today-bg); color: var(--z-today); }
.due.z-buhafta { background: var(--z-week-bg); color: var(--z-week); }
.due.z-surevar, .due.z-kapali { background: var(--z-later-bg); color: var(--z-later); }
.tag { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tag-acil { background: var(--danger-bg); color: var(--danger); }
.tag-dusuk { background: var(--surface-2); color: var(--muted); }
.progress { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.subbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 2px 9px 2px 7px;
    border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.subbadge .ico { width: 14px; height: 14px; }
.subbadge.all-done { color: var(--muted); font-weight: 600; }

.empty { border: 1px dashed var(--line); border-radius: 10px; padding: 22px 16px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* ---------- liste ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 11px 14px 11px calc(14px + var(--depth, 0) * 22px); border-top: 1px solid var(--line); cursor: pointer; }
.row:first-child { border-top: 0; }
.row.nolead { grid-template-columns: 1fr auto; }
.row:hover { background: var(--surface-2); }
.row-main { min-width: 0; display: grid; gap: 4px; }
.row-title { font-weight: 600; overflow-wrap: anywhere; text-align: left; border: 0; background: transparent; padding: 0; }
.row.done .row-title { color: var(--muted); }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.row-end { display: flex; align-items: center; gap: 8px; }
.fold { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); display: inline-grid; place-items: center; }
.fold:hover { background: var(--surface-2); color: var(--ink); }
.fold .ico { transition: transform .15s; }
.fold[aria-expanded="true"] .ico { transform: rotate(90deg); }
.fold-spacer { width: 28px; height: 28px; }
@media (max-width: 760px) { .fold-spacer, .fold { width: 22px; } }
.more { display: block; margin: 14px auto 0; }

/* ---------- tanımlar ---------- */
.panels { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 16px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.panel-head + .item, .group-title + .item { border-top: 0; }
.item-main { min-width: 0; }
.item-name { font-weight: 600; overflow-wrap: anywhere; }
.group-title { padding: 10px 14px 6px; font-weight: 700; color: var(--muted); font-size: 13px; background: var(--surface-2); border-top: 1px solid var(--line); }
.panel-head + .group-title { border-top: 0; }
.ghost-btn { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 6px 12px; font-weight: 600; }
.ghost-btn:hover { background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
.legend-note { padding: 0 14px 12px; }

/* ---------- butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 16px; height: 42px; font-weight: 650; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 25;
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; border-radius: 28px; height: 52px; padding: 0 22px 0 18px;
    background: var(--plate-fg); color: #10202d; font-weight: 750;
    box-shadow: var(--shadow);
}
.fab:hover { filter: brightness(.95); }

/* ---------- sayfa altı sheet / modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(8, 16, 24, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet {
    width: min(720px, 100%); max-height: min(92vh, 900px);
    background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; outline: none; overflow: hidden;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; letter-spacing: -.01em; }
.sheet-body { padding: 16px 20px 22px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 16px; }

.status-row { display: flex; flex-wrap: wrap; gap: 8px; }
.status-row .btn { height: 38px; padding: 0 12px; font-size: 14px; }
.status-row .btn[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.field { display: grid; gap: 6px; }
.field > span, .field > legend, legend.lbl { font-size: 13px; font-weight: 650; color: var(--muted); padding: 0; }
.field input[type="text"], .field input[type="password"], .field input[type="datetime-local"], .field select { width: 100%; height: 42px; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields .full { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.radios { display: flex; gap: 6px; }
.radios label { flex: 1; }
.radios input { position: absolute; opacity: 0; pointer-events: none; }
.radios span { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; background: var(--surface); }
.radios input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.radios input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.help { color: var(--muted); font-size: 13px; }
.section-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.subs { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sub-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 10px 12px; }
.sub-row:first-child { border-top: 0; }
.sub-row:hover { background: var(--surface-2); }
.sub-row .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.move-row { display: flex; gap: 8px; }
.move-row select { flex: 1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-top: 4px; }
.form-actions .right { display: flex; gap: 10px; margin-left: auto; }
.form-error { color: var(--danger); background: var(--danger-bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-weight: 600; }
.stamp { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }

/* ---------- bildirim ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; animation: pop .18s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- giriş sayfası ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-brand h1 { font-size: 20px; letter-spacing: -.01em; line-height: 1.2; }
.login-card form { display: grid; gap: 14px; }

/* ---------- geniş ekran ---------- */
@media (min-width: 761px) {
    .fab span { display: inline; }
    .tab span { display: inline; }
}

/* ---------- tablet / dar masaüstü ---------- */
@media (max-width: 980px) {
    .board { grid-template-columns: 1fr; }
    .seg { display: flex; }
    .board .col { display: none; }
    .board .col.active { display: block; }
    .col-head { display: none; }
    .user-name { display: none; }
    .search { width: min(260px, 36vw); }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
    :root { --topbar-h: 52px; }
    .topbar { padding: 0 10px; gap: 6px; }
    .brand-name { display: none; }
    .search { flex: 1; width: auto; margin-left: 4px; }
    #btn-theme { display: none; }

    .tabs {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; margin: 0; gap: 0;
        height: calc(var(--nav-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--surface); border-top: 1px solid var(--line);
    }
    .tab { flex: 1; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 4px; border-radius: 0; font-size: 12px; }
    .tab[aria-current="page"] { box-shadow: inset 0 3px 0 var(--plate-fg); border-radius: 0; }

    .scope { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
    .scope .sel { flex: 1 1 140px; }
    .scope .sel span { display: none; }
    .scope select { width: 100%; max-width: none; }
    .chips { margin-left: 0; width: 100%; }

    main { padding: 12px 10px; }
    .fab { right: 14px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
    .fab span { display: none; }
    .fab .ico { width: 26px; height: 26px; }

    .backdrop { padding: 0; align-items: flex-end; }
    .sheet { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .sheet-body { padding: 14px 16px 22px; }
    .fields { grid-template-columns: 1fr; }
    .row { grid-template-columns: auto 1fr; }
    .row.nolead { grid-template-columns: 1fr; }
    .row-end { grid-column: 2; }
    .item { grid-template-columns: 1fr auto; }
    .item > .plate { grid-column: 1 / -1; justify-self: start; }
    .input-lg, input, select, textarea { font-size: 16px; } /* iOS yakınlaştırmayı engeller */
    .toasts { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 84px); }
    .menu { position: fixed; right: 10px; top: calc(var(--topbar-h) + 6px); }
}

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

/* ---------- proje sayfası ---------- */
.plate-link { text-decoration: none; cursor: pointer; }
.plate-link:hover { filter: brightness(1.12); }
.item-link { color: inherit; text-decoration: none; }
.item-link:hover { text-decoration: underline; }
.pj-head { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; }
.pj-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; }
.pj-title { display: flex; gap: 12px; align-items: center; }
.pj-title h2 { font-size: 20px; overflow-wrap: anywhere; }
.pj-desc { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; max-height: 14em; overflow: auto; }
.pj-desc-empty { justify-self: start; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 12px; }
.pj-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.stat { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--muted); background: var(--surface); }
.stat.bad { color: #b3261e; border-color: currentColor; font-weight: 650; }
.pj-tabs { display: flex; gap: 4px; margin: 16px 0 12px; border-bottom: 1px solid var(--line); }
.pj-tab { border: 0; background: transparent; padding: 9px 14px; font-weight: 650; color: var(--muted); border-bottom: 3px solid transparent; }
.pj-tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.pj-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pj-bar input[type="search"] { flex: 1 1 160px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--surface); }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
.timeline { position: relative; padding-left: 22px; display: grid; gap: 10px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-month { font-size: 14px; color: var(--muted); margin-top: 8px; position: relative; }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: -20px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--bg, var(--surface-2)); }
.tl-not { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.tl-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tl-title { font-size: 16px; overflow-wrap: anywhere; }
.tl-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.tl-body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.tl-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ntag { font-size: 12px; font-weight: 750; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ntag.nt1 { color: #0a5c9e; } .ntag.nt2 { color: #8a5a00; } .ntag.nt3 { color: #b3261e; }
.ntag.nt4 { color: #2e7d32; } .ntag.nt5 { color: #6a3fa0; } .ntag.nt6 { color: var(--muted); }
.tl-gorev { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 4px 0; flex-wrap: wrap; }
.tl-gorev::before { background: var(--muted); width: 8px; height: 8px; left: -19px; top: 12px; }
.tl-gbtn { display: inline-flex; gap: 8px; align-items: center; border: 0; background: transparent; text-align: left; padding: 4px 0; color: var(--ink); }
.tl-gbtn:hover .tl-gtxt { text-decoration: underline; }
.tl-gorev.done .tl-gtxt { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .pj-title h2 { font-size: 18px; } }

/* ---------- pasif proje ---------- */
.item.pasif { opacity: .65; }
.pasif-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 750; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }

/* ---------- kalıcı silme onayı ---------- */
.sil-warn { line-height: 1.5; overflow-wrap: anywhere; }
.sil-kod { font: 800 30px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3em; text-align: center; padding: 14px 10px 14px 18px; border: 2px dashed #b3261e; border-radius: 10px; color: #b3261e; background: var(--surface-2); user-select: none; -webkit-user-select: none; }
