/* ==========================================================================
   Bütçe — arayüz teması
   Nötr yüzeyler, koyu mürekkep, limon vurgu. Açık / koyu mod token'larla.
   ========================================================================== */

:root {
    --bg: #f5f6f3;
    --surface: #ffffff;
    --surface-2: #f0f1ed;
    --surface-3: #e8eae5;
    --border: #e3e5df;
    --border-strong: #cfd3cb;
    --text: #131715;
    --text-2: #4c544f;
    --text-3: #838a85;

    --ink: #131715;          /* birincil düğme / vurgu zemin */
    --ink-contrast: #ffffff;
    --accent: #c6f135;       /* limon */
    --accent-strong: #8fbf0f;/* beyaz üstünde okunur limon */
    --accent-ink: #1b2604;
    --accent-soft: #f0f9d4;

    --info: #2d6be4;   --info-soft: #e7eefc;
    --ok: #17803d;     --ok-soft: #e2f3e7;
    --warn: #b25b07;   --warn-soft: #fcefdc;
    --danger: #d4343c; --danger-soft: #fce7e7;

    /* grafik serileri */
    --chart-1: #131715;
    --chart-2: #8fbf0f;
    --chart-3: #2d6be4;
    --chart-4: #f0892a;
    --chart-5: #149384;
    --chart-6: #d14b86;
    --chart-muted: #d9ddd5;
    --chart-grid: #eceee9;

    --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --r-xs: 6px;
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --side-w: 264px;
    --top-h: 64px;

    --shadow-xs: 0 1px 2px rgba(19, 23, 21, .05);
    --shadow-sm: 0 1px 2px rgba(19, 23, 21, .04), 0 2px 6px -2px rgba(19, 23, 21, .06);
    --shadow-pop: 0 16px 40px -12px rgba(19, 23, 21, .22), 0 0 0 1px var(--border);
    --ring: 0 0 0 3px rgba(143, 191, 15, .35);

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0c0f0e;
    --surface: #141817;
    --surface-2: #1b201e;
    --surface-3: #232926;
    --border: #252b28;
    --border-strong: #343b37;
    --text: #edf0ed;
    --text-2: #a9b1ac;
    --text-3: #717a75;

    --ink: #edf0ed;
    --ink-contrast: #0c0f0e;
    --accent-strong: #c6f135;
    --accent-soft: #232d10;

    --info: #6e9cf5;   --info-soft: #172239;
    --ok: #4cc27a;     --ok-soft: #132a1c;
    --warn: #f0a24c;   --warn-soft: #2e2211;
    --danger: #f06a70; --danger-soft: #331618;

    --chart-1: #edf0ed;
    --chart-2: #c6f135;
    --chart-3: #6e9cf5;
    --chart-4: #f0a24c;
    --chart-5: #3cc2b1;
    --chart-6: #ec7aad;
    --chart-muted: #333a36;
    --chart-grid: #202623;

    --shadow-xs: none;
    --shadow-sm: 0 0 0 1px var(--border);
    --shadow-pop: 0 18px 40px -12px rgba(0, 0, 0, .6), 0 0 0 1px var(--border-strong);

    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -.012em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

.icon { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-right { text-align: right; }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow { font-size: 12px; font-weight: 500; color: var(--text-3); }

/* ------------------------------------------------------------------ yerleşim yardımcıları */
.stack { display: grid; gap: 20px; }
.stack--sm { gap: 12px; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.ml-auto { margin-left: auto; }

@media (max-width: 1180px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ marka */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--ink); display: grid; place-items: center; }
.brand__mark svg { width: 18px; height: 18px; }
.brand__name { font-size: 16px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.brand__name small { display: block; font-size: 11.5px; font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-top: 1px; }

/* ------------------------------------------------------------------ düğmeler */
.btn {
    --btn-h: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--btn-h);
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .icon { width: 16px; height: 16px; }

.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--ink-contrast); }
.btn--primary:hover { background: var(--ink); opacity: .88; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #b8e524; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: var(--danger); opacity: .9; }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn--sm { --btn-h: 32px; padding: 0 10px; font-size: 13px; }
.btn--lg { --btn-h: 46px; padding: 0 20px; font-size: 14.5px; }
.btn--icon { width: var(--btn-h); padding: 0; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------ form */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }

.field { display: grid; gap: 6px; align-content: start; }
.field__label { font-size: 13px; font-weight: 500; color: var(--text); }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--text-3); }
.field__error { font-size: 12.5px; color: var(--danger); }

