/* ============================================
   moneybox — Terminal Design System
   Font: IBM Plex Sans (UI) + IBM Plex Mono (sayılar)
   Brand: #0f62fe (Blue)
   v3.0 — 2026-04-09
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

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

:root {
    /* ════════════════════════════════════════════
       NEW SEMANTIC TOKENS — Tek kaynak (source of truth)
       ════════════════════════════════════════════ */

    /* ── Arka Plan ── */
    --bg-base:        #0a0a0a;
    --bg-surface:     #141414;
    --bg-card:        #292929;
    --bg-fill-hover:  rgba(255, 255, 255, 0.06);
    --bg-fill-active: rgba(255, 255, 255, 0.10);

    /* ── Ön Plan (Metin) ── */
    --fg-primary:     #ffffff;
    --fg-secondary:   rgba(255, 255, 255, 0.80);
    --fg-tertiary:    rgba(255, 255, 255, 0.60);
    --fg-disabled:    rgba(255, 255, 255, 0.20);

    /* ── Border ── */
    --border-subtle:  rgba(255, 255, 255, 0.10);
    --border-default: rgba(255, 255, 255, 0.15);
    --border-strong:  rgba(255, 255, 255, 0.30);

    /* ── Marka / Durum ── */
    --brand:          #0f62fe;
    --brand-light:    #2985ff;
    --success:        #30b757;
    --danger:         #fa4d56;
    --warning:        #f9a307;

    /* ════════════════════════════════════════════
       LEGACY ALIASES — Mevcut bileşenler bu isimleri kullanıyor.
       Hepsi yukarıdaki yeni token'lara eşleniyor.
       ════════════════════════════════════════════ */

    /* ── Primary → Brand ── */
    --primary-color:          var(--brand);
    --primary-hover-color:    var(--brand-light);
    --primary-selected-color: rgba(15, 98, 254, 0.25);
    --primary-light:          rgba(15, 98, 254, 0.12);
    --primary-dim:            rgba(15, 98, 254, 0.10);

    /* ── Accent Renkler ── */
    --accent-blue:     var(--brand);
    --accent-blue-bg:  rgba(15, 98, 254, 0.12);
    --accent-green:    var(--success);
    --accent-green-bg: rgba(48, 183, 87, 0.12);
    --accent-orange:   var(--warning);
    --accent-orange-bg:rgba(249, 163, 7, 0.12);
    --accent-red:      var(--danger);
    --accent-red-bg:   rgba(250, 77, 86, 0.12);
    --accent-teal:     #08bdba;
    --accent-teal-bg:  rgba(8, 189, 186, 0.12);

    /* ── Metin → fg ── */
    --primary-text-color:   var(--fg-primary);
    --secondary-text-color: var(--fg-secondary);
    --placeholder-color:    var(--fg-tertiary);
    --disabled-text-color:  var(--fg-disabled);
    --link-color:           var(--brand-light);

    /* ── Text Scale → fg ── */
    --text-primary:   var(--fg-primary);
    --text-secondary: var(--fg-secondary);
    --text-muted:     var(--fg-tertiary);

    /* ── Zemin → bg ── */
    --primary-background-color:   var(--bg-base);
    --secondary-background-color: var(--bg-surface);
    --elevated-background-color:  var(--bg-card);
    --ui-background-color:        var(--bg-card);
    --ui-border-color:            var(--border-default);
    --layout-border-color:        var(--border-subtle);

    /* ── Surface → bg ── */
    --surface-0:   var(--bg-surface);
    --surface-50:  #111111;
    --surface-100: var(--bg-card);
    --surface-200: #333333;
    --surface-300: #3d3d3d;

    /* ── Durum → success/danger/warning ── */
    --positive-color:          var(--success);
    --positive-color-hover:    #28a34a;
    --positive-color-selected: rgba(48, 183, 87, 0.15);
    --negative-color:          var(--danger);
    --negative-color-hover:    #da1e28;
    --negative-color-selected: rgba(250, 77, 86, 0.15);
    --warning-color:           var(--warning);
    --warning-color-hover:     #d48806;

    --inverted-color-background: var(--fg-primary);

    /* ── Gölgeler ── */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.50);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.60);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.70);
    /* Geriye dönük uyum */
    --box-shadow-xs:     var(--shadow-sm);
    --box-shadow-small:  var(--shadow-md);
    --box-shadow-medium: var(--shadow-lg);
    --box-shadow-large:  0 8px 32px rgba(0, 0, 0, 0.80);

    /* ── Spacing ── */
    --spacing-xs: 4px;
    --spacing-small: 8px;
    --spacing-medium: 16px;
    --spacing-large: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* ── Border Radius ── */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --radius-2xl: 8px;
    --radius-full: 9999px;
    /* Geriye dönük uyum */
    --border-radius-small: 4px;
    --border-radius-medium: 6px;
    --border-radius-big: 8px;

    /* ── Font ── */
    --font-family-heading: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --font-family-text:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --font-family-mono:    'IBM Plex Mono', ui-monospace, 'Cascadia Code', monospace;

    /* ── Font Size Skalası ── */
    --font-size-xs: 12px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;

    /* ── Font Weight Skalası ── */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* ── Line Height Skalası ── */
    --line-height-tight: 20px;
    --line-height-normal: 20px;
    --line-height-heading: 32px;

    /* ── Motion ── */
    --motion-productive-short: 70ms;
    --motion-productive-medium: 100ms;
    --motion-productive-long: 150ms;
    --motion-expressive-short: 250ms;
    --motion-expressive-long: 400ms;
    --motion-easing-enter: cubic-bezier(0, 0, 0.35, 1);
    --motion-easing-exit: cubic-bezier(0.4, 0, 1, 1);
    --motion-easing-transition: cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Accent (geriye dönük uyum) ── */
    --accent:     var(--brand);
    --accent-dim: rgba(15, 98, 254, 0.10);

    /* ── İşlem Renkleri ── */
    --color-deposit:       var(--success);
    --color-deposit-text:  #fff;
    --color-withdraw:      var(--danger);
    --color-withdraw-text: #fff;
    --color-transfer:      var(--brand);
    --color-transfer-text: #fff;
    --color-forex:         var(--brand-light);
    --color-loc-bank:      var(--brand);
    --color-loc-broker:    var(--warning);
    --color-loc-safe:      #08bdba;

    /* ── Grafik ── */
    --chart-text-color:   var(--fg-tertiary);
    --chart-border-color: var(--border-subtle);

    /* ── Modal/Overlay ── */
    --overlay-bg:     rgba(0, 0, 0, 0.70);
    --nav-overlay-bg: rgba(0, 0, 0, 0.60);

    /* ── Sidebar ── */
    --sidebar-w-collapsed: 64px;
    --sidebar-w-expanded: 220px;
}

/* ============================================
   Light Theme — Terminal Design System
   ============================================ */
[data-theme="light"] {
    /* ── Arka Plan ── */
    --bg-base:        #f4f4f4;
    --bg-surface:     #ffffff;
    --bg-card:        #ffffff;
    --bg-fill-hover:  rgba(0, 0, 0, 0.04);
    --bg-fill-active: rgba(0, 0, 0, 0.08);

    /* ── Ön Plan (Metin) ── */
    --fg-primary:     #161616;
    --fg-secondary:   rgba(22, 22, 22, 0.78);
    --fg-tertiary:    rgba(22, 22, 22, 0.50);
    --fg-disabled:    rgba(22, 22, 22, 0.25);

    /* ── Border ── */
    --border-subtle:  rgba(0, 0, 0, 0.08);
    --border-default: rgba(0, 0, 0, 0.15);
    --border-strong:  rgba(0, 0, 0, 0.30);

    /* ── Primary → Brand ── */
    --primary-color:          var(--brand);
    --primary-hover-color:    var(--brand-light);
    --primary-selected-color: rgba(15, 98, 254, 0.10);
    --primary-light:          rgba(15, 98, 254, 0.06);
    --primary-dim:            rgba(15, 98, 254, 0.06);

    /* ── Metin → fg ── */
    --primary-text-color:   var(--fg-primary);
    --secondary-text-color: var(--fg-secondary);
    --placeholder-color:    var(--fg-tertiary);
    --disabled-text-color:  var(--fg-disabled);
    --link-color:           var(--brand);

    /* ── Text Scale → fg ── */
    --text-primary:   var(--fg-primary);
    --text-secondary: var(--fg-secondary);
    --text-muted:     var(--fg-tertiary);

    /* ── Zemin → bg ── */
    --primary-background-color:   var(--bg-base);
    --secondary-background-color: var(--bg-surface);
    --elevated-background-color:  #e8e8e8;
    --ui-background-color:        #e0e0e0;
    --ui-border-color:            var(--border-default);
    --layout-border-color:        var(--border-subtle);

    /* ── Surface → bg ── */
    --surface-0:   var(--bg-surface);
    --surface-50:  #f4f4f4;
    --surface-100: #e8e8e8;
    --surface-200: #e0e0e0;
    --surface-300: #c6c6c6;

    /* ── Durum Renkleri ── */
    --positive-color:          var(--success);
    --positive-color-hover:    #28a34a;
    --positive-color-selected: rgba(48, 183, 87, 0.10);
    --negative-color:          var(--danger);
    --negative-color-hover:    #da1e28;
    --negative-color-selected: rgba(250, 77, 86, 0.10);
    --warning-color:           var(--warning);
    --warning-color-hover:     #d48806;

    --inverted-color-background: var(--fg-primary);

    /* ── Gölgeler (Light) ── */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.12);
    /* Geriye dönük uyum */
    --box-shadow-xs:     var(--shadow-sm);
    --box-shadow-small:  var(--shadow-md);
    --box-shadow-medium: var(--shadow-lg);
    --box-shadow-large:  0 8px 32px rgba(0, 0, 0, 0.15);

    /* ── Accent ── */
    --accent:     var(--brand);
    --accent-dim: rgba(15, 98, 254, 0.06);

    /* ── Accent Renkler (Light) ── */
    --accent-blue-bg:  rgba(15, 98, 254, 0.08);
    --accent-green-bg: rgba(48, 183, 87, 0.08);
    --accent-orange-bg:rgba(249, 163, 7, 0.08);
    --accent-red-bg:   rgba(250, 77, 86, 0.08);
    --accent-teal-bg:  rgba(8, 189, 186, 0.08);

    /* ── İşlem Renkleri ── */
    --color-deposit:       var(--success);
    --color-deposit-text:  #fff;
    --color-withdraw:      var(--danger);
    --color-withdraw-text: #fff;
    --color-transfer:      var(--brand);
    --color-transfer-text: #fff;
    --color-forex:         var(--brand);
    --color-loc-bank:      var(--brand);
    --color-loc-broker:    var(--warning);
    --color-loc-safe:      #08bdba;

    /* ── Grafik ── */
    --chart-text-color:   var(--fg-tertiary);
    --chart-border-color: var(--border-subtle);

    /* ── Modal/Overlay ── */
    --overlay-bg:     rgba(0, 0, 0, 0.50);
    --nav-overlay-bg: rgba(0, 0, 0, 0.30);
}

