/* ==========================================================================
   Pazaren — Design System (Tema: Siyah / Mavi / Beyaz)
   ThemeForest "firma-tema" görünümüne uyarlandı. Tek merkezden re-skin:
   sınıf adları korunur, tüm sayfalar otomatik yeni tasarımı alır.
   Light + dark mode via [data-theme]. Sidebar daima koyu (tema kimliği).
   ========================================================================== */
/* Ana metin fontu: Roboto. Sembol/glyph yedeği için Nunito Sans. */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root {
    /* Fintech-dashboard dili (örnek e1/e2/e3): yuvarlak yumuşak kartlar, bol
       beyaz alan, koyu sidebar + koyu "feature" kartları, çivit/violet accent. */
    --bg:            #f5f6f8;
    --surface:       #ffffff;
    --surface-2:     #f4f5f8;
    --border:        #f0f1f4;   /* çok hafif — çizgiler neredeyse görünmez */
    --text:          #14161d;
    --text-soft:     #6b7280;
    --primary:       #06c167;   /* marka yeşili (butonlar/accent) */
    --primary-2:     #04a050;   /* gradient için koyu yeşil */
    --primary-soft:  #d9f7e6;   /* açık yeşil tint */
    /* Grafik accent'i: --primary beyaz zeminde 2.3:1 kalıyor (3:1 altı). Çizgi/
       nokta gibi ince işaretler için bir tık koyu adım kullanılır. */
    --chart-accent:  #04a050;
    --success:       #16a34a;
    --warning:       #f59e0b;
    --danger:        #ef4444;
    --radius:        18px;
    --radius-sm:     12px;
    --field-border:  transparent;     /* inputlar dolgu-tabanlı, kenarlıksız */
    --shadow:        0 2px 8px rgba(16,24,40,.05), 0 18px 40px -16px rgba(16,24,40,.14);
    --shadow-sm:     0 1px 2px rgba(16,24,40,.04), 0 8px 22px -12px rgba(16,24,40,.10);
    --card-border:   transparent;     /* kartlar kenarlıksız — sadece yumuşak gölge */
    --sidebar-w:     250px;
    /* İçerik alanının sağ/sol boşluğu (gutter). Üst çubuk (.topbar) da AYNI
       değeri kullanır → header'daki logo/menü ile gövde birebir hizalanır. */
    --content-gutter: 28px;
    /* İçeriğin azami genişliği. Ayarlar > Görünüm'den seçilir; layout bunu
       :root üzerinde ezer (bkz. content_widths()). Varsayılan tam genişlik. */
    --content-max:    100000px;
    /* Üst çubuk ve gövde AYNI yatay dolguyu kullanır → hangi genişlik seçilirse
       seçilsin header'daki logo/menü ile kartlar birebir hizalı kalır.
       max(): içerik sınıra ulaşmadıysa kenar payı, ulaştıysa ortalayan boşluk. */
    --content-pad:    max(var(--content-gutter), (100% - var(--content-max)) / 2);
    /* Ana font: Roboto (sonra değiştirilebilir). */
    --font:          'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    /* Koyu "feature" kartları (bakiye/kredi-kartı vb.) — aydınlık panelde siyah kart */
    --ink:           #16181f;
    --ink-2:         #20232e;
    --ink-text:      #ffffff;
    --ink-soft:      rgba(255,255,255,.62);

    /* Sidebar — GÜNDÜZ modunda açık/beyaz (tema ile uyumlu). Gece modunda
       aşağıdaki [data-theme="dark"] bloğu koyuya çevirir. Özel renk ayarlardan. */
    --sb-bg:         #ffffff;
    --sb-bg-2:       #f3f4f7;
    --sb-text:       rgba(28,32,46,.66);
    --sb-text-strong:#111827;
    --sb-hover:      rgba(17,24,39,.055);
    --sb-active-bg:  var(--primary);
    --sb-active-tx:  #ffffff;
    --sb-border:     rgba(17,24,39,.09);
    --sb-label:      rgba(28,32,46,.45);
}

[data-theme="dark"] {
    --bg:            #0e1018;   /* nötr koyu (Editorial gece) */
    --surface:       #171a23;
    --surface-2:     #12141d;
    --border:        #262a36;
    --text:          #eceef4;
    --text-soft:     #9aa3b5;
    --primary:       #0ad177;   /* parlak yeşil (gece için) */
    --primary-2:     #06c167;
    --primary-soft:  #0c2a1c;   /* koyu yeşil tint */
    --chart-accent:  #0ad177;   /* koyu zeminde parlak adım okunur kalır */
    --shadow:        0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.5);
    --shadow-sm:     0 1px 2px rgba(0,0,0,.35);
    --field-border:  #2b303e;
    --card-border:   #242834;
    --sb-bg:         #12141d;   /* sidebar gövdeden hafif ayrık */
    --sb-bg-2:       #0e1018;
    --sb-text:       #9aa3b5;
    --sb-text-strong:#ffffff;
    --sb-hover:      rgba(255,255,255,.07);
    --sb-active-bg:  var(--primary);
    --sb-active-tx:  #ffffff;
    --sb-border:     rgba(255,255,255,.06);
    --sb-label:      #5b6577;
}

* { box-sizing: border-box; }

/* --- Modern, yumuşak, tema-duyarlı kaydırma çubuğu (gündüz/gece) ---------- */
:root          { --scroll-thumb: rgba(17,24,39,.20); --scroll-thumb-hover: rgba(17,24,39,.34); }
[data-theme="dark"] { --scroll-thumb: rgba(255,255,255,.16); --scroll-thumb-hover: rgba(255,255,255,.30); }
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb); border-radius: 100px;
    border: 3px solid transparent; background-clip: padding-box;
    transition: background .15s;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }

/* --- Auth screen ---------------------------------------------------------- */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(0,113,227,.10), transparent),
        var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 32px;
}
.auth-card h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-soft); margin: 0 0 28px; font-size: 13px; }
.brand-dot {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: grid; place-items: center; color: #fff; font-weight: 700;
    margin-bottom: 20px; font-size: 20px;
}