.control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-xs);
    transition: border-color .15s, box-shadow .15s, background-color .4s;
}
.control:hover { border-color: var(--text-3); }
.control:focus-within { border-color: var(--accent-strong); box-shadow: var(--ring); }
.control.is-invalid { border-color: var(--danger); }
.control > .icon { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; width: 16px; height: 16px; }
.control input, .control select, .control textarea {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    font-size: 14px;
    outline: none;
}
.control textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.control > .icon ~ input { padding-left: 36px; }
.control select { appearance: none; padding-right: 34px; cursor: pointer; }
.control--select::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 7px; height: 7px;
    border-right: 1.5px solid var(--text-3);
    border-bottom: 1.5px solid var(--text-3);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.control select option { background: var(--surface); color: var(--text); }
.control__addon { padding: 0 12px; color: var(--text-3); font-size: 13px; white-space: nowrap; align-self: stretch; display: flex; align-items: center; }
.control__addon:first-child { border-right: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r-sm) 0 0 var(--r-sm); }
.control__addon:last-child { border-left: 1px solid var(--border); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.control input[type="number"], .control input.num-input { font-variant-numeric: tabular-nums; }
.control input.num-input { text-align: right; }
.control.is-flash { background: var(--accent-soft); }
.control__btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; background: none; color: var(--text-3); cursor: pointer; }
.control__btn:hover { color: var(--text); }
.control__btn .when-on { display: none; }
.control__btn[aria-pressed="true"] .when-on { display: inline-block; }
.control__btn[aria-pressed="true"] .when-off { display: none; }

/* anahtar (switch) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; }
.switch input { appearance: none; position: relative; width: 34px; height: 20px; margin: 0; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border-strong); cursor: pointer; transition: background-color .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--ink); border-color: var(--ink); }
.switch input:checked::after { transform: translateX(14px); background: var(--accent); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--text-2); }
.check input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid var(--border-strong); border-radius: 4px; background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.check input::after { content: ""; width: 8px; height: 4.5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent-strong); }
.check input:checked::after { opacity: 1; }

/* filtre çubuğu */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { min-width: 150px; flex: 1 1 150px; max-width: 240px; }
.filters .field--grow { max-width: none; flex: 2 1 220px; }
.filters .control { min-height: 36px; }
.filters .control input, .filters .control select { height: 34px; font-size: 13.5px; }

/* ------------------------------------------------------------------ kart */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    min-width: 0;
}
.card__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; min-height: 60px; }
.card__head + .card__body { padding-top: 0; }
.card__head--bordered { border-bottom: 1px solid var(--border); }
.card__head--bordered + .card__body { padding-top: 20px; }
.card__title { font-size: 14.5px; font-weight: 600; }
.card__desc { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.card__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0 !important; }
.card__foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }

/* istatistik */
.stat { position: relative; padding: 18px 20px; display: grid; gap: 6px; }
.stat__label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.stat__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.stat__icon .icon { width: 15px; height: 15px; }
.stat--accent .stat__icon { background: var(--accent); color: var(--accent-ink); }
.stat__value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.15; }
.stat__foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }

