/* ============================================================
   Kredi Karti Takip - Tasarim Sistemi
   Kaynak: awesome-omni-skills/frontend-design ilkeleri
   - OKLCH renk uzayi, tonlu notrler (marka tonu karisimi)
   - 5 adimli tipografi skalasi, 1.25 oran
   - 60-30-10 renk agirligi, tek aksan rengi
   - Tabular numerals for financial data
   - Erisilebilirlik: WCAG AA kontrast, gorunur odak halkasi, 44px dokunma hedefi
   - Harici bagimlilik YOK (CSP: style-src 'self')
   ============================================================ */

/* ---------- 1. Tasarim tokenlari ---------- */
:root {
    /* Ilkel renkler - OKLCH, perceptually uniform */
    --indigo-50:  oklch(97% 0.015 265);
    --indigo-100: oklch(94% 0.035 265);
    --indigo-200: oklch(88% 0.06 265);
    --indigo-400: oklch(66% 0.16 265);
    --indigo-500: oklch(56% 0.19 265);
    --indigo-600: oklch(48% 0.19 265);
    --indigo-700: oklch(40% 0.16 265);

    /* Tonlu notrler: saf gri yok, marka tonundan 0.008 chroma */
    --n-0:   oklch(100% 0 0);
    --n-25:  oklch(98.5% 0.005 265);
    --n-50:  oklch(97% 0.007 265);
    --n-100: oklch(94% 0.008 265);
    --n-200: oklch(89% 0.009 265);
    --n-300: oklch(80% 0.011 265);
    --n-400: oklch(68% 0.013 265);
    --n-500: oklch(55% 0.015 265);
    --n-600: oklch(45% 0.017 265);
    --n-700: oklch(35% 0.017 265);
    --n-900: oklch(20% 0.015 265);

    /* Anlamsal renkler: basari / hata / uyari / bilgi */
    --ok-50:  oklch(96% 0.03 155);
    --ok-500: oklch(52% 0.13 155);
    --ok-700: oklch(38% 0.1 155);
    --err-50:  oklch(96% 0.03 25);
    --err-500: oklch(52% 0.19 25);
    --err-700: oklch(40% 0.16 25);
    --warn-50:  oklch(96% 0.04 75);
    --warn-500: oklch(62% 0.14 75);
    --warn-700: oklch(45% 0.11 75);

    /* Anlamsal katman (dark mode icin sadece burasi degisir) */
    --bg:            var(--n-50);
    --surface:       var(--n-0);
    --surface-2:     var(--n-25);
    --border:        var(--n-200);
    --border-strong: var(--n-300);
    --text:          var(--n-900);
    --text-muted:    var(--n-600);
    --text-subtle:   var(--n-600);
    --accent:        var(--indigo-600);
    --accent-hover:  var(--indigo-700);
    --accent-soft:   var(--indigo-50);
    --accent-text:   var(--indigo-700);
    /* Tema duyarli yardimci tokenlar: sabit ilkel renk kullanimi yerine bunlar */
    --on-accent:     oklch(100% 0 0);
    --track:         var(--n-100);
    --neutral-soft:  var(--n-100);
    --neutral-text:  var(--n-700);
    --neutral-border: var(--border-strong);
    --ok:      var(--ok-500);
    --ok-soft: var(--ok-50);
    --ok-text: var(--ok-700);
    --err:      var(--err-500);
    --err-soft: var(--err-50);
    --err-text: var(--err-700);
    --warn:      var(--warn-500);
    --warn-soft: var(--warn-50);
    --warn-text: var(--warn-700);

    /* Tipografi: 1.25 oranli skala */
    --fs-xs:   0.75rem;
    --fs-sm:   0.875rem;
    --fs-base: 1rem;
    --fs-lg:   1.25rem;
    --fs-xl:   1.5rem;
    --fs-2xl:  1.875rem;
    --fs-3xl:  2.25rem;

    --lh-tight: 1.25;
    --lh-base:  1.6;

    /* Bosluk: dikey ritim = 1.5rem temel */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-full: 999px;

    --shadow-sm: 0 1px 2px oklch(20% 0.02 265 / 0.06);
    --shadow-md: 0 2px 8px oklch(20% 0.02 265 / 0.08);
    --shadow-lg: 0 8px 24px oklch(20% 0.02 265 / 0.10);

    --focus-ring: 0 0 0 3px oklch(66% 0.16 265 / 0.45);

    --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-num: "SF Mono", "Fira Code", "Cascadia Mono", Menlo, Consolas, monospace;

    color-scheme: light;
}

