/* ==========================================================================
   PazarTek — Panel tasarım sistemi  v2
   Bağımlılık yok. Açık/koyu tema, erişilebilir odak, yoğun veri ekranları.
   ========================================================================== */

/* ─── Tokenlar ─────────────────────────────────────────────────────────── */
:root {
    /* Yüzeyler — hafif sıcak nötr, düz gri yerine */
    --bg:            #f7f8fa;
    --surface:       #ffffff;
    --surface-2:     #fbfcfd;
    --surface-3:     #f2f4f7;
    --surface-4:     #e9edf2;
    --border:        #e5e8ed;
    --border-2:      #d5dae2;
    --border-strong: #c2c9d4;

    --text:          #101623;
    --text-2:        #4d5766;
    --text-3:        #8a94a4;

    --brand:         #2f5cf6;
    --brand-2:       #2449d8;
    --brand-ink:     #1c3bb0;
    --brand-soft:    #eaf0ff;
    --brand-soft-2:  #d8e3ff;
    --brand-border:  #b6caff;

    --success:       #0f9d63;
    --success-soft:  #e4f8ef;
    --warning:       #d97706;
    --warning-soft:  #fef3e2;
    --danger:        #e11d48;
    --danger-soft:   #ffe9ee;
    --info:          #0ea5e9;
    --info-soft:     #e5f6fe;

    /* Vurgu paleti — kartlar ve rozetler icin */
    --violet:        #7c3aed;  --violet-soft:  #f1e9fe;
    --amber:         #f59e0b;  --amber-soft:   #fef5e0;
    --teal:          #0d9488;  --teal-soft:    #e2f7f4;
    --rose:          #e11d48;  --rose-soft:    #ffe9ee;
    --sky:           #0284c7;  --sky-soft:     #e3f3fd;

    --radius-xs:     5px;
    --radius-sm:     7px;
    --radius:        10px;
    --radius-lg:     14px;
    --radius-full:   999px;

    /* Çok hafif yükselti — abartılı gölge yok */
    --lift-1: 0 1px 2px rgba(16, 22, 35, .04);
    --lift-2: 0 2px 8px rgba(16, 22, 35, .06), 0 1px 2px rgba(16, 22, 35, .04);
    --lift-3: 0 8px 28px rgba(16, 22, 35, .10), 0 2px 6px rgba(16, 22, 35, .05);
    --ring:   0 0 0 3px var(--brand-soft-2);

    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-7: 28px; --s-8: 32px;
    --s-10: 40px; --s-12: 48px; --s-16: 64px;

    --sidebar-w: 236px;
    --header-h:  58px;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur:  .13s;
}

[data-theme="dark"] {
    --bg:            #0b0e14;
    --surface:       #131822;
    --surface-2:     #171d29;
    --surface-3:     #1d2431;
    --surface-4:     #252d3d;
    --border:        #242c3a;
    --border-2:      #313a4c;
    --border-strong: #3f4a5e;

    --text:          #e9ecf2;
    --text-2:        #9aa4b6;
    --text-3:        #6b7488;

    --brand:         #6d8dff;
    --brand-2:       #829dff;
    --brand-ink:     #9db4ff;
    --brand-soft:    #16203f;
    --brand-soft-2:  #1e2c58;
    --brand-border:  #2f4488;

    --success:       #34d399;
    --success-soft:  #0d2a20;
    --warning:       #fbbf24;
    --warning-soft:  #2c2210;
    --danger:        #fb7185;
    --danger-soft:   #2e1319;
    --info:          #38bdf8;
    --info-soft:     #0c2331;

    --violet:        #a78bfa;  --violet-soft:  #201a3a;
    --amber:         #fbbf24;  --amber-soft:   #2c2210;
    --teal:          #2dd4bf;  --teal-soft:    #0c2a28;
    --rose:          #fb7185;  --rose-soft:    #2e1319;
    --sky:           #38bdf8;  --sky-soft:     #0c2331;

    --lift-1: 0 1px 2px rgba(0, 0, 0, .3);
    --lift-2: 0 2px 8px rgba(0, 0, 0, .35);
    --lift-3: 0 8px 28px rgba(0, 0, 0, .5);
    --ring:   0 0 0 3px rgba(125, 120, 245, .25);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.5;
    font-feature-settings: "cv02", "cv03", "cv04", "tnum" 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand-ink); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: 24px; letter-spacing: -.03em; }
h2 { font-size: 16.5px; }
h3 { font-size: 14px; }

p { margin: 0 0 var(--s-3); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-xs); }
::selection { background: var(--brand-soft-2); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--radius-full); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ─── Yerleşim ─────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 30;
}

.sidebar__brand {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 0 var(--s-4);
    border-bottom: 1px solid var(--border);
    font-weight: 660;
    font-size: 14.5px;
    letter-spacing: -.02em;
    flex: 0 0 auto;
}