/* --- Split login (brand panel + form) ----------------------------------- */
.auth-split {
    width: 100%; max-width: 900px;
    display: grid; grid-template-columns: 1.05fr .95fr;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
}
.auth-brandside {
    position: relative; color: #fff; padding: 46px 40px;
    background: linear-gradient(160deg, #0b1326 0%, #102350 55%, #1746b3 130%);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth-brandside::after {
    content: ''; position: absolute; right: -90px; top: -90px; width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(47,107,255,.55), transparent 70%); filter: blur(10px);
}
.auth-brandside .b-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; position: relative; z-index: 1; }
.auth-brandside .b-logo .brand-dot { margin: 0; width: 40px; height: 40px; font-size: 17px; }
.auth-brandside .b-hero { position: relative; z-index: 1; }
.auth-brandside .b-hero h2 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.02em; }
.auth-brandside .b-hero p { color: rgba(255,255,255,.72); margin: 0; font-size: 14px; line-height: 1.6; }
.auth-brandside .b-feats { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.auth-brandside .b-feats span { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: rgba(255,255,255,.85); }
.auth-brandside .b-feats span::before { content: '✓'; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 11px; }
.auth-formside { padding: 46px 42px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 760px) {
    .auth-split { grid-template-columns: 1fr; max-width: 420px; }
    .auth-brandside { display: none; }
    .auth-formside { padding: 36px 26px; }
}

/* --- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 6px; font-weight: 500; }
.input, .select, textarea.input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);       /* iç beyaz + ince yumuşak kenarlık */
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.input::placeholder, textarea.input::placeholder { color: var(--text-soft); opacity: .8; }
.input:focus, .select:focus, textarea.input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.input:hover:not(:focus), .select:hover:not(:focus) { border-color: color-mix(in srgb, var(--text) 14%, var(--border)); }
/* Checkbox/radio + select: hover'da el imleci */
input[type="checkbox"], input[type="radio"], .select, label.flex { cursor: pointer; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; }
/* Themed select with custom chevron */
.select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7488' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 34px;
}
.checkrow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: transform .08s, background .15s, opacity .15s;
    font-family: inherit;
}
.btn { font-weight: 600; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; width: 100%; box-shadow: 0 1px 2px rgba(6,193,103,.20); }
.btn-primary:hover { background: var(--primary-2); color: #fff; box-shadow: 0 2px 8px rgba(6,193,103,.28); opacity: 1; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 12%, var(--border)); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
/* Square, equal-size icon-only action button for list rows (clock, maximize…). */
.row-act { width: 34px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.btn-danger { background: var(--danger); color:#fff; box-shadow: 0 4px 12px rgba(239,68,68,.25); }
.btn-success { background: var(--success); color:#fff; box-shadow: 0 4px 12px rgba(22,163,74,.22); }

/* --- Alerts --------------------------------------------------------------- */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 18px; }
.alert-error { background: rgba(255,59,48,.1); color: var(--danger); }
.alert-success { background: rgba(52,199,89,.12); color: #1a7e3a; }
.alert-info { background: var(--primary-soft); color: var(--primary); }

/* --- App shell ------------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    background: var(--sb-bg);
    border-right: 1px solid var(--sb-border);
    padding: 14px 12px 10px;
    position: fixed; inset: 0 auto 0 0;
    display: flex; flex-direction: column;
    z-index: 30;
    overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent;
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 100px; }
.sidebar .logo { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 6px 8px 12px; margin-bottom: 2px;
    font-weight: 800; letter-spacing: -.02em; color: var(--sb-text-strong); border-bottom: none; }
.sidebar .logo .brand-dot { width: 34px; height: 34px; font-size: 15px; border-radius: 10px; margin: 0; }
/* Logo tek yerden basılır (partials/brand.php); ölçüsü çağıran yerin verdiği
   --brand-h ile belirlenir. .no-invert = zaten doğru renkte (beyaz wordmark ya
   da yöneticinin yüklediği logo) → gece modunda ters çevrilmez. */
.brand-logo { height: var(--brand-h, 44px); width: auto; max-width: 100%; object-fit: contain; display: block; }
/* Logo iki tonlu (yeşil kare + yazı) → filtreyle beyaza çevrilemez. Bunun
   yerine iki dosya basılır, temaya göre biri gizlenir (bkz. partials/brand.php). */
.brand-on-dark { display: none; }
[data-theme="dark"] .brand-on-light { display: none; }
[data-theme="dark"] .brand-on-dark { display: block; }
.brand-mark { max-height: 34px; max-width: 34px; object-fit: contain; display: none; border-radius: 9px; }
.shell.mini .brand-logo { display: none; }
.shell.mini .brand-mark { display: block; }
/* Mobilde sidebar tam açıldığında yine wordmark göster. */
@media (max-width: 860px) { .shell.open.mini .brand-logo { display: block; } .shell.open.mini .brand-mark { display: none; } }
.nav-group-label { display: flex; align-items: center; justify-content: space-between; width: 100%;
    border: none; background: transparent; cursor: pointer; font-family: inherit;
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--sb-label); padding: 9px 10px 3px; font-weight: 700; }
.nav-group-label:hover { color: var(--sb-text-strong); }
.nav-chev { display: inline-flex; align-items: center; opacity: .55; transition: transform .18s ease; }
.nav-chev.closed { transform: rotate(-90deg); }
.nav-group + .nav-group { margin-top: 2px; }
.nav-item {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 11px; border: 1px solid transparent;
    color: var(--sb-text); font-size: 13.5px; font-weight: 600;
    margin-bottom: 2px; cursor: pointer; transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.nav-item:hover:not(.active) { background: var(--sb-hover); color: var(--sb-text-strong); opacity: 1; transform: translateX(2px); }
/* Active = yeşil gradient pill + gölge (modern, markaya uygun). */
.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: var(--sb-active-tx); font-weight: 700;
    border: 1px solid transparent;
    box-shadow: 0 6px 16px rgba(6,193,103,.32);
}
/* Aktif öğenin solunda ince beyaz vurgu çizgisi. */
.nav-item.active::before {
    content: ''; position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 16px; border-radius: 3px; background: rgba(255,255,255,.85);
}
.nav-item.active .ic, .nav-item.active svg, .nav-item.active .fi { color: var(--sb-active-tx); }
.nav-item .ic { width: 20px; text-align: center; font-size: 15px; opacity: .85;
    font-family: 'Nunito Sans', 'Segoe UI Symbol', 'Apple Symbols', sans-serif; }
.nav-item.active .ic { opacity: 1; }
.nav-solo { margin-bottom: 4px; }

/* Group header = clickable link (→ ana sayfa) + a separate chevron toggle. */
.nav-group-head { display: flex; align-items: center; gap: 2px; margin-top: 7px; }
.nav-group-label { flex: 1; display: flex; align-items: center; justify-content: flex-start; gap: 11px;
    text-decoration: none; padding: 8px 11px; border-radius: 10px; color: var(--sb-text-strong);
    font-size: 13px; font-weight: 700; letter-spacing: -.01em; transition: background .15s; min-width: 0;
    border: none; background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
/* SVG bulunmayan (eski sembol) ikonlar için yedek görünüm. */
.ic-glyph { font-family: 'Nunito Sans', 'Segoe UI Symbol', 'Apple Symbols', sans-serif; font-size: 15px; line-height: 1; }
/* Flaticon UIcons — icon() helper'ının ürettiği <i class="fi fi-br-*">.
   Boyut inline font-size ile gelir; burada yalnızca hizalama sabitlenir.
   Renk currentColor'dan gelir, yani eski SVG'lerle aynı şekilde renklenir. */
.fi { display: inline-flex; align-items: center; justify-content: center;
      line-height: 1; flex: none; vertical-align: middle; }
.fi::before { line-height: 1; }
.nav-group-label span:not(.ic) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group-label .ic { width: 20px; text-align: center; font-size: 15px; opacity: .9;
    font-family: 'Nunito Sans', 'Segoe UI Symbol', 'Apple Symbols', sans-serif; }
.nav-group-label:hover { background: var(--sb-hover); }
.nav-group-head.active .nav-group-label { background: var(--sb-hover); }
.nav-chev-btn { flex: none; border: none; background: transparent; cursor: pointer; color: var(--sb-text);
    padding: 7px; border-radius: 8px; display: flex; }
.nav-chev-btn:hover { background: var(--sb-hover); color: var(--sb-text-strong); }
.nav-group-items { margin: 1px 0 4px; }
.nav-group-items .nav-item { padding-left: 20px; font-size: 13px; }
.nav-group-items .nav-item .ic { font-size: 13.5px; }

/* --- Üst menü modu (menu_mode = top): menü HEADER içinde, sidebar yok ------- */
.shell.menu-top .sidebar,
.shell.menu-top .sb-toggle { display: none; }
.shell.menu-top .main { margin-left: 0; }
/* Header içindeki yatay grup menüsü; her grup hover'da açılır alt menü (dropdown)
   gösterir. overflow görünür kalmalı ki dropdown kırpılmasın. */
/* Menü, logo ile sağdaki sabit ikonlar arasındaki alanı kaplar ve o alanın
   ORTASINA hizalanır. Logo solda, arama/gece modu/bildirim/avatar sağda yaslı
   kalır; taşma olursa JS zaten force-collapse ile hamburger'a indirir. */
.topmenu { display: flex; align-items: center; justify-content: center; gap: 2px; flex: 1; min-width: 0;
    height: 100%; overflow: visible; }
.topmenu-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
    font-weight: 800; flex: none; padding-right: 12px; margin-right: 4px; border-right: 1px solid var(--border); }
.topmenu-brand .brand-dot { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
.topmenu-group { position: relative; flex: none; height: 100%; display: flex; align-items: center; }
.topmenu-solo, .topmenu-link { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none;
    color: var(--text); font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 10px;
    cursor: pointer; white-space: nowrap; }
.topmenu-solo:hover, .topmenu-link:hover { background: var(--surface-2); }
.topmenu-solo.active, .topmenu-link.active { background: var(--primary-soft); color: var(--primary); }
.topmenu-link .caret { display: inline-flex; opacity: .55; }
.topmenu .ic { width: 18px; display: inline-flex; align-items: center; justify-content: center; }
/* Hover dropdown: grubun altına açılan alt menü. */
.topmenu-drop { position: absolute; top: calc(100% - 6px); left: 0; min-width: 230px; z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.topmenu-item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
    font-size: 13.5px; font-weight: 600; padding: 8px 11px; border-radius: 9px; white-space: nowrap; }
.topmenu-item:hover { background: var(--surface-2); }
.topmenu-item.active { background: var(--primary-soft); color: var(--primary); }
.topmenu-item .ic { width: 18px; display: inline-flex; align-items: center; justify-content: center; }
/* Üst menü modunda aramayı küçült, spacer'ı gizle ki menüye yer açılsın. */
.shell.menu-top .topbar .search { flex: 0 0 200px; max-width: 200px; }
.shell.menu-top .topbar .spacer { display: none; }

/* Üst menü (menu_mode=top): yatay menü 8 gruba kadar çıkabildiğinden bazı
   çözünürlüklerde sağdaki SABİT ikonların (arama / gece / bildirim) üstüne
   biniyordu. Sabit bir px eşiği yeterli değil (menü genişliği izin/etikete göre
   değişir); bu yüzden JS taşmayı ölçüp `force-collapse` sınıfını ekler. O sınıf
   varken yatay menü gizlenir, logo + hamburger kalır, menü soldan drawer olarak
   açılır. Sağ ikonlar ve logo her zaman yerinde durur. */
/* Karartma katmanı (drawer açıkken) — görünürlüğü .shell.open ile kontrol edilir. */
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }

.shell.menu-top.force-collapse .topmenu { display: none; }          /* yatay menü gizli */
.shell.menu-top.force-collapse .topbar .burger,
.shell.menu-top.menu-partial .topbar .burger { display: grid; }   /* menüyü açan hamburger */
.shell.menu-top.force-collapse .topbar .spacer { display: block; }  /* logo solda, ikonlar sağda */
.shell.menu-top.force-collapse .sidebar,
.shell.menu-top.menu-partial .sidebar { display: flex; transform: translateX(-100%); }
.shell.menu-top.force-collapse.open .sidebar,
.shell.menu-top.menu-partial.open .sidebar { transform: none; box-shadow: var(--shadow); width: var(--sidebar-w); }
.shell.menu-top.force-collapse .main,
.shell.menu-top.menu-partial .main { margin-left: 0; }
.shell.menu-top.force-collapse.open .scrim,
.shell.menu-top.menu-partial.open .scrim { display: block; }
/* Daha önce sol menü modunda "mini" bırakılmışsa drawer'ı tam genişlikte aç. */
.shell.menu-top.force-collapse.open.mini .sidebar,
.shell.menu-top.menu-partial.open.mini .sidebar { width: var(--sidebar-w); padding: 20px 14px; }
.shell.menu-top.force-collapse.open.mini .nav-item span:not(.ic),
.shell.menu-top.force-collapse.open.mini .nav-group-label span:not(.ic),
.shell.menu-top.force-collapse.open.mini .nav-chev-btn,
.shell.menu-top.force-collapse.open.mini .logo span,
.shell.menu-top.menu-partial.open.mini .nav-item span:not(.ic),
.shell.menu-top.menu-partial.open.mini .nav-group-label span:not(.ic),
.shell.menu-top.menu-partial.open.mini .nav-chev-btn,
.shell.menu-top.menu-partial.open.mini .logo span { display: revert; }

/* menu-partial: bazı bölümler header'dan gizlendiğinde yatay menü DURUR
   (force-collapse'tan farkı bu), gizlenenlere hamburger çekmecesinden ulaşılır.
   Çekmecedeki sidebar her zaman menünün TAMAMINI gösterir. */
/* Çok dar ekranda header'daki logoyu gizle (drawer içinde zaten logo var). */
@media (max-width: 560px) { .shell.menu-top .topmenu-brand { display: none; } }

/* --- Sayfa-içi alt menü (aktif grubun sekmeleri, header altı) -------------- */
.subnav { display: flex; align-items: center; gap: 14px; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 0 20px; position: sticky; top: 60px; z-index: 18;
    overflow-x: auto; scrollbar-width: thin; }
.subnav-home { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none;
    color: var(--text); font-weight: 700; font-size: 13.5px; padding: 11px 14px 11px 0;
    border-right: 1px solid var(--border); }
.subnav-home .ic { font-size: 16px; font-family: 'Nunito Sans', 'Segoe UI Symbol', 'Apple Symbols', sans-serif; }
.subnav-tabs { display: flex; align-items: center; gap: 2px; }
.subnav-tab { display: flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap;
    color: var(--text-soft); font-size: 13.5px; font-weight: 600; padding: 13px 12px;
    border-bottom: 2px solid transparent; }
.subnav-tab:hover { color: var(--text); }
.subnav-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.subnav-tab .ic { font-size: 14px; opacity: .85;
    font-family: 'Nunito Sans', 'Segoe UI Symbol', 'Apple Symbols', sans-serif; }
@media (max-width: 640px) { .subnav-home-l { display: none; } }

/* --- Genel arama modalı (header arama ikonundan) -------------------------- */
.search-modal { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center;
    align-items: flex-start; padding: 12vh 16px 16px; background: rgba(16,24,40,.45); backdrop-filter: blur(3px); }
.search-modal-box { width: 100%; max-width: 560px; }
.search-modal-field { display: flex; align-items: center; gap: 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 16px; padding: 15px 18px; box-shadow: var(--shadow); }
.search-modal-field .sm-ic { display: flex; color: var(--text-soft); }
.search-modal-field input { flex: 1; border: none; background: transparent; outline: none;
    color: var(--text); font-size: 17px; font-family: inherit; }
.search-modal-field .sm-x { border: none; background: var(--surface-2); color: var(--text-soft);
    width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; flex: none; }
.search-modal-field .sm-x:hover { background: var(--border); color: var(--text); }
.search-modal-hint { color: #fff; font-size: 12.5px; margin-top: 10px; text-align: center; opacity: .9; }

/* --- Responsive: tabloları küçük ekranda yatay kaydır, taşmayı önle -------- */
@media (max-width: 860px) {
    :root { --content-gutter: 14px; }          /* hem .content hem .topbar bunu kullanır */
    .content { padding: 16px var(--content-pad); }
    .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    table.tbl { min-width: 560px; }
    .topbar { gap: 10px; }
}

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 60px; background: color-mix(in srgb, var(--surface) 80%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 16px; padding: 0 var(--content-pad);
}
.topbar .search {
    flex: 1; max-width: 560px;
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: 13px; padding: 12px 16px; transition: background .15s, border-color .15s, box-shadow .15s;
}
.topbar .search:focus-within { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.topbar .search input { border: none; background: transparent; outline: none; color: var(--text); width: 100%; font-size: 14.5px; }
.topbar .spacer { flex: 1; }
.iconbtn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font-size: 15px; box-shadow: var(--shadow-sm); display: inline-grid; place-items: center; flex: none; }
.iconbtn:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; display:grid; place-items:center; font-weight:600; font-size:13px; }

/* İçerik: üst çubukla aynı yatay kutu — aynı --content-gutter, aynı sınır.
   Böylece header'daki logo/menü ile gövdedeki kartlar aynı hizada başlar. */
.content {
    /* max-width + margin:auto DEĞİL — dolgu ile ortalanıyor ki .topbar da aynı
       hesabı kullanabilsin (o tam genişlikte kalmalı: zemin ve alt çizgi). */
    padding: 28px var(--content-pad);
    width: 100%;
}
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
.page-sub { color: var(--text-soft); margin: 0 0 24px; }

/* --- Cards & stats -------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 24px; }
.card {
    background: var(--surface); border: 1px solid var(--card-border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 22px;
}
.stat-card .label { color: var(--text-soft); font-size: 13px; margin-bottom: 8px; display:flex; align-items:center; gap:8px; }
.stat-card .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.stat-card .trend { font-size: 12px; margin-top: 6px; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }
.stat-ic { width:32px;height:32px;border-radius:9px;display:grid;place-items:center;font-size:15px; }

/* --- Tables --------------------------------------------------------------- */
.card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.card-head h3 { margin:0; font-size:16px; font-weight:600; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.tbl th { text-align: left; color: var(--text-soft); font-weight: 600; font-size: 12px; padding: 11px 14px; border: none; }
table.tbl td { padding: 13px 14px; border: none; }
/* Çizgi yok — satır ayrımı yalnızca hover ile (soft). */
table.tbl tbody tr { border-radius: 12px; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:hover td:first-child { border-radius: 12px 0 0 12px; }
table.tbl tbody tr:hover td:last-child { border-radius: 0 12px 12px 0; }

/* --- Badges --------------------------------------------------------------- */
.badge { display:inline-flex; align-items:center; gap:5px; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; }
.badge.green { background: rgba(52,199,89,.14); color:#1a7e3a; }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.orange { background: rgba(255,159,10,.16); color:#a96400; }
.badge.red { background: rgba(255,59,48,.12); color: var(--danger); }
.badge.gray { background: var(--surface-2); color: var(--text-soft); border:1px solid var(--border); }

/* --- Misc ----------------------------------------------------------------- */
.row { display:flex; gap:12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.muted { color: var(--text-soft); }
.right { text-align: right; }
.mt { margin-top: 16px; }
.flex { display:flex; align-items:center; gap:10px; }
.between { justify-content: space-between; }
.pill-progress { height:8px; background: var(--surface-2); border-radius:100px; overflow:hidden; }
.pill-progress > span { display:block; height:100%; background: var(--primary); }

/* --- Sidebar: full / mini (icon-rail) / mobile --------------------------- */
.sidebar { transition: width .2s ease, transform .25s ease; }
.main { transition: margin-left .2s ease; }

/* Mini (icon-only) rail on desktop. */
:root { --sidebar-mini: 68px; }
.shell.mini .sidebar { width: var(--sidebar-mini); padding: 20px 10px; }
.shell.mini .sidebar .logo span:not(.brand-dot),
.shell.mini .nav-item span:not(.ic),
.shell.mini .nav-group-label span:not(.ic),
.shell.mini .nav-chev-btn { display: none; }
.shell.mini .sidebar .logo { justify-content: center; padding: 6px 0 22px; }
.shell.mini .nav-item { justify-content: center; padding: 8px 0; gap: 0; }
.shell.mini .nav-group-items .nav-item { padding-left: 0; }
.shell.mini .nav-item .ic { font-size: 15px; width: auto; }
/* Mini rayda başlıklar ikonsuz olduğundan gizlenir; gruplar sadece ikon-öğeler olarak görünür. */
.shell.mini .nav-group-head { display: none; }
.shell.mini .nav-group + .nav-group { margin-top: 6px; }
.shell.mini .main { margin-left: var(--sidebar-mini); }

/* Sidebar kenarına oturan daralt/genişlet oku (sidebar çizgisini ortalar). */
.sb-toggle { position: fixed; top: 72px; left: calc(var(--sidebar-w) - 13px); z-index: 45;
    width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow); color: var(--text); cursor: pointer;
    display: flex; align-items: center; justify-content: center; line-height: 0;
    transition: left .2s ease, background .15s, transform .2s ease; }
.sb-toggle:hover { background: var(--surface-2); }
/* İkon butonlarındaki SVG'yi block yap + padding sıfırla: tarayıcı varsayılan
   buton iç boşluğu ve line-box kayması olmadan tam merkezde durur. */
.sb-toggle svg, .iconbtn svg, .sb-toggle .fi, .iconbtn .fi { display: block; }
.iconbtn { padding: 0; line-height: 0; }
.shell.mini .sb-toggle { left: calc(var(--sidebar-mini) - 13px); }
.topbar .burger { display: none; }      /* masaüstü: kenar oku kullanılır */
@media (max-width: 860px) {
    .sb-toggle { display: none; }        /* mobilde topbar hamburger açar */
    .topbar .burger { display: grid; }
}

@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); }
    .shell.open .sidebar { transform: none; box-shadow: var(--shadow); width: var(--sidebar-w); }
    .shell.open.mini .sidebar { width: var(--sidebar-w); padding: 20px 14px; } /* full when opened on mobile */
    .shell.open.mini .nav-item span:not(.ic), .shell.open.mini .nav-group-label span:not(.ic),
    .shell.open.mini .nav-chev-btn, .shell.open.mini .logo span { display: revert; }
    .shell.open.mini .nav-group-label { justify-content: flex-start; padding: 8px 11px; gap: 11px; }
    .shell.open.mini .nav-group-items .nav-item { padding-left: 20px; }
    .main, .shell.mini .main { margin-left: 0; }
    .shell.open .scrim { display: block; }
    /* Üst menü modunda mobilde de hamburger + sidebar drawer kullanılır
       (yatay menü gizlemesini/toplamayı JS `force-collapse` sınıfı yürütür). */
    .shell.menu-top .sidebar { display: flex; }
}

/* --- Modal dialog -------------------------------------------------------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,.45);
    display: grid; place-items: center; padding: 24px;
    backdrop-filter: blur(2px);
}
.modal {
    width: 100%; max-width: 520px; max-height: 90vh; overflow: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 24px;
    animation: modal-in .18s ease;
}
.modal-lg { max-width: 760px; }
@keyframes modal-in { from { opacity:0; transform: translateY(8px) scale(.98);} to { opacity:1; transform:none;} }
.modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal-head h3 { margin:0; font-size:18px; }
[x-cloak] { display: none !important; }

/* --- Wizard (full-screen product add) ----------------------------------- */
.wizard-shell { min-height: 100vh; background: var(--bg); display:flex; flex-direction:column; }
.wizard-top {
    height: 60px; display:flex; align-items:center; gap:16px; padding:0 24px;
    background: var(--surface); border-bottom:1px solid var(--border);
    position: sticky; top:0; z-index:10;
}
.wizard-body { flex:1; display:flex; max-width:1100px; width:100%; margin:0 auto; padding:28px; gap:28px; }
.wizard-steps { width: 240px; flex-shrink:0; }
.wstep { display:flex; gap:12px; align-items:flex-start; padding:14px 12px; border-radius:12px; cursor:pointer; }
.wstep.active { background: var(--primary-soft); }
.wstep .num {
    width:26px; height:26px; border-radius:50%; flex-shrink:0;
    display:grid; place-items:center; font-size:13px; font-weight:600;
    background: var(--surface-2); color: var(--text-soft); border:1px solid var(--border);
}
.wstep.active .num { background: var(--primary); color:#fff; border-color: var(--primary); }
.wstep.done .num { background: var(--success); color:#fff; border-color: var(--success); }
.wstep .t { font-weight:600; font-size:14px; }
.wstep .d { color: var(--text-soft); font-size:12px; }
.wizard-content { flex:1; min-width:0; }
.req { color: var(--danger); }
.field.invalid .input, .field.invalid .select { border-color: var(--danger); box-shadow:0 0 0 3px rgba(255,59,48,.12); }
.field .hint { font-size:12px; color: var(--text-soft); margin-top:4px; }

/* --- Chart cards -------------------------------------------------------- */
.chart-wrap { position: relative; height: 260px; }
.chart-wrap.sm { height: 220px; }

/* --- Right-click context menu ------------------------------------------- */
.ctx-menu {
    position: fixed; z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    min-width: 240px;
    max-height: 82vh;
    overflow-y: auto;
    overscroll-behavior: contain;          /* don't scroll the page behind it */
    /* Modern soft scrollbar (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
/* Modern soft scrollbar (WebKit/Blink) */
.ctx-menu::-webkit-scrollbar { width: 8px; }
.ctx-menu::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.ctx-menu::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 100px;
    border: 2px solid var(--surface);      /* inset look, thinner thumb */
}
.ctx-menu::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }
.ctx-item { display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:none; background:transparent; padding:9px 11px; border-radius:9px; cursor:pointer; color:var(--text); font-size:13.5px; font-family:inherit; line-height:1; }
.ctx-item:hover { background: var(--surface-2); }
/* Yalnızca-görüntüleme: yazma aksiyonu pasif (soluk) — tıklanınca uyarı toast'ı çıkar. */
.ctx-item.is-disabled { opacity: .45; }
.ctx-item.is-disabled:hover { background: transparent; }
.ctx-item svg, .ctx-item .fi { color: var(--text-soft); }
.ctx-item.ctx-danger, .ctx-item.ctx-danger svg, .ctx-item.ctx-danger .fi { color: var(--danger); }
.ctx-label { font-size:11px; color:var(--text-soft); padding:9px 11px 3px; text-transform:uppercase; letter-spacing:.04em; }
.ctx-sep { border-top:1px solid var(--border); margin:4px 0; }

/* --- Sidebar colour swatch (settings appearance) ------------------------ */
.sw-active { box-shadow: 0 0 0 3px var(--primary); border-color: var(--primary) !important; }

/* --- Selectable pick cards (publish to marketplaces) -------------------- */
.pick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
.pick-card { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--border);
    border-radius:12px; cursor:pointer; transition:.15s; background:var(--surface); }
.pick-card:hover { border-color:var(--primary); }
.pick-card:has(input:checked) { border-color:var(--primary); background:var(--primary-soft); }
.pick-card input { position:absolute; opacity:0; pointer-events:none; }
.pick-box { width:22px; height:22px; border-radius:7px; border:2px solid var(--border);
    display:grid; place-items:center; flex:none; color:#fff; font-size:13px; font-weight:700; }
.pick-card:has(input:checked) .pick-box { background:var(--primary); border-color:var(--primary); }
.pick-card:has(input:checked) .pick-box::after { content:'✓'; }

/* --- Stepper tabs (form sections: A › B › C) ---------------------------- */
.steps { display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-bottom:18px; }
.step-chip { display:inline-flex; align-items:center; gap:8px; padding:7px 13px; border-radius:100px; cursor:pointer;
    font-size:13px; font-weight:500; color:var(--text-soft); background:transparent; border:1px solid var(--border); white-space:nowrap; font-family:inherit; transition:.15s; }
.step-chip:hover { background:var(--surface-2); color:var(--text); }
.step-chip.active { background:var(--primary); color:#fff; border-color:var(--primary); box-shadow:0 1px 3px rgba(16,0,255,.25); }
.step-chip .step-no { width:20px; height:20px; border-radius:50%; display:grid; place-items:center; font-size:11px; font-weight:700;
    background:var(--surface-2); color:var(--text-soft); border:1px solid var(--border); }
.step-chip.active .step-no { background:rgba(255,255,255,.25); color:#fff; border-color:transparent; }
.step-sep { color:var(--text-soft); opacity:.45; font-size:15px; }

/* --- Sticky form action bar --------------------------------------------- */
.form-actions-bar {
    position: sticky; bottom: 12px; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(180%) blur(8px);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 12px 16px; margin-top: 16px;
}

/* --- Data toolbar (above list grids) ------------------------------------ */
.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.toolbar .search { flex:1; min-width:260px; max-width:580px; display:flex; align-items:center; gap:10px;
    background:var(--surface); border:1.5px solid var(--border); border-radius:13px; padding:12px 16px; transition: background .15s, border-color .15s, box-shadow .15s; }
.toolbar .search:focus-within { background:var(--surface); border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.toolbar .search input { border:none; background:transparent; outline:none; color:var(--text); width:100%; font-size:14.5px; }
/* Body/tablo arama kutusundaki ikon biraz daha büyük (SVG). */
.search .muted svg { width:18px; height:18px; color:var(--text-soft); }
.search .muted .fi { font-size:18px; color:var(--text-soft); }
/* Standalone toolbar button — works inside .toolbar AND .card-head etc. */
.tb-btn { display:inline-flex; align-items:center; gap:6px; padding:9px 14px; border:1px solid var(--border);
    background:var(--surface); border-radius:11px; cursor:pointer; font-size:13px; color:var(--text); font-family:inherit; font-weight:600; box-shadow:var(--shadow-sm); }
.tb-btn:hover { background:var(--surface-2); }
.tb-btn svg, .tb-btn .fi { color:var(--text-soft); }

/* --- List grid table polish (Excel-like) -------------------------------- */
.tbl.grid-tbl thead th { background:var(--surface-2); }
.tbl.grid-tbl tbody tr { transition:background .1s; }
.tbl.grid-tbl tbody tr:hover { background:var(--primary-soft); }
.tbl.grid-tbl td, .tbl.grid-tbl th { padding:11px 14px; }
.av-ini { width:30px; height:30px; border-radius:50%; display:inline-grid; place-items:center; color:#fff; font-size:12px; font-weight:600; flex:none; }
/* Pazaryeri avatarı: logo (beyaz zemin) ya da renkli baş harf — her sayfada tutarlı */
.mp-av { display:inline-grid; place-items:center; border-radius:9px; overflow:hidden; flex:none; background:#fff; border:1px solid var(--border); }
.mp-av img { width:74%; height:74%; object-fit:contain; display:block; }
.mp-av-ini { color:#fff; font-weight:700; font-size:13px; border:none; }
.cell-main { display:flex; align-items:center; gap:10px; }

/* --- Segmented control (permission level: none/read/full) ---------------- */
.seg { display:inline-flex; background:var(--surface-2); border:1px solid var(--border); border-radius:9px; padding:2px; gap:2px; }
.seg button { border:none; background:transparent; padding:5px 12px; border-radius:7px; font-size:12.5px; cursor:pointer; color:var(--text-soft); font-family:inherit; line-height:1.4; white-space:nowrap; }
.seg button.on { color:#fff; }
.seg button.on[data-v="none"] { background:var(--text-soft); }
.seg button.on[data-v="read"] { background:var(--primary); }
.seg button.on[data-v="full"] { background:var(--success); }
/* data-v'siz segmentlerde (kullanıcı yetki modalı) seçili olan koyu zemin alır:
   açık temada siyah/beyaz yazı, gece temada açık/koyu — her zaman görünür. */
.seg button.on:not([data-v]) { background:var(--text); color:var(--surface); }
.perm-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.perm-row:last-child { border-bottom:none; }

/* --- Rich-text (HTML) editor -------------------------------------------- */
.rte { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface); }
.rte-toolbar button {
    min-width: 30px; height: 30px; padding: 0 8px; border: none; background: transparent;
    color: var(--text); border-radius: 7px; cursor: pointer; font-size: 14px;
}
.rte-toolbar button:hover { background: var(--surface-2); }
.rte-area { min-height: 150px; padding: 12px 14px; outline: none; color: var(--text); font-size: 14px; line-height: 1.6; }
.rte-area:empty:before { content: attr(data-placeholder); color: var(--text-soft); }
.rte-area:focus { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.rte-area ul, .rte-area ol { padding-left: 22px; }

/* --- Product image gallery (Cropper) ------------------------------------ */
.img-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.img-tile { position: relative; width: 110px; height: 110px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile .img-actions { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.img-tile .img-actions button { border: none; background: rgba(255,255,255,.9); border-radius: 6px; cursor: pointer; font-size: 11px; padding: 2px 6px; }
.img-tile .primary-flag { position: absolute; top: 6px; left: 6px; background: var(--primary); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 100px; }
.img-drop { width: 110px; height: 110px; border: 2px dashed var(--border); border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--text-soft); text-align: center; font-size: 12px; }
.img-drop:hover { border-color: var(--primary); color: var(--primary); }

/* --- Responsive: let content fill the screen, stack on small viewports --- */
@media (min-width: 1700px) {
    /* Geniş ekranda biraz daha dikey nefes payı. Yatay dolgu DEĞİŞMEZ:
       --content-pad kullanılmazsa gövde tam genişliğe kaçar, üst çubuk ise
       seçili genişlikte ortalanmış kalır → hiza bozulur. */
    .content { padding: 32px var(--content-pad); }
}

@media (max-width: 1100px) {
    /* Any two-column grid declared inline collapses to a single column so
       nothing overflows on tablets / small laptops. */
    .content .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* Wide data tables scroll horizontally (tablet & down) instead of squishing. */
@media (max-width: 1024px) {
    .card > table.tbl { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .card > table.tbl::-webkit-scrollbar { height: 8px; }
    .card > table.tbl::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
}

@media (max-width: 760px) {
    .content { padding: 18px var(--content-pad); }
    .page-title { font-size: 20px; }
    .topbar .search { max-width: none; }
    /* Side-by-side fields stack on phones. */
    .row { flex-direction: column; }
    .row > * { width: 100%; }
    /* Modals use the full width. */
    .modal, .modal-lg { max-width: 100%; }
    /* Stat cards one per row for readability. */
    .grid.stats { grid-template-columns: 1fr 1fr; }
}

/* Wizard becomes a single column on small screens. */
@media (max-width: 880px) {
    .wizard-body { flex-direction: column; padding: 18px 14px; }
    .wizard-steps { width: 100%; display: flex; gap: 8px; overflow-x: auto; }
    .wstep { flex: 0 0 auto; }
    .wstep .d { display: none; }
}

/* ==========================================================================
   V3 — Fintech-dashboard komponentleri (örnek e1/e2/e3)
   ========================================================================== */

/* Cards: hafif "kalkma" etkisi (soft hover) */
.card { transition: box-shadow .18s ease, transform .18s ease; }
.card.hoverable:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* --- Sidebar bottom profile card ---------------------------------------- */
.sb-card {
    margin: auto 4px 4px; padding: 12px; border-radius: 14px;   /* margin-top:auto → en alta sabitlenir */
    background: var(--sb-hover); border: 1px solid var(--sb-border);
    display: flex; align-items: center; gap: 10px;
}
.sb-card .av { width: 36px; height: 36px; border-radius: 50%; flex: none; overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sb-card .av img { width: 100%; height: 100%; object-fit: cover; }
.sb-card .who { min-width: 0; flex: 1; }
.sb-card .who .n { color: var(--sb-text-strong); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-card .who .r { color: var(--sb-text); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-card .out { flex: none; width: 30px; height: 30px; border-radius: 9px; border: none; cursor: pointer;
    background: rgba(255,255,255,.08); color: var(--sb-text-strong); display: grid; place-items: center; font-size: 14px; text-decoration: none; }
.sb-card .out:hover { background: var(--danger); color: #fff; }
.shell.mini .sb-card { justify-content: center; padding: 10px 0; }
.shell.mini .sb-card .who, .shell.mini .sb-card .out { display: none; }

/* --- Feature card (koyu hero kart: bakiye/ciro) -------------------------- */
.feature-card {
    /* Sade siyah — gradyan ve köşedeki yeşil parıltı kaldırıldı. */
    background: var(--ink);
    color: var(--ink-text); border-radius: var(--radius);
    padding: 22px; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
/* Gece modunda gövde zaten koyu; kartın kenarı kaybolmasın diye ince çerçeve. */
[data-theme="dark"] .feature-card { border: 1px solid var(--card-border); }
.feature-card .fc-label { color: var(--ink-soft); font-size: 13px; display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.feature-card .fc-value { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 4px; position: relative; z-index: 1; }
.feature-card .fc-trend { font-size: 12.5px; color: rgba(255,255,255,.8); position: relative; z-index: 1; }
.feature-card .fc-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.btn-ink { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px; padding: 10px 16px; font-weight: 700; font-size: 13px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: background .15s; }
.btn-ink:hover { background: rgba(255,255,255,.2); color: #fff; opacity: 1; }
.btn-ink.solid { background: #fff; color: var(--ink); border-color: #fff; }
.btn-ink.solid:hover { background: #f0f0f3; }

/* --- Segmented control (dönem: 12A / 1A / 7G / 24S) ---------------------- */
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--border);
    border-radius: 11px; padding: 3px; gap: 2px; box-shadow: var(--shadow-sm); }
.segmented button, .segmented a { border: none; background: transparent; padding: 7px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-soft); font-family: inherit; text-decoration: none; transition: .15s; }
.segmented button:hover, .segmented a:hover { color: var(--text); }
.segmented .on, .segmented button.on, .segmented a.on { background: var(--primary-soft); color: var(--primary); }

/* --- List rows (avatar + başlık/alt + sağ değer + chevron) --------------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.list-row:last-child { border-bottom: none; }
.list-row:hover { opacity: 1; }
.list-row .lr-av { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
    font-weight: 700; font-size: 14px; color: #fff; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-sub { color: var(--text-soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-val { font-weight: 700; font-size: 13.5px; text-align: right; white-space: nowrap; }
.list-row .lr-chev { color: var(--text-soft); flex: none; opacity: .6; }

/* --- Section title (kart başlıkları için ferah) -------------------------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.sec-head h3 { margin: 0; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }

/* Welcome header (sayfa üstü) */
.welcome { margin-bottom: 20px; }
.welcome h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 3px; }
.welcome p { color: var(--text-soft); margin: 0; }

/* --- Paket karşılaştırma tablosu (modern, ortalı) ----------------------- */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 560px; }
.cmp th, .cmp td { padding: 13px 16px; text-align: center; vertical-align: middle; }
.cmp thead th { position: sticky; top: 0; background: var(--surface); vertical-align: bottom; padding-top: 6px; padding-bottom: 14px; border-bottom: 2px solid var(--border); }
.cmp .cmp-feat { text-align: left; font-weight: 600; color: var(--text); min-width: 220px; }
.cmp .cmp-name { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.cmp .cmp-price { font-size: 12px; color: var(--primary); font-weight: 700; margin-top: 2px; }
.cmp .cmp-price span { color: var(--text-soft); font-weight: 600; }
.cmp tbody td { border-bottom: 1px solid var(--border); }
.cmp tbody tr:last-child td { border-bottom: none; }
.cmp .cmp-group td { text-align: left; background: var(--surface-2); font-weight: 800; font-size: 11px;
    text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); padding: 9px 16px; }
.cmp .cmp-pop { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.cmp thead .cmp-pop { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-radius: 12px 12px 0 0; }
.cmp .ck { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: color-mix(in srgb, var(--success) 16%, transparent); color: #1a7e3a; font-size: 12px; font-weight: 800; }
.cmp .no { color: var(--text-soft); opacity: .35; }
.cmp .lim { font-weight: 800; }

/* ==========================================================================
   Gösterge paneli grafikleri (V4)
   Metrik sekmeleri + tek eksenli alan grafiği + donut & pay listesi.
   Not: Tek grafikte iki y-ekseni (sipariş adedi + ciro ₺) KULLANILMAZ; iki
   ölçeğin hizası keyfi olduğu için veride olmayan bir korelasyon uydurur.
   Bunun yerine iki metrik sekmeye ayrıldı, ikisi de özet + sparkline olarak
   her zaman görünür durumda.
   ========================================================================== */

.chart-card { display: flex; flex-direction: column; }
.chart-card .chart-wrap { flex: 1; }
.chart-wrap.lg { height: 300px; min-height: 260px; }

/* --- Metrik sekmeleri (Ciro / Sipariş) ---------------------------------- */
.metric-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; margin-bottom: 16px; }
.metric-tile {
    position: relative; text-align: left; cursor: pointer; font-family: inherit; color: inherit;
    background: var(--surface-2); border: 1px solid transparent; border-radius: 14px;
    padding: 11px 13px 12px; overflow: hidden; min-height: 74px;
    transition: background .18s ease, border-color .18s ease;
}
.metric-tile:hover { border-color: var(--border); }
.metric-tile.on { background: color-mix(in srgb, var(--chart-accent) 8%, var(--surface)); }
/* Seçili sekme rengin yanında bir de alt çizgi taşır — işaret tek kanala kalmasın. */
.metric-tile.on::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 0;
    height: 2px; border-radius: 2px 2px 0 0; background: var(--chart-accent); }
.metric-tile:focus-visible { outline: 2px solid var(--chart-accent); outline-offset: 2px; }
.metric-tile .mt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.metric-tile .mt-label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.metric-tile .mt-value { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.metric-tile .mt-delta { font-size: 11.5px; font-weight: 700; color: var(--text-soft); white-space: nowrap; }
.metric-tile .mt-delta.up { color: var(--success); }
.metric-tile .mt-delta.down { color: var(--danger); }
.metric-tile .mt-spark { display: block; width: 100%; height: 26px; margin-top: 8px; pointer-events: none; }
.metric-tile .mt-spark path { fill: none; stroke: var(--text-soft); stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round; opacity: .38; transition: stroke .18s ease, opacity .18s ease; }
.metric-tile.on .mt-spark path { stroke: var(--chart-accent); opacity: 1; }

/* --- Grafik ipucu (canvas dışı HTML → tema ile birebir uyumlu) ----------- */
.chart-tt {
    position: absolute; z-index: 5; pointer-events: none; white-space: nowrap;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
    padding: 8px 11px; opacity: 0;
    transform: translate(-50%, -100%) translateY(-4px) scale(.96);
    transition: opacity .14s ease, transform .14s ease, left .09s ease, top .09s ease;
}
.chart-tt.on { opacity: 1; transform: translate(-50%, -100%) translateY(-12px) scale(1); }
.chart-tt .tt-d { font-size: 11.5px; font-weight: 600; color: var(--text-soft); }
.chart-tt .tt-v { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; }
.chart-tt .tt-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* --- Donut merkezi ------------------------------------------------------- */
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center .dc-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.donut-center .dc-l { font-size: 11.5px; font-weight: 600; color: var(--text-soft); margin-top: 2px;
    max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Pay listesi (donut'un okunabilir ikizi: isim + değer + oran) -------- */
.share-list { margin-top: 12px; display: flex; flex-direction: column; }
.share-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px;
    padding: 8px; border-radius: 11px; transition: background .15s ease; }
.share-row:hover, .share-row.hot { background: var(--surface-2); }
.share-row .sr-dot { width: 10px; height: 10px; border-radius: 50%; }
.share-row .sr-mid { min-width: 0; }
.share-row .sr-name { font-size: 13px; font-weight: 700; text-transform: capitalize;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-row .sr-bar { height: 4px; border-radius: 100px; background: var(--border); overflow: hidden; margin-top: 6px; }
.share-row .sr-bar i { display: block; height: 100%; width: 0; border-radius: 100px;
    transition: width .9s cubic-bezier(.22,1,.36,1); }
.share-row.in .sr-bar i { width: var(--w); }
.share-row .sr-val { text-align: right; font-size: 13px; font-weight: 800; white-space: nowrap; }
.share-row .sr-pct { display: block; font-size: 11px; font-weight: 700; color: var(--text-soft);
    font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .chart-tt { transition: opacity .01s; }
    .share-row .sr-bar i { transition: none; }
    .metric-tile, .metric-tile .mt-spark path { transition: none; }
}

/* Tek metrik kalan durum (fiyat yetkisi yok): sekme değil, düz özet kartı. */
.metric-tile.single { cursor: default; }

/* ==========================================================================
   FORM KONTROLLERİ (V4) — tek merkezden modernleştirme
   --------------------------------------------------------------------------
   Sınıf adları korunur (.input / .select / .field / .checkrow), bu yüzden
   projedeki mevcut ~220 alan otomatik olarak yeni görünümü alır. Buraya
   eklenenler, daha önce hiç ele alınmamış durumlar ve kontrol tipleridir:
   pasif/salt-okunur, otomatik doldurma, tarih/saat/sayı/dosya/renk/aralık,
   onay kutusu & radyo, anahtar (switch), ek parçalı alanlar ve ölçüler.
   ========================================================================== */

:root { --ring: 0 0 0 3px var(--primary-soft); --control-h: 46px; }
[data-theme="dark"] { --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 26%, transparent); }

/* --- Ortak taban: tüm kontroller aynı yükseklik ve satır yüksekliğinde ---- */
.input, .select, textarea.input {
    min-height: var(--control-h);
    line-height: 1.45;
}
.input:hover:not(:focus):not(:disabled):not([readonly]),
.select:hover:not(:focus):not(:disabled) { border-color: color-mix(in srgb, var(--text) 14%, var(--border)); }

/* Pasif: dolgu griye döner, imleç engelli. iOS'un kendi soluklaştırmasını ez. */
.input:disabled, .select:disabled, textarea.input:disabled {
    background: var(--surface-2);
    color: var(--text-soft);
    -webkit-text-fill-color: var(--text-soft);
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 1;
}
/* Salt okunur: pasif DEĞİL — metin normal renkte ve seçilebilir; odakta halka yok. */
.input[readonly], textarea.input[readonly] {
    background: var(--surface-2);
    border-color: var(--border);
}
.input[readonly]:focus, textarea.input[readonly]:focus { border-color: var(--border); box-shadow: none; }

/* Tarayıcının otomatik doldurma sarısı — gece modunu bozuyordu. */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
textarea.input:-webkit-autofill,
.select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out;
}

textarea.input { resize: vertical; min-height: 96px; line-height: 1.55; }

/* --- Ölçüler -------------------------------------------------------------- */
.input-sm { min-height: 36px; padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.select.input-sm { padding-right: 30px; background-position: right 10px center; }
.input-lg { min-height: 54px; padding: 15px 18px; font-size: 16px; }
.select.input-lg { padding-right: 40px; }

/* --- Tarih / saat --------------------------------------------------------- */
.input::-webkit-calendar-picker-indicator {
    opacity: .5; cursor: pointer; padding: 3px; border-radius: 6px;
    transition: opacity .15s, background .15s;
}
.input::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--surface-2); }
/* Gece modunda ikon siyah kaldığı için görünmüyordu. */
[data-theme="dark"] .input::-webkit-calendar-picker-indicator { filter: invert(1) brightness(1.7); }

/* --- Sayı: oklar yalnız hover/odakta görünür ------------------------------ */
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button { opacity: 0; transition: opacity .15s; }
.input[type="number"]:hover::-webkit-inner-spin-button,
.input[type="number"]:focus::-webkit-inner-spin-button { opacity: 1; }

/* --- Arama: temizle düğmesi tema rengine boyanır -------------------------- */
.input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none;
    width: 15px; height: 15px; cursor: pointer; opacity: .45; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.input[type="search"]::-webkit-search-cancel-button:hover { opacity: .9; }

/* --- Dosya: işletim sistemi düğmesi yerine tema düğmesi ------------------- */
.input[type="file"] { padding: 7px 8px; cursor: pointer; display: flex; align-items: center; }
.input[type="file"]::file-selector-button {
    margin-right: 12px; padding: 8px 14px; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    font: inherit; font-size: 13px; font-weight: 700;
    transition: background .15s, border-color .15s, color .15s;
}
.input[type="file"]::file-selector-button:hover {
    background: var(--primary-soft); border-color: var(--primary); color: var(--primary);
}
.input[type="file"]:disabled::file-selector-button { cursor: not-allowed; opacity: .6; }

/* --- Renk ---------------------------------------------------------------- */
.input[type="color"] { padding: 5px; cursor: pointer; }
.input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.input[type="color"]::-webkit-color-swatch { border: none; border-radius: 8px; }
.input[type="color"]::-moz-color-swatch { border: none; border-radius: 8px; }

/* --- Aralık (range) ------------------------------------------------------- */
input[type="range"], progress { accent-color: var(--primary); }
.input[type="range"] {
    border: none; background: transparent; box-shadow: none;
    padding: 0; min-height: 0; height: 24px; cursor: pointer;
}
.input[type="range"]:focus { box-shadow: none; }
.input[type="range"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }

/* --- Onay kutusu & radyo — marka renginde, tam kontrollü ------------------ */
input[type="checkbox"], input[type="radio"] {
    appearance: none; -webkit-appearance: none;
    flex: none; margin: 0; width: 18px; height: 18px;
    display: inline-grid; place-content: center; vertical-align: -4px;
    border: 1.5px solid color-mix(in srgb, var(--text) 24%, var(--border));
    border-radius: 6px; background: var(--surface);
    transition: background .15s, border-color .15s, box-shadow .15s;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--primary); }
input[type="checkbox"]::after {
    content: ''; width: 11px; height: 11px; background: #fff;
    transform: scale(0); transition: transform .13s cubic-bezier(.3,1.4,.5,1);
    clip-path: polygon(14% 44%, 0 60%, 39% 100%, 100% 18%, 84% 2%, 39% 68%);
}
input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate {
    background: var(--primary); border-color: var(--primary);
}
input[type="checkbox"]:checked::after { transform: scale(1); }
/* Kısmî seçim (tablo başlığındaki "tümünü seç") — tik yerine çizgi. */
input[type="checkbox"]:indeterminate::after {
    width: 10px; height: 2px; border-radius: 2px; clip-path: none; transform: scale(1);
}
input[type="radio"]::after {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff;
    transform: scale(0); transition: transform .13s cubic-bezier(.3,1.4,.5,1);
}
input[type="radio"]:checked { background: var(--primary); border-color: var(--primary); }
input[type="radio"]:checked::after { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: var(--ring); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { background: var(--surface-2); opacity: .55; }
.checkrow { gap: 9px; color: var(--text); }
.checkrow:has(input:disabled) { color: var(--text-soft); cursor: not-allowed; }

/* --- Anahtar (switch) ----------------------------------------------------- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
    font-size: 13.5px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch .sw-track {
    position: relative; flex: none; width: 44px; height: 25px; border-radius: 100px;
    background: color-mix(in srgb, var(--text) 20%, var(--border));
    transition: background .2s ease;
}
.switch .sw-track::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.32);
    transition: transform .2s cubic-bezier(.3,1.3,.5,1);
}
.switch input:checked + .sw-track { background: var(--primary); }
.switch input:checked + .sw-track::after { transform: translateX(19px); }
.switch input:focus-visible + .sw-track { box-shadow: var(--ring); }
.switch input:disabled + .sw-track { opacity: .5; cursor: not-allowed; }

/* --- Ek parçalı alan: baştaki ikon / sondaki birim ------------------------ */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .input { flex: 1; width: 100%; }
.input-wrap .iw-ic, .input-wrap .iw-affix {
    position: absolute; left: 14px; z-index: 1; display: flex; align-items: center;
    color: var(--text-soft); font-size: 13.5px; font-weight: 700; pointer-events: none;
}
.input-wrap .iw-ic svg, .input-wrap .iw-ic .fi { width: 17px; height: 17px; font-size: 17px; }
.input-wrap .iw-affix.end, .input-wrap .iw-ic.end { left: auto; right: 14px; }
.input-wrap:has(.iw-ic:not(.end)) > .input,
.input-wrap:has(.iw-affix:not(.end)) > .input { padding-left: 40px; }
.input-wrap:has(.iw-ic.end) > .input,
.input-wrap:has(.iw-affix.end) > .input { padding-right: 42px; }
/* Odakta ek parça da canlanır. */
.input-wrap:focus-within .iw-ic, .input-wrap:focus-within .iw-affix { color: var(--text); }

/* --- Alan etiketi / ipucu / hata ------------------------------------------ */
.field label { font-size: 12.5px; font-weight: 600; }
.field.invalid .hint { color: var(--danger); }
.field .hint.ok { color: var(--success); }

/* --- Arama kutusu: araç çubuğu DIŞINDA da kullanılabilsin ----------------- */
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1.5px solid var(--border); border-radius: 13px;
    padding: 12px 16px; min-height: var(--control-h);
    transition: background .15s, border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.search input { border: none; background: transparent; outline: none; color: var(--text);
    width: 100%; font-size: 14.5px; font-family: inherit; }
.search input::placeholder { color: var(--text-soft); opacity: .85; }

@media (prefers-reduced-motion: reduce) {
    .input, .select, textarea.input, .search, .switch .sw-track, .switch .sw-track::after,
    input[type="checkbox"], input[type="radio"],
    input[type="checkbox"]::after, input[type="radio"]::after { transition: none; }
}

/* --- Tarayıcı yerel bileşenleri de temayı bilsin -------------------------- */
/* color-scheme olmadan gece modunda tarih seçici açılır kutusu, otomatik
   doldurma menüsü ve yerel kaydırma çubukları BEYAZ kalıyordu. */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* --- Aralık (range): parçaları elle boyanır --------------------------------
   accent-color tek başına bırakılınca Chrome, açık yeşil accent'e karşılık
   koyu bir ray üretiyordu (gündüz modunda siyah çubuk). */
.input[type="range"] { -webkit-appearance: none; appearance: none; }
.input[type="range"]::-webkit-slider-runnable-track {
    height: 6px; border-radius: 100px;
    background: color-mix(in srgb, var(--text) 13%, var(--border));
}
.input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; margin-top: -6px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--primary); border: 3px solid var(--surface);
    box-shadow: 0 1px 4px rgba(16,24,40,.28); cursor: pointer;
}
.input[type="range"]::-moz-range-track {
    height: 6px; border-radius: 100px;
    background: color-mix(in srgb, var(--text) 13%, var(--border));
}
.input[type="range"]::-moz-range-progress { height: 6px; border-radius: 100px; background: var(--primary); }
.input[type="range"]::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary); border: 3px solid var(--surface); cursor: pointer;
}

/* ==========================================================================
   Yazarken çıkan öneriler (autocomplete)
   Herhangi bir input'a data-ac eklemek yeter; panel gövdeye tutturulur
   (position:fixed) — böylece kart/tablo taşma kırpmalarına takılmaz.
   ========================================================================== */
.ac-panel {
    position: fixed; z-index: 300; min-width: 260px;
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow);
    max-height: min(430px, 62vh); overflow: hidden;
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
}
/* Liste kaydırılır, alt bilgi satırı sabit kalır. */
.ac-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.ac-panel.on { opacity: 1; transform: none; pointer-events: auto; }

.ac-group { padding: 9px 10px 4px; font-size: 10.5px; font-weight: 800;
    letter-spacing: .07em; text-transform: uppercase; color: var(--text-soft); }
.ac-group:first-child { padding-top: 4px; }

.ac-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
    padding: 9px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; color: inherit; }
.ac-item:hover, .ac-item.on { background: var(--surface-2); }
.ac-item .ac-main { min-width: 0; }
.ac-item .ac-t { display: block; font-size: 13.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item .ac-s { display: block; font-size: 12px; color: var(--text-soft);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ac-item .ac-m { font-size: 12.5px; font-weight: 700; color: var(--text-soft); white-space: nowrap; }
/* Eşleşen parça vurgusu — metin rengi değişmez, yalnız arkası boyanır. */
.ac-item mark { background: color-mix(in srgb, var(--primary) 26%, transparent);
    color: inherit; border-radius: 3px; padding: 0 1px; }

.ac-state { padding: 18px 12px; text-align: center; color: var(--text-soft); font-size: 13px; }
.ac-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border-top: 1px solid var(--border); padding: 9px 13px;
    background: var(--surface); font-size: 12px; color: var(--text-soft); }
.ac-foot kbd { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px;
    padding: 1px 6px; font: inherit; font-size: 11px; font-weight: 700; }
.ac-clear { border: none; background: none; color: var(--text-soft); font: inherit; font-size: 12px;
    cursor: pointer; text-decoration: underline; padding: 0; }
.ac-clear:hover { color: var(--text); }

.ac-spin { width: 15px; height: 15px; border-radius: 50%; display: inline-block; vertical-align: -3px;
    border: 2px solid var(--border); border-top-color: var(--primary); animation: ac-spin .7s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .ac-panel { transition: none; }
    .ac-spin { animation-duration: 2.4s; }
}

/* Parola sıfırlama kartındaki logo (eski tek harfli rozetin yerine). */
.auth-card .auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }

/* Zil menüsündeki bildirim satırı — tamamı tıklanabilir. */
.notif-row { display: block; text-decoration: none; color: inherit; cursor: pointer;
    padding: 11px 14px; border-bottom: 1px solid var(--border); transition: background .12s; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--surface-2); opacity: 1; }
/* Okunmamış: vurgulu zemin — hover'da bir tık koyulaşır (inline stil kullanılmıyor
   ki hover kuralı ezilmesin). */
.notif-row.unread { background: var(--primary-soft); }
.notif-row.unread:hover { background: color-mix(in srgb, var(--primary) 20%, var(--surface)); }

/* ==========================================================================
   YÖNETİCİ HESAP GÜVENLİĞİ  (admin/account)
   Parola + Google Authenticator ekranı. İki kart yan yana; kurtarma kodları
   altta tam genişlikte, çünkü yazdırılacak/kopyalanacak bir liste.
   ========================================================================== */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .acc-grid { grid-template-columns: 1fr; } }

/* Alan + buton aynı satırda; dar ekranda alta sarar. */
.acc-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acc-inline .input { flex: 1 1 160px; min-width: 0; }
.acc-inline .btn { flex: 0 0 auto; }

/* 6 haneli kod: rakamlar aralıklı ve tek genişlikte — okunurken yanlış hane girilmesin. */
.code-input {
    flex: 0 0 128px !important; text-align: center; letter-spacing: 6px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; font-size: 16px;
}

/* Nadir kullanılan yıkıcı işlemler katlanmış dursun. */
.acc-fold { border-top: 1px solid var(--border); padding: 12px 0 0; margin-top: 12px; }
.acc-fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; padding: 2px 0 10px; }
.acc-fold > summary::-webkit-details-marker { display: none; }
.acc-fold > summary::before { content: "+"; display: inline-block; width: 14px; color: var(--text-soft); }
.acc-fold[open] > summary::before { content: "−"; }
.acc-fold-danger > summary { color: var(--danger); }

.totp-setup { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.totp-qr {
    background: #fff; padding: 10px; border-radius: 10px;
    border: 1px solid var(--border); line-height: 0; flex: 0 0 auto;
}
/* SVG vektörel: kutu boyutu değişse de modüller keskin kalır. */
.totp-qr svg { display: block; width: 216px; height: 216px; }
.totp-manual { flex: 1 1 220px; min-width: 0; }
/* Anahtar dörtlü gruplar hâlinde: elle girerken yer kaybetmeyi engeller. */
.totp-secret {
    display: block; margin-top: 6px; padding: 10px 12px; border-radius: 8px;
    background: var(--surface-2); border: 1px solid var(--border);
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
    letter-spacing: 1px; user-select: all; overflow-wrap: break-word;
}

.recovery-card { margin-top: 16px; border-color: var(--warning, #ffb020); }
.recovery-list {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin: 0; padding: 0 0 0 22px;
}
@media (max-width: 720px) { .recovery-list { grid-template-columns: repeat(2, 1fr); } }
.recovery-list li {
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px;
    letter-spacing: 1px; padding: 6px 0;
}

/* Metin görünümlü ikincil eylem (form içinde <a> kullanılamadığı yerlerde). */
.btn-link {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--text-soft); font-size: 12.5px; text-decoration: underline;
}
.btn-link:hover { color: var(--text); }

/* Kurtarma kodları yazdırılırken sayfadaki her şey gereksiz. */
@media print {
    .sidebar, .topbar, .subnav, .acc-grid, .page-sub { display: none !important; }
    .recovery-card { border: 1px solid #000; box-shadow: none; }
}

/* ==========================================================================
   PAKETİN AÇTIĞI BÖLÜMLER  (admin > firma detayı)
   Limit sayısal kotayı, özellik bölümün kendisini belirler. Açık/kapalı
   ayrımı renkle değil işaretle veriliyor; liste uzun, renk gürültü olurdu.
   ========================================================================== */
.pkg-feats { margin: 4px 0 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pkg-feats-head { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 10px; }
.pkg-feat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pkg-feat {
    font-size: 12px; padding: 4px 10px; border-radius: 100px;
    border: 1px solid var(--border); background: var(--surface); white-space: nowrap;
}
.pkg-feat.off { color: var(--text-soft); opacity: .6; }
.pkg-feat.on  { font-weight: 600; }

/* ==========================================================================
   PAKET DÜZENLEME  (admin > paketler)
   ========================================================================== */
/* Boş = sınırsız, 0 = yok ayrımı formda tek satırda anlatılıyor; bu kural
   yanlış anlaşılırsa paket yanlış satılır, o yüzden alanların üstünde. */
.limit-note {
    display: flex; align-items: flex-start; gap: 8px;
    margin: 4px 0 12px; padding: 10px 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; font-size: 12.5px; color: var(--text-soft);
}
.limit-note i, .limit-note svg { flex: 0 0 auto; margin-top: 2px; }

/* Paket kartındaki limit satırları: ikon ve metin aynı taban çizgisinde. */
.pkg-lines { font-size: 13px; display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.pkg-lines > div { display: flex; align-items: center; gap: 8px; }
.pkg-lines i, .pkg-lines svg { flex: 0 0 auto; opacity: .75; }