body {
    background: var(--bg-base);
    color: var(--fg-primary);
    font-family: var(--font-family-text);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Sayısal Fontlar (IBM Plex Mono) ── */
/* Sadece sayı, fiyat, yüzde, istatistik içeren elementler */
.stat-card .value,
.kpi-value,
.kpi-sub,
.dist-value,
.dist-pct,
.txn-amount,
.txn-date,
.pct-pill,
.perf-table td.num,
.perf-stat-val,
.perf-rank,
.trend,
.rate-value,
.acc-bar-val,
.acc-bar-pct,
.acc-bar-meta .amount,
.alloc-bar-val,
.alloc-bar-pct,
.acc-card-val,
.acc-card-pct,
.wl-val,
.wl-pct,
.perf-overlay-val,
.account-list-value span,
.account-list-value small,
.cash-kpi-value,
.gd-kpi-value,
.gt-price-value,
table td:not(:first-child) {
    font-family: var(--font-family-mono);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Tipografi
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--fg-primary);
    line-height: var(--line-height-heading);
    font-weight: var(--font-weight-bold);
}
h1 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--font-size-xl);  font-weight: var(--font-weight-semibold); }
h3 { font-size: var(--font-size-lg);  font-weight: var(--font-weight-semibold); }
h4 { font-size: var(--font-size-md);  font-weight: var(--font-weight-semibold); }

p {
    font-size: var(--font-size-md);
    color: var(--fg-secondary);
    line-height: var(--line-height-normal);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: opacity var(--motion-productive-long) var(--motion-easing-transition);
}
a:hover { opacity: 0.8; }

small, .text-xs  { font-size: var(--font-size-xs); }
.text-sm         { font-size: var(--font-size-sm); }
.text-md         { font-size: var(--font-size-md); }
.text-lg         { font-size: var(--font-size-lg); }

.text-primary    { color: var(--text-primary); }
.text-secondary  { color: var(--text-secondary); }
.text-muted      { color: var(--text-muted); }
.text-positive   { color: var(--success); }
.text-negative   { color: var(--danger); }
.text-warning    { color: var(--warning); }
.text-accent     { color: var(--brand); }

.font-normal  { font-weight: var(--font-weight-normal); }
.font-medium  { font-weight: var(--font-weight-medium); }
.font-semibold{ font-weight: var(--font-weight-semibold); }
.font-bold    { font-weight: var(--font-weight-bold); }

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.text-nowrap { white-space: nowrap; }
.text-right  { text-align: right; }
.text-center { text-align: center; }

/* ============================================================
   SIDEBAR NAVİGASYON
   ============================================================ */

/* ── Sidebar Durum Değişkenleri ────────────────────────────── */
:root {
    --sidebar-current-w: var(--sidebar-w-collapsed);
    --topbar-h: 0px;   /* Desktop'ta topbar yok */
}
html[data-sidebar="expanded"] {
    --sidebar-current-w: var(--sidebar-w-expanded);
}

/* ── Full-screen layout ────────────────────────────────────── */
body {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-current-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width 0.22s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

/* ── Logo ──────────────────────────────────────────────────── */
.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    height: 60px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}
/* Sidebar logo: collapsed = sadece icon, expanded = tam logo */
.sidebar-logo-icon-only { display: block; flex-shrink: 0; }

/* Tam logolar her zaman gizli — sadece expanded+doğru tema kombinasyonunda görünür */
.sidebar-logo-full.logo-for-dark,
.sidebar-logo-full.logo-for-light { display: none; max-width: 100%; }

/* Dark tema + expanded */
html[data-sidebar="expanded"] .sidebar-logo                      { justify-content: flex-start; }
html[data-sidebar="expanded"] .sidebar-logo-icon-only            { display: none; }
html[data-sidebar="expanded"] .sidebar-logo-full.logo-for-dark   { display: block; height: 26px; }
html[data-sidebar="expanded"] .sidebar-logo-full.logo-for-light  { display: none; }

/* Light tema + expanded */
html[data-sidebar="expanded"][data-theme="light"] .sidebar-logo-full.logo-for-dark  { display: none; }
html[data-sidebar="expanded"][data-theme="light"] .sidebar-logo-full.logo-for-light { display: block; height: 26px; }

/* Mobile logo: tema-aware (logo-for-* class'larını burada da kullanıyoruz) */
.mobile-logo .logo-for-dark  { display: block; }
.mobile-logo .logo-for-light { display: none; }
html[data-theme="light"] .mobile-logo .logo-for-dark  { display: none; }
html[data-theme="light"] .mobile-logo .logo-for-light { display: block; }

/* Legacy classes */
.sidebar-logo-icon { display: none; }
.sidebar-logo-text { display: none; }

/* ── Nav ───────────────────────────────────────────────────── */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 44px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    transition:
        background 0.12s ease,
        color 0.12s ease;
    position: relative;
}
.sidebar-item:hover {
    background: var(--bg-fill-hover);
    color: var(--fg-primary);
    opacity: 1;
}
.sidebar-item.active {
    background: var(--bg-fill-active);
    color: var(--fg-primary);
    font-weight: var(--font-weight-semibold);
}
.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--fg-primary);
    border-radius: 0 2px 2px 0;
}
.sidebar-item-logout:hover {
    color: var(--danger);
    background: rgba(250, 77, 86, 0.08);
}

/* ── Sidebar İkonlar ───────────────────────────────────────── */
.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.sidebar-icon svg {
    width: 20px;
    height: 20px;
}

/* ── Sidebar Label ─────────────────────────────────────────── */
.sidebar-label {
    font-size: .85rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
}
html[data-sidebar="expanded"] .sidebar-label {
    opacity: 1;
    transition-delay: 0.08s;
}

/* ── Tema ikonları ─────────────────────────────────────────── */
.icon-sun  { display: block; }
.icon-moon { display: none; }
html[data-theme="light"] .icon-sun  { display: none; }
html[data-theme="light"] .icon-moon { display: block; }


/* ── Alt araçlar ───────────────────────────────────────────── */
.sidebar-bottom {
    padding: 8px 0;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

/* ── Genişlet / Daralt butonu ──────────────────────────────── */
.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 44px;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.12s, color 0.12s;
}
.sidebar-toggle:hover {
    background: var(--bg-fill-hover);
    color: var(--fg-primary);
}
.toggle-icon-expand   { display: block; }
.toggle-icon-collapse { display: none; }
html[data-sidebar="expanded"] .toggle-icon-expand   { display: none; }
html[data-sidebar="expanded"] .toggle-icon-collapse { display: block; }

/* ── Tooltip (collapsed modda hover) ──────────────────────── */
.sidebar-tooltip {
    position: fixed;
    background: var(--bg-card);
    color: var(--fg-primary);
    padding: 5px 10px;
    border-radius: var(--radius-md);
    font-size: .78rem;
    font-weight: 500;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
}
.sidebar-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--bg-card);
}

/* ── Overlay (mobile) ──────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 190;
}
.sidebar-overlay.active { display: block; }

/* ── Mobile Topbar ─────────────────────────────────────────── */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    z-index: 150;
}
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.mobile-menu-btn:hover { background: var(--bg-fill-hover); }
.mobile-menu-btn svg { width: 20px; height: 20px; }
.mobile-logo { display: flex; align-items: center; }
.mobile-page-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: auto;
}

/* ── Ana İçerik Alanı ──────────────────────────────────────── */
.main-wrap {
    margin-left: var(--sidebar-current-w);
    width: calc(100% - var(--sidebar-current-w));
    min-width: 0;
    transition: margin-left 0.22s cubic-bezier(.4,0,.2,1), width 0.22s cubic-bezier(.4,0,.2,1);
    min-height: 100vh;
    box-sizing: border-box;
}

/* ============================================================
   Layout — Container
   ============================================================ */
.container {
    padding: 24px 28px;
    width: 100%;
}
/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--fg-tertiary);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--fg-tertiary);
    text-decoration: none;
    transition: color var(--motion-productive-long);
}
.breadcrumb a:hover {
    color: var(--fg-primary);
}
.breadcrumb .sep {
    color: var(--fg-disabled);
    font-size: 10px;
    user-select: none;
}
.breadcrumb .current {
    color: var(--fg-secondary);
    font-weight: var(--font-weight-medium);
}

/* ── Sayfa Başlığı ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--spacing-large);
    flex-wrap: wrap;
}
.page-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.page-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-heading);
    letter-spacing: -0.2px;
    margin: 0;
    color: var(--fg-primary);
}
.page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--fg-tertiary);
    margin: 0;
    line-height: var(--line-height-normal);
}

/* ============================================
   Stat / KPI Kartlar — Vibe Design System
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-medium);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background var(--motion-productive-long) var(--motion-easing-transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    background: var(--bg-fill-hover);
}

/* ── Üst Satır: İkon + Etiket ── */
.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.stat-card .label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--fg-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

/* ── İkon Alanı ── */
.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
/* Renk varyantları */
.stat-card-icon.color-primary { background: rgba(15, 98, 254, 0.12);  color: var(--brand-light); }
.stat-card-icon.color-blue    { background: rgba(15, 98, 254, 0.12);  color: var(--brand-light); }
.stat-card-icon.color-green   { background: rgba(48, 183, 87, 0.12);  color: var(--success);     }
.stat-card-icon.color-orange  { background: rgba(249, 163, 7, 0.12);  color: var(--warning);     }
.stat-card-icon.color-red     { background: rgba(250, 77, 86, 0.12);  color: var(--danger);      }
.stat-card-icon.color-teal    { background: rgba(8, 189, 186, 0.12);  color: #08bdba;            }

/* ── Değer ── */
.stat-card .value {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--fg-primary);
    line-height: var(--line-height-heading);
    letter-spacing: -0.3px;
}
.stat-card .value.positive { color: var(--success); }
.stat-card .value.negative { color: var(--danger); }

/* ── Alt Satır: Trend + Açıklama ── */
.stat-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-card .sub {
    font-size: var(--font-size-sm);
    color: var(--fg-tertiary);
}

/* ── Trend Göstergesi ── */
.trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}
.trend-up   { color: var(--success); background: rgba(48, 183, 87, 0.12); }
.trend-down { color: var(--danger);  background: rgba(250, 77, 86, 0.12); }
.trend-up::before   { content: '↑'; }
.trend-down::before { content: '↓'; }

/* ── Loading Skeleton ── */
.stat-card.skeleton .label,
.stat-card.skeleton .value,
.stat-card.skeleton .sub,
.stat-card.skeleton .stat-card-icon {
    background: linear-gradient(
        90deg,
        var(--surface-100) 25%,
        var(--surface-200) 50%,
        var(--surface-100) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
    color: transparent;
}
.stat-card.skeleton .label  { width: 60%;  height: 12px; }
.stat-card.skeleton .value  { width: 80%;  height: 28px; }
.stat-card.skeleton .sub    { width: 50%;  height: 11px; }

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Charts
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: var(--spacing-xl);
}
.chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: none;
}
.chart-card.full-width {
    grid-column: 1 / -1;
}
.chart-card h3 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-medium);
    color: var(--fg-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.chart-container {
    position: relative;
    width: 100%;
}

/* Distribution (Varlık Dağılımı) */
.distribution-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-medium);
}
.distribution-chart {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    position: relative;
}
.distribution-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    transition: background var(--motion-productive-short);
}
.dist-item:hover {
    background: var(--bg-fill-hover);
}
.dist-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dist-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dist-label {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--fg-primary);
}
.dist-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
}
.dist-value {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--fg-primary);
}
.dist-pct {
    font-size: 12px;
    color: var(--fg-tertiary);
    min-width: 40px;
}