/* Karanlik mod: derinlik golge ile degil, yuzey rengiyle saglanir */
:root[data-theme="dark"] {
    --bg:            oklch(17% 0.012 265);
    --surface:       oklch(21% 0.014 265);
    --surface-2:     oklch(25% 0.014 265);
    --border:        oklch(30% 0.014 265);
    --border-strong: oklch(38% 0.016 265);
    --text:          oklch(95% 0.008 265);
    --text-muted:    oklch(72% 0.012 265);
    --text-subtle:   oklch(70% 0.012 265);
    --accent:        oklch(68% 0.16 265);
    --accent-hover:  oklch(74% 0.15 265);
    --accent-soft:   oklch(27% 0.06 265);
    --accent-text:   oklch(84% 0.09 265);
    --ok:      oklch(66% 0.13 155);
    --ok-soft: oklch(25% 0.04 155);
    --ok-text: oklch(84% 0.1 155);
    --err:      oklch(66% 0.17 25);
    --err-soft: oklch(25% 0.05 25);
    --err-text: oklch(85% 0.09 25);
    --warn:      oklch(74% 0.13 75);
    --warn-soft: oklch(26% 0.04 75);
    --warn-text: oklch(86% 0.09 75);
    /* Tema duyarli yardimci tokenlar (light ile ayni sozlesme) */
    --on-accent:      oklch(19% 0.012 265);
    --track:          oklch(32% 0.014 265);
    --neutral-soft:   oklch(27% 0.014 265);
    --neutral-text:   oklch(85% 0.01 265);
    --neutral-border: oklch(38% 0.016 265);
    --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.3);
    --shadow-md: 0 2px 8px oklch(0% 0 0 / 0.4);
    --shadow-lg: 0 8px 24px oklch(0% 0 0 / 0.5);
    color-scheme: dark;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--text);
    background: var(--bg);
    font-kerning: normal;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-text); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: var(--s-3) var(--s-4);
    background: var(--accent);
    color: var(--on-accent);
    border-radius: 0 0 var(--r-md) 0;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { left: 0; }

.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;
}

/* ---------- 3. Yerlesim ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: var(--s-3) var(--s-4);
    display: flex;
    align-items: center;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: var(--fs-base);
    letter-spacing: -0.01em;
}

.brand__mark {
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: var(--on-accent);
    display: grid;
    place-items: center;
    font-size: var(--fs-sm);
    font-weight: 700;
    flex: none;
}

.brand__sub {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

.site-header__user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.site-header__user form { margin: 0; }

.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 57px;
    z-index: 19;
}

.site-nav__list {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--s-4);
    display: flex;
    gap: var(--s-1);
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__link {
    display: block;
    padding: var(--s-3) var(--s-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    min-height: 44px;
    line-height: 1.25rem;
}
.site-nav__link:hover {
    color: var(--text);
    background: var(--surface-2);
}
.site-nav__link[aria-current="page"] {
    color: var(--accent-text);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.page {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: var(--s-5) var(--s-4) var(--s-7);
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: var(--s-5) var(--s-4);
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-subtle);
}

/* ---------- 4. Sayfa basligi ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-bottom: var(--s-5);
}

.page-head__title {
    font-size: var(--fs-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-head__sub {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: var(--s-1);
}

.page-head__actions {
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--s-3);
    flex-wrap: wrap;
}
.breadcrumb a { text-decoration: none; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb__sep { color: var(--text-subtle); }

/* ---------- 5. Kart / panel ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel + .panel { margin-top: var(--s-5); }

.panel__head {
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    flex-wrap: wrap;
}

.panel__title {
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.panel__hint {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.panel__body { padding: var(--s-5); }
.panel__body--flush { padding: 0; }

/* ---------- 6. KPI kutulari ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--s-4);
    margin-bottom: var(--s-5);
}

.kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-4) var(--s-5);
    box-shadow: var(--shadow-sm);
}

.kpi__label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--s-2);
}

.kpi__value {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.kpi__meta {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: var(--s-2);
}

.kpi--accent { border-color: var(--accent); background: var(--accent-soft); }
.kpi--accent .kpi__value { color: var(--accent-text); }
.kpi--danger .kpi__value { color: var(--err-text); }
.kpi--ok .kpi__value { color: var(--ok-text); }

/* Odak paneli: bu donem odenecek tutar */
.focus-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--s-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
    flex-wrap: wrap;
}

.focus-panel__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent-text);
    margin-bottom: var(--s-2);
}

