/* Aile Kasası — stiller */
/* Yazı tipleri: yerel (CSP), değişken ağırlıklı, SIL Open Font License (fonts/*-OFL.txt) */
@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
    --bg: #f6f4ef;
    --surface: #ffffff;
    --ink: #1f2a2e;
    --muted: #5d6a6e;
    --border: #e2ded4;
    --accent: #1d6a5b;
    --accent-ink: #ffffff;
    --paid: #2e7d4f;
    --partial: #b7791f;
    --overdue: #c0392b;
    --user-adem: #1d6a5b;
    --user-cemile: #3d4f9e;
    --radius: 12px;
    --font-heading: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-num: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141a1c;
        --surface: #1c2427;
        --ink: #e8ece9;
        --muted: #9aa8a6;
        --border: #2c3739;
        --accent: #3fa08a;
        --accent-ink: #0d1413;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; }

a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }

.nav ul { display: flex; flex-wrap: wrap; gap: .25rem .75rem; list-style: none; margin: 0; padding: 0; }
.nav a, .link-button {
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    background: none;
    border: 0;
    padding: .25rem 0;
    cursor: pointer;
}
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }
.nav form { margin: 0; }

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
    animation: fade-in .25s ease-out;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.muted { color: var(--muted); }

.btn {
    display: inline-block;
    padding: .6rem 1rem;
    border-radius: 8px;
    border: 0;
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.error-page { text-align: center; max-width: 480px; margin: 2rem auto; }
.error-code { font-family: var(--font-num); font-size: 3rem; margin: 0; color: var(--muted); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Formlar */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field select, .field textarea {
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}
.field input[type="color"] { width: 4rem; height: 2.5rem; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; }
.field input:focus { border-color: var(--accent); }
.btn-block { width: 100%; }
.form-inline { margin-top: 1rem; }
.auth-card { max-width: 420px; margin: 2rem auto; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-success { background: color-mix(in srgb, var(--paid) 12%, var(--surface)); border-color: var(--paid); }
.alert-error { background: color-mix(in srgb, var(--overdue) 12%, var(--surface)); border-color: var(--overdue); }
.alert-info { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: var(--accent); }
.plain-list { margin: 0; padding-left: 1.1rem; }

.grid-2 { display: grid; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.page > .card + .card, .page > h1 + .card { margin-top: 1rem; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .5rem .25rem; border-bottom: 1px solid var(--border); }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Yardımcılar */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.r { text-align: right !important; }
.meta { display: block; font-size: .85rem; color: var(--muted); }
.inline { display: inline; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-small { padding: .35rem .7rem; font-size: .9rem; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

/* Ay seçici */
.month-nav { display: flex; align-items: center; gap: .5rem; }
.month-nav__arrow { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--border); border-radius: 50%; text-decoration: none; color: var(--ink); background: var(--surface); }
.month-nav__label { font-family: var(--font-heading); font-weight: 700; min-width: 8.5rem; text-align: center; }
.month-nav__today { font-size: .9rem; }

/* Özet kutuları */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.stat__label { display: block; font-size: .8rem; color: var(--muted); }
.stat__value { font-size: 1.15rem; font-weight: 600; }

/* Filtreler */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.field--inline { min-width: 10rem; }

/* Durum etiketleri (metin + renk) */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; transition: color .3s, background-color .3s; }
.badge--odendi { color: var(--paid); }
.badge--kismi { color: var(--partial); }
.badge--gecikmis { color: var(--overdue); }
.badge--odenmedi { color: var(--muted); }
.badge--iptal { color: var(--muted); border-style: dashed; }

.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--user-color, var(--muted)); vertical-align: middle; margin-left: .2rem; }

/* Tablolar */
.table td { vertical-align: top; }
.table tr.is-cancelled td { opacity: .55; }
.table tr.is-cancelled strong { text-decoration: line-through; }
.actions { white-space: nowrap; text-align: right; }
.actions .inline, .actions form { display: inline; }

/* İşlem menüsü */
.menu { position: relative; display: inline-block; text-align: left; }
.menu summary { cursor: pointer; list-style: none; padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu__body { position: absolute; right: 0; z-index: 10; margin-top: .35rem; min-width: 15rem; display: grid; gap: .75rem; padding: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.menu__body form { display: grid; gap: .4rem; }
.form-row input { padding: .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }

/* Açılır kart */
.collapsible { margin-top: 1rem; }
.collapsible summary { cursor: pointer; list-style: none; }
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary h2 { display: inline; font-size: 1.1rem; }
.collapsible summary h2::before { content: "+ "; color: var(--accent); }
.collapsible[open] summary h2::before { content: "− "; }
.collapsible[open] summary { margin-bottom: 1rem; }

.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: .35rem; }
.choice { display: flex; align-items: center; gap: .4rem; font-weight: 400; margin-bottom: .25rem; }
.form-card { max-width: 760px; }
.field input[type="month"] { width: 100%; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
.empty { text-align: center; }

/* Mobil: tablo satırları kart olur */
@media (max-width: 960px) {
    .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .75rem; }
    .table td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    .table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; }
    .table td:first-child { display: block; text-align: left; padding-bottom: .5rem; }
    .table td:first-child::before { display: none; }
    .table td.actions { justify-content: flex-end; padding-top: .5rem; }
    .menu__body { position: static; box-shadow: none; margin-top: .5rem; }
}

[hidden] { display: none !important; }
.nav li { display: flex; align-items: center; }
.link-button { line-height: inherit; }

/* Kişi başına yük */
.load { margin-bottom: 1rem; }
.load__title { font-size: 1rem; margin-bottom: .5rem; }
.load__grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.load__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.load__who { font-weight: 600; }
.load__amount { font-size: 1.15rem; font-weight: 600; margin: .15rem 0 .4rem; }
.bar { height: .5rem; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: .35rem; }
.bar__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--user-color, var(--accent)); transition: width .6s ease-out; }