/* ============================================
   Tables — Vibe Design System
   ============================================ */

/* ── Sarmalayıcı ── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: none;
    /* Beyaz boşluk fix: içerik tam genişlik */
    width: 100%;
    max-width: 100%;
    display: block;
}

/* ── Tablo ── */
table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    /* Sağ boşluk fix: auto layout, sabit genişlik yok */
    table-layout: auto;
}

/* ── Başlık ── */
table thead tr {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
}
table th {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fg-tertiary);
    padding: 11px var(--spacing-medium);
    text-align: left;
    white-space: nowrap;
    user-select: none;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 1;
}

/* ── Sıralama — tüm tablolarda geçerli (table, gd-table vs.) ── */
th.sortable {
    cursor: pointer;
    transition: color var(--motion-productive-short) var(--motion-easing-transition),
                box-shadow var(--motion-productive-short) var(--motion-easing-transition);
}
th.sortable:hover {
    color: var(--fg-secondary);
    box-shadow: inset 0 -2px 0 var(--border-default);
}
th.sort-asc,
th.sort-desc {
    color: var(--fg-primary) !important;
    box-shadow: inset 0 -2px 0 var(--brand) !important;
}

/* ── Satırlar ── */
table tbody tr {
    transition: background var(--motion-productive-short) var(--motion-easing-transition);
    border-bottom: 1px solid var(--border-subtle);
}
table tbody tr:last-child { border-bottom: none; }
table tbody tr:last-child td { border-bottom: none; }

/* Striped — kaldırıldı, temiz görünüm */
table tbody tr:hover {
    background: var(--bg-fill-hover) !important;
    cursor: pointer;
}

/* ── Hücreler ── */
table td {
    padding: 11px var(--spacing-medium);
    font-size: var(--font-size-md);
    color: var(--fg-primary);
    vertical-align: middle;
}
table td:last-child,
table th:last-child {
    /* Sağ taraf boşluk fix */
    padding-right: var(--spacing-medium);
}

/* ── Footer / Toplam Satırı ── */
table tfoot tr {
    background: var(--bg-card);
    border-top: 1px solid var(--border-default);
}
table tfoot td {
    padding: 11px var(--spacing-medium);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--fg-primary);
}

/* ── Boş Durum ── */
.table-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--fg-tertiary);
    font-size: var(--font-size-md);
}
.table-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ── Tablo Başlığı Alanı ── */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 12px;
    flex-wrap: wrap;
}
.table-header-title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--fg-primary);
}
.table-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   Forms — Vibe Design System
   ============================================ */

/* ── Form Kartı ── */
.form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-large);
    margin-bottom: var(--spacing-large);
    box-shadow: none;
}
.form-card h3 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 20px;
    color: var(--fg-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

/* ── Grid Sistemleri ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-medium);
}
.form-row {
    display: flex;
    gap: var(--spacing-medium);
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 160px; }

/* ── Grup ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ── Label ── */
.form-group label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--fg-secondary);
    letter-spacing: 0.1px;
}
.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

/* ── Input / Select / Textarea ── */
.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    height: 38px;
    color: var(--fg-primary);
    font-family: var(--font-family-text);
    font-size: var(--font-size-md);
    outline: none;
    width: 100%;
    transition: border-color var(--motion-productive-long) var(--motion-easing-transition),
                box-shadow    var(--motion-productive-long) var(--motion-easing-transition),
                background    var(--motion-productive-long) var(--motion-easing-transition);
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-strong);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.25);
    background: var(--bg-base);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--fg-tertiary);
}
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-card);
    color: var(--fg-disabled);
}

/* ── Textarea ── */
.form-group textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* ── Select ── */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6f85' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ── Hata Durumu ── */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(250, 77, 86, 0.20);
}
.form-group .error-msg {
    font-size: var(--font-size-xs);
    color: var(--danger);
    margin-top: 2px;
}

/* ── Yardım Metni ── */
.form-group .hint {
    font-size: var(--font-size-xs);
    color: var(--fg-tertiary);
    margin-top: 2px;
}

/* ── Input Prefix/Suffix ── */
.input-group {
    display: flex;
    align-items: stretch;
}
.input-group input {
    border-radius: 0;
    flex: 1;
    min-width: 0;
}
.input-prefix,
.input-suffix {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--fg-tertiary);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    flex-shrink: 0;
}
.input-prefix {
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.input-suffix {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ── Sekme (Tab) Navigasyonu — form modları için ── */
.form-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--spacing-large);
    flex-wrap: wrap;
}
.form-tab {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-text);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--fg-tertiary);
    cursor: pointer;
    transition: all var(--motion-productive-long) var(--motion-easing-transition);
    text-align: center;
    white-space: nowrap;
}
.form-tab:hover { color: var(--fg-primary); }
.form-tab.active {
    background: var(--bg-surface);
    color: var(--brand);
    box-shadow: none;
}

/* ── Toggle Switch ── */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.toggle-group:last-child { border-bottom: none; }
.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toggle-label span { font-size: var(--font-size-md); font-weight: var(--font-weight-medium); color: var(--fg-primary); }
.toggle-label small { font-size: var(--font-size-xs); color: var(--fg-tertiary); }

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--motion-productive-long) var(--motion-easing-transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--motion-productive-long) var(--motion-easing-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--brand); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================
   Buttons — Terminal Design System (5 varyant)
   ============================================ */

/* ── Base ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-text);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--motion-productive-long) var(--motion-easing-transition),
                border-color var(--motion-productive-long) var(--motion-easing-transition),
                box-shadow var(--motion-productive-long) var(--motion-easing-transition),
                opacity var(--motion-productive-long) var(--motion-easing-transition);
    line-height: 1;
    position: relative;
    overflow: hidden;
}
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.40);
}
.btn:disabled,
.btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Varyantlar ── */

/* Primary */
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}
.btn-primary:hover {
    background: var(--brand-light);
    border-color: var(--brand-light);
}
.btn-primary:active { opacity: 0.9; }

/* Secondary */
.btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-default);
    color: var(--fg-secondary);
}
.btn-secondary:hover {
    background: var(--bg-fill-active);
    border-color: var(--border-strong);
    color: var(--fg-primary);
}

/* Outline */
.btn-outline {
    background: transparent;
    border-color: var(--brand);
    color: var(--brand-light);
}
.btn-outline:hover {
    background: rgba(15, 98, 254, 0.10);
}

/* Danger */
.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: color-mix(in srgb, var(--danger) 85%, #000);
    border-color: color-mix(in srgb, var(--danger) 85%, #000);
}

/* Success (yeşil) */
.btn-success {
    background: var(--positive-color, #00b386);
    border-color: var(--positive-color, #00b386);
    color: #fff;
}
.btn-success:hover {
    background: color-mix(in srgb, var(--positive-color, #00b386) 85%, #000);
    border-color: color-mix(in srgb, var(--positive-color, #00b386) 85%, #000);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--fg-secondary);
}
.btn-ghost:hover {
    background: var(--bg-fill-hover);
    color: var(--fg-primary);
}
.btn-ghost-danger {
    color: var(--fg-tertiary);
}
.btn-ghost-danger:hover {
    background: rgba(250, 77, 86, 0.08);
    color: var(--danger);
}

/* Buton içi ikon */
.btn-icon-inline {
    display: inline-block;
    margin-right: 2px;
    font-size: 1.1em;
    vertical-align: -1px;
}

/* ── Boyutlar ── */
.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
}
.btn-md {
    height: 36px;
    padding: 0 16px;
    font-size: var(--font-size-md);
}
.btn-lg {
    height: 44px;
    padding: 0 24px;
    font-size: var(--font-size-lg);
    border-radius: var(--radius-md);
}

/* ── Full Width ── */
.btn-full { width: 100%; }

/* ── Loading Spinner ── */
.btn.loading {
    color: transparent;
    pointer-events: none;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    color: #fff;
}
.btn-secondary.loading::after,
.btn-outline.loading::after,
.btn-ghost.loading::after  { color: var(--brand); }
.btn-danger.loading::after { color: var(--danger); }

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ── Extra Small ── */
.btn-xs {
    height: 24px;
    padding: 0 8px;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}

/* ── İkon Butonlar ── */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}
.btn-icon.btn-sm { width: 28px; height: 28px; }
.btn-icon.btn-xs { width: 24px; height: 24px; font-size: .7rem; }

/* ============================================
   Asset Logo
   ============================================ */
.asset-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--logo-size, 24px);
    height: var(--logo-size, 24px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 6px;
}
.asset-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--surface-100);
}
.asset-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    font-family: var(--font-family-sans);
}

/* ============================================
   Badge — Vibe Design System (5 renk + dot)
   ============================================ */

/* ── Base ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-family: var(--font-family-text);
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    border: 1px solid transparent;
}

/* Not sütunu — tablo td mono kalıtımını sıfırla */
.not-badge,
.td-note,
table td .td-note-text {
    font-family: var(--font-family-text);
    font-size: .75rem;
    font-weight: 400;
    color: var(--fg-secondary);
    line-height: 1.4;
}
table td.td-note {
    font-family: var(--font-family-text);
    font-size: .75rem;
    color: var(--fg-tertiary);
}

/* ── Renkler — token referanslı, tema bağımsız ── */
.badge-success {
    background: rgba(48, 183, 87, 0.12);
    color: var(--success);
    border-color: rgba(48, 183, 87, 0.20);
}
.badge-warning {
    background: rgba(249, 163, 7, 0.12);
    color: var(--warning);
    border-color: rgba(249, 163, 7, 0.20);
}
.badge-danger {
    background: rgba(250, 77, 86, 0.12);
    color: var(--danger);
    border-color: rgba(250, 77, 86, 0.20);
}
.badge-info {
    background: rgba(15, 98, 254, 0.12);
    color: var(--brand-light);
    border-color: rgba(15, 98, 254, 0.20);
}
.badge-neutral {
    background: var(--bg-card);
    color: var(--fg-secondary);
    border-color: var(--border-default);
}
.badge-primary {
    background: rgba(15, 98, 254, 0.10);
    color: var(--brand-light);
    border-color: rgba(15, 98, 254, 0.20);
}
.badge-teal {
    background: rgba(8, 189, 186, 0.12);
    color: #08bdba;
    border-color: rgba(8, 189, 186, 0.20);
}

/* ── Dot Göstergesi ── */
.badge-dot::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
}

/* ── Boyutlar ── */
.badge-sm {
    padding: 2px 8px;
    font-size: var(--font-size-xs);
}
.badge-md {
    padding: 3px 10px;
    font-size: var(--font-size-sm);
}
.badge-lg {
    padding: 4px 12px;
    font-size: var(--font-size-md);
}

/* ============================================
   Modal — Vibe Design System
   Kural: blur yok, sadece opacity overlay
   ============================================ */

/* ── Overlay ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    /* blur yok — proje kuralı */
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-large);
    animation: overlayIn var(--motion-expressive-short) var(--motion-easing-enter);
}
.modal-overlay.open { display: flex; }

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── İçerik Kutusu ── */
.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn var(--motion-expressive-short) var(--motion-easing-enter);
    overflow: hidden;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Boyut Varyantları ── */
.modal-sm { max-width: 400px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 680px; }
.modal-xl { max-width: 860px; }

/* ── Header ── */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.modal-header h3 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--fg-primary);
    margin: 0;
}

