/* ═══════════════════════════════════════════════════════════
   OzyConnect — Premium Theme System
   © 2025 OziyWeb — Tüm Hakları Saklıdır
   Dark + Light tema desteği · Electron-ready
   ═══════════════════════════════════════════════════════════ */

/* ─── FONTS ─────────────────────────────────────────────── */
@font-face { font-family: 'Gilroy'; font-weight: 200; src: url('../fonts/Gilroy-UltraLight.otf') format('opentype'); }
@font-face { font-family: 'Gilroy'; font-weight: 300; src: url('../fonts/Gilroy-Light.otf') format('opentype'); }
@font-face { font-family: 'Gilroy'; font-weight: 400; src: url('../fonts/subset-Gilroy-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Gilroy'; font-weight: 500; src: url('../fonts/subset-Gilroy-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Gilroy'; font-weight: 600; src: url('../fonts/subset-Gilroy-Semibold.woff2') format('woff2'); }
@font-face { font-family: 'Gilroy'; font-weight: 700; src: url('../fonts/subset-Gilroy-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Gilroy'; font-weight: 800; src: url('../fonts/Gilroy-Extrabold.otf') format('opentype'); }
@font-face { font-family: 'Gilroy'; font-weight: 900; src: url('../fonts/Gilroy-Black.otf') format('opentype'); }

@font-face {
    font-family: 'Font Awesome 5 Pro';
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/14126655f43628074be1976d86f13eae.eot');
    src: url('../fonts/14126655f43628074be1976d86f13eae.eot?#iefix') format('embedded-opentype'),
         url('../fonts/14126655f43628074be1976d86f13eae.woff2') format('woff2'),
         url('../fonts/14126655f43628074be1976d86f13eae.woff') format('woff'),
         url('../fonts/14126655f43628074be1976d86f13eae.ttf') format('truetype');
}

.fal { font-family: 'Font Awesome 5 Pro'; font-weight: 300; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ─── LIGHT THEME (Default) ─────────────────────────────── */
:root, [data-theme="light"] {
    --bg-body: #f0f2f5;
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: #f4f6f8;
    --bg-sidebar-active: linear-gradient(180deg, #0f63ea 0%, #1466ee 45%, #1b6ef7 100%);
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --bg-input: #f4f6f8;
    --bg-topbar: rgba(255,255,255,.85);
    --bg-dropdown: #ffffff;
    --bg-modal: #ffffff;
    --bg-table-hover: #f8fafc;
    --bg-table-stripe: #fafbfc;
    --bg-badge: #f1f5f9;
    --bg-code: #f1f5f9;

    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #1967F2;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --text-sidebar: #475569;
    --text-sidebar-active: #ffffff;
    --text-sidebar-heading: #94a3b8;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.08);
    --shadow-card: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.03);
    --shadow-sidebar: 2px 0 12px rgba(0,0,0,.04);
    --shadow-topbar: 0 1px 4px rgba(0,0,0,.04);
    --shadow-btn: 0 2px 8px rgba(25,103,242,.25);
    --shadow-stat: 0 4px 20px rgba(0,0,0,.04);

    --sidebar-width: 260px;
    --topbar-height: 64px;

    /* Accent Colors */
    --primary: #1967F2;
    --primary-light: #4B8AF5;
    --primary-dark: #0F52D4;
    --primary-bg: rgba(25,103,242,.08);
    --success: #10b981;
    --success-bg: rgba(16,185,129,.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245,158,11,.08);
    --danger: #ef4444;
    --danger-bg: rgba(239,68,68,.08);
    --info: #3b82f6;
    --info-bg: rgba(59,130,246,.08);
    --purple: #8b5cf6;
    --purple-bg: rgba(139,92,246,.08);
    --cyan: #06b6d4;
    --cyan-bg: rgba(6,182,212,.08);

    /* Marketplace */
    --mp-trendyol: #f27a1a;
    --mp-hepsiburada: #ff6000;
    --mp-n11: #7b2d96;
    --mp-amazon: #ff9900;

    /* Stat Card Gradients */
    --stat-1: linear-gradient(135deg, #1967F2 0%, #4B8AF5 100%);
    --stat-2: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --stat-3: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    --stat-4: linear-gradient(135deg, #1967F2 0%, #06b6d4 100%);

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transition */
    --transition: all .2s cubic-bezier(.4,0,.2,1);
    --transition-slow: all .35s cubic-bezier(.4,0,.2,1);
}

/* ─── DARK THEME ─────────────────────────────────────────── */
[data-theme="dark"] {
    --bg-body: #0c0e14;
    --bg-sidebar: #12141c;
    --bg-sidebar-hover: #1a1d2b;
    --bg-sidebar-active: linear-gradient(135deg, #1967F2 0%, #4B8AF5 100%);
    --bg-card: #161822;
    --bg-card-hover: #1c1f2e;
    --bg-input: #1a1d2b;
    --bg-topbar: rgba(18,20,28,.92);
    --bg-dropdown: #1a1d2b;
    --bg-modal: #1a1d2b;
    --bg-table-hover: #1a1d2b;
    --bg-table-stripe: #14161e;
    --bg-badge: #1e2235;
    --bg-code: #1a1d2b;

    --border: #262a3a;
    --border-light: #1e2235;
    --border-focus: #4B8AF5;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;
    --text-sidebar-heading: #4a5078;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.4);
    --shadow-card: 0 1px 4px rgba(0,0,0,.15), 0 4px 16px rgba(0,0,0,.1);
    --shadow-sidebar: 2px 0 20px rgba(0,0,0,.3);
    --shadow-topbar: 0 1px 8px rgba(0,0,0,.3);
    --shadow-btn: 0 2px 12px rgba(25,103,242,.3);
    --shadow-stat: 0 4px 24px rgba(0,0,0,.2);

    --primary-bg: rgba(25,103,242,.12);
    --success-bg: rgba(16,185,129,.12);
    --warning-bg: rgba(245,158,11,.12);
    --danger-bg: rgba(239,68,68,.12);
    --info-bg: rgba(59,130,246,.12);
    --purple-bg: rgba(139,92,246,.12);
    --cyan-bg: rgba(6,182,212,.12);
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Marketplace Logo Dark Mode Fix ─────────────────────── */
[data-theme="dark"] img[src*="/marketplaces/"] {
    background: #fff;
    border-radius: 6px;
    padding: 2px 4px;
}

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background .35s ease, color .35s ease;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

::selection { background: var(--primary); color: #fff; }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    box-shadow: var(--shadow-sidebar);
    transition: transform .3s cubic-bezier(.4,0,.2,1), var(--transition-slow);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Brand */
.sidebar-brand {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-brand .brand-icon {
    width: 42px; height: 42px;
    background: var(--stat-4);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 900; color: #fff;
    box-shadow: 0 4px 12px rgba(25,103,242,.35);
    flex-shrink: 0;
}
.sidebar-brand .brand-text h2 { font-size: 16px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.sidebar-brand .brand-text span { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* Nav Sections */
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section { margin-bottom: 4px; }
.nav-heading {
    padding: 12px 20px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-sidebar-heading);
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 1px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}
.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-primary);
}
.nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(25,103,242,.3);
}
.nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.sidebar-footer .user-avatar {
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    background: var(--stat-4);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.sidebar-footer .user-info { flex: 1; min-width: 0; }
.sidebar-footer .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .user-role { font-size: 11px; color: var(--text-muted); }

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s cubic-bezier(.4,0,.2,1);
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-topbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-topbar);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-left .page-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.topbar-left .page-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}
.topbar-btn:hover { background: var(--bg-sidebar-hover); color: var(--primary); border-color: var(--primary); }
.topbar-btn.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }

.hamburger { display: none; }

/* ─── PAGE CONTENT ───────────────────────────────────────── */
.page-content { flex: 1; padding: 24px 28px 40px; }

/* ─── STAT CARDS ─────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    box-shadow: var(--shadow-stat);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card:nth-child(1)::before { background: var(--stat-1); }
.stat-card:nth-child(2)::before { background: var(--stat-2); }
.stat-card:nth-child(3)::before { background: var(--stat-3); }
.stat-card:nth-child(4)::before { background: var(--stat-4); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-info { flex: 1; }
.stat-info h4 {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.stat-value { font-size: 28px; font-weight: 600; color: var(--text-primary); line-height: 1.1; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }
.stat-icon.danger { background: var(--danger-bg); color: var(--danger); }
.stat-icon.primary { background: var(--primary-bg); color: var(--primary); }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 22px; }
.card-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }

/* ─── GRID HELPERS ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 20px; }

/* ─── DATA TABLE ─────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    background: var(--bg-table-stripe);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.data-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-table-hover); }
.data-table tbody tr:nth-child(even) { background: var(--bg-table-stripe); }
.data-table tbody tr:nth-child(even):hover { background: var(--bg-table-hover); }

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-nowrap { white-space: nowrap; }
.fw-bold { font-weight: 700; color: var(--text-primary); }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-cyan { background: var(--cyan-bg); color: var(--cyan); }
.badge-secondary { background: var(--bg-badge); color: var(--text-muted); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}
.btn:active { transform: scale(.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: var(--shadow-btn);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(25,103,242,.4); color: #fff; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-sidebar-hover); color: var(--text-primary); border-color: var(--primary); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── FORMS ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-bg);
    background: var(--bg-card);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 16px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; font-weight: 500; }

/* ─── TOAST ──────────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideInRight .3s cubic-bezier(.4,0,.2,1);
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }

/* ─── FLASH MESSAGE ──────────────────────────────────────── */
.flash-message {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown .3s ease;
}
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,.2); }

/* ─── THEME TOGGLE ───────────────────────────────────────── */
.theme-toggle {
    position: relative;
    width: 44px; height: 24px;
    background: var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.theme-toggle::after {
    content: '☀️';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
[data-theme="dark"] .theme-toggle { background: var(--primary); }
[data-theme="dark"] .theme-toggle::after { transform: translateX(20px); content: '🌙'; }

/* ─── AUTH LAYOUT ────────────────────────────────────────── */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
}
.auth-layout::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(25,103,242,.1), transparent 70%);
    top: -150px; right: -100px;
    pointer-events: none;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 420px;
    max-width: 95vw;
    box-shadow: var(--shadow-lg);
}
.auth-card .brand { text-align: center; margin-bottom: 32px; }
.auth-card .brand .logo {
    width: 56px; height: 56px;
    background: var(--stat-4);
    border-radius: var(--radius-lg);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(25,103,242,.35);
}
.auth-card .brand h1 { font-size: 22px; font-weight: 600; color: var(--text-primary); }
.auth-card .brand p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

.animate-fadeIn { animation: fadeIn .4s ease; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-2, .grid-7-5 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .hamburger { display: flex; }
    .page-content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ─── SIDEBAR OVERLAY (mobile) ───────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.show { display: block; }

/* ─── SCROLLBAR (global) ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── PRODUCT TABS ───────────────────────────────────────── */
.product-tabs {
    display: flex;
    gap: 2px;
    padding: 0 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    overflow-x: auto;
}
.product-tabs::-webkit-scrollbar { height: 0; }
.product-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
    position: relative;
}
.product-tab:hover {
    color: var(--text-primary);
    background: var(--bg-sidebar-hover);
}
.product-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.product-tab .tab-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: var(--bg-badge);
    color: var(--text-muted);
    min-width: 20px;
    text-align: center;
}
.product-tab.active .tab-badge {
    background: var(--primary-bg);
    color: var(--primary);
}
.product-tab .mp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.product-tab .mp-dot.trendyol { background: var(--mp-trendyol); }
.product-tab .mp-dot.hepsiburada { background: var(--mp-hepsiburada); }
.product-tab .mp-dot.n11 { background: var(--mp-n11); }
.product-tab .mp-dot.amazon { background: var(--mp-amazon); }
.product-tab .mp-dot.system { background: var(--primary); }

.tab-content {
    display: none;
    animation: fadeIn .25s ease;
}
.tab-content.active { display: block; }

/* ─── BULK TOOLBAR ───────────────────────────────────────── */
.bulk-toolbar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--primary-bg);
    border: 1px solid rgba(25,103,242,.2);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    animation: fadeInDown .2s ease;
}
.bulk-toolbar.show { display: flex; }
.bulk-toolbar .bulk-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-right: 6px;
}
.bulk-toolbar .bulk-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}
.bulk-toolbar .bulk-clear {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}
.bulk-toolbar .bulk-clear:hover { color: var(--danger); background: var(--danger-bg); }