.focus-panel__value {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.focus-panel__meta {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: var(--s-2);
}

.focus-panel--urgent { border-left-color: var(--err); }
.focus-panel--urgent .focus-panel__label { color: var(--err-text); }

/* ---------- 7. Kart listesi (dashboard) ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: var(--s-4);
}

.credit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.credit-card--urgent { border-color: var(--err); }
.credit-card--over { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }

.credit-card__head {
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-3);
}

.credit-card__bank {
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.credit-card__name {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: var(--s-1);
}

.credit-card__num {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-sm);
    color: var(--text-subtle);
    letter-spacing: 0.08em;
}

.credit-card__body {
    padding: var(--s-4) var(--s-5);
    display: grid;
    gap: var(--s-3);
    flex: 1;
}

.credit-card__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-3);
    font-size: var(--fs-sm);
}

.credit-card__row dt { color: var(--text-muted); }

.credit-card__row dd {
    margin: 0;
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
}

.credit-card__foot {
    padding: var(--s-3) var(--s-5) var(--s-4);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
}

/* Limit kullanim cubugu (native <progress>, CSP dostu) */
.limit-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border: none;
    border-radius: var(--r-full);
    background: var(--track);
    overflow: hidden;
    display: block;
}
.limit-bar::-webkit-progress-bar { background: var(--track); border-radius: var(--r-full); }
.limit-bar::-webkit-progress-value { background: var(--accent); border-radius: var(--r-full); }
.limit-bar::-moz-progress-bar { background: var(--accent); border-radius: var(--r-full); }
.limit-bar--warn::-webkit-progress-value { background: var(--warn); }
.limit-bar--warn::-moz-progress-bar { background: var(--warn); }
.limit-bar--over::-webkit-progress-value { background: var(--err); }
.limit-bar--over::-moz-progress-bar { background: var(--err); }

.limit-note {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: var(--s-1);
}

/* ---------- 8. Rozetler ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    padding: 2px var(--s-3);
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
    border: 1px solid transparent;
}

.badge--ok      { background: var(--ok-soft);   color: var(--ok-text);   border-color: var(--ok); }
.badge--warn    { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn); }
.badge--err     { background: var(--err-soft);  color: var(--err-text);  border-color: var(--err); }
.badge--info    { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.badge--neutral { background: var(--neutral-soft); color: var(--neutral-text); border-color: var(--neutral-border); }

/* Statement import: ordered how-it-works list, checkbox column, and the muted
   styling for rows that were already imported or skipped. */
.steps {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-5, 1.25rem);
    display: grid;
    gap: var(--space-2);
    color: var(--text-muted);
    max-width: 70ch;
}
.steps li { padding-left: var(--space-1); }
.steps strong { color: var(--text); }

.col-check { width: 3rem; text-align: center; }
.col-check input { width: 1rem; height: 1rem; cursor: pointer; }

.row-muted { opacity: 0.55; }
.row-muted .cell-strong { font-weight: 500; }

/* ---------- 9. Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    color: var(--on-accent);
    background: var(--accent);
    transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn--ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

.btn--danger { background: var(--err); }
.btn--danger:hover { background: var(--err-text); }

.btn--sm {
    padding: var(--s-2) var(--s-3);
    min-height: 36px;
    font-size: var(--fs-xs);
}

.btn--block { width: 100%; }

/* ---------- 10. Formlar ---------- */
.form { display: grid; gap: var(--s-4); }

.form--narrow { max-width: 560px; }

.field { display: grid; gap: var(--s-2); }

.field__label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text);
}

.field__help {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.field__error {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--err-text);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: var(--s-3) var(--s-3);
    font-family: inherit;
    font-size: var(--fs-base);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    transition: border-color 140ms ease-out, box-shadow 140ms ease-out;
}

input[type="number"], .num-input {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                      linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: var(--s-6);
}

.field-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--s-4);
}

.form-actions {
    display: flex;
    gap: var(--s-3);
    flex-wrap: wrap;
    padding-top: var(--s-2);
}

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-4);
    margin: 0;
}
fieldset > legend {
    padding: 0 var(--s-2);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* Filtre cubugu */
.filters {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-4) var(--s-5);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--s-5);
}

.filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--s-3) var(--s-4);
    align-items: end;
}

.filters__actions {
    display: flex;
    gap: var(--s-2);
    align-items: end;
    flex-wrap: wrap;
}

