/* =====================================================================
   ALP Etsy Sipariş Takibi — Premium arayüz (alfa)
   ===================================================================== */

:root {
    --bg: #eceff5;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #eef2f8;

    --ink: #0d1526;
    --ink-2: #2b3648;
    --muted: #6a7689;
    --faint: #97a2b4;

    --line: #e7ebf2;
    --line-strong: #d7dee9;

    --brand: #10b981;
    --brand-600: #059669;
    --brand-700: #047857;
    --brand-50: #e7f8f1;
    --brand-grad: linear-gradient(135deg, #10b981 0%, #0d9488 100%);

    --blue: #2563eb;
    --blue-grad: linear-gradient(135deg, #3b82f6, #2563eb);
    --amber: #d97706;
    --amber-grad: linear-gradient(135deg, #f59e0b, #d97706);
    --indigo: #6366f1;
    --indigo-grad: linear-gradient(135deg, #818cf8, #6366f1);
    --violet: #7c3aed;
    --violet-grad: linear-gradient(135deg, #a78bfa, #7c3aed);

    --danger: #e11d48;
    --danger-bg: #fdeef1;
    --success: #0f7a5a;
    --success-bg: #e4f7ef;

    --r: 18px;
    --r-md: 14px;
    --r-sm: 11px;
    --r-xs: 9px;

    --sh-sm: 0 1px 2px rgba(13, 21, 38, .06), 0 1px 3px rgba(13, 21, 38, .04);
    --sh: 0 10px 26px -12px rgba(13, 21, 38, .18), 0 2px 8px -4px rgba(13, 21, 38, .08);
    --sh-lg: 0 28px 60px -24px rgba(13, 21, 38, .30);
    --sh-brand: 0 12px 26px -10px rgba(16, 185, 129, .55);

    --sidebar-w: 276px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(1100px 600px at 100% -10%, rgba(16, 185, 129, .10), transparent 60%),
        radial-gradient(900px 600px at -10% 0%, rgba(37, 99, 235, .08), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "ss01";
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0; }

h1, h2, h3, .brand strong, .stat-card strong, .bar-value {
    font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
}

h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 700; }

.muted { color: var(--muted); }

/* =========================== Sidebar =============================== */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 22px 16px 18px;
    color: #e8edf6;
    background:
        radial-gradient(420px 220px at 20% 0%, rgba(16, 185, 129, .18), transparent 60%),
        linear-gradient(180deg, #0c1322 0%, #0a1120 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    z-index: 40;
}

.brand {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 6px 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
    align-items: center;
    background: var(--brand-grad);
    border-radius: 13px;
    box-shadow: var(--sh-brand);
    color: #04261b;
    display: inline-flex;
    font-family: Sora, sans-serif;
    font-size: 22px;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.brand-text { display: grid; gap: 1px; }
.brand-text strong { color: #fff; font-size: 19px; letter-spacing: .04em; }
.brand-text small { color: #93a1b6; font-size: 12px; }

nav { display: grid; gap: 5px; margin-top: 20px; }

nav a {
    align-items: center;
    border-radius: 12px;
    color: #aeb9cb;
    display: flex;
    font-size: 14.5px;
    font-weight: 600;
    gap: 12px;
    padding: 11px 13px;
    position: relative;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}

nav a svg {
    fill: none;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 20px;
    opacity: .9;
}

nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }

nav a.active {
    background: linear-gradient(100deg, rgba(16, 185, 129, .22), rgba(16, 185, 129, .05));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .25);
}

nav a.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    height: 22px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--brand);
    box-shadow: 0 0 14px 1px var(--brand);
}

nav a.active svg { color: #34d399; opacity: 1; }

.sidebar-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 12px; }

.sidebar-stat {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    display: grid;
    gap: 2px;
    padding: 12px 14px;
}
.sidebar-stat-num { color: #fff; font-family: Sora, sans-serif; font-size: 26px; font-weight: 800; }
.sidebar-stat-label { color: #93a1b6; font-size: 12.5px; }

.sidebar-card {
    align-items: center;
    background: rgba(16, 185, 129, .10);
    border: 1px solid rgba(16, 185, 129, .22);
    border-radius: 14px;
    display: flex;
    gap: 11px;
    padding: 11px 13px;
}
.sidebar-card strong { color: #eafff7; display: block; font-size: 13.5px; }
.sidebar-card small { color: #8fb6ab; font-size: 12px; }

.dot-live {
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    flex: none;
    height: 10px;
    width: 10px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ====================== Mobil menü tetik ========================== */

.nav-toggle {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: var(--sh);
    color: var(--ink);
    cursor: pointer;
    display: none;
    height: 44px;
    justify-content: center;
    left: 14px;
    position: fixed;
    top: 14px;
    transition: transform .25s ease;
    width: 44px;
    z-index: 60;
}
.nav-toggle svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 22px; }

/* Dashboard'a hızlı dönüş butonu (menü tetikleyicisinin yanında). */
.nav-home {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: var(--sh);
    color: var(--ink);
    cursor: pointer;
    display: none;
    height: 44px;
    justify-content: center;
    left: 68px;
    position: fixed;
    top: 14px;
    transition: transform .25s ease;
    width: 44px;
    z-index: 60;
}
.nav-home svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 22px; }
.nav-home:hover { color: var(--brand); }

/* Menü açıkken tetik butonları da menüyle birlikte sağa kayar.
   Dar ekranda taşmamaları için kayma miktarı ekran genişliğiyle sınırlanır. */
body.sidebar-open .nav-toggle,
body.sidebar-open .nav-home { transform: translateX(min(var(--sidebar-w), calc(100vw - 126px))); }

.sidebar-overlay {
    background: rgba(8, 12, 22, .5);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .2s ease;
    z-index: 39;
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

/* ============== Daraltılmış menü (dashboard dışı sayfalar) ============== */

body.nav-collapsed .nav-toggle { display: inline-flex; }
body.nav-collapsed .nav-home { display: inline-flex; }
body.nav-collapsed .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--sh-lg);
}
body.nav-collapsed .sidebar.open { transform: translateX(0); }
body.nav-collapsed .main {
    margin-left: 0;
    max-width: none;
    padding-top: 70px;
    transition: margin-left .25s ease;
}
/* Menü açıkken içerik daralır ve sağa kayar (geniş ekran). */
body.nav-collapsed.sidebar-open .main { margin-left: var(--sidebar-w); }
body.nav-collapsed .sidebar-overlay { display: none; }

/* ============================ Main ================================ */

.main {
    margin-left: var(--sidebar-w);
    max-width: 1560px;
    padding: 30px 36px 40px;
}

.topbar {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 13px 20px;
}
.topbar h1 { font-size: 21px; }

.topbar-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-2);
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 650;
    gap: 8px;
    padding: 7px 14px;
    transition: border-color .15s ease, color .15s ease;
}
.meta-chip svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 15px; }
.meta-chip.date { color: var(--muted); }
a.meta-chip:hover { border-color: var(--brand); color: var(--brand-700); }
.meta-dot { border-radius: 50%; flex-shrink: 0; height: 8px; width: 8px; }
.meta-dot.pending { background: #f59e0b; }
.meta-dot.completed { background: var(--brand); }

.eyebrow {
    color: var(--brand-700);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ============================ Panel =============================== */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--sh);
    margin-bottom: 22px;
    padding: 24px;
}

.panel-title-row {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.panel-title-row .muted { font-size: 13px; margin-top: 3px; }

/* ============================ Buttons ============================= */

.button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    box-shadow: var(--sh-sm);
    color: var(--ink-2);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    white-space: nowrap;
}
.button svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 18px; }
.button:hover { border-color: var(--faint); transform: translateY(-1px); box-shadow: var(--sh); }
.button:active { transform: translateY(0); }

.button.primary {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--sh-brand);
}
.button.primary:hover { filter: brightness(1.04); box-shadow: 0 16px 30px -10px rgba(16, 185, 129, .6); }

.button.ghost { background: transparent; border-color: var(--line); box-shadow: none; color: var(--muted); }
.button.ghost:hover { background: var(--surface-2); color: var(--ink); }

.button.danger { background: var(--surface); border-color: #f3c7cf; color: var(--danger); }
.button.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.button.compact { min-height: 38px; padding: 8px 12px; font-size: 13px; }

.actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============================ Alerts ============================== */

.alert {
    align-items: center;
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    display: flex;
    font-weight: 600;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 16px;
}
.alert-icon {
    align-items: center;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: none;
    font-size: 13px;
    font-weight: 800;
    height: 22px;
    justify-content: center;
    width: 22px;
}
.alert.success { background: var(--success-bg); color: var(--success); border: 1px solid #bfead9; }
.alert.success .alert-icon { background: var(--brand-600); }
.alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f5cdd6; }
.alert.error .alert-icon { background: var(--danger); }

/* ========================= Dashboard grid ========================= */

.dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--sh);
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    transition: transform .15s ease, box-shadow .2s ease;
}
.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    height: 120px;
    width: 120px;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, .12), transparent 70%);
    pointer-events: none;
}
a.stat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }

.stat-top { align-items: center; display: flex; gap: 11px; }
.stat-ic {
    align-items: center;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
    flex: none;
}
.stat-ic svg { fill: none; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 21px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }

.stat-card strong { color: var(--ink); font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--faint); font-size: 12.5px; }

.stat-card.total .stat-ic { background: var(--blue-grad); }
.stat-card.pending .stat-ic { background: var(--amber-grad); }
.stat-card.printing .stat-ic { background: var(--violet-grad); }
.stat-card.printed .stat-ic { background: var(--indigo-grad); }
.stat-card.completed .stat-ic { background: var(--brand-grad); }
.stat-card.revenue .stat-ic { background: linear-gradient(135deg, #34d399, #0d9488); }
.stat-card.revenue strong, .stat-card.profit strong { font-size: 26px; }
.stat-card.loss .stat-ic { background: linear-gradient(135deg, #f87171, #e11d48); }
.stat-card.loss strong { color: var(--danger); }

/* ================= Raporlar: dönem filtresi ================= */

.report-filter {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 14px 18px;
}
.range-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.range-tab {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 650;
    padding: 8px 16px;
    transition: all .15s ease;
}
.range-tab:hover { border-color: var(--brand); color: var(--brand-700); }
.range-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.month-pick { align-items: end; display: flex; gap: 8px; }
.month-label { display: grid; gap: 4px; }
.month-label span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.month-pick input { padding: 8px 12px; }
.month-pick .button { flex-shrink: 0; }

.report-grid .stat-card strong { font-size: 22px; }

/* ======================== Two-column rows ========================= */

.dash-columns {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 22px;
}
.dash-columns .panel { margin-bottom: 0; }

/* =========================== Bar chart ============================ */

.bar-chart {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    height: 188px;
}
.bar-chart.tall { height: 236px; }

.bar-col { align-items: center; display: grid; gap: 8px; grid-template-rows: 1fr auto auto; height: 100%; }
.bar-track { align-items: end; display: flex; height: 100%; width: 64%; }
.bar-fill {
    background: var(--brand-grad);
    border-radius: 8px 8px 4px 4px;
    box-shadow: inset 0 -6px 14px rgba(255, 255, 255, .22);
    min-height: 5px;
    width: 100%;
    transition: height .4s cubic-bezier(.4, 0, .2, 1);
}
.bar-col:hover .bar-fill { filter: brightness(1.07); }
.bar-value { color: var(--ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-label { color: var(--muted); font-size: 12px; }

/* ====================== Recent / due lists ======================= */

.recent-list, .due-list { display: grid; gap: 9px; }

.recent-item, .due-item {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    color: var(--ink);
    display: grid;
    gap: 14px;
    padding: 13px 15px;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.recent-item { grid-template-columns: 1.4fr 1fr auto; }
.due-item { grid-template-columns: 64px 1fr auto; }
.recent-item:hover, .due-item:hover { background: var(--surface); border-color: var(--line-strong); transform: translateX(2px); box-shadow: var(--sh-sm); }

.recent-item > div { display: grid; gap: 3px; }
.recent-item strong { font-weight: 700; }
.recent-item span, .recent-item small { color: var(--muted); font-size: 13px; }

.due-main { display: grid; gap: 3px; }
.due-main strong { font-weight: 700; font-size: 14px; }
.due-main span { color: var(--muted); font-size: 12.5px; }

.due-date {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fdd9a8;
    border-radius: 12px;
    color: #b45309;
    display: grid;
    justify-items: center;
    padding: 8px 6px;
}
.due-date strong { font-family: Sora, sans-serif; font-size: 22px; line-height: 1; }
.due-date span { font-size: 11.5px; }
.due-date.overdue { background: #fef2f3; border-color: #f7cdd4; color: var(--danger); }

/* ========================= Status badges ========================= */

.status-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    gap: 6px;
    padding: 6px 12px;
    white-space: nowrap;
}
.status-badge::before { content: ""; border-radius: 50%; height: 7px; width: 7px; background: currentColor; opacity: .85; }
.status-badge.pending { background: #fff5e9; color: #b45309; }
.status-badge.printing { background: #f3ecff; color: #6d28d9; }
.status-badge.printed { background: #eef0ff; color: #4338ca; }
.status-badge.completed { background: var(--success-bg); color: var(--success); }
.status-badge.refunded { background: var(--danger-bg); color: var(--danger); }

.status-dot { border-radius: 50%; display: inline-block; height: 9px; margin-right: 9px; width: 9px; }
.status-dot.pending { background: var(--amber); }
.status-dot.printing { background: var(--violet); }
.status-dot.printed { background: var(--indigo); }
.status-dot.completed { background: var(--brand); }
.status-dot.refunded { background: var(--danger); }

/* =========================== Filter bar ========================== */

.filter-bar {
    align-items: end;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: grid;
    gap: 12px;
    grid-template-columns: 1.6fr repeat(2, 1fr) repeat(2, .9fr) auto;
    margin-bottom: 18px;
    padding: 14px;
}
.filter-bar label { gap: 6px; }
.filter-bar label span { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.filter-actions { display: flex; gap: 8px; }

/* ============================ Forms ============================== */

.form-grid {
    background: var(--surface);
    display: grid;
    gap: 18px 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section {
    align-items: center;
    background: linear-gradient(100deg, var(--surface-3), var(--surface-2));
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 18px;
}
.section h2 { font-size: 16px; }
.section .eyebrow { margin: 0; }

.full { grid-column: 1 / -1; }

label { color: var(--ink-2); display: grid; font-size: 13px; font-weight: 600; gap: 7px; }
/* Form hücreleri satır yüksekliğini paylaşır; içerik üste hizalanmazsa uzun bir
   yardımcı metin (ör. telefon dolgusu açıklaması) komşu alanların girdisini aşağı itiyor. */
.form-grid > label { align-content: start; }

input, select, textarea {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    min-height: 44px;
    padding: 10px 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
    outline: none;
}
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a7689' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; padding-right: 34px; }

.check-line {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    display: flex;
    font-weight: 600;
    gap: 11px;
    min-height: 44px;
    padding: 11px 13px;
}
.check-line input { accent-color: var(--brand); min-height: auto; width: auto; height: 18px; width: 18px; }

.stand-box { display: grid; gap: 12px; }

/* Birleşik sipariş listesinde ürün tipi rozeti (sipariş no altı). */
.ptype-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    margin-top: 3px;
    padding: 1px 8px;
}
.ptype-badge.fabric { background: #ecfdf5; color: #047857; }
.ptype-badge.stand  { background: #eff6ff; color: #1d4ed8; }
.ptype-badge.both   { background: #fef3c7; color: #b45309; }

/* Kurdele renk seçimi: yan yana kompakt checkbox'lar. */
#ribbon_field .field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ribbon-options { display: flex; flex-wrap: wrap; gap: 10px; }
.ribbon-options .check-line { min-height: 38px; padding: 8px 12px; }

/* Hazır ölçü seçimi + "Özel Ölçü" cm/inch giriş çiftleri. */
.size-field { display: grid; gap: 8px; }
.custom-size {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    padding: 12px;
}
.unit-pair { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
    .custom-size { grid-template-columns: 1fr; }
}

.current-photo {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    gap: 16px;
    padding: 14px;
}
.current-photo img { border: 1px solid var(--line); border-radius: 12px; height: 84px; object-fit: cover; width: 84px; }

.hidden { display: none !important; }

/* ============================ Tables ============================= */

.toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.table-toolbar {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Toplu işlem çubuğu + seçim sütunu. */
.bulk-bar {
    align-items: center;
    background: var(--ink);
    border-radius: var(--r-md);
    box-shadow: var(--sh);
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
}
.bulk-bar.show { display: flex; }
.bulk-count { color: #fff; font-size: 13.5px; font-weight: 650; }
.bulk-count strong { color: var(--brand); }
.bulk-sep { color: #9fb0c4; font-size: 12.5px; font-weight: 650; margin-left: 6px; }
.bulk-bar .button { padding: 7px 12px; }
.bulk-bar .button svg { height: 15px; width: 15px; }
.col-check { width: 38px; text-align: center; }
.col-check input { cursor: pointer; height: 16px; width: 16px; }

/* Sipariş durum sekmeleri (Beklemede / Baskı Yapıldı). */

.order-tabs {
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
}
.order-tab {
    align-items: center;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    display: inline-flex;
    font-size: 14px;
    font-weight: 650;
    gap: 9px;
    margin-bottom: -1px;
    padding: 11px 16px;
    transition: color .15s ease, border-color .15s ease;
}
.order-tab svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 17px; }
.order-tab em {
    background: var(--surface-3);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    min-width: 22px;
    padding: 2px 8px;
    text-align: center;
}
.order-tab:hover { color: var(--ink); }
.order-tab.active { border-bottom-color: var(--brand); color: var(--brand-700); }
.order-tab.active em { background: var(--brand-50); color: var(--brand-700); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }

table { border-collapse: separate; border-spacing: 0; min-width: 1040px; width: 100%; }

th, td { padding: 14px 14px; text-align: left; vertical-align: middle; }
thead th {
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}
tbody td { border-bottom: 1px solid var(--line); font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--surface-2); }

.th-sort { align-items: center; color: var(--muted); display: inline-flex; gap: 3px; }
.th-sort:hover { color: var(--ink); }
.th-sort.active { color: var(--brand-700); }

.order-link { color: var(--brand-700); font-weight: 800; }
.order-link:hover { text-decoration: underline; }

.muted-line { color: var(--muted); display: block; font-size: 12px; margin-top: 2px; }

.product-cell { align-items: center; display: flex; gap: 11px; }
.product-cell img, .thumb-empty { border: 1px solid var(--line); border-radius: 10px; height: 48px; object-fit: cover; width: 48px; }
.thumb-button { background: none; border: 0; cursor: zoom-in; padding: 0; }
.thumb-button img { display: block; transition: transform .15s ease; }
.thumb-button:hover img { transform: scale(1.05); }
.thumb-empty { align-items: center; color: var(--faint); display: inline-flex; justify-content: center; }
.product-cell > div { display: grid; gap: 4px; }

/* Görsel sonradan yüklenecek işareti: amber vurgu (kumaş siparişinde tasarım beklenirken). */
.choice-pill.pending { background: #fff7ed; color: var(--amber); }
/* Tasarım görseli arka planı: şeffaf = tamam, beyaz/zeminli = baskıdan önce kaldır. */
.choice-pill.bg-ok { background: var(--success-bg); color: var(--success); }
.choice-pill.bg-warn { background: var(--danger-bg); color: var(--danger); font-weight: 700; }
.thumb-empty.pending { background: #fff7ed; border-color: #fed7aa; color: var(--amber); font-size: 18px; }
.product-photo.placeholder.pending { background: #fff7ed; border-color: #fed7aa; color: var(--amber); }

.choice-pill {
    background: var(--brand-50);
    border-radius: 999px;
    color: var(--brand-700);
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    width: fit-content;
}

.status-form { display: flex; gap: 6px; margin-top: 9px; }
.status-icon {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--faint);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    transition: all .15s ease;
    width: 36px;
}
.status-icon svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 19px; }
.status-icon:hover { border-color: var(--brand); color: var(--brand-700); transform: translateY(-1px); }
.status-icon.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.row-actions { align-items: center; display: flex; gap: 6px; }
.inline-form { display: inline-flex; margin: 0; }
.icon-button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    transition: all .15s ease;
    width: 36px;
}
.icon-button svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 17px; }
.icon-button:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.icon-button.danger { background: var(--danger-bg); border-color: #f3c7cf; color: var(--danger); }
.icon-button.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.icon-button.success { background: #ecfdf5; border-color: #b9e3d3; color: #0d9488; }
.icon-button.success:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ========================== Pagination =========================== */

.pagination { align-items: center; display: flex; gap: 14px; justify-content: center; margin-top: 20px; }
.page-link {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    box-shadow: var(--sh-sm);
    font-weight: 600;
    padding: 9px 15px;
    transition: all .15s ease;
}
.page-link:hover { border-color: var(--brand); color: var(--brand-700); }
.page-link.disabled { opacity: .45; pointer-events: none; }
.page-info { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ============================ Empty ============================== */

.empty {
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    color: var(--muted);
    padding: 36px 24px;
    text-align: center;
}

/* =========================== Settings ============================ */

/* "Ölçüleri Kopyala" butonu içindeki son kopyalama zamanı */
.copy-sizes-time { color: var(--muted); font-size: 11.5px; font-style: normal; margin-left: 6px; }
#copy_sizes_btn.copied { border-color: var(--brand); color: var(--brand-700); }
#copy_sizes_btn.copied .copy-sizes-time { color: var(--brand-700); }

/* Ayarlarda tek ölçü kopyalama ikonu (kaydet yanı) */
.icon-button.copy-size-single.copied,
.icon-button.copy-price-single.copied,
.icon-button.copy-cost-single.copied,
.icon-button.copy-size-stand.copied,
.icon-button.copy-total-cost.copied { background: var(--brand); border-color: var(--brand); color: #fff; }
.pct-badge { font-size: 13px; font-weight: 800; line-height: 1; }

/* Tasarım onayı tiki: onaylıysa yeşil */
.attach-toggle.design-ok.on { background: #dcfce7; border: 1px solid #86efac; color: #15803d; }
.attach-toggle.design-ok.on:hover { filter: brightness(.96); }

/* Son kopyalanan satır + basılan buton (turuncu, kalıcı işaret) */
.setting-list li.last-copied { background: #fff7ed; border-color: #fdba74; }
.icon-button.last-copied { background: #f97316; border-color: #f97316; color: #fff; }

/* Ayarlar sekmeleri */
.settings-tabs {
    align-items: stretch; border-bottom: 1px solid var(--line); display: flex;
    flex-wrap: wrap; gap: 4px; margin-bottom: 20px;
}
.settings-tab {
    background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
    cursor: pointer; font-family: inherit; font-size: 14.5px; font-weight: 600;
    margin-bottom: -1px; padding: 10px 16px; transition: color .15s ease, border-color .15s ease;
}
.settings-tab:hover { color: var(--ink); }
.settings-tab.active { border-bottom-color: var(--brand); color: var(--brand-700); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }

.settings-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 22px; }

/* Fiyat listeleri */
.price-list-add { grid-template-columns: 1fr auto; }
.price-list-head {
    align-items: center; border-bottom: 1px solid var(--line); display: flex;
    flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding-bottom: 14px;
}
.price-list-name { align-items: center; display: flex; gap: 8px; }
.price-list-name input { font-weight: 700; width: 300px; max-width: 100%; }
.price-list-count { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: auto; white-space: nowrap; }

/* Fiyat varyasyonu: satış + piyasa fiyatı sütunları */
.price-item-add { grid-template-columns: 1fr 130px 130px auto; }
.setting-edit input[name="name"] { flex: 1; min-width: 90px; }
.setting-edit input[name="price"], .setting-edit input[name="market_price"] { width: 104px; flex: none; }
.setting-add { display: grid; gap: 10px; grid-template-columns: 1fr 150px auto; margin: 16px 0; }
.setting-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.setting-list li {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    display: flex;
    font-weight: 600;
    gap: 12px;
    padding: 11px 14px;
    transition: border-color .15s ease;
}
.setting-cost { align-items: center; display: flex; gap: 8px; }
.setting-cost input { width: 110px; }
.setting-cost .button { padding: 8px 12px; }

/* Ölçü satırı: sıralama okları + ad/maliyet düzenleme. */
.setting-move { display: grid; gap: 3px; }
.setting-move button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 21px;
    justify-content: center;
    padding: 0;
    width: 26px;
}
.setting-move button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.setting-move button:disabled { cursor: default; opacity: .3; }
.setting-move svg { fill: none; height: 13px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; width: 13px; }
.setting-edit { align-items: center; display: flex; flex: 1; gap: 8px; }
.setting-edit input[name="value"] { flex: 1; min-width: 90px; }
.setting-edit input[name="cost"] { width: 110px; }
.setting-edit .button { padding: 8px 12px; }

.field-hint { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 5px; }
.field-hint code { background: var(--surface-3); border-radius: 5px; font-size: 11.5px; padding: 1px 5px; }

/* Kargo takip linki. */
/* Takip no + tek tıkla kopyalama. */
.track-cell { align-items: center; display: flex; gap: 8px; }
.copy-btn {
    align-items: center; background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 8px; color: var(--muted); cursor: pointer; display: inline-flex; flex: none;
    height: 30px; justify-content: center; padding: 0; width: 30px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.copy-btn:hover { border-color: var(--brand); color: var(--brand-700); }
.copy-btn svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 15px; }
.copy-btn .copy-ok { display: none; }
.copy-btn.copied { background: var(--brand); border-color: var(--brand); color: #fff; }
.copy-btn.copied .copy-ic { display: none; }
.copy-btn.copied .copy-ok { display: inline-flex; }

.track-link { align-items: center; color: var(--brand-700); display: inline-flex; font-weight: 650; gap: 4px; }
.track-link:hover { text-decoration: underline; }
.track-link svg { fill: none; height: 13px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; width: 13px; }

/* Kargo maliyeti hızlı giriş satırı. */
.shipping-cost-form { align-items: center; display: flex; gap: 8px; }
.shipping-cost-form input { width: 120px; }
.shipping-cost-form .button { padding: 8px 14px; }
.setting-list li:hover { border-color: var(--line-strong); }
.link-danger { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; font-weight: 700; }
.link-danger:hover { text-decoration: underline; }

/* ===================== Detay: yeni tasarım ===================== */

.detail-wrap { display: grid; gap: 20px; }
.detail-cols { align-items: start; display: grid; gap: 20px; grid-template-columns: 1.55fr 1fr; }
.detail-cols > * { min-width: 0; }
.detail-main, .detail-aside { display: grid; gap: 20px; min-width: 0; }

.card-title { color: var(--brand-700); margin-bottom: 16px; }

/* --- Üst şerit --- */
.detail-hero { display: grid; gap: 20px; }
.hero-top { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.hero-id-row { align-items: center; display: flex; gap: 12px; margin-top: 2px; }
.hero-id-row h2 { font-size: 26px; letter-spacing: -0.02em; }
.hero-sub { color: var(--muted); font-size: 14px; margin-top: 5px; }
.hero-sub strong { color: var(--ink); }
.hero-right { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions { display: flex; gap: 8px; }

.due-chip {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    gap: 9px;
    padding: 7px 14px 7px 11px;
}
.due-chip svg { fill: none; height: 19px; stroke: var(--muted); stroke-linecap: round; stroke-width: 2; width: 19px; }
.due-chip > span { display: grid; line-height: 1.25; }
.due-chip strong { font-size: 13px; }
.due-chip small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.due-chip.overdue { background: var(--danger-bg); border-color: #f3c7cf; }
.due-chip.overdue svg, .due-chip.overdue strong, .due-chip.overdue small { color: var(--danger); stroke: var(--danger); }

/* --- Durum adımları (stepper) --- */
.status-stepper { border-top: 1px solid var(--line); display: flex; padding-top: 18px; }
.step {
    align-items: center;
    background: none;
    border: 0;
    cursor: pointer;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding: 2px 4px;
    position: relative;
}
.step-line {
    background: var(--line-strong);
    height: 2px;
    left: calc(-50% + 21px);
    position: absolute;
    right: calc(50% + 21px);
    top: 19px;
}
.step.done .step-line, .step.current .step-line { background: var(--brand); }
.step-dot {
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
    width: 38px;
    z-index: 1;
}
.step-dot svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 19px; }
.step-label { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.step.done .step-dot { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }
.step.current .step-dot { background: var(--brand); border-color: var(--brand); box-shadow: var(--sh-brand); color: #fff; }
.step.current .step-label { color: var(--brand-700); }
.step:hover .step-dot { border-color: var(--brand); color: var(--brand-700); }
.step.current:hover .step-dot { color: #fff; }

/* --- Ürün & üretim --- */
.product-flex { display: flex; gap: 18px; }
.product-photo {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    flex-shrink: 0;
    height: 132px;
    overflow: hidden;
    padding: 0;
    width: 132px;
}
.product-photo img { display: block; height: 100%; object-fit: cover; width: 100%; }
.product-photo:hover { border-color: var(--brand); }
.product-photo.placeholder {
    align-items: center;
    color: var(--faint);
    cursor: default;
    display: grid;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    justify-items: center;
    padding: 0 10px;
    text-align: center;
}
.product-photo.placeholder svg { fill: none; height: 26px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; width: 26px; }

.fact-grid { display: grid; flex: 1; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); min-width: 0; }
.fact {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    display: grid;
    gap: 5px;
    padding: 14px 16px;
}
.fact small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fact strong { font-family: Sora, Inter, sans-serif; font-size: 18px; letter-spacing: -0.01em; }
.fact-muted strong { color: var(--faint); font-weight: 600; }

.note-callout {
    background: #fffaeb;
    border: 1px solid #f1dfad;
    border-radius: var(--r-sm);
    display: grid;
    gap: 6px;
    margin-top: 16px;
    padding: 13px 15px;
}
.note-callout small { color: #92700c; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.note-callout p { color: #6d5709; font-size: 13.5px; line-height: 1.55; }

/* --- Bilgi satırları --- */
.info-cols { column-gap: 32px; columns: 2; }
.info-row {
    align-items: baseline;
    border-bottom: 1px dashed var(--line);
    break-inside: avoid;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 9px 0;
}
.info-row .k { color: var(--muted); flex-shrink: 0; font-size: 13px; font-weight: 600; }
.info-row .v { font-weight: 650; overflow-wrap: anywhere; text-align: right; }
.text-danger { color: var(--danger); }

/* Tamamlananlar tablosundaki sipariş bazlı kâr değeri. */
.profit-val { color: #0d9488; font-weight: 700; font-variant-numeric: tabular-nums; }
.profit-val.negative { color: var(--danger); }

/* ======================= Muhasebe (giderler) ====================== */

.expense-form { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.expense-form .full { grid-column: 1 / -1; }
.expense-actions { display: flex; justify-content: flex-end; }
.expense-type {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 11px;
    white-space: nowrap;
}
.expense-type.general { background: var(--surface-3); color: var(--ink-2); }
.expense-type.ads { background: rgba(245, 158, 11, .14); color: #b45309; }
.expense-amount { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ======================= Tasarımlar ============================== */

.design-form { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.design-form .full { grid-column: 1 / -1; }
.design-form .design-url { grid-column: 1 / -1; }
.design-actions { display: flex; justify-content: flex-end; }
.design-sku {
    color: var(--brand-700);
    font-family: Sora, sans-serif;
    font-weight: 700;
    letter-spacing: .01em;
}
.design-sku:hover { text-decoration: underline; }
.design-cat {
    background: var(--brand-50);
    border-radius: 999px;
    color: var(--brand-700);
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 11px;
    white-space: nowrap;
}
.design-prod { color: var(--ink); font-weight: 600; }
.design-prod:hover { color: var(--brand-700); text-decoration: underline; }
a.design-cat:hover { filter: brightness(.96); text-decoration: none; }
.link-actions { display: flex; gap: 6px; }
.icon-button.etsy:hover { background: #f1641e; border-color: #f1641e; color: #fff; }
.icon-button.muted-icon { color: var(--line-strong); cursor: default; opacity: .5; }
.icon-button.muted-icon:hover { border-color: var(--line-strong); color: var(--line-strong); transform: none; }

/* ---- SKU görsel küçük resimleri (designs tablosu) + lightbox ---- */
.sku-thumbs { display: flex; gap: 6px; align-items: center; }
.sku-thumb {
    height: 56px; width: auto; border-radius: 6px; border: 1px solid rgba(0,0,0,.12);
    cursor: zoom-in; object-fit: cover; background: #fff; transition: transform .12s ease;
}
.sku-thumb:hover { transform: scale(1.06); }
.sku-lightbox {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.78);
    display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 24px;
}
.sku-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 12px 48px rgba(0,0,0,.5); background: #fff; }

/* ---- Ürünler: collapse toggle + SKU alt satırı ---- */
.col-toggle { width: 34px; }
.sku-toggle {
    align-items: center; background: none; border: 1px solid var(--line); border-radius: 7px;
    color: var(--muted); cursor: pointer; display: inline-flex; height: 26px; justify-content: center;
    padding: 0; width: 26px; transition: color .15s ease, border-color .15s ease;
}
.sku-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.sku-toggle:hover { border-color: var(--brand); color: var(--brand); }
.sku-toggle.open svg { transform: rotate(90deg); }
.sku-subrow > td { background: var(--surface-2); padding: 14px 16px; }

/* ---- SKU kartı ızgarası (ürün detayı + collapse) ---- */
.sku-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
.sku-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; display: flex; flex-direction: column; }
.sku-card .sku-thumb { width: 100%; height: 120px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.sku-card .sku-thumb:hover { transform: none; }
.sku-card-noimg { align-items: center; background: var(--surface-3); color: var(--faint); display: flex; height: 120px; justify-content: center; }
.sku-card-body { display: grid; gap: 7px; padding: 10px 11px; }
.sku-card-links { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.sku-card-links .icon-button { height: 30px; width: 30px; }

.info-block {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    display: grid;
    gap: 6px;
    margin-top: 16px;
    padding: 12px 14px;
}
.info-block small { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.info-block p { font-size: 13.5px; line-height: 1.55; }

/* --- Satır içi kaydetme formları (takip no, kargo maliyeti) --- */
.inline-save { align-items: end; display: flex; gap: 10px; margin-top: 16px; }
.inline-save label { display: grid; flex: 1; gap: 7px; }
.inline-save .button { flex-shrink: 0; }

/* --- Finans --- */
.cost-table { border-collapse: collapse; min-width: 0; width: 100%; }
.cost-table td { border-bottom: 1px dashed var(--line); font-size: 13.5px; padding: 9px 0; }
.cost-table td:first-child { color: var(--muted); font-weight: 600; }
.cost-table td:last-child { font-weight: 650; text-align: right; }
.cost-table .cost-sale td { font-weight: 700; }
.cost-table .cost-sale td:first-child { color: var(--ink); }
.cost-table .cost-total td { border-bottom: 0; border-top: 2px solid var(--line-strong); font-weight: 800; }
.cost-table .cost-total td:first-child { color: var(--ink); }

.profit-banner {
    align-items: baseline;
    border-radius: var(--r-sm);
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 13px 16px;
}
.profit-banner span { font-size: 13px; font-weight: 700; }
.profit-banner strong { font-family: Sora, Inter, sans-serif; font-size: 20px; letter-spacing: -0.01em; }
.profit-banner small { font-size: 12.5px; font-weight: 600; margin-left: auto; }
.profit-banner.positive { background: #ecfdf5; border: 1px solid #bbe7d3; color: var(--brand-700); }
.profit-banner.negative { background: var(--danger-bg); border: 1px solid #f3c7cf; color: var(--danger); }

/* --- Geçmiş zaman çizelgesi --- */
.timeline { display: grid; list-style: none; margin: 0; max-height: 360px; overflow-y: auto; padding: 2px 0 0 4px; }
.timeline li { display: flex; gap: 13px; position: relative; }
.timeline li:not(:last-child)::before {
    background: var(--line-strong);
    bottom: -4px;
    content: "";
    left: 9px;
    position: absolute;
    top: 16px;
    width: 2px;
}
.tl-dot {
    background: var(--brand-50);
    border: 2px solid var(--brand);
    border-radius: 50%;
    flex-shrink: 0;
    height: 12px;
    margin-top: 5px;
    width: 12px;
    z-index: 1;
}
.tl-body { display: grid; gap: 2px; padding-bottom: 16px; }
.tl-action { font-size: 13px; font-weight: 700; }
.tl-detail { color: var(--ink-2); font-size: 13px; }
.timeline time { color: var(--faint); font-size: 11.5px; }

/* ====================== Distribution bars ======================= */

.dist-list { display: grid; gap: 13px; }
.dist-row { align-items: center; display: grid; gap: 13px; grid-template-columns: 150px 1fr 46px; }
.dist-label { align-items: center; color: var(--ink); display: flex; font-size: 13.5px; font-weight: 600; }
.dist-track { background: var(--surface-3); border-radius: 999px; height: 13px; overflow: hidden; }
.dist-fill { background: var(--brand-grad); border-radius: 999px; height: 100%; min-width: 4px; transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.dist-fill.pending { background: var(--amber-grad); }
.dist-fill.printing { background: var(--violet-grad); }
.dist-fill.printed { background: var(--indigo-grad); }
.dist-fill.completed { background: var(--brand-grad); }
.dist-fill.refunded { background: var(--danger); }
.dist-fill.total { background: var(--blue-grad); }
.dist-count { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }

/* ============================ Modal ============================== */

.image-modal {
    align-items: center;
    backdrop-filter: blur(6px);
    background: rgba(8, 12, 22, .78);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 30px;
    position: fixed;
    z-index: 80;
}
.image-modal img {
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    max-height: calc(100vh - 80px);
    max-width: calc(100vw - 80px);
    object-fit: contain;
}
.image-modal-close {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--sh);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 26px;
    height: 44px;
    justify-content: center;
    line-height: 1;
    position: fixed;
    right: 24px;
    top: 20px;
    width: 44px;
}
.image-modal-close:hover { background: var(--danger); color: #fff; }
.image-modal-download {
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--sh);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 650;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    position: fixed;
    right: 80px;
    top: 20px;
}
.image-modal-download svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 18px; }
.image-modal-download:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==================== Takip numarası modalı ====================== */

.tracking-modal {
    align-items: center;
    backdrop-filter: blur(6px);
    background: rgba(8, 12, 22, .55);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 80;
}
.tracking-modal-box {
    background: var(--surface);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    display: grid;
    gap: 14px;
    max-width: 440px;
    padding: 24px;
    width: 100%;
}
.tracking-modal-box h3 { font-size: 17px; }
.tracking-modal-box p { color: var(--ink-2); font-size: 13.5px; }
.tracking-modal-box form { display: grid; gap: 16px; }
.tracking-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* =========================== Footer ============================== */

.app-foot {
    color: var(--faint);
    display: flex;
    font-size: 12.5px;
    justify-content: space-between;
    margin-top: 8px;
    padding: 4px 4px 0;
}

/* ============================ Auth =============================== */

.auth-body {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 28px 16px;
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(16, 185, 129, .22), transparent 60%),
        radial-gradient(700px 520px at -10% 0%, rgba(37, 99, 235, .16), transparent 55%),
        #0a1120;
}

.auth-shell { width: 100%; max-width: 420px; }

.auth-brand { align-items: center; display: flex; gap: 13px; justify-content: center; margin-bottom: 22px; }
.auth-brand strong { color: #fff; display: block; font-family: Sora, sans-serif; font-size: 20px; letter-spacing: .04em; }
.auth-brand small { color: #93a1b6; font-size: 12.5px; }

.auth-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 22px;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
    padding: 34px 30px;
}
.auth-card h1 { font-size: 24px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 6px 0 22px; }
.auth-card form { display: grid; gap: 16px; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 46px; }
.pass-toggle {
    align-items: center;
    background: none;
    border: 0;
    color: var(--faint);
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    position: absolute;
    right: 2px;
    top: 0;
    width: 42px;
}
.pass-toggle svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 19px; }
.pass-toggle:hover, .pass-toggle.on { color: var(--brand-700); }

.auth-submit { margin-top: 4px; min-height: 50px; font-size: 15px; }
.auth-foot { color: #93a1b6; font-size: 12.5px; margin-top: 18px; text-align: center; }

/* ====================== Sidebar user/logout ===================== */

.sidebar-user {
    align-items: center;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    display: flex;
    gap: 11px;
    padding: 10px 12px;
}
.sidebar-user .avatar {
    align-items: center;
    background: var(--brand-grad);
    border-radius: 10px;
    color: #04261b;
    display: inline-flex;
    flex: none;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    text-transform: uppercase;
    width: 36px;
}
.sidebar-user .who { display: grid; gap: 1px; min-width: 0; }
.sidebar-user .who strong { color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .who small { color: #8b98ad; font-size: 11.5px; }
.logout-btn {
    align-items: center;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #c5cedb;
    cursor: pointer;
    display: inline-flex;
    flex: none;
    height: 36px;
    justify-content: center;
    width: 36px;
    transition: background .15s ease, color .15s ease;
}
.logout-btn:hover { background: rgba(225, 29, 72, .22); color: #fff; }
.logout-btn svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 18px; }

/* ========================= Responsive ============================ */

@media (max-width: 1180px) {
    .dash-columns, .detail-cols { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: var(--sh-lg);
    }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 70px 18px 32px; }
    /* Dar ekranda itme yerine menü içeriğin üzerine açılır (overlay). */
    body.nav-collapsed.sidebar-open .main { margin-left: 0; }
    body.nav-collapsed .sidebar-overlay { display: block; }
}

@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .table-toolbar { align-items: stretch; flex-direction: column; }
    .dashboard-grid, .form-grid, .settings-grid, .filter-bar { grid-template-columns: 1fr; }
    .info-cols { columns: 1; }
    .product-flex { flex-direction: column; }
    .product-photo { height: 180px; width: 100%; }
    .step-label { font-size: 10.5px; }
    .hero-top, .inline-save { flex-direction: column; }
    .hero-top { gap: 12px; }
    .inline-save { align-items: stretch; }
    .recent-item, .due-item { grid-template-columns: 1fr; }
    .dist-row { grid-template-columns: 110px 1fr 40px; }
    .main { padding: 70px 14px 28px; }
    h1 { font-size: 23px; }
}

/* Sütun aç/kapa menüsü (sipariş listesi) */
.cols-menu-wrap { position: relative; }
.cols-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
    background: var(--panel, #fff); border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14);
    padding: 10px 14px; display: flex; flex-direction: column; gap: 7px;
    min-width: 180px; white-space: nowrap;
}
.cols-menu label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.cols-menu.hidden { display: none; }

/* Son kargo tarihi aciliyeti — yaklaşan/geçmiş siparişleri öne çıkarır. */
tr.ship-overdue  { background: #fef2f2; }
tr.ship-overdue:hover  { background: #fee2e2; }
tr.ship-due-soon { background: #fff7ed; }
tr.ship-due-soon:hover { background: #ffedd5; }
tr.ship-overdue td[data-col="ship"],
tr.ship-due-soon td[data-col="ship"] { font-weight: 600; }
.ship-badge {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.ship-badge.overdue  { background: #fee2e2; color: #b91c1c; }
.ship-badge.due-soon { background: #ffedd5; color: #c2410c; }

/* Kargo etiketi (PDF) önizleme + aksiyonlar. */
.label-preview {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 0.75rem;
}
.label-preview object {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
}
.label-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.label-actions .button { flex: 1; text-align: center; }
/* Sipariş listesinde etiket göstergesi. */
.label-flag {
    color: #b91c1c;
    margin-left: 4px;
    font-size: 13px;
    vertical-align: middle;
}

/* Tamamlanan siparişlerde teslim durumu (alındı/alınmadı) rozeti. */
.pickup-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
.pickup-badge.yes { background: #dcfce7; color: #15803d; }
.pickup-badge.no  { background: #f1f5f9; color: #64748b; }
a.pickup-badge { text-decoration: none; }
a.pickup-badge:hover { filter: brightness(.95); text-decoration: none; }

/* Etiket "pakete yapıştırıldı" aç/kapa düğmesi (sipariş listesi). */
.attach-toggle {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 999px;
    color: #64748b;
    cursor: pointer;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    margin-top: 3px;
    padding: 1px 8px;
    white-space: nowrap;
}
.attach-toggle:hover { border-color: #94a3b8; color: #475569; }
.attach-toggle.on {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}
.attach-toggle.on:hover { filter: brightness(.96); }
.track-no { color: inherit; text-decoration: underline dotted; }
.track-no:hover { color: var(--brand-700); }

/* === Ayar tabloları (arkadaşın 2026-07-20 settings-table düzeni) === */
.price-list-name input { font-weight: 700; min-width: 0; width: 100%; max-width: 230px; }
.price-list-count { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: auto; white-space: nowrap; }

/* Fiyat varyasyonu ekleme formu (listeler yan yana olduğu için dar) */
.price-item-add { grid-template-columns: 1fr 96px 96px auto; }
.price-item-add .button { padding: 10px 12px; }

/* Ayar tabloları (ölçüler + fiyat varyasyonları): başlıklı, hizalı satırlar.
   Global "table { min-width: 1040px }" burada geçersiz kılınır; aksi halde
   dar ayar panellerinde tablo taşıp yatay kaydırma gerektiriyordu. */
.settings-table { min-width: 0; table-layout: fixed; width: 100%; }
.settings-table th { font-size: 11px; letter-spacing: .04em; padding: 9px 6px; white-space: nowrap; }
.settings-table td { padding: 8px 6px; vertical-align: middle; }
/* Dar hücrelerde metnin kırpılmaması için input dolgusu da sıkı tutulur. */
.settings-table input { min-width: 0; padding: 8px 9px; width: 100%; }
/* Sayı oklarını gizle: dar fiyat sütunlarında yer kaplayıp rakamı kırpıyorlardı. */
.settings-table input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.settings-table input[type="number"]::-webkit-outer-spin-button,
.settings-table input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.settings-table .col-order { width: 70px; }
.settings-table .col-num { width: 128px; }
.settings-table .col-tools { width: 96px; }
/* Fiyat tablosu yan yana panellerde durduğu için sayı sütunları daha dar;
   kalan genişliği varyasyon adı alır. */
.price-table .col-order { width: 68px; }
.price-table .col-num { width: 80px; }
.price-table .col-tools { width: 82px; }
.settings-table tbody tr:hover { background: transparent; }

.row-order { display: flex; gap: 4px; }
.row-order button {
    align-items: center; background: var(--surface); border: 1px solid var(--line);
    border-radius: 7px; color: var(--muted); cursor: pointer; display: inline-flex;
    height: 26px; justify-content: center; padding: 0; width: 26px;
}
.row-order button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.row-order button:disabled { cursor: default; opacity: .3; }
.row-order svg { fill: none; height: 13px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; width: 13px; }

.row-tools { align-items: center; display: flex; gap: 6px; }
.row-tools .icon-button { height: 32px; width: 32px; }
/* Satır düzenleme formları yalnızca gizli alan taşır (girdiler tabloda, form="" ile bağlı). */
.row-form { display: none; }

/* Kopyalama butonları tablo satırında: hücre sabit kalır, butonlar sarar. */
.settings-table.has-copy .col-tools { width: 118px; }
.has-copy .row-tools { flex-wrap: wrap; }
