/* ============================================================
   KAYA PLUS — Yönetim Paneli Design System
   Marka: kayaas.com.tr  ·  Birincil #005790 (KAYA mavisi), Lacivert #15233c
   Bespoke tasarım sistemi · Açık + Koyu tema · IBM Plex Sans (kurumsal/modern/resmi)
   ============================================================ */

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

/* ---------- Tasarım token'ları ---------- */
:root {
    /* Marka rampası — KAYA mavisi (#005790) etrafında; lime yeşil aksan (#81bc00) */
    --brand-50:  #e7f1f8;
    --brand-100: #c4dcec;
    --brand-200: #9cc5df;
    --brand-300: #6aa6cb;
    --brand-400: #2f82ad;
    --brand-500: #005790;   /* birincil — KAYA mavisi */
    --brand-600: #004e82;
    --brand-700: #003d63;
    --brand-800: #002e4a;   /* koyu lacivert */
    --brand-900: #001f33;
    --accent:    #81bc00;   /* lime yeşil vurgu */

    /* Nötr (slate) */
    --slate-50:#f8fafc; --slate-100:#f1f5f9; --slate-200:#e2e8f0; --slate-300:#cbd5e1;
    --slate-400:#94a3b8; --slate-500:#64748b; --slate-600:#475569; --slate-700:#334155;
    --slate-800:#1e293b; --slate-900:#0f172a;

    /* Semantik */
    --ok:#15803d;    --ok-bg:#e7f6ec;    --ok-border:#bbe7c9;
    --warn:#b45309;  --warn-bg:#fef3e2;  --warn-border:#f5d9ad;
    --danger:#b91c1c;--danger-bg:#fdecec;--danger-border:#f6c6c6;
    --info:#0369a1;  --info-bg:#e6f3fb;  --info-border:#bfe0f2;

    /* Ölçek */
    --radius-sm:8px; --radius:12px; --radius-lg:16px; --radius-pill:999px;
    --shadow-sm:0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
    --shadow-md:0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg:0 18px 50px rgba(15,23,42,.18);
    --space:16px;
    --sidebar-w:264px;
    --topbar-h:64px;

    /* Açık tema yüzeyleri */
    --bg:        #f5f7fb;
    --surface:   #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --ink:       #0f1b2d;
    --ink-soft:  #334155;
    --muted:     #64748b;
    --border:    #e6eaf1;
    --border-strong:#d4dbe6;
    --primary:        var(--brand-500);
    --primary-hover:  var(--brand-600);
    --primary-soft:   var(--brand-50);
    --primary-contrast:#ffffff;
    --ring: 0 0 0 3px rgba(0,40,130,.22);

    /* Yan menü = KAYA mavisi ailesi (hero ile aynı gradient ailesi) */
    --side-bg: linear-gradient(190deg, #006aa6 0%, #004e82 52%, #001f33 100%);
    --side-ink:#dbe7f6;
    --side-muted:#9fb6d6;
    --side-hover:rgba(255,255,255,.10);
    --side-active-bg:rgba(255,255,255,.16);
    --side-active-ink:#ffffff;
}

[data-theme="dark"] {
    --bg:        #0a1018;
    --surface:   #111b2b;
    --surface-2: #0e1726;
    --surface-3: #16223a;
    --ink:       #e8eef7;
    --ink-soft:  #c2cede;
    --muted:     #8c9bb3;
    --border:    #20304a;
    --border-strong:#2a3c59;
    --primary:        #3a9bd6;
    --primary-hover:  #57b0e6;
    --primary-soft:   rgba(58,155,214,.12);
    --primary-contrast:#06121f;
    --ring: 0 0 0 3px rgba(58,155,214,.30);

    --ok-bg:rgba(34,197,94,.12); --ok:#4ade80; --ok-border:rgba(34,197,94,.25);
    --warn-bg:rgba(245,158,11,.12); --warn:#fbbf24; --warn-border:rgba(245,158,11,.25);
    --danger-bg:rgba(239,68,68,.12); --danger:#f87171; --danger-border:rgba(239,68,68,.25);
    --info-bg:rgba(56,189,248,.12); --info:#7dd3fc; --info-border:rgba(56,189,248,.25);
    --shadow-sm:0 1px 2px rgba(0,0,0,.4);
    --shadow-md:0 6px 18px rgba(0,0,0,.45);
    --shadow-lg:0 24px 60px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}
a { color: var(--primary); }
::selection { background: var(--brand-200); color: var(--brand-900); }

/* ---------- Yerleşim (uygulama kabuğu) ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--side-bg); color: var(--side-ink);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
/* Marka başlığı: tam genişlik beyaz bant (topbar ile hizalı) — logo native beyaz
   zemininde durur, kopuk "sticker" hissi olmaz; orijinal logo renkleri korunur. */
/* Marka bandı: mavi sidebar üzerinde BEYAZ logo (kaya-logo-white) — temiz, kartsız */
.sidebar .brand {
    display: flex; align-items: center; justify-content: flex-start;
    height: var(--topbar-h); padding: 0 20px;
    background: rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.sidebar .brand img { height: 44px; width: auto; max-width: 88%; object-fit: contain; display: block; }

/* Beyaz/açık zeminler için logo kartı (login mobil beyaz kart — mavi logo) */
.logo-card {
    display: inline-flex; align-items: center; background: #fff;
    border-radius: 12px; padding: 8px 18px; box-shadow: 0 6px 16px rgba(20,50,100,.13);
}
.logo-card img { height: 32px; width: auto; display: block; }

/* Karanlık modda sidebar gövdesi daha da koyulaşır */
[data-theme="dark"] { --side-bg: linear-gradient(190deg, #16263f 0%, #0d1626 100%); --side-hover: rgba(255,255,255,.07); }
/* Marka kilidi: beyaz plaka (logo şeffaf değil) + "Bonus" eki */
.brand-plate { background: #fff; border-radius: 9px; padding: 6px 10px; display: inline-flex; align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.brand-plate img { height: 22px; width: auto; display: block; }
.brand-suffix { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: #fff; }
.sidebar .nav-section { padding: 16px 14px 4px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .6px; color: var(--side-muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; flex: 1; overflow-y: auto; }
.sidebar nav a {
    display: flex; align-items: center; gap: 12px;
    color: var(--side-ink); text-decoration: none;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar nav a:hover { background: var(--side-hover); color: #fff; }
.sidebar nav a.active { background: var(--side-active-bg); color: var(--side-active-ink); font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent); }
.sidebar nav a.active svg { opacity: 1; }
.sidebar .side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }

/* Ana içerik */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h); display: flex; align-items: center; gap: 14px;
    padding: 0 28px; background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.topbar .spacer { flex: 1; }
.content { padding: 26px 28px 40px; max-width: 1320px; width: 100%; }

/* ---------- Tipografi ---------- */
h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
h3 { margin: 26px 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
h4 { margin: 16px 0 8px; font-size: 14px; font-weight: 600; }
.page-head { margin-bottom: 20px; }
.hint, .page-head p { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }

/* ---------- KPI kartları ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 16px; margin-bottom: 8px; }
.kpi-card {
    position: relative; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
    box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.kpi-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--primary); opacity:.9; }
.kpi-card .kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary); }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.6px; line-height: 1.1; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Kartlar / panel ---------- */
.card, .panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel { padding: 20px 22px; margin: 16px 0; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding: 16px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; }
.card-body { padding: 6px 0; }

/* ---------- Tablolar ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 18px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.table-wrap > .table { border: 0; border-radius: 0; margin: 0; box-shadow: none; }
.table th { background: var(--surface-2); text-align: left; padding: 12px 14px; font-size: 11.5px;
    color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--ink-soft); }
.table tbody tr { transition: background .12s; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td b, .table td strong { color: var(--ink); }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.badge::before { content:''; width:6px; height:6px; border-radius:50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-muted { background: var(--surface-3); color: var(--muted); border-color: var(--border); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.text-ok { color: var(--ok); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }

/* ---------- Formlar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px 16px; align-items: center; max-width: 760px; margin-bottom: 16px; }
.form-grid label { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.form-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
label { font-weight: 500; }
input, select, textarea {
    padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font: inherit; font-size: 14px; background: var(--surface); color: var(--ink);
    width: 100%; max-width: 440px; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--slate-400); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
textarea { min-height: 86px; max-width: 680px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input:disabled, select:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { border-color: var(--danger-border); color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* İkon buton (tema toggle, vb.) */
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* Tema toggle ikon değişimi */
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }

/* Kullanıcı menüsü (topbar) */
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 6px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
    font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); }
.user-chip .u-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-chip .u-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-chip .u-role { font-size: 11px; color: var(--muted); }
@media (max-width: 560px){ .user-chip .u-meta { display: none; } }

/* ---------- Uyarılar ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 14px; border: 1px solid transparent; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.key-show { display: block; background: var(--brand-900); color: #5ef0a0; padding: 12px 14px; border-radius: var(--radius-sm);
    margin: 10px 0; font-family: 'SF Mono', ui-monospace, 'Cascadia Code', monospace; font-size: 13.5px; word-break: break-all; }

/* Boş durum */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state svg { width: 44px; height: 44px; opacity: .4; margin-bottom: 10px; }

/* İnce yükleniyor çubuğu / spinner */
.loading { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); padding: 14px 0; font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--border-strong); border-top-color: var(--primary);
    border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Giriş ekranı ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--bg); }
.login-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 56px;
    background: radial-gradient(1200px 600px at 10% 0%, #3b6ef0 0%, transparent 55%), linear-gradient(160deg, #172554 0%, #2563EB 100%);
    display: flex; flex-direction: column; }
.login-hero .hero-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; }
.login-hero .hero-brand .brand-plate img { height: 30px; }
.login-hero .hero-brand .brand-suffix { font-size: 22px; }
.login-hero .hero-body { margin-top: auto; }
.login-hero h2 { font-size: 34px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; max-width: 460px; margin: 0 0 14px; }
.login-hero p { font-size: 15px; color: rgba(255,255,255,.78); max-width: 420px; margin: 0 0 26px; }
.login-hero ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.login-hero li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: rgba(255,255,255,.9); }
.login-hero li svg { width: 20px; height: 20px; color: #7fd0ff; flex-shrink: 0; }
.login-hero .hero-deco { position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px;
    border-radius: 50%; background: rgba(255,255,255,.05); }

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .lc-logo-mobile { display: none; }
.login-card h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.4px; }
.login-card .lc-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.login-card label { display: block; font-size: 13px; color: var(--ink-soft); margin: 14px 0 6px; font-weight: 500; }
.login-card input { max-width: none; }
.login-card .btn-block { margin-top: 22px; height: 44px; font-size: 15px; }
.login-card .lc-foot { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--muted); }