/* ── Kapat Butonu ── */
.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--fg-tertiary);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--motion-productive-long) var(--motion-easing-transition),
                color var(--motion-productive-long) var(--motion-easing-transition);
    line-height: 1;
}
.modal-close:hover {
    background: var(--bg-fill-hover);
    color: var(--fg-primary);
}

/* ── Body ── */
.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
/* Eski yapı için geriye dönük uyum — modal-body olmadan doğrudan form kullanımı */
.modal-content > form {
    padding: 20px 24px;
}
.modal-content > form > .modal-footer {
    margin: 16px -24px -20px;
}
.modal-content .form-group { margin-bottom: 16px; }
.modal-content .form-group:last-of-type { margin-bottom: 0; }

/* ── Form hint (input altı açıklama) ── */
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: var(--font-size-xs);
    color: var(--fg-tertiary);
}

/* ── Footer ── */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.modal-footer-left {
    margin-right: auto;
}

/* ── Form grid 2 kolon ── */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Mobile: tam ekran alt sayfa ── */
@media (max-width: 480px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        max-height: 92vh;
        animation: modalInMobile var(--motion-expressive-short) var(--motion-easing-enter);
    }
    @keyframes modalInMobile {
        from { opacity: 0; transform: translateY(100%); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .modal-header { padding: 16px 16px 12px; }
    .modal-body   { padding: 16px; }
    .modal-footer { padding: 12px 16px 20px; }
    .form-grid-2  { grid-template-columns: 1fr; }
}

/* ============================================
   Alert Mesajları
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-md);
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-success {
    background: rgba(48, 183, 87, 0.10);
    color: var(--success);
    border-color: rgba(48, 183, 87, 0.20);
}
.alert-danger {
    background: rgba(250, 77, 86, 0.10);
    color: var(--danger);
    border-color: rgba(250, 77, 86, 0.20);
}
.alert-info {
    background: rgba(15, 98, 254, 0.10);
    color: var(--brand-light);
    border-color: rgba(15, 98, 254, 0.20);
}
.alert-warning {
    background: rgba(249, 163, 7, 0.10);
    color: var(--warning);
    border-color: rgba(249, 163, 7, 0.20);
}

/* ============================================
   Varlık Filtre Butonları
   ============================================ */
.asset-filters {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

/* ============================================
   Utilities
   ============================================ */
.text-green { color: var(--success); }
.text-red { color: var(--danger); }
.text-muted { color: var(--fg-tertiary); }
.text-right { text-align: right; }
.mt-16 { margin-top: var(--spacing-medium); }
.mt-24 { margin-top: var(--spacing-large); }
.mb-16 { margin-bottom: var(--spacing-medium); }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ============================================
   Auth Pages (Login/Register)
   ============================================ */
.auth-page {
    background: var(--primary-background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-large);
}
.auth-card {
    background: var(--secondary-background-color);
    border: 1px solid var(--layout-border-color);
    border-radius: var(--border-radius-big);
    padding: var(--spacing-xxl) var(--spacing-xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--box-shadow-medium);
}
.auth-card .logo {
    display: block;
    text-align: center;
    margin-bottom: var(--spacing-small);
}
.auth-card .logo img { height: 32px; }
.auth-card .subtitle {
    text-align: center;
    color: var(--fg-secondary);
    font-size: 14px;
    margin-bottom: var(--spacing-large);
}
.auth-card .form-group {
    margin-bottom: 14px;
}
.auth-card .form-group label {
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    color: var(--fg-secondary);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 4px;
}
.auth-card .form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--fg-primary);
    font-family: var(--font-family-text);
    font-size: 14px;
}
.auth-card .form-group input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.25);
}
.auth-card .btn-primary {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    margin-top: var(--spacing-small);
}
.auth-card .auth-link {
    text-align: center;
    margin-top: var(--spacing-medium);
    font-size: 14px;
    color: var(--fg-secondary);
}
.auth-card .auth-link a {
    color: var(--link-color);
    text-decoration: none;
}
.auth-card .auth-link a:hover { text-decoration: underline; }

.auth-card .alert {
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    font-size: 13px;
    margin-bottom: var(--spacing-medium);
}
.auth-card .alert-danger {
    background: rgba(250, 77, 86, 0.10);
    color: var(--danger);
    border: 1px solid rgba(250, 77, 86, 0.30);
}
.auth-card .alert-success {
    background: rgba(48, 183, 87, 0.10);
    color: var(--success);
    border: 1px solid rgba(48, 183, 87, 0.30);
}
.auth-card .alert a {
    color: var(--link-color);
    text-decoration: none;
    margin-left: 8px;
}

/* ============================================
   Vault
   ============================================ */
.location-card {
    transition: border-color var(--motion-productive-long), box-shadow var(--motion-productive-long);
    position: relative;
}
.location-card:hover { border-color: var(--border-strong); }
.location-card.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}
.loc-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   Dashboard — Kur Barı
   ============================================ */
.rate-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    margin-bottom: var(--spacing-large);
    box-shadow: none;
    flex-wrap: wrap;
}
.rate-bar-items {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.rate-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.rate-label {
    font-size: var(--font-size-sm);
    color: var(--fg-tertiary);
}
.rate-value {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--fg-primary);
}
.rate-date {
    font-size: var(--font-size-xs);
    color: var(--fg-tertiary);
}

/* ============================================
   Dashboard — Hesap Listesi
   ============================================ */
.account-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--motion-productive-short) var(--motion-easing-transition),
                padding    var(--motion-productive-short) var(--motion-easing-transition);
    gap: 12px;
}
.account-list-item:last-child { border-bottom: none; }
.account-list-item:hover {
    background: var(--bg-fill-hover);
    padding-left: 10px;
    padding-right: 10px;
}
.account-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.account-list-info strong {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--fg-primary);
}
.account-list-info small {
    font-size: var(--font-size-xs);
}
.account-list-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.account-list-value span {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-primary);
}
.account-list-value small {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* ============================================
   Quick Actions
   ============================================ */
.quick-actions {
    display: flex;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-large);
    flex-wrap: wrap;
}
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--fg-primary);
    text-decoration: none;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    transition: background var(--motion-productive-long) var(--motion-easing-transition),
                border-color var(--motion-productive-long) var(--motion-easing-transition);
    flex: 1;
    min-width: 130px;
    justify-content: center;
    box-shadow: none;
}
.quick-action-btn:hover {
    background: var(--bg-fill-hover);
    border-color: var(--border-default);
}
.qa-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.qa-label { font-family: var(--font-family-text); }

.qa-cash:hover  { border-color: var(--success); }
.qa-stock:hover { border-color: var(--brand); }
.qa-gold:hover  { border-color: var(--warning); }
.qa-forex:hover { border-color: var(--brand-light); }

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--motion-productive-long) var(--motion-easing-transition);
    flex-shrink: 0;
}
.theme-toggle:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.2);
}
.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* ── Light Mode Navbar ── */
[data-theme="light"] .hamburger:hover { background: var(--surface-100); }
[data-theme="light"] .hamburger span  { background: var(--text-secondary); }
[data-theme="light"] .navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: none;
}
[data-theme="light"] .navbar nav a {
    color: var(--fg-secondary);
}
[data-theme="light"] .navbar nav a:hover {
    color: var(--fg-primary);
    background: var(--bg-fill-hover);
}
[data-theme="light"] .navbar nav a.active {
    color: var(--fg-primary);
    background: var(--bg-fill-active);
    font-weight: var(--font-weight-semibold);
}
@media (max-width: 768px) {
    [data-theme="light"] .navbar nav {
        background: var(--bg-surface);
        border-left: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-lg);
    }
    [data-theme="light"] .navbar nav a { color: var(--fg-secondary); }
    [data-theme="light"] .navbar nav a:hover  { color: var(--fg-primary); background: var(--bg-fill-hover); }
    [data-theme="light"] .navbar nav a.active { color: var(--fg-primary); background: var(--bg-fill-active); }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 4px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--ui-border-color);
    border-radius: var(--border-radius-small);
}
::-webkit-scrollbar-thumb:hover { background: var(--placeholder-color); }

/* ============================================
   Responsive — Tablet (768px)
   ============================================ */
@media (max-width: 768px) {
    /* ── Sidebar: mobile davranışı ── */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s cubic-bezier(.4,0,.2,1);
        width: var(--sidebar-w-expanded); /* açıkken tam genişlik */
        z-index: 200;
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .mobile-topbar { display: flex; }
    .main-wrap {
        margin-left: 0;
        width: 100%;
        padding-top: 52px; /* topbar yüksekliği */
    }

    /* İçerik responsive */
    .charts-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .container { padding: var(--spacing-medium); }
    .form-grid-2 { grid-template-columns: 1fr; }
    .modal-content { margin: 12px; max-width: calc(100vw - 24px); }
    .page-title { font-size: 20px; }
    .quick-action-btn { min-width: 120px; padding: 8px 14px; font-size: 13px; }
    .chart-card { padding: var(--spacing-medium); }
    .chart-card h3 { font-size: 14px; }
    .distribution-chart { width: 140px; height: 140px; }
    table th { padding: 8px 10px; font-size: 11px; }
    table td { padding: 8px 10px; font-size: 13px; }
}

/* ============================================
   Responsive — Mobil (480px)
   ============================================ */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card .value { font-size: 18px; }
    .auth-card { padding: var(--spacing-xl) var(--spacing-large); }
    .modal-content { padding: var(--spacing-medium); margin: 8px; }
    .modal-header h3 { font-size: 16px; }
    .page-title { font-size: 18px; }
    .quick-action-btn { min-width: 100px; padding: 8px 10px; font-size: 12px; }
    .quick-action-btn .qa-icon { font-size: 16px; }
    .btn { padding: 6px 12px; font-size: 13px; }
    .btn-sm { padding: 4px 8px; font-size: 12px; }
    .badge { font-size: 11px; padding: 2px 6px; }
    .form-card { padding: var(--spacing-medium); }
    .form-card h3 { font-size: 14px; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 16px; }
    table th { padding: 6px 8px; font-size: 11px; }
    table td { padding: 6px 8px; font-size: 12px; }
    .stat-card { padding: 12px 14px; }
    .stat-card .label { font-size: 11px; }
    .stat-card .sub { font-size: 11px; }
    .chart-card { padding: 12px; }
}

/* ============================================
   Responsive — Kucuk Telefon (360px)
   ============================================ */
@media (max-width: 360px) {
    .container { padding: 10px; }
    .page-title { font-size: 16px; }
    .stat-card .value { font-size: 16px; }
    .navbar .logo img { height: 22px; }
}

/* ============================================================
   DASHBOARD v2 — Professional Layout
   ============================================================ */