/* ---------- 11. Tablolar ---------- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

thead th {
    padding: var(--s-3) var(--s-4);
    text-align: left;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

tfoot td, tfoot th {
    padding: var(--s-3) var(--s-4);
    border-top: 2px solid var(--border-strong);
    background: var(--surface-2);
    font-weight: 700;
}

.num, .money {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.money { font-weight: 600; }

.table-actions {
    display: flex;
    gap: var(--s-2);
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
}
.table-actions form { margin: 0; display: inline-flex; }

.cell-muted { color: var(--text-muted); }
.cell-strong { font-weight: 600; }

.table-total {
    display: flex;
    justify-content: flex-end;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    font-size: var(--fs-base);
}

.table-total__label { color: var(--text-muted); }

.table-total__value {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: var(--fs-lg);
}

/* ---------- 12. Uyari / bildirim ---------- */
.alert {
    display: flex;
    gap: var(--s-3);
    padding: var(--s-4);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-size: var(--fs-sm);
    margin-bottom: var(--s-5);
}

.alert__title { font-weight: 700; margin-bottom: var(--s-1); }

.alert--error   { background: var(--err-soft);  color: var(--err-text);  border-color: var(--err); }
.alert--success { background: var(--ok-soft);   color: var(--ok-text);   border-color: var(--ok); }
.alert--warn    { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn); }
.alert--info    { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }

.notice-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--err-text);
}

/* ---------- 13. Bos durum ---------- */
.empty {
    text-align: center;
    padding: var(--s-7) var(--s-5);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-lg);
}

.empty__icon {
    width: 48px; height: 48px;
    margin: 0 auto var(--s-4);
    border-radius: var(--r-full);
    background: var(--accent-soft);
    color: var(--accent-text);
    display: grid;
    place-items: center;
    font-size: var(--fs-xl);
    font-weight: 700;
}

.empty__title {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--s-2);
}

.empty__text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    max-width: 46ch;
    margin: 0 auto var(--s-5);
}

/* ---------- 14. Rapor menusu ---------- */
.report-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--s-4);
}

.report-link {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: border-color 140ms ease-out, box-shadow 140ms ease-out;
}
.report-link:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    color: var(--text);
}

.report-link__title {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--s-2);
    color: var(--accent-text);
}

.report-link__text { font-size: var(--fs-sm); color: var(--text-muted); }

.report-link__more {
    display: block;
    margin-top: var(--s-4);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--accent);
}

/* ---------- 15. Giris ekrani ---------- */
.login-page {
    flex: 1;
    display: grid;
    place-items: center;
    padding: var(--s-5) var(--s-4);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--s-6);
}

.login-card__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
    text-align: center;
}

.login-card__title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.login-card__sub { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- 16. Yardimci siniflar ---------- */
.stack-3 { display: grid; gap: var(--s-3); }
.stack-3--end { justify-items: end; }
.stack-4 { display: grid; gap: var(--s-4); }
.stack-5 { display: grid; gap: var(--s-5); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.row-gap { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-ok { color: var(--ok-text); font-weight: 600; }
.text-err { color: var(--err-text); font-weight: 600; }
.text-warn { color: var(--warn-text); font-weight: 600; }
.nowrap { white-space: nowrap; }
.section-title {
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--s-4);
}

/* ---------- 17. Duyarli tasarim ---------- */
@media (max-width: 720px) {
    :root {
        --fs-2xl: 1.625rem;
        --fs-3xl: 1.875rem;
    }
    .page { padding: var(--s-4) var(--s-3) var(--s-6); }
    .focus-panel { padding: var(--s-4); }
    .panel__body { padding: var(--s-4); }
    .kpi__value { font-size: var(--fs-lg); }
    .site-header__inner { padding: var(--s-3); }
    .card-grid { grid-template-columns: 1fr; }
    thead th, tbody td { padding: var(--s-3); }
}

/* Hareket hassasiyeti */
@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;
    }
}

/* Yardimci yerlesim ve kategori payi cubugu */
.split {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-3);
    padding: 0.15rem 0;
    border-bottom: 1px solid var(--border);
}
.split:last-child { border-bottom: 0; }

.bar {
    display: block;
    width: 100%;
    min-width: 4rem;
    height: 0.5rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    background: var(--surface-2, #eef0f4);
    border-radius: 999px;
}
.bar__fill {
    display: block;
    height: 100%;
    width: var(--pct, 0%);
    background: var(--accent, #4f46e5);
    border-radius: inherit;
}

/* Yazdirma */
@media print {
    .site-nav, .site-header__user, .filters, .page-head__actions,
    .credit-card__foot, .table-actions, .btn { display: none !important; }
    body { background: #fff; }
    .panel, .kpi, .credit-card { box-shadow: none; border-color: #ccc; }
}