@media (max-width: 920px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-card .lc-logo-mobile { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 22px; }
    .login-card .lc-logo-mobile img { height: 30px; }
    .login-card .lc-logo-mobile .brand-suffix { color: var(--brand-500); }
}

/* Hamburger: masaüstünde gizli (SIRA önemli — media query'den ÖNCE olmalı, yoksa mobili ezer) */
.topbar .menu-toggle { display: none; }

/* Sidebar arkası karartma (mobilde açıkken; tıklayınca kapatır) */
.sidebar-backdrop { display: none; }

/* ---------- Mobil kabuk ---------- */
@media (max-width: 860px) {
    .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .topbar .menu-toggle { display: grid !important; }
    .content { padding: 18px 16px 32px; }
    body.kaya-side-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(8,18,34,.45); z-index: 55; }
}

/* ---------- Blazor hata UI ---------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--warn-bg); color: var(--warn); border-top: 1px solid var(--warn-border);
    padding: 12px 18px; z-index: 1000; box-shadow: var(--shadow-lg); }
#blazor-error-ui .dismiss { cursor: pointer; float: right; font-weight: 700; }

/* ============================================================
   FINTECH KATMANI — grafikler, trend kartları, sparkline, mesh login
   ============================================================ */

/* KPI kartı: trend chip + sparkline + zengin görünüm */
.kpi-card { background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--primary) 7%, var(--surface)) 0%, var(--surface) 42%); }
.kpi-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
    padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.kpi-trend svg { width: 13px; height: 13px; }