/* ── KPI Grid ─────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background .15s;
}
.kpi-card:hover {
    background: var(--bg-fill-hover);
}

/* Hero kart — daha büyük */
.kpi-hero {
    background: var(--brand);
    border-color: transparent;
    color: #fff;
}
.kpi-hero:hover {
    background: var(--brand-light);
}
.kpi-hero .kpi-label,
.kpi-hero .kpi-label-sm,
.kpi-hero .kpi-sep { color: rgba(255,255,255,.7); }
.kpi-hero .kpi-value { color: #fff; font-size: 2rem; }
.kpi-hero .kpi-sub,
.kpi-hero #kpiCost  { color: rgba(255,255,255,.85); }

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kpi-label    { font-size: .75rem; font-weight: var(--font-weight-medium); color: var(--fg-tertiary); letter-spacing: .04em; text-transform: uppercase; }
.kpi-icon     { font-size: 1.1rem; font-weight: var(--font-weight-bold); }
.kpi-value    { font-size: 1.55rem; font-weight: var(--font-weight-bold); color: var(--fg-primary); line-height: 1.2; }
.kpi-value.positive { color: var(--success); }
.kpi-value.negative { color: var(--danger); }

.kpi-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: .75rem;
    font-weight: 600;
    width: fit-content;
}
.kpi-badge-pos     { background: rgba(48, 183, 87, 0.12);  color: var(--success); }
.kpi-badge-neg     { background: rgba(250, 77, 86, 0.12);  color: var(--danger); }
.kpi-badge-neutral { background: var(--bg-card);             color: var(--fg-secondary); }

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--fg-tertiary);
    margin-top: 2px;
}
.kpi-label-sm { font-size: .72rem; color: var(--fg-tertiary); }
.kpi-sub-row  { display: flex; align-items: center; gap: 6px; }
.kpi-sub      { font-size: .82rem; color: var(--fg-secondary); }
.kpi-sep      { color: var(--border-subtle); }

/* ── Orta Satır ───────────────────────────────────────────── */
/* ── Performans Grafiği (tam genişlik) ─────────────────────── */
.db-perf-full {
    margin-bottom: 20px;
}
.db-perf-full .perf-chart-wrap {
    height: 280px;
    position: relative;
}
.perf-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    z-index: 2;
}
.perf-overlay-item { text-align: center; }
.perf-overlay-label {
    display: block;
    font-size: .62rem;
    color: var(--fg-tertiary);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.perf-overlay-val {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fg-primary);
}
.perf-overlay-val.positive { color: var(--success); }
.perf-overlay-val.negative { color: var(--danger); }
.perf-source-label {
    font-size: .65rem;
    font-weight: 400;
    color: var(--fg-tertiary);
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: .02em;
}

/* ── Orta Bant: 3 sütun ──────────────────────────────────── */
.db-triple-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}
.db-triple-grid .chart-card {
    display: flex;
    flex-direction: column;
}
.db-triple-grid .chart-card > div:not(.chart-card-header) {
    flex: 1;
    overflow-y: auto;
}