.sidebar__logo {
    width: 27px; height: 27px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700;
    flex: 0 0 auto;
    box-shadow: var(--lift-1);
    overflow: hidden;
}

/* ─── Marka işareti ────────────────────────────────────────────────────────
   Ürünle gelen geçici işaret renkli kutunun içinde beyaz çizilir; müşteri
   kendi logosunu yükleyince kutu şeffaflaşır ve logo olduğu gibi görünür.
   ------------------------------------------------------------------------ */
.brand-mark { display: grid; place-items: center; }
.brand-mark svg { width: 78%; height: 78%; display: block; }

.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Yüklenmiş logo varsa kutunun kendi zemini ve gölgesi kalkar */
.sidebar__logo:has(.brand-logo),
.auth__logo:has(.brand-logo) {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* Ayarlardaki önizleme */
.brand-preview {
    display: inline-grid; place-items: center;
    width: 56px; height: 56px; flex: 0 0 56px;
    border-radius: 13px;
    background: var(--brand);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--lift-1);
}
.brand-preview:has(.brand-logo) { background: var(--surface-3); color: inherit; box-shadow: none; }
.brand-preview .brand-mark { width: 56px; height: 56px; }

.sidebar__nav { padding: var(--s-3) 10px; flex: 1 1 auto; }
.nav-group { margin-bottom: var(--s-5); }

.nav-group__title {
    font-size: 10.5px;
    font-weight: 640;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3);
    padding: 0 10px;
    margin-bottom: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 1px;
    position: relative;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-item:hover { background: var(--surface-3); color: var(--text); }

.nav-item.is-active {
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-weight: 600;
}

.nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -10px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
}

.nav-item__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; flex: 0 0 18px;
    color: var(--text-3);
    transition: color var(--dur) var(--ease);
}
.nav-item:hover  .nav-item__icon { color: var(--text-2); }
.nav-item.is-active .nav-item__icon { color: var(--brand); }

/* Satır içi SVG ikonlar — metinle aynı optik hizada dursun */
.icon { display: block; flex: 0 0 auto; }

/* Tema düğmesi: iki ikon da işaretlemede durur, görüneni tema seçer */
.theme-toggle__dark  { display: none; }
[data-theme="dark"] .theme-toggle__light { display: none; }
[data-theme="dark"] .theme-toggle__dark  { display: block; }

/* Okunmamış bildirim noktası */
.btn--icon { position: relative; }
.btn__dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--surface);
}

.nav-item__badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    letter-spacing: -.01em;
}

.sidebar__foot {
    padding: var(--s-3) var(--s-4);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.5;
}

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: var(--header-h);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: 0 var(--s-5);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar__title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.topbar__spacer { flex: 1 1 auto; }

.content { padding: var(--s-5) var(--s-6) var(--s-12); flex: 1 1 auto; }
.content--narrow { max-width: 920px; }

.page-head {
    display: flex;
    align-items: flex-start;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
    flex-wrap: wrap;
}

.page-head__text { flex: 1 1 340px; min-width: 0; }
.page-head__sub { color: var(--text-2); font-size: 12.5px; margin-top: 3px; }
.page-head__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* ─── Kart ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--s-4);
    box-shadow: var(--lift-1);
}