.kpi-trend.up { color: var(--ok); background: var(--ok-bg); }
.kpi-trend.down { color: var(--danger); background: var(--danger-bg); }
.kpi-trend.flat { color: var(--muted); background: var(--surface-3); }
.kpi-spark { flex: 1; height: 36px; min-width: 0; }
.kpi-card .kpi-sub { margin-top: 2px; }

/* Grafik kartları */
.chart-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-top: 24px; }
@media (max-width: 1040px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 18px 20px; }
.chart-card .ch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chart-card .ch-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.chart-card .ch-sub { font-size: 12px; color: var(--muted); }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 240px; }

/* Bölüm başlığı (ikonlu) */
.section-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600;
    margin: 28px 0 14px; color: var(--ink); }
.section-title svg { width: 18px; height: 18px; color: var(--primary); }

/* Login: aurora mesh + cam form kartı */
.login-hero {
    background: linear-gradient(155deg, #172554 0%, #1E40AF 52%, #2563EB 100%);
}
.login-hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
      radial-gradient(640px 360px at 82% 8%, rgba(127,208,255,.30), transparent 60%),
      radial-gradient(520px 340px at 6% 92%, rgba(156,79,152,.28), transparent 60%),
      radial-gradient(420px 280px at 50% 50%, rgba(0,120,180,.18), transparent 65%);
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero .hero-deco { background: rgba(255,255,255,.06); backdrop-filter: blur(2px); }
.login-form-side { background:
    radial-gradient(900px 500px at 90% -10%, color-mix(in srgb, var(--primary) 8%, var(--bg)), var(--bg) 55%); }
.login-card {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 34px 32px; backdrop-filter: blur(8px);
}
.login-card input { height: 44px; }

/* ============================================================
   kp-admin MOCKUP UYUMU — Panele Giriş + açık sidebar + topbar
   ============================================================ */

/* ---- Panele Giriş (AdminLogin) ---- */
.adm-login { display: grid; grid-template-columns: 44% 1fr; min-height: 100vh; background: var(--surface); }
.adm-login-brand { position: relative; overflow: hidden; color: #fff; padding: 46px 48px; display: flex; flex-direction: column;
    background: linear-gradient(150deg, #2F6BFF 0%, #1E50D6 48%, #173FB0 100%); }
.alb-glow { position: absolute; top: -80px; right: -60px; width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,.40), transparent 70%); }
.alb-logo { position: relative; display: flex; align-items: center; gap: 10px; }
.alb-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 430px; position: relative; }
.alb-body h1 { font-weight: 800; font-size: 34px; line-height: 1.15; letter-spacing: -1px; margin: 0; }
.alb-body p { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.82); }
.alb-feats { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 13px; }
.alb-feats li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: rgba(255,255,255,.92); }
.alb-check { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex-shrink: 0; }
.alb-check svg { width: 14px; height: 14px; }
.alb-stats { position: relative; display: flex; gap: 32px; }
.alb-num { font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.alb-num span { color: var(--accent); }
.alb-lbl { font-size: 12.5px; color: rgba(255,255,255,.7); }
.adm-login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--surface); }
.alf-card { width: 380px; }
.alf-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; margin: 0; }
.alf-card .lc-sub { color: var(--muted); margin: 6px 0 26px; }
.alf-card label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 7px; }
.adm-field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.adm-field:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.adm-field > svg { width: 18px; height: 18px; color: var(--dim); flex-shrink: 0; }
.adm-field input { border: none; outline: none; background: none; flex: 1; height: 100%; font: inherit; font-size: 15px; color: var(--ink); padding: 0; max-width: none; }
.adm-eye { border: none; background: none; color: var(--dim); cursor: pointer; padding: 0; display: grid; place-items: center; }
.adm-eye svg { width: 18px; height: 18px; }
.alf-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--dim); font-size: 12.5px; }
.alf-divider span { flex: 1; height: 1px; background: var(--border); }
.alf-card .lc-foot { text-align: center; margin-top: 24px; font-size: 12.5px; color: var(--dim); }
.alf-card .lc-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }
.adm-login-form .lc-logo-mobile { display: none; }
@media (max-width: 900px) {
    .adm-login { grid-template-columns: 1fr; }
    .adm-login-brand { display: none; }
    .alf-card { width: 100%; max-width: 380px; }
    .adm-login-form .lc-logo-mobile { display: flex; justify-content: center; margin-bottom: 22px; }
}