/* ── Varlık Dağılımı: Yatay Bar ──────────────────────────── */
.alloc-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: .82rem;
}
.alloc-bar-item:last-child { border-bottom: none; }
.alloc-bar-dot {
    width: 10px; height: 10px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.alloc-bar-info { flex: 1; min-width: 0; }
.alloc-bar-name { font-weight: 500; color: var(--fg-primary); font-size: .8rem; }
.alloc-bar-sub { font-size: .68rem; color: var(--fg-tertiary); margin-top: 1px; margin-bottom: 2px; }
.alloc-bar-track {
    height: 6px;
    background: var(--bg-fill-hover);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.alloc-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .5s ease;
}
.alloc-bar-right {
    text-align: right;
    flex-shrink: 0;
    min-width: 80px;
}
.alloc-bar-val { font-weight: 600; color: var(--fg-primary); font-size: .8rem; display: block; }
.alloc-bar-pct { font-size: .7rem; color: var(--fg-tertiary); }

/* ── Hesap Kartları ──────────────────────────────────────── */
.acc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, background .15s;
    margin-bottom: 8px;
}
.acc-card:last-child { margin-bottom: 0; }
.acc-card:hover {
    border-color: var(--border-default);
    background: var(--bg-fill-hover);
}
.acc-card-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.acc-card-icon.trade { background: rgba(108,43,217,0.12); color: #6C2BD9; }
.acc-card-icon.dividend { background: rgba(18,184,134,0.12); color: #12B886; }
.acc-card-icon.cash { background: rgba(64,192,87,0.12); color: #40C057; }
.acc-card-icon.gold { background: rgba(230,119,0,0.12); color: #E67700; }
.acc-card-info { flex: 1; min-width: 0; }
.acc-card-name {
    font-weight: 600;
    font-size: .8rem;
    color: var(--fg-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acc-card-sub {
    font-size: .7rem;
    color: var(--fg-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acc-card-right { text-align: right; flex-shrink: 0; }
.acc-card-val { font-weight: 600; font-size: .82rem; color: var(--fg-primary); display: block; }
.acc-card-pct { font-size: .7rem; font-weight: 600; }
.acc-card-pct.positive { color: var(--success); }
.acc-card-pct.negative { color: var(--danger); }

/* ── Kazananlar & Kaybedenler Grid ───────────────────────── */
.db-wl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.wl-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: .82rem;
}
.wl-card:last-child { border-bottom: none; }
.wl-rank {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg-fill-hover);
    color: var(--fg-tertiary);
    font-size: .65rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wl-info { flex: 1; min-width: 0; }
.wl-name {
    font-weight: 600; font-size: .8rem; color: var(--fg-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wl-ticker { font-size: .68rem; color: var(--fg-tertiary); }
.wl-right { text-align: right; flex-shrink: 0; }
.wl-val { font-weight: 600; font-size: .8rem; display: block; }
.wl-pct {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: .68rem;
    font-weight: 700;
}
.wl-pct.positive { background: rgba(48,183,87,0.12); color: var(--success); }
.wl-pct.negative { background: rgba(250,77,86,0.12); color: var(--danger); }
.wl-empty {
    padding: 24px 0;
    text-align: center;
    font-size: .82rem;
    color: var(--fg-tertiary);
}

.db-mid-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    margin-bottom: 20px;
    align-items: start;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.chart-card-header h3 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Performans sekmeler */
.perf-tabs, .winners-toggle {
    display: flex;
    gap: 4px;
    background: var(--surface-2);
    padding: 3px;
    border-radius: var(--radius-sm);
}
.perf-tab {
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: calc(var(--radius-sm) - 1px);
    cursor: pointer;
    transition: background .12s, color .12s;
}
.perf-tab.active, .perf-tab:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* Performans grafiği */
.perf-chart-wrap { height: 220px; position: relative; margin-bottom: 12px; }

.perf-stats-row {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}
.perf-stat {
    flex: 1;
    text-align: center;
    padding: 0 8px;
}
.perf-stat + .perf-stat { border-left: 1px solid var(--border-color); }
.perf-stat-label { display: block; font-size: .68rem; color: var(--text-muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .04em; }
.perf-stat-val   { font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.perf-stat-val.positive { color: var(--success); }
.perf-stat-val.negative { color: var(--danger); }

/* Dağılım */
.alloc-chart-wrap { height: 180px; position: relative; margin-bottom: 14px; }

.alloc-legend { display: flex; flex-direction: column; gap: 8px; }
.alloc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
}
.alloc-row-left { display: flex; align-items: center; gap: 8px; }
.alloc-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.alloc-name { color: var(--text-secondary); }
.alloc-row-right { display: flex; align-items: center; gap: 10px; }
.alloc-val  { font-weight: 600; color: var(--text-primary); }
.alloc-pct  { font-size: .72rem; color: var(--text-muted); min-width: 36px; text-align: right; }

/* ── Alt Satır ────────────────────────────────────────────── */
.db-bot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* Performans tablosu */
.perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.perf-table thead th {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 0 8px 10px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.perf-table thead th.num { text-align: right; }
.perf-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background .1s;
}
.perf-table tbody tr:last-child { border-bottom: none; }
.perf-table tbody tr:hover { background: var(--surface-2); }
.perf-table td {
    padding: 10px 8px;
    color: var(--text-primary);
    vertical-align: middle;
}
.perf-table td:first-child { display: flex; align-items: center; gap: 10px; }
.perf-table td.num { text-align: right; }
.perf-table td.positive { color: var(--success); }
.perf-table td.negative { color: var(--danger); }

.perf-rank {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.perf-name { font-weight: 600; font-size: .82rem; }

.pct-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: .72rem;
    font-weight: 700;
}
.pct-pill.positive { background: rgba(48, 183, 87, 0.12); color: var(--success); }
.pct-pill.negative { background: rgba(250, 77, 86, 0.12); color: var(--danger); }

/* ── Son İşlemler ─────────────────────────────────────────── */
.txn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: .82rem;
}
.txn-row:last-child { border-bottom: none; }
.txn-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.txn-info { flex: 1; }
.txn-type { display: block; font-weight: 600; color: var(--text-primary); }
.txn-right { text-align: right; }
.txn-amount { display: block; font-weight: 600; color: var(--text-primary); }
.txn-date   { font-size: .72rem; }

/* ── Hesap Barları ────────────────────────────────────────── */
.acc-bar-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background .1s;
}
.acc-bar-item:last-child { border-bottom: none; }
.acc-bar-item:hover { opacity: .85; }
.acc-bar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: .82rem;
}
.acc-bar-name { font-weight: var(--font-weight-semibold); color: var(--fg-primary); }
.acc-bar-nums { display: flex; align-items: center; gap: 10px; }
.acc-bar-val  { font-weight: var(--font-weight-semibold); color: var(--fg-primary); }
.acc-bar-pct  { font-size: .75rem; font-weight: var(--font-weight-semibold); }
.acc-bar-pct.positive { color: var(--success); }
.acc-bar-pct.negative { color: var(--danger); }
.acc-bar-track {
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    overflow: hidden;
}
.acc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #9F4DFF 100%);
    border-radius: 2px;
    transition: width .6s ease;
    max-width: 100%;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    .kpi-hero {
        grid-column: span 2;
    }
    .db-mid-grid {
        grid-template-columns: 1fr;
    }
    .db-triple-grid {
        grid-template-columns: 1fr 1fr;
    }
    .db-triple-grid > :last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .kpi-hero         { grid-column: span 2; }
    .kpi-value        { font-size: 1.25rem; }
    .kpi-hero .kpi-value { font-size: 1.5rem; }

    .db-mid-grid,
    .db-bot-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .db-triple-grid {
        grid-template-columns: 1fr;
    }
    .db-triple-grid > :last-child {
        grid-column: auto;
    }
    .db-wl-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .db-perf-full .perf-chart-wrap { height: 220px; }
    .perf-overlay {
        position: static;
        margin-top: 12px;
        justify-content: center;
        background: transparent;
        border: none;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-hero { grid-column: auto; }
    .kpi-card { padding: 16px; }

    .perf-tabs .perf-tab { padding: 3px 8px; }
    .perf-chart-wrap { height: 180px; }
    .db-perf-full .perf-chart-wrap { height: 180px; }
}


/* ════════════════════════════════════════════════════════════
   İÇ SAYFA BİLEŞENLERİ — Terminal Design System v3.0
   ════════════════════════════════════════════════════════════ */

/* ── Global Helpers ─────────────────────────────────────────── */
.positive { color: var(--success) !important; }
.negative { color: var(--danger) !important; }

/* ── Gold Detail: KPI ───────────────────────────────────────── */
.gd-kpi-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.gd-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: background var(--motion-productive-long);
}
.gd-kpi-card:hover { background: var(--bg-fill-hover); }
.gd-kpi-hero {
    background: var(--brand);
    border-color: transparent;
    color: #fff;
}
.gd-kpi-hero:hover { background: var(--brand-light); }
.gd-kpi-hero .gd-kpi-label,
.gd-kpi-hero .gd-kpi-sub { color: rgba(255,255,255,.7); }
.gd-kpi-hero .gd-kpi-value { color: #fff; }
.gd-kpi-label { font-size:.72rem; font-weight:var(--font-weight-semibold); text-transform:uppercase; letter-spacing:.06em; color:var(--fg-tertiary); margin-bottom:6px; }
.gd-kpi-value { font-size:1.35rem; font-weight:var(--font-weight-bold); font-family:var(--font-family-mono); color:var(--fg-primary); }
.gd-kpi-sub   { font-size:.78rem; margin-top:4px; color:var(--fg-tertiary); font-family:var(--font-family-sans); }
@media(max-width:900px){ .gd-kpi-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:500px){ .gd-kpi-grid { grid-template-columns: 1fr; } }

/* ── Gold Detail: Info Card ─────────────────────────────────── */
.gd-info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 4px 0;
    display: flex;
    flex-wrap: wrap;
}
.gd-info-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 10px 20px;
    font-size: .83rem;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
}
.gd-info-row:last-child { border-bottom: none; }
.gd-info-row > span { color: var(--fg-tertiary); min-width: 80px; flex-shrink:0; }
.gd-info-row > strong { color: var(--fg-primary); }

/* ── Gold Detail: Table ─────────────────────────────────────── */
.gd-table { width:100%; border-collapse:collapse; font-size:.82rem; }
.gd-table th {
    padding:9px 12px;
    background:var(--bg-card);
    color:var(--fg-tertiary);
    font-size:.7rem; font-weight:var(--font-weight-semibold); text-transform:uppercase; letter-spacing:.05em;
    white-space:nowrap;
}
.gd-table td { padding:10px 12px; border-bottom:1px solid var(--border-subtle); vertical-align:middle; }
.gd-table tbody tr:last-child td { border-bottom:none; }
.gd-table tbody tr:hover td { background:var(--bg-fill-hover); }
.gd-table tfoot td { padding:10px 12px; border-top:1px solid var(--border-default); }
@media(max-width:768px){
    .gd-table th:nth-child(5), .gd-table td:nth-child(5),
    .gd-table th:nth-child(6), .gd-table td:nth-child(6) { display:none; }
}

/* ── Gold Detail: Custom Select ────────────────────────────── */
.gd-select { position: relative; }

.gd-select-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--fg-primary);
    font-family: var(--font-family-text);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s;
    min-height: 38px;
}
.gd-select-trigger:hover { border-color: var(--border-default); }
.gd-select.open .gd-select-trigger,
.gd-select-trigger:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 2px rgba(15,98,254,.15);
}
.gd-select-trigger.invalid { border-color: var(--danger); }

.gd-select-value { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-select-value.placeholder { color: var(--fg-tertiary); }

.gd-select-arrow {
    color: var(--fg-tertiary);
    font-size: 11px;
    flex-shrink: 0;
    transition: transform .15s;
    line-height: 1;
}
.gd-select.open .gd-select-arrow { transform: rotate(180deg); }

.gd-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    z-index: 9999;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    scrollbar-width: thin;
    scrollbar-color: var(--border-default) transparent;
}
.gd-select.open .gd-select-dropdown { display: block; }

.gd-select-group {
    padding: 8px 12px 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--fg-tertiary);
    font-family: var(--font-family-text);
    border-top: 1px solid var(--border-subtle);
}
.gd-select-group:first-child { border-top: none; }

.gd-select-option {
    padding: 7px 16px;
    font-size: 13px;
    font-family: var(--font-family-text);
    font-weight: 400;
    color: var(--fg-primary);
    cursor: pointer;
    transition: background .1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gd-select-option:hover { background: var(--bg-fill-hover); }
.gd-select-option.selected {
    color: var(--brand);
    background: rgba(15,98,254,.08);
}
@media (max-width: 480px) {
    .gd-select-dropdown { max-height: 200px; }
    .gd-select-option { font-size: 13px; padding: 9px 14px; }
}

/* ── Gold Detail: Badges ────────────────────────────────────── */
.badge-tip {
    display:inline-block; padding:2px 8px; border-radius:99px;
    font-size:.71rem; font-weight:var(--font-weight-semibold);
    background:rgba(15, 98, 254, 0.12); color:var(--brand);
}
.badge-vade {
    display:inline-block; padding:2px 8px; border-radius:99px;
    font-size:.71rem; font-weight:var(--font-weight-semibold);
    background:rgba(249, 163, 7, 0.12); color:var(--warning);
}

/* ── Gold Transaction ───────────────────────────────────────── */
.gt-price-pill {
    display: flex; flex-direction: column; align-items: flex-end;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}
.gt-price-label { font-size:.68rem; font-weight:var(--font-weight-bold); text-transform:uppercase; letter-spacing:.07em; color:var(--brand); }
.gt-price-value { font-size:1.2rem; font-weight:var(--font-weight-bold); color:var(--brand-light); font-family:var(--font-family-mono); }

.gt-step-card { margin-bottom: 14px; }
.gt-step-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.gt-step-header h3 { margin: 0; font-size: .95rem; font-weight: var(--font-weight-bold); }
.gt-step-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand); color: #fff;
    font-size: .78rem; font-weight: var(--font-weight-bold);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gt-step-buy  { background: var(--success); }
.gt-step-sell { background: var(--danger); }
.gt-step-body { padding: 18px 20px; }

.gt-info-strip {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-top: 10px; flex-wrap: wrap;
}
.gt-info-strip a { color: var(--brand-light); text-decoration:none; font-weight:var(--font-weight-semibold); }

.gt-tab-group {
    display: flex;
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden; width: fit-content; margin-top: 14px;
}
.gt-tab {
    padding: 10px 32px; border: none; background: transparent;
    cursor: pointer; font-size: .88rem; font-weight: var(--font-weight-bold);
    color: var(--fg-tertiary); transition: background .15s, color .15s; letter-spacing: .02em;
}
.gt-tab-buy.active  { background: var(--success); color: #fff; }
.gt-tab-sell.active { background: var(--danger); color: #fff; }

.gt-lot-strip {
    display: flex; flex-wrap: wrap; gap: 20px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin: 12px 0;
}
.gt-lot-cell { display: flex; flex-direction: column; gap: 3px; }
.gt-lot-label { font-size:.67rem; font-weight:var(--font-weight-bold); text-transform:uppercase; letter-spacing:.06em; color:var(--fg-tertiary); }
.gt-lot-cell strong { font-size: .88rem; }

.gt-divider { height: 1px; background: var(--border-subtle); margin: 16px 0; }

.gt-summary-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 18px; margin-top: 16px;
}
.gt-summary-title { font-size:.7rem; font-weight:var(--font-weight-bold); text-transform:uppercase; letter-spacing:.07em; color:var(--fg-tertiary); margin-bottom:12px; }
.gt-summary-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:12px 20px; }
.gt-summary-item { display:flex; flex-direction:column; gap:3px; }
.gt-summary-item span { font-size:.75rem; color:var(--fg-tertiary); }
.gt-summary-item strong { font-size:.95rem; font-weight:var(--font-weight-bold); }

.gt-flash {
    display:flex; align-items:flex-start; gap:10px;
    padding:13px 18px; border-radius:var(--radius-lg);
    margin-bottom:16px; font-size:.88rem; line-height:1.5;
}
.gt-flash-success { background:rgba(48,183,87,0.10); color:var(--success); border:1px solid rgba(48,183,87,0.20); }
.gt-flash-error   { background:rgba(250,77,86,0.10); color:var(--danger); border:1px solid rgba(250,77,86,0.20); }

.gt-form-footer {
    display:flex; gap:12px; justify-content:flex-end;
    margin-top:20px; padding-top:16px;
    border-top:1px solid var(--border-subtle);
}
.gt-btn-buy  { background:var(--success); color:#fff; border:none; padding:9px 22px; border-radius:var(--radius-md); font-weight:var(--font-weight-bold); cursor:pointer; font-size:.9rem; }
.gt-btn-buy:hover  { filter: brightness(1.1); }
.gt-btn-sell { background:var(--danger); color:#fff; border:none; padding:9px 22px; border-radius:var(--radius-md); font-weight:var(--font-weight-bold); cursor:pointer; font-size:.9rem; }
.gt-btn-sell:hover { filter: brightness(1.1); }
@media(max-width:640px) {
    .gt-tab { padding: 10px 20px; }
    .gt-price-pill { display: none; }
}

/* ── Stock Detail: Cash KPI ─────────────────────────────────── */
.cash-kpi-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px; margin-bottom: 20px;
}
.cash-kpi {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: background var(--motion-productive-long);
}
.cash-kpi:hover { background: var(--bg-fill-hover); }
.cash-kpi-hero {
    background: var(--brand);
    border-color: transparent; color: #fff;
}
.cash-kpi-hero:hover { background: var(--brand-light); }
.cash-kpi-hero .cash-kpi-label { color: rgba(255,255,255,.7); }
.cash-kpi-hero .cash-kpi-value { color: #fff; }
.cash-kpi-label { font-size:.7rem; font-weight:var(--font-weight-bold); text-transform:uppercase; letter-spacing:.06em; color:var(--fg-tertiary); margin-bottom:6px; }
.cash-kpi-value { font-size:1.35rem; font-weight:var(--font-weight-bold); font-family:var(--font-family-mono); color:var(--fg-primary); }
.cash-kpi-sub { font-size:.75rem; color:var(--fg-tertiary); margin-top:4px; font-family:var(--font-family-sans); }
@media(max-width:900px) { .cash-kpi-row { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px) { .cash-kpi-row { grid-template-columns: 1fr; } }

/* ── Stock Detail: Cash Transactions ────────────────────────── */
.cash-txn-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.cash-txn-header { padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); }
.cash-txn-header h3 { margin:0; font-size:.95rem; }
.cash-date-header {
    padding: 10px 20px;
    background: var(--bg-card);
    font-size: .72rem; font-weight: var(--font-weight-bold);
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--fg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
}
.cash-txn-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background .15s;
}
.cash-txn-row:last-child { border-bottom: none; }
.cash-txn-row:hover { background: var(--bg-fill-hover); }
.cash-txn-icon {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: var(--font-weight-bold); flex-shrink: 0;
}
.cash-txn-in  { background: rgba(48,183,87,0.12); color: var(--success); }
.cash-txn-out { background: rgba(250,77,86,0.12); color: var(--danger); }
.cash-txn-info { flex: 1; min-width: 0; }
.cash-txn-title { font-size:.88rem; font-weight:var(--font-weight-semibold); color:var(--fg-primary); }
.cash-txn-desc { font-size:.76rem; color:var(--fg-tertiary); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cash-txn-amounts { text-align: right; flex-shrink: 0; }
.cash-txn-amt { font-size:.95rem; font-weight:var(--font-weight-bold); font-family:var(--font-family-mono); }
.cash-txn-bal { font-size:.72rem; color:var(--fg-tertiary); margin-top:2px; font-family:var(--font-family-mono); }
.cash-txn-actions { display:flex; gap:4px; flex-shrink:0; margin-left:8px; opacity:0; transition:opacity .15s; }
.cash-txn-row:hover .cash-txn-actions { opacity: 1; }
.cash-act-btn {
    width:30px; height:30px;
    border:1px solid var(--border-subtle);
    border-radius:var(--radius-sm);
    background:var(--bg-surface);
    color:var(--fg-tertiary);
    font-size:.8rem; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition: all .15s;
}
.cash-act-btn:hover { border-color:var(--brand); color:var(--brand); }
.cash-act-del:hover { border-color:var(--danger); color:var(--danger); }
@media(max-width:600px) {
    .cash-txn-actions { opacity: 1; }
    .cash-act-btn { width: 26px; height: 26px; font-size: .7rem; }
}

/* ── Stock Detail: Cash Filters ─────────────────────────────── */
.cash-filters { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.cash-filter-btn {
    padding:5px 12px;
    border:1px solid var(--border-subtle);
    border-radius:var(--radius-full);
    background:var(--bg-surface);
    color:var(--fg-tertiary);
    font-size:.75rem; font-weight:var(--font-weight-semibold);
    cursor:pointer; transition:all .15s; white-space:nowrap;
}
.cash-filter-btn:hover { border-color:var(--brand); color:var(--brand); }
.cash-filter-btn.active { background:var(--brand); border-color:var(--brand); color:#fff; }
.cash-filter-sep { width:1px; height:20px; background:var(--border-subtle); margin:0 4px; }
.cash-filter-date {
    padding:4px 8px;
    border:1px solid var(--border-subtle);
    border-radius:var(--radius-sm);
    font-size:.75rem; color:var(--fg-secondary);
    background:var(--bg-surface); width:130px;
}
.cash-filter-count { font-size:.78rem; color:var(--fg-tertiary); }
@media(max-width:600px) {
    .cash-filter-sep { display:none; }
    .cash-filter-date { width: 110px; }
}

/* ── Stock Detail: Stats Grid & Table ───────────────────────── */
.sd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.sd-table { width:100%; border-collapse:collapse; font-size:.83rem; }
.sd-table th {
    padding:9px 12px;
    background:var(--bg-card); color:var(--fg-tertiary);
    font-size:.69rem; font-weight:var(--font-weight-semibold); text-transform:uppercase; letter-spacing:.05em; white-space:nowrap;
}
.sd-table td { padding:9px 12px; border-bottom:1px solid var(--border-subtle); vertical-align:middle; }
.sd-table tbody tr:last-child td { border-bottom:none; }
.sd-table tbody tr:hover td { background:var(--bg-fill-hover); }
.sd-table tfoot td { padding:9px 12px; border-top:1px solid var(--border-default); }
.sd-ticker {
    display:inline-block;
    background:rgba(15, 98, 254, 0.12); color:var(--brand);
    padding:2px 8px; border-radius:var(--radius-sm);
    font-size:.78rem; font-weight:var(--font-weight-bold); font-family:var(--font-family-sans);
}
.sd-yoc-badge {
    display:inline-block; padding:1px 6px; border-radius:var(--radius-sm);
    background:rgba(48, 183, 87, 0.12); color:var(--success);
    font-size:.72rem; font-weight:var(--font-weight-bold);
}
@media(max-width:600px) { .sd-stats-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:400px) { .sd-stats-grid { grid-template-columns: 1fr; } }

/* ── Dividend Account: KPI ──────────────────────────────────── */
.div-kpi-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
    gap: 12px; margin-bottom: 16px;
}
.div-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: background var(--motion-productive-long);
}
.div-kpi-card:hover { background: var(--bg-fill-hover); }
.div-kpi-hero {
    background: var(--brand);
    border-color: transparent; color: #fff;
}
.div-kpi-hero:hover { background: var(--brand-light); }
.div-kpi-hero .div-kpi-label,
.div-kpi-hero .div-kpi-sub { color: rgba(255,255,255,.7); }
.div-kpi-hero .div-kpi-value { color: #fff; }
.div-kpi-yoc {
    background: var(--brand);
    border-color: transparent; color: #fff;
}
.div-kpi-yoc:hover { background: var(--brand-light); }
.div-kpi-yoc .div-kpi-label,
.div-kpi-yoc .div-kpi-sub { color: rgba(255,255,255,.7); }
.div-kpi-yoc .div-kpi-value { color: #fff; }
.div-kpi-label { font-size:.7rem; font-weight:var(--font-weight-bold); text-transform:uppercase; letter-spacing:.06em; color:var(--fg-tertiary); margin-bottom:6px; }
.div-kpi-value { font-size:1.3rem; font-weight:var(--font-weight-bold); font-family:var(--font-family-mono); color:var(--fg-primary); margin-bottom:4px; }
.div-kpi-sub   { font-size:.75rem; color:var(--fg-tertiary); line-height:1.4; font-family:var(--font-family-sans); }
.div-kpi-badge { display:inline-block; padding:1px 6px; border-radius:var(--radius-sm); font-size:.7rem; font-weight:var(--font-weight-bold); margin-left:4px; }
.div-kpi-badge.positive { background:rgba(48,183,87,0.12); color:var(--success); }
.div-kpi-badge.negative { background:rgba(250,77,86,0.12); color:var(--danger); }
@media(max-width:1100px) { .div-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:700px)  { .div-kpi-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px)  { .div-kpi-grid { grid-template-columns: 1fr; } }

/* ── Dividend Account: Table & Badges ───────────────────────── */
.div-triple-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 14px; margin-bottom: 14px;
}
.div-triple-row > .chart-card { margin-bottom: 0 !important; }
@media(max-width:1100px) { .div-triple-row { grid-template-columns: 1fr; } }

.div-table { width:100%; border-collapse:collapse; font-size:.83rem; }
.div-table th {
    padding:9px 12px;
    background:var(--bg-card); color:var(--fg-tertiary);
    font-size:.69rem; font-weight:var(--font-weight-semibold); text-transform:uppercase; letter-spacing:.05em; white-space:nowrap;
}
.div-table td { padding:9px 12px; border-bottom:1px solid var(--border-subtle); vertical-align:middle; }
.div-table tbody tr:last-child td { border-bottom:none; }
.div-table tbody tr:hover td { background:var(--bg-fill-hover); }
.div-table tfoot td { padding:9px 12px; border-top:1px solid var(--border-default); }
.div-ticker {
    display:inline-block;
    background:rgba(15, 98, 254, 0.12); color:var(--brand);
    padding:2px 8px; border-radius:var(--radius-sm);
    font-size:.78rem; font-weight:var(--font-weight-bold); font-family:var(--font-family-sans);
}
.div-yoc-badge {
    display:inline-block; padding:2px 8px; border-radius:var(--radius-sm);
    background:rgba(48, 183, 87, 0.12); color:var(--success);
    font-size:.78rem; font-weight:var(--font-weight-bold);
}
.div-row-urgent td { background:rgba(250,77,86,0.06) !important; }
.div-badge-urgent {
    display:inline-block; padding:1px 6px; border-radius:var(--radius-sm);
    background:var(--danger); color:#fff;
    font-size:.68rem; font-weight:var(--font-weight-bold); margin-left:4px;
}
.div-calc-box {
    background:var(--bg-surface);
    border:1px solid var(--border-subtle);
    border-radius:var(--radius-lg); padding:12px 16px; margin:12px 0;
}
.div-calc-row { display:flex; justify-content:space-between; align-items:center; padding:4px 0; font-size:.85rem; }
.div-empty { padding:36px 24px; text-align:center; color:var(--fg-tertiary); font-size:.88rem; line-height:1.6; }

/* ── Add Account: Type Cards ────────────────────────────────── */
.actype-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin-bottom: 4px;
}
.actype-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 14px 10px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer; transition: border-color .15s, background .15s;
    text-align: center;
}
.actype-card input[type=radio] { display:none; }
.actype-card:hover { border-color: var(--brand); background: rgba(15,98,254,0.08); }
.actype-card.selected { border-color: var(--brand); background: rgba(15,98,254,0.10); }
.actype-icon  { font-size: 1.6rem; }
.actype-label { font-weight: var(--font-weight-semibold); font-size: .88rem; }
.actype-desc  { font-size: .72rem; color: var(--fg-tertiary); }
.actype-gold.selected { border-color: var(--warning); background: rgba(249,163,7,0.10); }
@media(max-width:600px){ .actype-grid { grid-template-columns: repeat(2,1fr); } }

.gold-sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gold-sub-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; padding: 18px 14px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer; transition: border-color .15s, background .15s;
    text-align: center;
}
.gold-sub-card input[type=radio] { display:none; }
.gold-sub-card:hover { border-color: var(--brand); background: rgba(15,98,254,0.08); }
.gold-sub-card.selected { border-color: var(--brand); background: rgba(15,98,254,0.10); }
.gold-sub-icon  { font-size:2rem; }
.gold-sub-title { font-weight: var(--font-weight-semibold); font-size: .9rem; }
.gold-sub-desc  { font-size: .75rem; color: var(--fg-tertiary); line-height:1.5; }
#cardFiziki.selected, #cardBanka.selected,
#cardFiziki:hover, #cardBanka:hover {
    border-color: var(--warning);
    background: rgba(249,163,7,0.10);
}
@media(max-width:500px){ .gold-sub-grid { grid-template-columns:1fr; } }