.card__head {
    padding: 13px var(--s-5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
}

.card__title { font-size: 13.5px; font-weight: 620; letter-spacing: -.01em; }
.card__sub { font-size: 12px; color: var(--text-2); }
.card__body { padding: var(--s-5); }
.card__body--flush { padding: 0; }
.card__body--tight { padding: var(--s-4); }

.card__foot {
    padding: 11px var(--s-5);
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 0 0 var(--radius) var(--radius);
    display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
}

/* ─── Izgara ───────────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 340px; }

/* ─── KPI ──────────────────────────────────────────────────────────────── */
/* ─── İstatistik kartı ─────────────────────────────────────────────────────
   Üstte renkli şerit, sağda yumuşak renkli ikon karesi, büyük kalın sayı.
   ------------------------------------------------------------------------ */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 17px var(--s-5) 16px;
    box-shadow: var(--lift-1);
    position: relative;
    overflow: hidden;
    display: flex; align-items: flex-start; gap: var(--s-3);
    transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* Üst renk şeridi — kartın kimliği */
.stat::before {
    content: "";
    position: absolute; inset: 0 0 auto 0;
    height: 3px;
    background: var(--stat-color, var(--brand));
}

a.stat:hover { box-shadow: var(--lift-2); transform: translateY(-1px); color: inherit; }

.stat__body { flex: 1 1 auto; min-width: 0; }

.stat__label {
    font-size: 10.5px;
    color: var(--text-2);
    font-weight: 680;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex; align-items: center; gap: 6px;
}

.stat__value {
    font-size: 27px;
    font-weight: 720;
    letter-spacing: -.03em;
    margin-top: 7px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: var(--text);
}

.stat__meta { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.stat__meta b { color: var(--text-2); font-weight: 620; }

/* Sağdaki ikon karesi */
.stat__icon {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--stat-soft, var(--brand-soft));
    color: var(--stat-color, var(--brand));
    order: 2;
}

.stat--ok      { --stat-color: var(--success); --stat-soft: var(--success-soft); }
.stat--warn    { --stat-color: var(--amber);   --stat-soft: var(--amber-soft); }
.stat--danger  { --stat-color: var(--danger);  --stat-soft: var(--danger-soft); }
.stat--brand   { --stat-color: var(--brand);   --stat-soft: var(--brand-soft); }
.stat--violet  { --stat-color: var(--violet);  --stat-soft: var(--violet-soft); }
.stat--teal    { --stat-color: var(--teal);    --stat-soft: var(--teal-soft); }
.stat--sky     { --stat-color: var(--sky);     --stat-soft: var(--sky-soft); }

/* Sayı rengi yalnız "durum bildiren" kartlarda değişir; violet/teal/sky
   yalnızca ayırt edici vurgu renkleridir, sayıyı boyamazlar. */
.stat--brand .stat__value  { color: var(--brand); }
.stat--ok .stat__value     { color: var(--success); }
.stat--warn .stat__value   { color: var(--amber); }
.stat--danger .stat__value { color: var(--danger); }

/* Tıklanabilir kart: bağlantı rengi metne sızmasın */
a.stat {
    color: inherit;
    text-decoration: none;
}
a.stat:hover { border-color: var(--brand-border); }

/* ─── Karşılama afişi ──────────────────────────────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: var(--s-6) var(--s-7);
    margin-bottom: var(--s-5);
    background: linear-gradient(105deg, #2f5cf6 0%, #4f46e5 48%, #7c3aed 100%);
    color: #fff;
    display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap;
}

/* Sağ üstteki yumuşak halkalar */
.hero::after {
    content: "";
    position: absolute; right: -80px; top: -140px;
    width: 340px; height: 340px; border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    pointer-events: none;
}

.hero__text { flex: 1 1 320px; min-width: 0; position: relative; z-index: 1; }
.hero__title {
    font-size: 22px; font-weight: 720; letter-spacing: -.025em;
    color: #fff; margin: 0 0 5px;
}
.hero__sub { font-size: 13px; color: rgba(255, 255, 255, .82); margin: 0; }
.hero__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; position: relative; z-index: 1; }