/* ---- Sidebar: premium koyu navy (logo beyaz plaka üzerinde) ---- */
.sidebar .brand { border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand .brand-suffix { color: #fff; }
.sidebar nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
.sidebar .side-foot { border-top: 1px solid rgba(255,255,255,.08); }
/* sidebar alt kullanıcı çipi */
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); }
.side-user .avatar { width: 34px; height: 34px; font-size: 13px; }
.side-user .su-meta { flex: 1; min-width: 0; }
.side-user .su-name { font-weight: 700; font-size: 13px; color: #fff; }
.side-user .su-role { font-size: 12px; color: var(--side-muted); }
.side-user form { display: flex; }
.side-user button { border: none; background: none; color: var(--side-muted); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.side-user button:hover { color: #fff; }

/* ---- Topbar: kiracı çipi + arama ---- */
.tenant-chip { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.tenant-chip .tc-mark { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff;
    font-size: 11px; font-weight: 700; background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); }
.top-search { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px; width: 240px;
    border-radius: var(--radius-sm); background: var(--surface-2); color: var(--dim); font-size: 13px; }
.top-search svg { width: 17px; height: 17px; flex-shrink: 0; }
.top-search input { border: none; outline: none; background: none; flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--ink); padding: 0; max-width: none; }
.top-search input::placeholder { color: var(--dim); }
.top-search:focus-within { box-shadow: var(--ring); }
@media (max-width: 720px){ .top-search { display: none; } }

/* ---- Dashboard (AdminDashboard mockup) ---- */
:root { --brand-soft: var(--brand-50); --accent-soft: #eef7d6; --accent-ink: #3d5900; }
[data-theme="dark"] { --accent-soft: rgba(129,188,0,.16); --accent-ink: #b6e36a; }
.db-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.db-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); }
.db-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.db-kpi::before { display: none; }
.db-kpi { padding: 18px; }
.db-kpi .kpi-top { align-items: flex-start; }
.db-kpi-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
    position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(15,27,45,.07); }
.db-kpi-icon::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(157deg, rgba(255,255,255,.45), rgba(255,255,255,0) 58%); }
.db-kpi-icon svg { width: 21px; height: 21px; position: relative; z-index: 1; }
.db-kpi-val { font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); margin-top: 14px; }
.db-kpi-unit { font-size: 13px; font-weight: 600; color: var(--dim); }
.db-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 18px; align-items: start; }
@media (max-width: 1000px) { .db-charts { grid-template-columns: 1fr; } }
.db-chart-main .card-head, .db-chart-side .card-head { border-bottom: 1px solid var(--border); }
.db-chart-main .ch-sub, .db-chart-side .ch-sub { font-size: 12px; color: var(--dim); display: block; margin-top: 2px; }