/* rozet */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge--plain::before { display: none; }
.badge--ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge--info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge--accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 500; padding: 1px 6px; border-radius: 5px; }
.delta--up { color: var(--ok); background: var(--ok-soft); }
.delta--down { color: var(--danger); background: var(--danger-soft); }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 3px; flex: none; background: var(--text-3); }
.code { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

/* ilerleme çubuğu */
.progress { position: relative; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.progress__bar { height: 100%; border-radius: inherit; background: var(--ink); transition: width .4s; }
.progress--ok .progress__bar { background: var(--accent-strong); }
.progress--warn .progress__bar { background: var(--warn); }
.progress--danger .progress__bar { background: var(--danger); }
.progress--lg { height: 10px; }
.meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.meter__val { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-2); min-width: 48px; text-align: right; }

/* ------------------------------------------------------------------ tablo */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
    position: sticky;
    top: 0;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num, .table th.num { text-align: right; }
.table tfoot td { padding: 12px 16px; font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--border); }
.table .actions { width: 1%; white-space: nowrap; text-align: right; }
.table .actions > * { vertical-align: middle; }
.table a.link, .link { color: var(--text); text-decoration: none; font-weight: 500; }
.table a.link:hover, .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.table--compact td { padding: 8px 12px; }
.table--compact th { padding: 8px 12px; }
.table tr.is-group td { background: var(--surface-2); font-weight: 600; }
.table tr.is-child td:first-child { padding-left: 36px; }
.table td.cell-sub { color: var(--text-3); font-size: 12.5px; }
.cell-title { display: grid; gap: 1px; }
.cell-title small { color: var(--text-3); }

.table--months th, .table--months td { padding: 8px 10px; }
.table--months td { font-size: 12.5px; }

/* ------------------------------------------------------------------ sayfa başlığı, sekme */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-head__text { min-width: 0; flex: 1 1 320px; }
.page-head__title { font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.page-head__desc { color: var(--text-2); margin-top: 4px; max-width: 70ch; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); text-decoration: none; margin-bottom: 8px; }
.back-link:hover { color: var(--text); }

.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; width: max-content; max-width: 100%; overflow-x: auto; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* anahtar-değer listesi */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; }

/* zaman çizelgesi */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: -14px; width: 1px; background: var(--border); }
.timeline__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.timeline__icon .icon { width: 14px; height: 14px; }
.timeline__icon--ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.timeline__icon--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.timeline__icon--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.timeline__icon--info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.timeline__body { font-size: 13.5px; padding-top: 4px; }
.timeline__meta { font-size: 12px; color: var(--text-3); }
.timeline__note { margin-top: 6px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--r-sm); color: var(--text-2); font-size: 13px; }

/* liste satırları */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.list__main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.list__main small { color: var(--text-3); }

/* boş durum */
.empty { display: grid; justify-items: center; gap: 6px; padding: 48px 24px; text-align: center; }
.empty__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--text-3); margin-bottom: 6px; }
.empty__title { font-weight: 600; font-size: 14.5px; }
.empty p { color: var(--text-2); max-width: 44ch; }
.empty .btn { margin-top: 10px; }

/* uyarı kutusu */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 13.5px; border: 1px solid transparent; }
.alert .icon { margin-top: 1px; width: 16px; height: 16px; }
.alert--error { background: var(--danger-soft); color: var(--danger); }
.alert--ok { background: var(--ok-soft); color: var(--ok); }
.alert--warn { background: var(--warn-soft); color: var(--warn); }
.alert--info { background: var(--info-soft); color: var(--info); }

/* grafik */
.chart { position: relative; width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------------ sayfalama */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.pager__links { display: flex; gap: 4px; }
.pager__links a, .pager__links span { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-xs); text-decoration: none; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.pager__links a:hover { background: var(--surface-2); color: var(--text); }
.pager__links .is-active { background: var(--ink); color: var(--ink-contrast); }
.pager__links .is-disabled { opacity: .4; }

/* ------------------------------------------------------------------ açılır menü, modal, bildirim */
.dropdown { position: relative; }
.dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    min-width: 220px;
    padding: 6px;
    background: var(--surface);
    border-radius: var(--r);
    box-shadow: var(--shadow-pop);
    animation: pop .12s ease-out;
}
.dropdown__menu[hidden] { display: none; }
.dropdown__menu--left { right: auto; left: 0; }
.dropdown__label { padding: 8px 10px 6px; font-size: 11.5px; color: var(--text-3); }
.dropdown__head { display: grid; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.dropdown__head small { color: var(--text-3); }
.dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    font-size: 13.5px;
    text-align: left;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}