.hero .btn {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
    box-shadow: none;
    backdrop-filter: blur(2px);
}
.hero .btn:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero .btn--primary { background: #fff; border-color: #fff; color: var(--brand-ink); }
.hero .btn--primary:hover { background: rgba(255, 255, 255, .9); color: var(--brand-ink); }

/* ─── Pazaryeri sekme şeridi (logolu) ──────────────────────────────────── */
.mp-tabs {
    display: flex; gap: 6px;
    overflow-x: auto; padding-bottom: 4px;
    margin-bottom: var(--s-4);
    scrollbar-width: thin;
}

.mp-tab {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px; font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}
.mp-tab:hover { border-color: var(--border-strong); color: var(--text); }
.mp-tab.is-active {
    background: var(--brand-soft);
    border-color: var(--brand-border);
    color: var(--brand-ink);
    box-shadow: var(--lift-1);
}

.mp-tab__count {
    font-size: 11px; font-weight: 700;
    padding: 1px 7px; border-radius: var(--radius-full);
    background: var(--surface-3); color: var(--text-2);
    font-variant-numeric: tabular-nums;
}
.mp-tab.is-active .mp-tab__count { background: var(--brand); color: #fff; }

/* ─── Müşteri baş harfi rozeti ─────────────────────────────────────────── */
.avatar {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; flex: 0 0 28px;
    border-radius: 50%;
    font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
    color: #fff;
    background: var(--brand);
}
.avatar--sm { width: 22px; height: 22px; flex: 0 0 22px; font-size: 9px; }
.avatar--lg { width: 38px; height: 38px; flex: 0 0 38px; font-size: 13px; }

/* ─── Buton ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 12.5px;
    font-weight: 640;
    letter-spacing: -.005em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--lift-1);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.btn:active { background: var(--surface-4); box-shadow: none; }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn--primary:active { background: var(--brand-ink); }

.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(.94); color: #fff; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }

.btn--soft { background: var(--brand-soft); border-color: var(--brand-border); color: var(--brand-ink); }
.btn--soft:hover { background: var(--brand-soft-2); color: var(--brand-ink); }

.btn--sm { height: 27px; font-size: 12px; padding: 0 9px; }
.btn--lg { height: 39px; font-size: 13.5px; padding: 0 var(--s-5); }
.btn--block { width: 100%; }
.btn--icon { width: 33px; padding: 0; }
.btn--icon.btn--sm { width: 27px; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; box-shadow: none; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ─── Form ─────────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--s-4); }

.label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
    letter-spacing: -.005em;
}

.label__hint { font-weight: 400; color: var(--text-3); margin-left: 4px; }

.input, .select, .textarea {
    width: 100%;
    min-height: 33px;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }

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

.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:disabled, .select:disabled { background: var(--surface-3); color: var(--text-2); cursor: not-allowed; }

.textarea { min-height: 92px; resize: vertical; font-family: inherit; line-height: 1.55; }
.textarea--code { font-family: var(--mono); font-size: 12px; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%238a94a4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3 4.75 6 7.75 9 4.75'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    padding-right: 28px;
}

.select[multiple] { background-image: none; padding-right: 10px; }

.help { font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.error-text { font-size: 11.5px; color: var(--danger); margin-top: 5px; }

.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 auto; }
.check__text { font-size: 12.5px; font-weight: 500; }
.check__desc { font-size: 11.5px; color: var(--text-3); display: block; margin-top: 1px; }

.switch-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s-4); padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row input { width: 16px; height: 16px; accent-color: var(--brand); }

.form-row { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group__addon {
    display: inline-flex; align-items: center; padding: 0 11px;
    background: var(--surface-3); border: 1px solid var(--border-2); border-left: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12.5px; color: var(--text-2); font-weight: 550;
    transition: background var(--dur) var(--ease);
}
.input-group__addon:hover { background: var(--surface-4); }

/* Seçilebilir kutu (pazaryeri seçimi) */
.pick {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pick:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pick input { margin: 1px 0 0; width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.pick:has(input:checked) { border-color: var(--brand-border); background: var(--brand-soft); }
/* ─── Arama açılır listesi (müşteri / ürün seçici) ─────────────────────── */
.field { position: relative; }

.lookup {
    position: absolute; left: 0; right: 0; top: 100%;
    margin-top: 5px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    box-shadow: var(--lift-3);
    max-height: 320px; overflow-y: auto;
    z-index: 40;
    padding: 5px;
}

.lookup__item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 8px 10px;
    border: 0; background: none; font: inherit; color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.lookup__item:hover { background: var(--brand-soft); }
.lookup__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.lookup__text strong {
    font-size: 12.5px; font-weight: 620;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lookup__empty { padding: 14px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* Seçilmiş müşteri kartı */
.picked {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    border: 1px solid var(--brand-border);
    background: var(--brand-soft);
    border-radius: var(--radius);
    margin-top: var(--s-3);
}
.picked__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.35; }

/* ─── Ödeme yöntemi seçimi ─────────────────────────────────────────────── */
.pay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 7px;
}

.pay {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 11px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px; font-weight: 600;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pay:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pay input { position: absolute; opacity: 0; pointer-events: none; }
.pay:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-ink);
    box-shadow: 0 0 0 1px var(--brand);
}
.pay__icon { color: var(--text-3); display: flex; }
.pay:has(input:checked) .pay__icon { color: var(--brand); }
.pay__text { min-width: 0; }

/* Küçük varyantlar */
.segments--sm .segment { padding: 4px 11px; font-size: 11.5px; }
.input--sm { height: 30px; padding: 0 8px; font-size: 12px; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-lg { font-size: 17px; letter-spacing: -.02em; }

/* ─── Kuyruk ilerleme paneli ───────────────────────────────────────────────
   Kuyruk boşaltılırken sağ altta durur: dolan çubuk + "3 / 7" + o an biten
   işin adı. Tek başına düşen bir sayı ("4 iş kaldı") toplamı bilinmeden
   anlamsız görünüyordu.
   ------------------------------------------------------------------------ */
.progress-panel {
    position: fixed;
    right: var(--s-5); bottom: var(--s-5);
    z-index: 60;
    width: 340px; max-width: calc(100vw - 2 * var(--s-4));
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--lift-3);
    padding: 15px 17px 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.progress-panel.is-open { opacity: 1; transform: translateY(0); }

.progress-panel__head {
    display: flex; align-items: baseline; gap: var(--s-3);
    margin-bottom: 10px;
}
.progress-panel__head strong { font-size: 13.5px; font-weight: 650; flex: 1 1 auto; }

.progress-panel__count {
    font-size: 12.5px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--brand);
}

.progress-panel__row {
    margin-top: 9px;
    font-size: 11.5px; color: var(--text-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.progress-panel__row.is-error { color: var(--danger); }

.progress-panel.is-error .progress-panel__count { color: var(--danger); }
.progress-panel.is-error .progress-bar > span { background: var(--danger); }

.progress-bar {
    height: 7px;
    border-radius: var(--radius-full);
    background: var(--surface-4);
    overflow: hidden;
}
.progress-bar > span {
    display: block; height: 100%; width: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--brand), var(--violet));
    transition: width .35s var(--ease);
}

@media (max-width: 560px) {
    .progress-panel { right: var(--s-3); left: var(--s-3); bottom: var(--s-3); width: auto; }
}

/* ─── Etiket / değer listesi (detay kenar sütunu) ──────────────────────── */
.kv { margin: 0; display: grid; gap: 0; }
.kv dt {
    font-size: 11px; font-weight: 620; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-3);
    margin-top: var(--s-4);
}
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 3px 0 0; font-size: 13px; color: var(--text); }
.kv dd .cell-sub { margin-top: 1px; }

/* ─── Hedef mağaza seçimi (ürün → bayi aktarımı) ───────────────────────── */
.target-list {
    max-height: 320px; overflow-y: auto;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.target-group + .target-group { border-top: 1px solid var(--border); }

.target-group__head {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 12px;
    font-size: 12.5px; font-weight: 620;
    background: var(--surface-3);
    cursor: pointer;
    position: sticky; top: 0; z-index: 1;
}
.target-group__head > span:first-of-type { flex: 1 1 auto; min-width: 0; }

.target-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 12px 7px 26px;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}
.target-item:hover { background: var(--surface-3); }
.target-item__text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.target-item__text > span:first-child { font-size: 12.5px; font-weight: 550; }

.target-list input[type="checkbox"] {
    width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 auto; margin: 0;
}

.pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: var(--s-2);
}
@media (max-width: 560px) { .pick-grid { grid-template-columns: 1fr; } }