/* ---- Bayi Kurulum Sihirbazı (AdminWizard mockup) ---- */
.wiz { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.wiz-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.wiz-body { flex: 1; display: flex; align-items: stretch; overflow: hidden; }
.wiz-steps { width: 300px; flex-shrink: 0; padding: 32px 26px; border-right: 1px solid var(--border); background: var(--surface); }
.wiz-title-input { font-size: 19px; font-weight: 700; letter-spacing: -.3px; border: none; background: none; padding: 8px 0 24px; max-width: none; color: var(--ink); }
.wiz-title-input:focus { outline: none; box-shadow: none; border-bottom: 2px solid var(--brand-500); }
.wiz-step-list { display: flex; flex-direction: column; gap: 22px; }
.wiz-step { display: flex; align-items: flex-start; gap: 14px; background: none; border: none; cursor: pointer; text-align: left; padding: 0; font: inherit; }
.wiz-step.todo { opacity: .55; }
.ws-num { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 14px;
    background: var(--surface); color: var(--dim); border: 1.5px solid var(--border-strong); }
.ws-num svg { width: 17px; height: 17px; }
.wiz-step.done .ws-num { background: var(--ok); color: #fff; border: none; }
.wiz-step.active .ws-num { background: var(--brand-500); color: #fff; border: none; box-shadow: var(--ring); }
.ws-text { padding-top: 3px; }
.ws-title { display: block; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.wiz-step.active .ws-title { color: var(--ink); }
.ws-sub { display: block; font-size: 12.5px; color: var(--dim); margin-top: 1px; }
.wiz-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.wiz-scroll { flex: 1; overflow: auto; padding: 34px 40px; }
.kp-h1-x { font-size: 24px; font-weight: 800; letter-spacing: -.4px; margin: 0; color: var(--ink); }
.wiz-desc { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 6px 0 24px; max-width: 560px; }
.wiz-rules { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.wiz-line { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.rule-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.rule-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.rule-icon svg { width: 22px; height: 22px; }
.rule-meta { flex: 1; min-width: 0; }
.rule-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink); }
.rule-desc { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.rule-ctrl { padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 13px; color: var(--ink); white-space: nowrap; }
.rule-toggle { width: 46px; height: 27px; border-radius: 99px; padding: 3px; flex-shrink: 0; border: none; cursor: pointer; background: var(--border-strong); display: flex; justify-content: flex-start; transition: background .15s; }
.rule-toggle.on { background: var(--brand-500); justify-content: flex-end; }
.rule-toggle span { width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); display: block; }
.wiz-info { display: flex; gap: 11px; margin-top: 18px; max-width: 640px; padding: 14px; border-radius: var(--radius-sm); background: var(--warn-bg); border: 1px solid var(--warn-border); font-size: 12.5px; color: var(--warn); line-height: 1.5; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; border-top: 1px solid var(--border); background: var(--surface); }
.wiz-foot .btn { width: auto; min-width: 120px; height: 46px; }
@media (max-width: 820px) { .wiz-steps { display: none; } }

/* ---- Sağ Drawer (detay paneli — alta açma yerine) ---- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,27,45,.42); z-index: 80; animation: kbFade .2s ease; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 480px; max-width: 94vw; background: var(--surface);
    z-index: 81; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: kbDrawer .28s cubic-bezier(.2,.8,.2,1); }
@keyframes kbDrawer { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes kbFade { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-sec { margin: 22px 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--dim); }
.drawer-balance { background: var(--brand-soft); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 16px 18px; }
.drawer-balance > span { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--brand-600); }
.db-bal { font-size: 30px; font-weight: 800; letter-spacing: -.6px; color: var(--brand-700); margin-top: 4px; font-variant-numeric: tabular-nums; }
.db-bal small { font-size: 14px; font-weight: 600; color: var(--brand-500); }
.drawer-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.plate-list { display: flex; flex-direction: column; gap: 8px; }
.plate-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.form-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.switch input { display: none; }
.plate-chip { display: inline-block; font-family: 'SF Mono', ui-monospace, monospace; font-size: 12px; font-weight: 600;
    letter-spacing: .3px; padding: 3px 8px; border-radius: 7px; background: var(--brand-50); color: var(--brand-700); margin: 2px 5px 2px 0; }
[data-theme="dark"] .plate-chip { background: rgba(58,155,214,.14); color: #9dccef; }
.row-click { cursor: pointer; }
.row-click:hover { background: var(--surface-2); }
.muted-sm { font-size: 12px; color: var(--dim); }
.tnum { font-variant-numeric: tabular-nums; }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.drawer-foot .btn { width: auto; min-width: 110px; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: var(--danger-bg, rgba(220,38,38,.1)); }

/* ---- Kampanya kademe editörü ---- */
.drawer-section-head { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.drawer-section-head h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.tier-edit { display: flex; flex-direction: column; gap: 6px; }
.tier-edit-head, .tier-edit-row { display: grid; grid-template-columns: 1.4fr .9fr .8fr .6fr .8fr .7fr 28px; gap: 6px; align-items: center; }
.tier-edit-head { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--dim); padding: 0 2px; }
.tier-edit-row input { height: 36px; padding: 4px 8px; font-size: 13px; max-width: none; width: 100%; }
.tier-edit-row .tnum { text-align: right; padding-right: 4px; }
.ai-suggest { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--brand-soft);
    border: 1px solid var(--brand-100); font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); white-space: pre-wrap; }

/* ---- Raporlar (modern) ---- */
.filter-bar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.fb-field { display: flex; flex-direction: column; gap: 5px; }
.fb-field span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.fb-field input, .fb-field select { height: 40px; max-width: none; }
.filter-bar .btn { height: 40px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 1000px) { .report-grid { grid-template-columns: 1fr; } }
.rep-row { padding: 11px 0; border-bottom: 1px solid var(--divider); }
.rep-row:last-child { border-bottom: none; }
.rep-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.rep-name { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.rep-val { font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rep-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rep-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rep-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--brand-500); transition: width .4s ease; }
.rep-meta { font-size: 11.5px; color: var(--dim); margin-top: 5px; }

/* ---- Dashboard: natro.com tarzı güven hero'su (derin lacivert #002882 + lime #81bc00 aksan) ---- */
.db-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    margin-bottom: 22px; padding: 24px 28px; border-radius: 18px; position: relative; overflow: hidden;
    background: var(--side-bg); color: #fff;
    box-shadow: 0 16px 38px rgba(0,40,130,.30); }
.db-hero::after { content: ''; position: absolute; right: -50px; top: -60px; width: 240px; height: 240px;
    border-radius: 50%; background: radial-gradient(circle, rgba(129,188,0,.30), transparent 70%); pointer-events: none; }
.db-hero > * { position: relative; z-index: 1; }
.db-hero h2 { margin: 0; color: #fff; font-size: 23px; letter-spacing: -.3px; }
.db-hero p { margin: 5px 0 0; color: rgba(255,255,255,.82); font-size: 13.5px; }
.db-hero-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.db-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--radius-pill);
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(4px);
    font-size: 12.5px; font-weight: 600; color: #fff; }
.db-hero .dot.ok { background: #81bc00; box-shadow: 0 0 0 3px rgba(129,188,0,.3); }
/* Dashboard KPI artış trendi natro yeşili (kohezyon) */
.db-kpi .kpi-trend.up { color: #5a8a00; background: rgba(129,188,0,.14); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg, rgba(16,185,129,.18)); }
.dot.warn { background: var(--warn, #d97706); }
.dot.off { background: var(--dim); }
.badge .dot { margin-right: 5px; }

/* ============================================================
   KURUMSAL TİPOGRAFİ RAFİNESİ (akaryakıt sektörü — resmi/ciddi)
   Abartılı 800 ağırlık + geniş display yerine ölçülü, güvenilir hiyerarşi.
   ============================================================ */
h1, h2, h3, h4, h5 { font-weight: 700; }
h2 { letter-spacing: -.2px; }
.page-head h2 { font-size: 21px; line-height: 1.25; }
.page-head p { font-size: 13.5px; color: var(--muted); }
.db-kpi-val, .kpi-value, .db-bal, .kasa-bal-val, .rep-val, .kasa-bal .kasa-bal-val { font-weight: 700; letter-spacing: -.2px; }
.db-kpi-val { font-size: 26px; }
.section-title, .card-head h3, .ch-title { font-weight: 700; }
.btn { letter-spacing: 0; }
/* Login: kurumsal koyu mavi panel + ölçülü başlık */
.adm-login-brand { background: linear-gradient(158deg, #013a9e 0%, #002882 52%, #001a5c 100%); }
.alb-body h1 { font-size: 29px; font-weight: 700; letter-spacing: -.3px; line-height: 1.22; }
.alb-body p { font-size: 14.5px; }
.alf-card h1 { font-size: 22px; font-weight: 700; }
.alb-logo img { height: 50px; width: auto; display: block; } /* beyaz logo, koyu panelde büyük */
.adm-login-form .lc-logo-mobile .logo-card img { height: 36px; }

/* ---- Kasa / QR ile puan harca ---- */
.kasa-wrap { max-width: 460px; margin: 0 auto; }
.kasa-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.kasa-tabs { display: flex; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.kasa-tab { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: .15s; }
.kasa-tab.active { background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-sm); }
.kasa-reader { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.kasa-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.kasa-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 4px 0 7px; }
.kasa-input { width: 100%; max-width: none; height: 48px; font-size: 16px; }
.kasa-full { width: 100%; margin-top: 14px; }
.kasa-amt { display: flex; gap: 10px; }
.kasa-amt .kasa-input { flex: 1; }
.kasa-amt .btn { width: auto; white-space: nowrap; }
.kasa-cust { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.kasa-avatar { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); }
.kasa-cust-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.kasa-bal { background: var(--brand-soft); border: 1px solid var(--brand-100); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.kasa-bal > span { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--brand-600); }
.kasa-bal-val { font-size: 26px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.kasa-bal-val small { font-size: 13px; font-weight: 600; color: var(--brand-500); }
.kasa-actions { display: flex; gap: 10px; margin-top: 20px; }
.kasa-actions .btn { flex: 1; }
.kasa-ok { text-align: center; }
.kasa-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; margin: 6px auto 14px; }
.kasa-ico.ok { background: var(--ok-bg, #d7f5e9); color: var(--ok, #059669); }
.kasa-ok h3 { margin: 0 0 6px; }
.kasa-ok p { color: var(--muted); margin-bottom: 18px; }

/* ---- Kasa (POS) tam-ekran PWA ---- */
.pos-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface-2); }
.pos-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pos-brand { display: flex; align-items: center; gap: 10px; }
.pos-brand .brand-suffix { font-weight: 700; color: var(--ink); font-size: 15px; }
.pos-body { flex: 1; display: grid; place-items: center; padding: 20px 16px 40px; }
.pos-card { width: 100%; max-width: 440px; }
.pos-h { margin: 0 0 14px; font-size: 17px; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* adım göstergesi */
.pos-steps { display: flex; gap: 8px; }
.pos-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pos-dot.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

/* büyük gösterge alanı (telefon / tutar) */
.kp-display { height: 60px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface-2);
    display: flex; align-items: center; justify-content: center; gap: 4px;
    font-size: 30px; font-weight: 800; letter-spacing: 1px; color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.kp-display.ph { color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.kp-amt-row { display: flex; gap: 10px; align-items: stretch; }
.kp-amt { flex: 1; }
.kp-cur { color: var(--brand-600); font-size: 22px; margin-right: 2px; }
.kp-all { white-space: nowrap; align-self: stretch; height: 60px; margin-bottom: 14px; font-weight: 700; }

/* numerik klavye (premium dokunmatik) */
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 4px; }
.numpad-key { height: 66px; border: 1px solid var(--border); border-radius: 16px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    font-size: 27px; font-weight: 700; color: var(--ink); cursor: pointer; user-select: none;
    box-shadow: 0 1px 2px rgba(16,28,50,.06), inset 0 1px 0 rgba(255,255,255,.5);
    -webkit-tap-highlight-color: transparent; transition: transform .07s ease, box-shadow .12s, background .12s; }
.numpad-key:hover { box-shadow: 0 3px 10px rgba(16,28,50,.10); }
.numpad-key:active { transform: scale(.94); background: var(--brand-soft); border-color: var(--brand-300, var(--brand-600)); color: var(--brand-700); }
.numpad-back { color: var(--brand-600); font-size: 24px; }
.numpad-empty { background: transparent; border: none; box-shadow: none; cursor: default; }

/* OTP kutuları */
.otp-boxes { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.otp-box { width: 44px; height: 56px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2);
    display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.otp-box.cur { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-soft); }

/* cüzdan çipleri (dokunmatik) */
.pos-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pos-chip { flex: 1; min-width: 120px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px;
    background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.pos-chip.on { border-color: var(--brand-600); background: var(--brand-soft); }
.pos-chip > span { font-weight: 700; font-size: 14px; color: var(--ink); }
.pos-chip > small { color: var(--muted); font-size: 12px; }

/* büyük aksiyon butonları */
.pos-action { width: 100%; height: 56px; font-size: 17px; font-weight: 700; margin-top: 12px; }
.pos-actions { display: flex; gap: 10px; margin-top: 12px; }
.pos-actions .btn { flex: 1; height: 50px; font-size: 15px; font-weight: 600; }

/* ============ Kasa POS v2 — modern dokunmatik tasarım ============ */
.pos2-shell { min-height: 100dvh; display: flex; flex-direction: column;
    background: radial-gradient(1200px 600px at 50% -10%, var(--brand-soft), transparent 60%), var(--surface-2); }
.pos2-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pos2-brand { display: flex; align-items: center; gap: 11px; }
.pos2-brandtext { display: flex; flex-direction: column; line-height: 1.1; }
.pos2-brandtext b { font-size: 15px; color: var(--ink); }
.pos2-brandtext small { font-size: 11px; color: var(--muted); }
.pos2-steps { display: flex; align-items: center; gap: 8px; }
.pos2-step { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pos2-step i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
    font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); transition: .2s; }
.pos2-step.on { color: var(--brand-700); }
.pos2-step.on i { background: var(--brand-600); color: #fff; border-color: var(--brand-600); box-shadow: 0 2px 8px rgba(0,87,144,.35); }
.pos2-sep { width: 18px; height: 2px; background: var(--border); border-radius: 2px; }
.pos2-exit { border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px;
    font-weight: 600; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.pos2-exit:hover { color: var(--ink); border-color: var(--muted); }

.pos2-body { flex: 1; display: grid; place-items: start center; padding: 26px 16px 48px; }
.pos2-card { width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 22px; box-shadow: 0 18px 50px -22px rgba(16,28,50,.35), var(--shadow-sm); padding: 26px 22px; }
.pos2-h { margin: 0 0 4px; font-size: 19px; text-align: center; letter-spacing: -.3px; }
.pos2-sub { margin: 0 0 16px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* büyük giriş alanı (hem fiziksel klavye hem ekran klavyesi yazar) */
.pos2-display { width: 100%; height: 66px; text-align: center; border: 2px solid var(--border); border-radius: 16px;
    background: var(--surface-2); font-size: 30px; font-weight: 800; letter-spacing: 1px; color: var(--ink);
    font-variant-numeric: tabular-nums; margin-bottom: 16px; transition: border-color .15s, box-shadow .15s; outline: none; }
.pos2-display::placeholder { color: var(--muted); font-weight: 600; letter-spacing: .5px; opacity: .7; }
.pos2-display:focus { border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.pos2-otp { letter-spacing: 14px; padding-left: 14px; }

.pos2-amtwrap { position: relative; display: flex; align-items: center; gap: 10px; }
.pos2-cur { position: absolute; left: 16px; font-size: 24px; font-weight: 800; color: var(--brand-600); pointer-events: none; z-index: 1; }
.pos2-amt { flex: 1; padding-left: 40px; margin-bottom: 0; }
.pos2-all { height: 66px; padding: 0 16px; border: 2px solid var(--brand-600); background: var(--brand-soft); color: var(--brand-700);
    font: inherit; font-weight: 700; border-radius: 16px; cursor: pointer; white-space: nowrap; margin-bottom: 16px; }
.pos2-conv { text-align: center; color: var(--brand-600); font-size: 13px; font-weight: 600; margin: 8px 0 6px; }

/* müşteri başlığı */
.pos2-cust { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 16px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.pos2-avatar { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 17px;
    color: #fff; background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); flex: none; }
.pos2-cust-info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.pos2-cust-info b { font-size: 15.5px; color: var(--ink); }
.pos2-cust-info small { font-size: 12.5px; color: var(--muted); }
.pos2-chip-x { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
    color: var(--muted); cursor: pointer; font-size: 13px; flex: none; }

/* cüzdan seçimi */
.pos2-wallets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pos2-wallet { flex: 1; min-width: 110px; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 13px;
    background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; transition: .15s; }
.pos2-wallet.on { border-color: var(--brand-600); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.pos2-wallet span { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.pos2-wallet small { color: var(--muted); font-size: 11.5px; }

/* bakiye kartı */
.pos2-balcard { background: linear-gradient(135deg, var(--brand-600), var(--brand-700)); color: #fff;
    border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; box-shadow: 0 10px 24px -10px rgba(0,87,144,.6); }
.pos2-balcard > span { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; opacity: .85; }
.pos2-balcard > b { display: block; font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pos2-balcard small { font-size: 13px; font-weight: 600; opacity: .9; }
.pos2-amtbadge { display: inline-block; margin-top: 6px; background: var(--brand-soft); color: var(--brand-700);
    font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; }

/* aksiyonlar */
.pos2-primary { width: 100%; height: 58px; margin-top: 16px; border: none; border-radius: 16px; cursor: pointer;
    font: inherit; font-size: 17px; font-weight: 700; color: #fff;
    background: linear-gradient(180deg, var(--brand-500, var(--brand-600)), var(--brand-700));
    box-shadow: 0 10px 24px -10px rgba(0,87,144,.7); transition: transform .07s, box-shadow .15s, opacity .15s; }
.pos2-primary:hover { box-shadow: 0 14px 30px -10px rgba(0,87,144,.8); }
.pos2-primary:active { transform: translateY(1px) scale(.995); }
.pos2-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.pos2-primary.ghost { background: var(--surface-2); color: var(--ink); box-shadow: none; border: 1px solid var(--border); }
.pos2-row2 { display: flex; gap: 10px; margin-top: 10px; }
.pos2-ghost { flex: 1; height: 46px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    font: inherit; font-weight: 600; font-size: 14px; border-radius: 12px; cursor: pointer; }
.pos2-ghost:hover { color: var(--ink); }
.pos2-err { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border);
    padding: 10px 14px; border-radius: 12px; font-size: 13.5px; margin-top: 12px; text-align: center; }
.pos2-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border);
    padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 6px 0; text-align: center; }

/* başarı ekranı */
.pos2-done { text-align: center; padding: 8px 0; }
.pos2-check { width: 72px; height: 72px; margin: 4px auto 16px; border-radius: 50%; display: grid; place-items: center;
    font-size: 38px; color: #fff; background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 12px 28px -10px rgba(5,150,105,.7); animation: pop .3s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pos2-done h3 { margin: 0 0 8px; font-size: 20px; }
.pos2-done p { color: var(--muted); margin: 0 0 8px; line-height: 1.5; }

/* sayfalama (pager) */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 4px; flex-wrap: wrap; }
.pager-btns { display: flex; align-items: center; gap: 10px; }

/* mod seçici (Harca / Kazan) */
.pos2-mode { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 14px; padding: 5px; margin-bottom: 18px; }
.pos2-mode button { flex: 1; height: 44px; border: none; background: transparent; border-radius: 10px;
    font: inherit; font-weight: 700; font-size: 14.5px; color: var(--muted); cursor: pointer; transition: .15s; }
.pos2-mode button.on { background: var(--brand-600); color: #fff; box-shadow: 0 4px 12px -4px rgba(0,87,144,.6); }
.pos2-mode button.on.kazan { background: #059669; box-shadow: 0 4px 12px -4px rgba(5,150,105,.6); }

/* kazan vurgusu */
.pos2-balcard.kazan { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 24px -10px rgba(5,150,105,.6); }
.pos2-primary.kazan { background: linear-gradient(180deg, #10b981, #059669); box-shadow: 0 10px 24px -10px rgba(5,150,105,.7); }

@media (max-width: 420px) { .pos2-steps .pos2-step span { display: none; } .pos2-card { padding: 22px 16px; } }

/* ---- Dashboard tipografi & cila ---- */
body { font-feature-settings: 'cv11', 'ss01'; }
.kpi-value, .db-kpi-val, .kpi-trend, .db-bal, .table td { font-variant-numeric: tabular-nums; }
.db-kpi-val { font-size: 28px; }
.kpi-card { transition: transform .18s ease, box-shadow .18s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
h2 { letter-spacing: -.5px; }

/* ---------- AI Asistan ---------- */
.ai-output { white-space: pre-wrap; line-height: 1.65; color: var(--ink-soft); font-size: 14px; }
.ai-insight .card-head h3 { margin: 0; }

.ai-chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 440px; padding: 0; }
.chat-stream { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.chat-hello { display: flex; gap: 12px; color: var(--ink-soft); }
.ai-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 12px;
    font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); flex-shrink: 0; }
.ai-avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.chat-msg { display: flex; gap: 10px; max-width: 82%; }
.chat-msg.me { align-self: flex-end; }
.chat-msg.ai { align-self: flex-start; }
.chat-msg .bubble { padding: 12px 15px; border-radius: 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.chat-msg.me .bubble { background: var(--primary); color: var(--primary-contrast); border-bottom-right-radius: 4px; }
.chat-msg.ai .bubble { background: var(--surface-3); color: var(--ink); border-bottom-left-radius: 4px;
    display: flex; align-items: center; gap: 8px; }
.chat-bar { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.chat-bar input { max-width: none; flex: 1; height: 44px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-soft);
    border-radius: var(--radius-pill); padding: 7px 13px; font-size: 13px; cursor: pointer; font: inherit; transition: .15s; }
.chip:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.chip:disabled { opacity: .5; cursor: not-allowed; }