/* ── Settings: Responsive ───────────────────────────────────── */
@media(max-width:600px) {
    .form-card { padding: 16px; }
    div[style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2,1fr) !important; }
}

/* ════════════════════════════════════════════════════════════
   WIZARD — Varlık Ekle Sayfası
   ════════════════════════════════════════════════════════════ */

/* ── İşlem Türü Seçici ───────────────────────────────────────── */
/* ── Wizard Split Layout ─────────────────────────────────────── */
.wz-split {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
.wz-split-left {
    position: sticky;
    top: 24px;
}
.wz-split-right {
    min-width: 0;
}

.wz-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 0;
}
.wz-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 8px;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, background .15s;
    cursor: pointer;
    text-align: center;
}
.wz-type-card:hover {
    border-color: var(--border-default);
    background: var(--bg-fill-hover);
    transform: translateY(-1px);
}
.wz-type-card.wz-type-active {
    border-color: var(--brand);
    background: rgba(15, 98, 254, 0.06);
}
.wz-type-icon {
    font-size: 1.3rem;
    line-height: 1;
}
.wz-type-label {
    font-weight: 600;
    font-size: .82rem;
    color: var(--fg-primary);
}
.wz-type-desc { display: none; }

/* ── Bölüm Başlıkları ────────────────────────────────────────── */
.wz-section {
    margin-bottom: 20px;
}
.wz-section-title {
    font-size: .72rem;
    font-weight: 600;
    color: var(--fg-tertiary);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}

/* ── Seçili Hesap Pill ────────────────────────────────────────── */
.wz-selected-acc {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 24px;
}
.wz-selected-icon { font-size: 1.2rem; }
.wz-selected-info { display: flex; flex-direction: column; }
.wz-selected-name { font-weight: 600; font-size: .85rem; color: var(--fg-primary); }
.wz-selected-sub  { font-size: .72rem; color: var(--fg-tertiary); }