.dropdown__item:hover { background: var(--surface-2); }
.dropdown__item .icon { width: 16px; height: 16px; color: var(--text-3); }
.dropdown__item.is-active { font-weight: 600; }
.dropdown__item.is-active::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); }
.dropdown__item--danger { color: var(--danger); }
.dropdown__item--danger .icon { color: var(--danger); }
.dropdown__sep { height: 1px; margin: 4px 0; background: var(--border); }

@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

.modal {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    padding: 0;
    border: 0;
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-pop);
    overflow: auto;
}
.modal--lg { width: min(820px, calc(100vw - 32px)); }
.modal--sm { width: min(420px, calc(100vw - 32px)); }
.modal[open] { animation: pop .15s ease-out; }
.modal::backdrop { background: rgba(12, 15, 14, .45); backdrop-filter: blur(2px); }
.modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 0; }
.modal__title { font-size: 16px; font-weight: 600; }
.modal__desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.modal__close { margin-left: auto; }
.modal__body { padding: 18px 20px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r);
    background: var(--ink);
    color: var(--ink-contrast);
    box-shadow: var(--shadow-pop);
    font-size: 13.5px;
    animation: toast-in .2s ease-out;
}
.toast .icon { width: 17px; height: 17px; margin-top: 1px; }
.toast--ok .icon { color: var(--accent); }
.toast--error { background: var(--danger); color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: .2s; }
.toast button { margin-left: auto; border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ uygulama iskeleti */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 50;
}
.sidebar__top { display: flex; align-items: center; height: var(--top-h); padding: 0 18px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.nav__group + .nav__group { margin-top: 16px; }
.nav__title { padding: 0 10px 6px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .12s, color .12s;
}
.nav__link .icon { width: 17px; height: 17px; color: var(--text-3); transition: color .12s; }
.nav__link:hover { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.nav__link.is-active .icon { color: var(--text); }
.nav__link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-strong); }
.nav__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }

.sidebar__foot { padding: 12px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); text-decoration: none; }
.me:hover { background: var(--surface-2); }
.me__text { min-width: 0; display: grid; line-height: 1.25; }
.me__text strong { font-size: 13px; font-weight: 600; }
.me__text small { color: var(--text-3); font-size: 12px; }

.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 600;
}
.avatar--sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar--muted { background: var(--surface-3); color: var(--text-2); }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--top-h);
    padding: 0 32px;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar__menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--text-3); }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs strong { color: var(--text); font-weight: 500; }
.crumbs .sep { opacity: .5; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.period-btn { gap: 8px; }
.period-btn .num { font-weight: 600; }
.period-btn .badge { height: 20px; font-size: 11px; }

.content { flex: 1; width: 100%; max-width: 1480px; padding: 28px 32px 56px; }

.sidebar-scrim { display: none; }

@media (max-width: 1024px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; width: min(84vw, var(--side-w)); transform: translateX(-100%); transition: transform .22s ease; }
    .shell.is-nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
    .shell.is-nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(12, 15, 14, .4); }
    .topbar { padding: 0 16px; }
    .topbar__menu { display: inline-flex; }
    .content { padding: 20px 16px 48px; }
    .period-btn .badge { display: none; }
}
@media (max-width: 560px) {
    .crumbs { display: none; }
    .page-head__title { font-size: 21px; }
    .stat__value { font-size: 22px; }
}

/* ------------------------------------------------------------------ giriş ekranı */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; min-height: 100dvh; background: var(--surface); }
.auth__main { display: flex; flex-direction: column; padding: 32px clamp(20px, 5vw, 72px); }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth__form { width: 100%; max-width: 400px; margin: auto; padding: 40px 0; }
.auth__title { font-size: 30px; font-weight: 600; letter-spacing: -.035em; margin-bottom: 8px; }
.auth__lead { color: var(--text-2); margin-bottom: 28px; font-size: 14.5px; }
.auth__form .control { min-height: 44px; }
.auth__form .control input { height: 42px; }
.auth__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-size: 12.5px; color: var(--text-3); }