/* Ödeme */
@media (min-width: 900px) { .stats--5 { grid-template-columns: repeat(5, 1fr); } }
.actions .btn + .btn, .actions .btn + .menu { margin-left: .25rem; }
.history-toggle { font-size: .85rem; color: var(--accent); padding: .25rem 0 0; }
.table tr.history td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.history__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.history__item { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.meta-inline { color: var(--muted); font-size: .85rem; }
.danger { color: var(--overdue); }
.danger-btn { background: var(--overdue); color: #fff; }
.confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.badge--changed { animation: badge-pop .5s ease-out; }
@keyframes badge-pop { 0% { transform: scale(.85); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
.row-flash td { animation: row-flash 1.2s ease-out; }
@keyframes row-flash { 0% { background: color-mix(in srgb, var(--paid) 25%, transparent); } 100% { background: transparent; } }

/* Alttan açılan pencere (mobilde bottom-sheet) */
.sheet { border: 0; border-radius: var(--radius); padding: 1.25rem; width: min(480px, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgb(0 0 0 / .25); }
.sheet::backdrop { background: rgb(0 0 0 / .45); }
.sheet[open] { animation: sheet-in .25s ease-out; }
.sheet h2 { font-size: 1.15rem; }
.sheet__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 600px) {
    .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; }
    .sheet__actions .btn { flex: 1; }
}

/* Bildirim */
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; box-shadow: 0 8px 24px rgb(0 0 0 / .2); animation: fade-in .2s ease-out; max-width: calc(100vw - 2rem); }
.toast--error { background: var(--overdue); color: #fff; }

/* Mobilde geçmiş satırı */
@media (max-width: 960px) {
    .table tr.history { margin-top: -.6rem; border-top-left-radius: 0; border-top-right-radius: 0; }
    .table tr.history td { display: block; background: none; }
}

/* Kasa */
.balance { display: grid; gap: .25rem; margin-bottom: 1rem; text-align: center; }
.balance__value { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 700; }
.section-title { font-size: 1.1rem; margin: 1.25rem 0 .75rem; }
.table td.num, .table td .num { white-space: nowrap; }
.table td[data-label="Ödenen"] { white-space: nowrap; }
@media (min-width: 961px) {
    .expenses { font-size: .95rem; }
    .expenses td.actions { width: 1%; }
}
@media (min-width: 961px) and (max-width: 1180px) {
    .expenses td.actions { white-space: normal; min-width: 6.5rem; }
    .expenses td.actions > * { margin: 0 0 .3rem !important; display: block; width: 100%; }
    .expenses td.actions .menu summary { text-align: center; }
}

/* Nakit akışı (renkler dataviz doğrulayıcısından geçti: açık ve koyu) */
:root { --c-income: #1f8a70; --c-expense: #b0643a; --c-balance: #1f2a2e; }
@media (prefers-color-scheme: dark) { :root { --c-income: #2fa283; --c-expense: #c97a4c; --c-balance: #e8ece9; } }
@media (min-width: 900px) { .stats--4 { grid-template-columns: repeat(4, 1fr); } }
.flow-income { color: inherit; }
.flow-expense { color: inherit; }
.danger { color: var(--overdue) !important; }
.chart-card { margin: 1rem 0; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; }
.chart-head h2 { font-size: 1.05rem; margin: 0; }
.chart-box { position: relative; height: 320px; margin-top: .75rem; }
@media (max-width: 600px) { .chart-box { height: 260px; } }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .35rem; }
.legend__swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; }
.legend__swatch--income { background: var(--c-income); }
.legend__swatch--expense { background: var(--c-expense); }
.legend__swatch--balance { height: 2px; width: 1.1rem; background: var(--c-balance); border-radius: 0; }
.legend__swatch--plan { border: 1px dashed var(--muted); background: transparent; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flow-table { min-width: 560px; }
.flow-table th[scope="row"] { text-align: left; font-weight: 600; }
.flow-row--future td, .flow-row--future th { color: var(--muted); }
.flow-row--future td strong { color: var(--ink); }
.flow-row--current { background: color-mix(in srgb, var(--accent) 7%, transparent); }
/* Akış tablosu dar ekranda da tablo kalır (yatay kaydırma kutu içinde) */
@media (max-width: 960px) {
    .flow-table { display: table !important; }
    .flow-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group !important; }
    .flow-table tbody { display: table-row-group !important; }
    .flow-table tr { display: table-row !important; border: 0; padding: 0; margin: 0; background: none; }
    .flow-table td, .flow-table th { display: table-cell !important; width: auto !important; padding: .5rem .35rem; border-bottom: 1px solid var(--border); text-align: right; }
    .flow-table th[scope="row"] { text-align: left; }
    .flow-table td::before { display: none !important; }
}

/* Özet ekranı */
:root {
    --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100;
    --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #4a3aa7;
}
@media (prefers-color-scheme: dark) {
    :root {
        --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
        --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9;
    }
}
.cat-1 { background: var(--cat-1); } .cat-2 { background: var(--cat-2); } .cat-3 { background: var(--cat-3); }
.cat-4 { background: var(--cat-4); } .cat-5 { background: var(--cat-5); } .cat-6 { background: var(--cat-6); }
.cat-7 { background: var(--cat-7); }
.dash-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 860px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.dash-grid > .card h2, .progress-card strong { font-size: 1.05rem; }
.progress-card { margin-top: 0; }
.progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.bar--lg { height: .8rem; }
.bar__fill--accent { background: var(--accent); }
.bar--split { display: flex; gap: 2px; background: var(--border); }
.bar--split .bar__fill { border-radius: 0; }
.bar--split .bar__fill:first-child { border-radius: 999px 0 0 999px; }
.bar__fill--cash { opacity: .45; }
.who-list, .upcoming, .inst-list, .cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.who-list__head { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.legend-inline { display: flex; align-items: center; gap: .35rem; margin-top: .75rem; }
.swatch { display: inline-block; width: .9rem; height: .5rem; border-radius: 999px; background: var(--muted); }
.swatch--cash { opacity: .45; margin-left: .6rem; }
.upcoming__item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.upcoming__item:last-child { border-bottom: 0; padding-bottom: 0; }
.upcoming__item .actions .btn + .btn { margin-left: .25rem; }
.inst-list li { display: grid; grid-template-columns: 1fr auto; gap: .15rem .5rem; }
.inst-list .meta, .inst-list .bar { grid-column: 1 / -1; }
.donut-wrap { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 520px) { .donut-wrap { grid-template-columns: 180px 1fr; } }
.donut-box { position: relative; height: 180px; }
.cat-list { gap: .45rem; }
.cat-list li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .5rem; }
.month-nav__label:focus { outline: none; }

/* Raporlar */
.report-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.report-table { min-width: 860px; }
.report-table tfoot th, .report-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.report-table th[scope="row"], .plain-table th[scope="row"] { text-align: left; font-weight: 600; }
/* Bu tablolar dar ekranda kart olmaz, kutu içinde kaydırılır */
@media (max-width: 960px) {
    .report-table, .plain-table { display: table !important; }
    .report-table thead, .plain-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group !important; }
    .report-table tbody, .plain-table tbody { display: table-row-group !important; }
    .report-table tfoot { display: table-footer-group !important; }
    .report-table tr, .plain-table tr { display: table-row !important; border: 0; padding: 0; margin: 0; background: none; }
    .report-table td, .report-table th, .plain-table td, .plain-table th { display: table-cell !important; width: auto !important; padding: .5rem .35rem; border-bottom: 1px solid var(--border); }
    .report-table td::before, .plain-table td::before { display: none !important; }
}
.dash-grid > *, .card { min-width: 0; }

/* Erişilebilirlik ve mobil menü (Faz 7) */
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .5rem .9rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: .5rem; }
.num { font-feature-settings: "tnum" 1; }
@media (max-width: 760px) {
    .site-header { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .35rem; padding-bottom: 0; }
    .nav { margin: 0 -1rem; min-width: 0; }
    .nav ul { flex-wrap: nowrap; overflow-x: auto; gap: 1.1rem; padding: .25rem 1rem .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .nav ul::-webkit-scrollbar { display: none; }
    .nav li { flex: 0 0 auto; }
    .nav a, .link-button { white-space: nowrap; padding: .35rem 0; }
}
@media (forced-colors: active) {
    .bar__fill, .dot, .legend__swatch { forced-color-adjust: none; }
    .badge { border: 1px solid CanvasText; }
}
main:focus { outline: none; }