/* ── Hesap Seçim Kartları ─────────────────────────────────────── */
.wz-acc-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wz-acc-group-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--fg-tertiary);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 0;
    margin-top: 6px;
}
.wz-acc-group-label:first-child { margin-top: 0; }
.wz-acc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.wz-acc-card:hover {
    border-color: var(--border-default);
    background: var(--bg-fill-hover);
}
.wz-acc-card.wz-acc-active {
    border-color: var(--brand);
    background: rgba(15, 98, 254, 0.06);
}
.wz-acc-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.wz-acc-icon.trade { background: rgba(108,43,217,0.12); color: #6C2BD9; }
.wz-acc-icon.dividend { background: rgba(18,184,134,0.12); color: #12B886; }
.wz-acc-icon.cash { background: rgba(64,192,87,0.12); color: #40C057; }
.wz-acc-icon.gold { background: rgba(230,119,0,0.12); color: #E67700; }
.wz-acc-icon.gold_physical { background: rgba(230,119,0,0.12); color: #E67700; }
.wz-acc-icon.gold_bank { background: rgba(15,98,254,0.12); color: var(--brand); }
.wz-acc-info { flex: 1; min-width: 0; }
.wz-acc-name {
    font-weight: 600;
    font-size: .82rem;
    color: var(--fg-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wz-acc-sub {
    font-size: .7rem;
    color: var(--fg-tertiary);
    display: block;
}

/* ── Özet Bandı ───────────────────────────────────────────────── */
.wz-summary {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.wz-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.wz-summary-text {
    font-weight: 600;
    font-size: .95rem;
    color: var(--fg-primary);
    font-family: var(--font-family-sans);
}
.wz-summary-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--fg-secondary);
    cursor: pointer;
}
.wz-summary-check input[type="checkbox"] {
    width: 16px; height: 16px;
    cursor: pointer;
    accent-color: var(--brand);
}

/* ── Wizard Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
    .wz-split {
        grid-template-columns: 1fr;
    }
    .wz-split-left {
        position: static;
    }
    .wz-type-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .wz-acc-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .wz-acc-card {
        flex: 1 1 200px;
    }
}

@media (max-width: 480px) {
    .wz-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .wz-type-card { padding: 10px 6px; }
    .wz-summary { padding: 12px 14px; }
    .wz-summary-text { font-size: .85rem; }
    .wz-acc-card { flex: 1 1 100%; }
}

/* ══════════════════════════════════════════════════════════════
   Gold Detail — Tab Navigasyon
   ══════════════════════════════════════════════════════════════ */
.gd-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0;
}
.gd-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--fg-tertiary);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gd-tab:hover {
    color: var(--fg-primary);
}
.gd-tab.active {
    color: var(--fg-primary);
    border-bottom-color: var(--brand-primary, var(--primary-color));
}
.gd-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--bg-fill-hover);
    font-size: .72rem;
    font-weight: var(--font-weight-semibold);
    color: var(--fg-secondary);
}
.gd-tab.active .gd-tab-count {
    background: color-mix(in srgb, var(--brand-primary, var(--primary-color)) 15%, transparent);
    color: var(--brand-primary, var(--primary-color));
}
.gd-tab-panel {
    margin-top: 20px;
}

/* Header actions responsive */
@media (max-width: 640px) {
    .page-header-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* ── Themed Dialog (mbConfirm / mbAlert) ─────────────────────────────────── */
.mb-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    transition: opacity .18s ease;
}
.mb-dialog-overlay.open {
    opacity: 1;
}
.mb-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .55);
    width: 100%;
    max-width: 420px;
    transform: translateY(8px) scale(.98);
    transition: transform .18s ease;
    font-family: var(--font-family-text);
    overflow: hidden;
}
.mb-dialog-overlay.open .mb-dialog {
    transform: translateY(0) scale(1);
}
.mb-dialog-header {
    padding: 16px 20px 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--fg-primary);
    letter-spacing: .2px;
}
.mb-dialog-body {
    padding: 4px 20px 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--fg-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.mb-dialog-footer {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: var(--bg-fill);
    border-top: 1px solid var(--border-subtle);
}
.mb-dialog-footer .btn {
    min-width: 88px;
}
@media (max-width: 480px) {
    .mb-dialog-footer {
        flex-direction: column-reverse;
    }
    .mb-dialog-footer .btn {
        width: 100%;
    }
}

/* ── Custom Date Picker (mbdp) ───────────────────────────────────────────── */
.mbdp-wrap {
    position: relative;
    display: block;
    width: 100%;
}
/* Inline/compact context — sınıf kopyalanır (örn. cash-filter-date) */
.mbdp-wrap.cash-filter-date {
    display: inline-block;
    width: 130px;
}
/* Trigger: yazılabilir text input */
.mbdp-trigger {
    display: block;
    width: 100%;
    padding: 7px 12px;
    background: var(--bg-input, var(--bg-card));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--fg-primary);
    font-family: var(--font-family-text);
    font-size: 14px;
    min-height: 36px;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    cursor: text;
    outline: none;
    line-height: 1.4;
}
.mbdp-trigger::placeholder { color: var(--fg-tertiary); }
.mbdp-trigger:hover { border-color: var(--border-strong, var(--brand)); }
.mbdp-trigger.open,
.mbdp-trigger:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(15,98,254,.15);
}
/* compact: cash-filter-date wrap'taki trigger */
.mbdp-wrap.cash-filter-date .mbdp-trigger {
    font-size: .75rem;
    padding: 4px 8px;
    min-height: 28px;
}
/* hidden native input */
.mbdp-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    top: 0;
    left: 0;
}

/* Popup — fixed, body'e eklenir, modal overflow'dan bağımsız */
.mbdp-popup {
    position: fixed;
    z-index: 10200;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px rgba(0,0,0,.55);
    min-width: 340px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: mbdp-in .14s ease;
}
.mbdp-popup.open { display: flex; }
@keyframes mbdp-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.mbdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 8px;
}
.mbdp-month-year {
    font-weight: 700;
    font-size: 14px;
    color: var(--fg-primary);
    font-family: var(--font-family-text);
    flex: 1;
    text-align: center;
}
.mbdp-nav {
    background: none;
    border: none;
    color: var(--fg-secondary);
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s;
    flex-shrink: 0;
}
.mbdp-nav:hover { background: var(--bg-fill-hover); color: var(--fg-primary); }

/* Body */
.mbdp-body {
    display: flex;
}
.mbdp-calendar {
    flex: 1;
    padding: 10px 12px 8px;
}
.mbdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 2px;
}
.mbdp-weekday {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--fg-tertiary);
    padding: 3px 0 5px;
    font-family: var(--font-family-text);
}
.mbdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}
.mbdp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: var(--font-family-text);
    cursor: pointer;
    color: var(--fg-primary);
    border: none;
    background: none;
    transition: background .1s, color .1s;
    min-width: 0;
    padding: 0;
}
.mbdp-day:hover:not(.selected) { background: var(--bg-fill-hover); }
.mbdp-day.other-month { color: var(--fg-tertiary); opacity: .55; }
.mbdp-day.today {
    color: var(--brand);
    font-weight: 700;
    position: relative;
}
.mbdp-day.today::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--brand);
}
.mbdp-day.selected {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}
.mbdp-day.selected.today::after { background: rgba(255,255,255,.7); }

/* Shortcuts */
.mbdp-shortcuts {
    border-left: 1px solid var(--border-subtle);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 94px;
}
.mbdp-shortcut {
    background: none;
    border: none;
    color: var(--fg-secondary);
    font-size: 11.5px;
    font-family: var(--font-family-text);
    text-align: left;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: background .1s, color .1s;
}
.mbdp-shortcut:hover { background: var(--bg-fill-hover); color: var(--fg-primary); }
.mbdp-shortcut.active { color: var(--brand); font-weight: 600; background: rgba(15,98,254,.08); }

/* Footer */
.mbdp-footer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-fill);
}
.mbdp-footer .btn { flex: 1; font-size: 13px; padding: 6px 12px; }

/* Responsive */
@media (max-width: 480px) {
    .mbdp-popup { min-width: calc(100vw - 24px); }
    .mbdp-shortcuts { display: none; }
}

/* ============================================================
   MOBİL İYİLEŞTİRMELERİ — v2.1
   ============================================================ */

/* ── 1. Rate Bar — mobilde yatay kaydırmalı ── */
@media (max-width: 600px) {
    .rate-bar {
        padding: 10px 14px;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
    }
    .rate-bar-items {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding-bottom: 2px;
        flex: 1;
        min-width: 0;
    }
    .rate-bar-items::-webkit-scrollbar { display: none; }
    .rate-item { flex-shrink: 0; }
    .rate-date { display: none; }
    .rate-bar > div:last-child { flex-shrink: 0; }
    #btnUpdateRates, #btnUpdateStocks {
        font-size: 11px;
        padding: 4px 8px;
        white-space: nowrap;
    }
}

/* ── 2. Form tabs — mobilde yatay kaydırmalı ── */
@media (max-width: 480px) {
    .form-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .form-tabs::-webkit-scrollbar { display: none; }
    .form-tab { flex-shrink: 0; }
}

/* ── 3. Quick action butonları — min dokunma hedefi 44px ── */
@media (max-width: 480px) {
    .quick-actions { gap: 8px; }
    .quick-action-btn {
        min-height: 44px;
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }
}

/* ── 4. Modal input'ları — iOS zoom engeli ── */
@media (max-width: 768px) {
    .modal input,
    .modal select,
    .modal textarea,
    .modal-body input,
    .modal-body select,
    .modal-body textarea {
        font-size: 16px !important;
    }
    /* gd-select trigger da 16px olsun */
    .modal .gd-select-trigger { font-size: 16px !important; }
}

/* ── 5. Tablo kaydırma görsel ipucu — sağ fade gölgesi ── */
.table-wrap {
    position: relative;
}
.table-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-surface));
    pointer-events: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    opacity: 0;
    transition: opacity .2s;
}
.table-wrap.has-scroll::after { opacity: 1; }

/* ── 6. Page header — küçük ekranlarda dikey yığılma ── */
@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* ── 7. Modal footer — 360px'de butonlar dikey ── */
@media (max-width: 360px) {
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── 8. Breadcrumb — taşma yok, yatay kaydırmalı ── */
@media (max-width: 480px) {
    .breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }
    .breadcrumb::-webkit-scrollbar { display: none; }
}

/* ── 9. Asset filter butonları — daha sıkı mobil ── */
@media (max-width: 480px) {
    .asset-filters {
        gap: 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .asset-filters::-webkit-scrollbar { display: none; }
    .asset-filters .btn { flex-shrink: 0; font-size: 12px; padding: 5px 10px; }
}

/* ── 10. kpi-grid 360px'de tek sütun ── */
@media (max-width: 360px) {
    .kpi-grid { grid-template-columns: 1fr; gap: 8px; }
    .kpi-hero { grid-column: auto; }
    .kpi-card { padding: 14px; }
}

/* ── 11. Tablo btn-xs touch hedefi ── */
@media (max-width: 768px) {
    table .btn-xs {
        min-width: 30px;
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ── 12. gd-select dropdown — mobilde daha geniş ── */
@media (max-width: 480px) {
    .gd-select-dropdown {
        min-width: 100%;
        max-height: 220px;
    }
    .gd-select-trigger { font-size: 16px; min-height: 44px; }
    .gd-select-option { padding: 11px 14px; font-size: 14px; }
}

/* ── 13. Hesaplar ızgarası — küçük ekranda sıkışmasın ── */
@media (max-width: 480px) {
    .actype-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 360px) {
    .actype-grid { grid-template-columns: 1fr !important; }
}

/* ── 14. İç sayfa tablo başlıkları — çok uzun metinler ── */
@media (max-width: 480px) {
    table th {
        white-space: nowrap;
    }
    table td {
        word-break: break-word;
    }
}

/* ── 15. Performans chart overlay — mobilde daha kompakt ── */
@media (max-width: 480px) {
    .perf-overlay {
        gap: 12px;
    }
    .perf-overlay-val { font-size: 14px; }
    .perf-overlay-label { font-size: 10px; }
}