.demo { margin-top: 28px; }
.demo__title { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.demo__title::before, .demo__title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.demo__list { display: grid; gap: 8px; }
.demo__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.demo__item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.demo__item.is-selected { border-color: var(--accent-strong); box-shadow: var(--ring); background: var(--surface); }
.demo__who { display: grid; min-width: 0; line-height: 1.3; }
.demo__who strong { font-size: 13.5px; font-weight: 600; }
.demo__who span { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.demo__go { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.demo__item:hover .demo__go, .demo__item.is-selected .demo__go { color: var(--text); }

/* sağ panel: ürün önizlemesi */
.auth__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    margin: 12px;
    padding: clamp(28px, 4vw, 56px);
    border-radius: 22px;
    background: #0e1210;
    color: #edf0ed;
    overflow: hidden;
    isolation: isolate;
}
:root[data-theme="dark"] .auth__aside { border: 1px solid var(--border); }
.auth__aside::before { /* ince nokta ızgara */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(160deg, #000 20%, transparent 75%);
            mask-image: linear-gradient(160deg, #000 20%, transparent 75%);
}
.auth__headline { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.04em; line-height: 1.12; max-width: 15em; }
.auth__headline em { font-style: normal; color: #c6f135; }
.auth__sub { color: #9aa39e; max-width: 40ch; margin-top: 12px; font-size: 14.5px; }

.preview { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; max-width: 600px; }
.pv-card { background: #171c1a; border: 1px solid #252c28; border-radius: 16px; padding: 18px; }
.pv-card--wide { grid-column: 1 / -1; }
.pv-label { font-size: 12px; color: #8b948f; display: flex; justify-content: space-between; gap: 8px; }
.pv-value { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.04em; margin: 6px 0 12px; }
.pv-value small { font-size: 14px; color: #8b948f; margin-left: 4px; }
.pv-bar { height: 8px; border-radius: 8px; background: #252c28; overflow: hidden; display: flex; }
.pv-bar i { display: block; height: 100%; background: #c6f135; }
.pv-bar i + i { background: #5b6660; }
.pv-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: #8b948f; }
.pv-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #c6f135; margin-right: 6px; }
.pv-legend span + span::before { background: #5b6660; }
.pv-bars { display: flex; align-items: flex-end; gap: 6px; height: 88px; margin-top: 14px; }
.pv-bars div { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; }
.pv-bars div::before { content: ""; position: absolute; inset: auto 0 0 0; height: var(--p); border: 1px dashed #3a433e; border-radius: 4px; }
.pv-bars div i { position: relative; width: 100%; height: var(--a); border-radius: 4px; background: #edf0ed; }
.pv-bars div.is-over i { background: #f06a70; }
.pv-bars div.is-now i { background: #c6f135; }
.pv-bars div.is-future i { background: transparent; }
.pv-months { display: flex; gap: 6px; margin-top: 6px; }
.pv-months span { flex: 1; text-align: center; font-size: 10px; color: #6b746f; font-family: var(--mono); }
.pv-rows { display: grid; gap: 12px; margin-top: 10px; }
.pv-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 12.5px; }
.pv-row span:nth-child(2) { font-variant-numeric: tabular-nums; color: #8b948f; }
.pv-row .pv-bar { grid-column: 1 / -1; height: 5px; }
.pv-row.is-over .pv-bar i { background: #f06a70; }
.pv-row.is-over span:nth-child(2) { color: #f06a70; }

@media (max-width: 1020px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__aside { display: none; }
}

/* tema düğmesi ikonları */
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }

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

@media print {
    .sidebar, .topbar, .page-head__actions, .filters, .pager, .toasts { display: none !important; }
    .shell { display: block; }
    .content { padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
}