.pick__text  { flex: 1 1 auto; min-width: 0; }
.pick__title { font-size: 13px; font-weight: 580; display: flex; align-items: center; gap: 7px; }
.pick__desc  { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.pick .mp-plate { align-self: center; }

/* ─── Tablo ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.table th {
    text-align: left;
    font-size: 11px;
    font-weight: 620;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-3);
    padding: 9px var(--s-4);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky; top: 0; z-index: 1;
}

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

.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }

.table--compact td, .table--compact th { padding: 7px var(--s-3); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .mono { font-family: var(--mono); font-size: 11.5px; }
.table .shrink { width: 1%; white-space: nowrap; }

.cell-main { font-weight: 560; color: var(--text); }
a.cell-main:hover { color: var(--brand); }
.cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

/* ─── Rozet ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 11px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
    letter-spacing: -.005em;
}

.badge--neutral { background: var(--surface-3); color: var(--text-2); }
.badge--brand   { background: var(--brand-soft); color: var(--brand-ink); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger  { background: var(--danger-soft); color: var(--danger); }
.badge--info    { background: var(--info-soft); color: var(--info); }
.badge--violet  { background: var(--violet-soft); color: var(--violet); }
.badge--teal    { background: var(--teal-soft); color: var(--teal); }

/* Sayfa başlığının üstündeki küçük büyük-harf etiket */
.eyebrow {
    display: block;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em;
    color: var(--text-2);
    margin-bottom: 4px;
}
.eyebrow--brand { color: var(--brand); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 7px; }
.dot--ok { background: var(--success); }
.dot--warn { background: var(--warning); }
.dot--danger { background: var(--danger); }
.dot--idle { background: var(--text-3); }

/* ─── Pazaryeri logosu ─────────────────────────────────────────────────────
   Logolar yatay kelime-logo (wordmark) olduğu için yüksekliğe göre
   ölçeklenir; kare kutuya sıkıştırmak okunmaz hâle getirir.
   ------------------------------------------------------------------------ */
/* Her logo AYNI kutuya sığdırılır. Yalnız yükseklik sabitlenirse
   ÇiçekSepeti/Pazarama gibi kareye yakın logolar minicik kalıyordu;
   kutuya sığdırınca hepsi eldeki alanı sonuna kadar kullanır. */
.mp-logo {
    display: block;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
}

.mp-logo--xs { width: 46px;  height: 15px; }
.mp-logo--sm { width: 62px;  height: 19px; }
.mp-logo--md { width: 88px;  height: 28px; }
.mp-logo--lg { width: 112px; height: 34px; }
.mp-logo--xl { width: 148px; height: 44px; }

/* Optik düzeltme: ÇiçekSepeti ve Pazarama kareye yakın olduğu için aynı
   kutuda geniş kelime-logolardan gözle görülür biçimde küçük kalıyor.
   Diğerleriyle aynı ağırlıkta görünsünler diye biraz büyütülürler. */
.mp-logo[data-mp="ciceksepeti"],
.mp-logo[data-mp="pazarama"] { transform: scale(1.3); }

/* Koyu temada beyaz zeminli logolar kaybolmasın */
[data-theme="dark"] .mp-logo {
    background: #fff;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Logo levhası — sabit genişlik, böylece yan yana dizilince hizalı durur */
.mp-plate {
    display: inline-flex; align-items: center; justify-content: center;
    width: 72px; height: 30px; flex: 0 0 72px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    border: 1px solid var(--border);
    overflow: hidden;
}
.mp-plate { padding: 4px 8px; }

.mp-plate--lg { width: 116px; height: 44px; flex: 0 0 116px; padding: 6px 8px; }

/* Logolu çip: kelime-logo zaten adı taşır, metni tekrarlama */
.mp-chip--logo { padding: 3px 8px; background: var(--surface-3); }

/* Pazaryeri çipi — logo veya renkli nokta */
.mp-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600;
    padding: 3px 9px 3px 6px;
    border-radius: var(--radius-full);
    background: var(--surface-3);
    color: var(--text-2);
    border: 1px solid transparent;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
a.mp-chip:hover { background: var(--surface-4); border-color: var(--border-2); color: var(--text); }
.mp-chip__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.mp-chip__count {
    font-size: 11px; font-variant-numeric: tabular-nums;
    padding-left: 7px; margin-left: 1px;
    border-left: 1px solid var(--border-2);
    color: var(--text-2);
}
.mp-chip--off { opacity: .5; }
.mp-chip--ok { background: var(--success-soft); color: var(--success); }
.mp-chip--err { background: var(--danger-soft); color: var(--danger); }

/* Logo çipinde durum, zemini boyamak yerine ince bir çerçeveyle belirtilir —
   marka renkleri yeşile/kırmızıya boğulmasın. */
.mp-chip--logo.mp-chip--ok  { background: var(--surface-3); border-color: var(--success); }
.mp-chip--logo.mp-chip--err { background: var(--surface-3); border-color: var(--danger); }

.mp-tag { /* geriye dönük uyum */
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full);
    background: var(--surface-3); color: var(--text-2);
}
.mp-tag__dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }

/* ─── Bayi kartı ───────────────────────────────────────────────────────── */
.dealer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--lift-1);
    display: flex; flex-direction: column;
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.dealer:hover { border-color: var(--border-2); box-shadow: var(--lift-2); }

.dealer__head {
    display: flex; align-items: center; gap: 11px;
    padding: 14px var(--s-4) 12px;
}

.dealer__avatar {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 9px;
    display: grid; place-items: center;
    color: #fff; font-weight: 680; font-size: 14px;
    letter-spacing: -.02em;
}

.dealer__name { font-size: 14px; font-weight: 620; letter-spacing: -.012em; }
.dealer__meta { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.dealer__chips {
    display: flex; flex-wrap: wrap; gap: 5px;
    padding: 0 var(--s-4) 13px;
}

.dealer__stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    margin-top: auto;
}
.dealer__stat { padding: 10px var(--s-3); text-align: center; border-right: 1px solid var(--border); }
.dealer__stat:last-child { border-right: 0; }
.dealer__stat b { display: block; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dealer__stat span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }

/* ─── Sekmeler ─────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: var(--s-4); }

.tab {
    padding: 8px 13px;
    font-size: 12.5px; font-weight: 560;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    display: inline-flex; align-items: center; gap: 6px;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 620; }

.tab__count {
    background: var(--surface-3); color: var(--text-2);
    font-size: 10.5px; font-weight: 620;
    padding: 0 6px; border-radius: var(--radius-full); min-width: 18px; text-align: center;
}
.tab.is-active .tab__count { background: var(--brand-soft); color: var(--brand-ink); }

/* Segment (durum filtresi) */
.segments { display: flex; flex-wrap: wrap; gap: 6px; }