/* ─── TABLE CHECKBOX ─────────────────────────────────────── */
.row-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── PRODUCT IMAGE IN TABLE ─────────────────────────────── */
.product-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}
.product-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    z-index: 10;
    position: relative;
}
.product-thumb-empty {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 16px;
}

/* ─── SYNC BADGE ────────────────────────────────────────── */
.sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
}
.sync-badge.synced { background: var(--success-bg); color: var(--success); }
.sync-badge.not-synced { background: var(--bg-badge); color: var(--text-muted); }
.sync-badge.error { background: var(--danger-bg); color: var(--danger); }
.sync-badge .sync-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ─── MARKETPLACE INDICATOR ──────────────────────────────── */
.mp-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
}
.mp-indicator.trendyol { background: rgba(242,122,26,.12); color: var(--mp-trendyol); }
.mp-indicator.hepsiburada { background: rgba(255,96,0,.12); color: var(--mp-hepsiburada); }
.mp-indicator.n11 { background: rgba(123,45,150,.12); color: var(--mp-n11); }
.mp-indicator.amazon { background: rgba(255,153,0,.12); color: var(--mp-amazon); }

/* ─── IMAGE LIGHTBOX ─────────────────────────────────────── */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    cursor: pointer;
    animation: fadeIn .2s ease;
}
.lightbox-overlay.show { display: flex; }
.lightbox-img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 60px rgba(0,0,0,.5);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ─── IMAGE GALLERY (Form) ───────────────────────────────── */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.image-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}
.image-gallery-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-gallery-item .img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6) 100%);
    opacity: 0;
    transition: opacity .2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px;
    gap: 4px;
}
.image-gallery-item:hover .img-overlay { opacity: 1; }
.image-gallery-item .img-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 9px;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
}
.img-add-btn {
    aspect-ratio: 1;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
    font-size: 12px;
}
.img-add-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}
.img-add-btn .add-icon { font-size: 28px; font-weight: 300; line-height: 1; }

/* ─── FORM TABS ──────────────────────────────────────────── */
.form-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.form-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    font-family: inherit;
}
.form-tab:hover { color: var(--text-primary); }
.form-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ─── ATTRIBUTE TABLE ────────────────────────────────────── */
.attr-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.attr-row:last-child { border-bottom: none; }
.attr-name {
    width: 180px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.attr-value { flex: 1; }

/* ─── FORM HINT ──────────────────────────────────────────── */
.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── PAGINATION ─────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-link.disabled {
    opacity: .4;
    pointer-events: none;
}

/* ─── MANUAL SYNC BUTTON ────────────────────────────────── */
.btn-sync {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.btn-sync:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}
.btn-sync.syncing { pointer-events: none; opacity: .6; }
.btn-sync.syncing i { animation: spin .8s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn .15s ease;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 520px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInDown .2s ease;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ─── FLASH WARNING ──────────────────────────────────────── */
.flash-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,.2); }

/* ─── INFO BOX ───────────────────────────────────────────── */
.info-box {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-box.info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(59,130,246,.15); }
.info-box.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,.15); }

/* ─── PRINT ──────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar { display: none !important; }
    .main-content { margin: 0 !important; }
}