.segment {
    padding: 5px 11px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-full);
    font-size: 12px; font-weight: 560;
    color: var(--text-2);
    background: var(--surface);
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: var(--lift-1);
    transition: all var(--dur) var(--ease);
}
.segment:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.segment.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.segment.is-active:hover { background: var(--brand-2); color: #fff; }
.segment.is-active .segment__count { background: rgba(255,255,255,.25); color: #fff; }
.segment__count {
    background: var(--surface-3); color: var(--text-2);
    font-size: 10.5px; font-weight: 620; padding: 0 6px; border-radius: var(--radius-full);
}

/* ─── Uyarı kutusu ─────────────────────────────────────────────────────── */
.alert {
    display: flex; gap: 11px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 12.5px;
    margin-bottom: var(--s-4);
    line-height: 1.55;
}

.alert__icon { flex: 0 0 auto; font-size: 13px; line-height: 20px; font-weight: 700; }
.alert__title { font-weight: 620; margin-bottom: 2px; }
.alert__body { flex: 1 1 auto; min-width: 0; }

.alert--success { border-left-color: var(--success); background: var(--success-soft); border-color: transparent; border-left-color: var(--success); color: var(--success); }
.alert--success .alert__body { color: var(--text); }
.alert--warning { border-color: transparent; border-left-color: var(--warning); background: var(--warning-soft); color: var(--warning); }
.alert--warning .alert__body { color: var(--text); }
.alert--error   { border-color: transparent; border-left-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.alert--error .alert__body { color: var(--text); }
.alert--info    { border-color: transparent; border-left-color: var(--info); background: var(--info-soft); color: var(--info); }
.alert--info .alert__body { color: var(--text); }

/* ─── Boş durum ────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: var(--s-12) var(--s-5); color: var(--text-2); }

.empty__icon {
    width: 46px; height: 46px;
    margin: 0 auto var(--s-4);
    border-radius: var(--radius);
    background: var(--surface-3);
    display: grid; place-items: center;
    font-size: 20px;
    color: var(--text-3);
}

.empty__title { font-size: 14.5px; font-weight: 620; color: var(--text); margin-bottom: 5px; }
.empty__text { font-size: 12.5px; max-width: 440px; margin: 0 auto var(--s-4); line-height: 1.6; }

/* ─── Yükleniyor ───────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
    background-size: 400% 100%;
    animation: sk 1.4s ease infinite;
    border-radius: var(--radius-xs);
    height: 14px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.spinner {
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .65s linear infinite;
    display: inline-block;
    opacity: .7;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .skeleton, .spinner { animation: none; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ─── İlerleme ─────────────────────────────────────────────────────────── */
.progress { height: 5px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--brand); border-radius: var(--radius-full); transition: width .3s var(--ease); }
.progress__bar--ok { background: var(--success); }
.progress__bar--warn { background: var(--warning); }

/* ─── Sipariş kartı ────────────────────────────────────────────────────── */
.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--lift-1);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.order-card:hover { border-color: var(--border-2); box-shadow: var(--lift-2); }

.order-card__head {
    display: flex; align-items: center; gap: 7px;
    padding: 10px var(--s-4);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    flex-wrap: wrap;
}

.order-card__no { font-weight: 650; font-size: 13px; font-family: var(--mono); letter-spacing: -.02em; }
.order-card__body { padding: var(--s-4); flex: 1 1 auto; }
.order-card__row { display: flex; gap: 8px; font-size: 12px; margin-bottom: 5px; }
.order-card__row dt { color: var(--text-3); flex: 0 0 62px; }
.order-card__row dd { margin: 0; flex: 1 1 auto; min-width: 0; }

.order-item { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid var(--border); }

.order-item__img {
    width: 42px; height: 42px; flex: 0 0 42px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    object-fit: cover;
    display: grid; place-items: center;
    color: var(--text-3); font-size: 15px;
    overflow: hidden;
}

.order-item__name { font-size: 12px; font-weight: 550; line-height: 1.4; }
.order-item__meta { font-size: 11px; color: var(--text-3); margin-top: 2px; font-family: var(--mono); }

.order-card__total { font-size: 17px; font-weight: 660; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.order-card__foot {
    padding: 11px var(--s-4);
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex; flex-direction: column; gap: 9px;
}

/* ─── Küçük görsel ─────────────────────────────────────────────────────── */
.thumb {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    object-fit: cover;
    background: var(--surface-3);
    flex: 0 0 36px;
}
.thumb--empty { display: grid; place-items: center; color: var(--text-3); }
.alert__icon .icon, .empty__icon .icon, .thumb--empty .icon { display: block; }

/* ─── Fiyat zinciri ────────────────────────────────────────────────────── */
.chain { display: flex; flex-direction: column; gap: 1px; }

.chain__row {
    display: flex; align-items: baseline; gap: var(--s-3);
    padding: 8px 12px;
    background: var(--surface-2);
    font-size: 12.5px;
}
.chain__row:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.chain__row:last-child  { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.chain__row--total  { background: var(--brand-soft); font-weight: 640; color: var(--brand-ink); }
.chain__row--profit { background: var(--success-soft); font-weight: 640; color: var(--success); }
.chain__row--loss   { background: var(--danger-soft); font-weight: 640; color: var(--danger); }

.chain__label { flex: 1 1 auto; }
.chain__note { color: var(--text-3); font-size: 11.5px; }
.chain__value { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ─── Sayfalama ────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pagination__info { font-size: 12px; color: var(--text-2); margin-right: auto; }

.page-link {
    min-width: 29px; height: 29px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 560;
    color: var(--text-2);
    background: var(--surface);
    transition: all var(--dur) var(--ease);
}
.page-link:hover { background: var(--surface-3); color: var(--text); }
.page-link.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ─── Filtre çubuğu ────────────────────────────────────────────────────── */
.filters {
    display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: flex-end;
    padding: 14px var(--s-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--s-4);
    box-shadow: var(--lift-1);
}

.filters__item { flex: 1 1 170px; min-width: 0; }
.filters__item--wide { flex: 2 1 260px; }
.filters__item--auto { flex: 0 0 auto; display: flex; gap: 6px; }
.filters .label { margin-bottom: 4px; }

/* ─── Giriş ekranı ─────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s-5); background: var(--bg); }

.auth__card {
    width: 100%; max-width: 386px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--s-8);
    box-shadow: var(--lift-3);
}

.auth__logo {
    width: 44px; height: 44px;
    border-radius: 11px;
    background: var(--brand);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 19px;
    margin-bottom: var(--s-5);
    box-shadow: var(--lift-2);
    overflow: hidden;
}

/* ─── Açılır menü ──────────────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }

.dropdown__menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    min-width: 210px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px;
    z-index: 40;
    display: none;
    max-height: 380px; overflow-y: auto;
    box-shadow: var(--lift-3);
}
.dropdown.is-open .dropdown__menu { display: block; }

.dropdown__item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 12.5px; color: var(--text);
    width: 100%; text-align: left;
    background: none; border: 0; cursor: pointer; font-family: inherit;
    transition: background var(--dur) var(--ease);
}
.dropdown__item:hover { background: var(--surface-3); }
.dropdown__divider { height: 1px; background: var(--border); margin: 5px 0; }

/* ─── Toast ────────────────────────────────────────────────────────────── */
.toasts {
    position: fixed; right: var(--s-5); bottom: var(--s-5);
    display: flex; flex-direction: column; gap: 8px;
    z-index: 100; max-width: 390px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 12.5px;
    box-shadow: var(--lift-3);
    animation: slide-in .2s var(--ease);
}
.toast--success { border-left-color: var(--success); }
.toast--error   { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }

@keyframes slide-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── Modal ────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(9, 12, 20, .5);
    backdrop-filter: blur(2px);
    display: none; place-items: center;
    z-index: 90; padding: var(--s-5);
}
.modal-backdrop.is-open { display: grid; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 560px;
    max-height: 86vh; overflow-y: auto;
    box-shadow: var(--lift-3);
    animation: slide-in .16s var(--ease);
}
.modal--wide { max-width: 880px; }
.modal__head { padding: 15px var(--s-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: var(--s-3); }
.modal__body { padding: var(--s-5); }
.modal__foot { padding: 14px var(--s-5); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ─── Eşleme sihirbazı ─────────────────────────────────────────────────── */
.map-field {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--s-3);
    align-items: center;
    padding: 9px var(--s-3);
    border-bottom: 1px solid var(--border);
}
.map-field:last-child { border-bottom: 0; }
.map-field:hover { background: var(--surface-2); }
.map-field__label { font-size: 12.5px; font-weight: 560; }
.map-field__req { color: var(--danger); }
.map-field__sample {
    font-family: var(--mono); font-size: 11px; color: var(--text-3);
    margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Yardımcılar ──────────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: var(--s-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row--tight { gap: 6px; }
.row--top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }

.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-brand   { color: var(--brand); }

.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); }
.hidden { display: none !important; }
.w-full { width: 100%; }

hr.sep { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }

/* ─── Duyarlılık ───────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
    .grid--sidebar { grid-template-columns: 1fr; }
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .grid--3, .grid--2 { grid-template-columns: 1fr; }
    .form-row, .form-row--3 { grid-template-columns: 1fr; }
    .map-field { grid-template-columns: 1fr; gap: 4px; }
    .content { padding: var(--s-4); }
}

@media (max-width: 820px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .2s var(--ease);
        box-shadow: var(--lift-3);
        z-index: 60;
    }
    .sidebar.is-open { transform: none; }

    /* Menü açıkken içeriği karart — dokunulan yerin menü mü sayfa mı
       olduğu belirsiz kalmasın; her yere dokunmak menüyü kapatır. */
    body.sidebar-open::after {
        content: "";
        position: fixed; inset: 0;
        background: rgba(9, 12, 18, .45);
        z-index: 50;
    }
    body.sidebar-open { overflow: hidden; }
    .grid--4 { grid-template-columns: 1fr; }
    .sidebar-toggle { display: inline-flex !important; }
    .topbar { padding: 0 var(--s-4); }
}

.sidebar-toggle { display: none; }

@media print {
    .sidebar, .topbar, .btn, .filters, .pagination { display: none !important; }
    .content { padding: 0; }
    .card { border: 1px solid #ddd; box-shadow: none; }
}
