/* ============================================================
   PRESTİJ TEDARİK V4 - Premium Design System
   Pixel-perfect, symmetric, modern dark theme
   ============================================================ */

:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --info: #74B9FF;

    --bg-dark: #0B0B14;
    --bg-body: #0F0F1A;
    --bg-card: #16162B;
    --bg-card-hover: #1E1E38;
    --bg-input: #121225;
    --bg-elevated: #1A1A30;
    --border: #252545;
    --border-light: #2D2D50;
    --border-focus: #6C5CE7;

    --text-primary: #E8E8F5;
    --text-secondary: #9090B0;
    --text-muted: #5C5C80;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 24px rgba(108, 92, 231, 0.15);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: rgba(9, 9, 18, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(108,92,231,0.12), 0 4px 24px rgba(0,0,0,0.2);
}
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.4) 30%, rgba(0,206,201,0.3) 70%, transparent);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}
.navbar-brand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}
.navbar-brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; color: #fff;
    box-shadow: 0 4px 12px rgba(108,92,231,0.35);
    flex-shrink: 0;
}
.navbar-brand span {
    background: linear-gradient(135deg, #fff 40%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}
.navbar-nav-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 14px;
    margin-right: 8px;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.nav-link {
    color: #6b7280;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    position: relative;
    white-space: nowrap;
}
.nav-link i { font-size: 0.8rem; }
.nav-link:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.05);
}
.nav-link.active {
    color: var(--primary-light);
    background: rgba(108,92,231,0.08);
}
.cart-link { position: relative; }
.cart-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1px;
    right: 2px;
    line-height: 1;
    border: 2px solid rgba(9,9,18,0.92);
}
.cart-badge:empty, .cart-badge[data-count="0"] { display: none; }
.balance-badge {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 6px;
    font-weight: 700;
    border: 1px solid rgba(0, 184, 148, 0.18);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #0e0e1c;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    min-width: 210px;
    padding: 6px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(108,92,231,0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #6b7280;
    border-radius: 8px;
    font-size: 0.84rem;
}
.dropdown-menu a:hover { background: rgba(255,255,255,0.04); color: #e2e8f0; }
.dropdown-menu hr { border: none; border-top: 1px solid rgba(255,255,255,0.05); margin: 5px 0; }

/* User Dropdown - Premium Design */
.ud-trigger { gap: 8px !important; padding: 6px 10px !important; }
.ud-avatar {
    width: 28px; height: 28px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: 0.72rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}
.ud-username { font-size: 0.84rem; font-weight: 600; color: #cbd5e1; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-arrow { font-size: 0.55rem !important; color: #4b5563; transition: all 0.2s ease; margin-left: 2px; }
.nav-dropdown:hover .ud-arrow { transform: rotate(180deg); color: #9ca3af; }
.ud-menu { min-width: 268px !important; padding: 0 !important; overflow: hidden; border-radius: 16px !important; }
.ud-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(108,92,231,0.06), rgba(0,206,201,0.03));
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}
.ud-header-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: 0.9rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}
.ud-header-info { flex: 1; min-width: 0; }
.ud-header-name { font-size: 0.88rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-header-email { font-size: 0.72rem; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ud-role-badge {
    position: absolute; top: 10px; right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-size: 0.58rem; font-weight: 800;
    padding: 2px 8px; border-radius: 6px; text-transform: uppercase;
    letter-spacing: 0.6px;
}
.ud-balance {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; margin: 6px 8px;
    background: rgba(0,184,148,0.05); border: 1px solid rgba(0,184,148,0.1);
    border-radius: 9px;
}
.ud-balance-label { font-size: 0.75rem; color: #4b5563; display: flex; align-items: center; gap: 6px; }
.ud-balance-label i { color: var(--success); font-size: 0.78rem; }
.ud-balance-value { font-size: 0.88rem; font-weight: 800; color: var(--success); }
.ud-section { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.ud-section:last-child { border-bottom: none; }
.ud-section a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; color: #6b7280;
    border-radius: 7px; font-size: 0.82rem;
    transition: all 0.18s ease; font-weight: 500;
}
.ud-section a:hover { background: rgba(255,255,255,0.04); color: #e2e8f0; }
.ud-section a i { width: 15px; text-align: center; font-size: 0.78rem; color: #374151; transition: color 0.18s; }
.ud-section a:hover i { color: var(--primary-light); }
.ud-section-logout { padding: 6px 8px; }
.ud-logout {
    color: #f87171 !important; font-weight: 600 !important;
    justify-content: center; background: rgba(244,63,94,0.05);
    border: 1px solid rgba(244,63,94,0.1); border-radius: 9px !important;
}
.ud-logout:hover { background: rgba(244,63,94,0.1) !important; color: #fca5a5 !important; }
.ud-logout i { color: #f87171 !important; }

/* Notification Bell */
.notif-bell { position: relative; }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--danger); color: #fff;
    font-size: 0.58rem; font-weight: 800;
    min-width: 16px; height: 16px;
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    line-height: 1; border: 2px solid var(--bg-dark);
    animation: notifPulse 2s infinite;
}
@keyframes notifPulse { 0%,100%{box-shadow:0 0 0 0 rgba(225,112,85,0.4)} 50%{box-shadow:0 0 0 6px rgba(225,112,85,0)} }
.notif-menu { min-width: 340px !important; padding: 0 !important; max-height: 450px; overflow: hidden; }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    font-size: 0.9rem; font-weight: 700;
}
.notif-mark-all {
    background: none; border: none; color: var(--primary-light);
    font-size: 0.74rem; font-weight: 600; cursor: pointer; font-family: var(--font);
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item {
    display: flex; gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid var(--border); cursor: pointer;
    transition: var(--transition); text-decoration: none;
}
.notif-item:hover { background: var(--bg-card-hover); }
.notif-item.unread { background: rgba(108,92,231,0.03); }
.notif-item-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.8rem;
}
.notif-item-icon.success { background: rgba(0,184,148,0.12); color: var(--success); }
.notif-item-icon.danger { background: rgba(225,112,85,0.12); color: var(--danger); }
.notif-item-icon.info { background: rgba(116,185,255,0.12); color: var(--info); }
.notif-item-icon.warning { background: rgba(253,203,110,0.12); color: var(--warning); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-msg { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-time { font-size: 0.66rem; color: var(--text-muted); margin-top: 3px; }
.notif-empty { padding: 30px; text-align: center; color: var(--text-muted); font-size: 0.84rem; }
.navbar-toggle {
    display: none;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px;
    color: #9ca3af;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.navbar-toggle:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content { flex: 1; padding: 32px 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(108, 92, 231, 0.5); color: #fff; }
.btn-success { background: linear-gradient(135deg, var(--success), #00A085); color: #fff; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #D63031); color: #fff; }
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 1.5px solid rgba(108, 92, 231, 0.5);
}
.btn-outline:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); }
.btn-one-click {
    background: linear-gradient(135deg, #FF6B6B, #EE5A24);
    color: #fff;
    box-shadow: 0 4px 16px rgba(238, 90, 36, 0.35);
}
.btn-one-click:hover { box-shadow: 0 6px 24px rgba(238, 90, 36, 0.5); color: #fff; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { border-color: rgba(108, 92, 231, 0.3); box-shadow: var(--shadow-glow); }
.card-body { padding: 24px; }
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: rgba(108, 92, 231, 0.4);
    box-shadow: 0 12px 40px rgba(108, 92, 231, 0.12);
    transform: translateY(-4px);
}
.product-card .product-image {
    height: 160px;
    background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: var(--primary-light);
}
.product-card .product-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card .product-category {
    font-size: 0.72rem;
    color: var(--primary-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.product-card .product-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.product-card .product-desc { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 16px; flex: 1; line-height: 1.5; }
.product-card .product-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }
.product-card .product-price { font-size: 1.2rem; font-weight: 800; color: var(--success); }
.product-card .product-stock { font-size: 0.75rem; color: var(--text-muted); }
.product-card .product-stock.in-stock { color: var(--success); }
.product-card .product-stock.low-stock { color: var(--warning); }
.product-card .product-stock.out-of-stock { color: var(--danger); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239090B0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
textarea.form-control { resize: vertical; min-height: 100px; }
.form-text { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); }
th {
    background: var(--bg-card);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}
td { font-size: 0.88rem; }
tr:hover td { background: rgba(108, 92, 231, 0.03); }
tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-success { background: rgba(0, 184, 148, 0.12); color: var(--success); }
.badge-warning { background: rgba(253, 203, 110, 0.12); color: var(--warning); }
.badge-danger { background: rgba(225, 112, 85, 0.12); color: var(--danger); }
.badge-info { background: rgba(116, 185, 255, 0.12); color: var(--info); }
.badge-primary { background: rgba(108, 92, 231, 0.12); color: var(--primary-light); }

/* ============================================================
   STATS (Analytics)
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}
.stat-card:hover { border-color: rgba(108, 92, 231, 0.3); box-shadow: var(--shadow-glow); }
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}
.stat-card .stat-icon.purple { background: rgba(108, 92, 231, 0.12); color: var(--primary-light); }
.stat-card .stat-icon.green { background: rgba(0, 184, 148, 0.12); color: var(--success); }
.stat-card .stat-icon.orange { background: rgba(225, 112, 85, 0.12); color: var(--danger); }
.stat-card .stat-icon.blue { background: rgba(116, 185, 255, 0.12); color: var(--info); }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.stat-card .stat-change { font-size: 0.75rem; font-weight: 600; margin-top: 8px; }
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ============================================================
   CHART
   ============================================================ */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.chart-title { font-size: 1.05rem; font-weight: 700; }
.chart-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chart-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    text-decoration: none;
}
.chart-filter-btn.active,
.chart-filter-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
canvas { max-width: 100%; }

/* ============================================================
   CART
   ============================================================ */
.cart-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}
.cart-item:hover { border-color: rgba(108, 92, 231, 0.3); }
.cart-item-image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-light);
    flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; margin-bottom: 4px; font-size: 0.92rem; }
.cart-item-price { color: var(--success); font-weight: 700; font-size: 1rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card-hover);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-qty button:hover { border-color: var(--primary); }
.cart-item-qty span { font-weight: 700; min-width: 28px; text-align: center; }
.cart-item-remove {
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    background: none;
    border: none;
    font-size: 1rem;
}
.cart-item-remove:hover { color: var(--danger); }
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 88px;
}
.cart-summary h3 {
    font-size: 1.05rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.88rem; }
.cart-summary-row.total {
    font-size: 1.1rem;
    font-weight: 800;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 12px;
}
.cart-summary-row .discount { color: var(--success); }
.coupon-form { display: flex; gap: 8px; margin: 16px 0; }
.coupon-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.84rem;
}
.coupon-form input:focus { outline: none; border-color: var(--primary); }

/* ============================================================
   HERO (old fallback)
   ============================================================ */
.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ============================================================
   AUTH
   ============================================================ */
.auth-container { max-width: 440px; margin: 40px auto; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 40px;
}
.auth-card h2 { text-align: center; font-size: 1.4rem; margin-bottom: 28px; }
.auth-card h2 i { color: var(--primary); margin-right: 8px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.86rem; color: var(--text-secondary); }

/* ============================================================
   PROFILE / 2FA
   ============================================================ */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.profile-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 16px;
}
.profile-name { font-size: 1.1rem; font-weight: 700; }
.profile-role { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.profile-balance {
    background: var(--bg-card-hover);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 20px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--success);
}
.twofa-setup {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 24px;
}
.twofa-setup h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 1.05rem; }
.qr-container { text-align: center; padding: 20px; background: #fff; border-radius: var(--radius); display: inline-block; }
.backup-codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.backup-code {
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--warning);
    font-weight: 600;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease;
    font-size: 0.88rem;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
.toast-close { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }

@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(30px); } }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-header h2 { font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-header h2 i { color: var(--primary-light); font-size: 1.1rem; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3.5rem; margin-bottom: 20px; opacity: 0.3; }
.empty-state h3 { margin-bottom: 8px; color: var(--text-secondary); font-size: 1.1rem; }
.empty-state p { font-size: 0.9rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.88rem; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(0,184,148,0.08); border: 1px solid rgba(0,184,148,0.2); color: var(--success); }
.alert-danger { background: rgba(225,112,85,0.08); border: 1px solid rgba(225,112,85,0.2); color: var(--danger); }
.alert-warning { background: rgba(253,203,110,0.08); border: 1px solid rgba(253,203,110,0.2); color: var(--warning); }
.alert-info { background: rgba(116,185,255,0.08); border: 1px solid rgba(116,185,255,0.2); color: var(--info); }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner { width: 18px; height: 18px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   DATE RANGE
   ============================================================ */
.date-range { display: flex; align-items: center; gap: 10px; }
.date-range input[type="date"] {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.84rem;
}
.date-range input[type="date"]:focus { border-color: var(--primary); outline: none; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.admin-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}
.top-sellers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.top-seller-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}
.top-seller-item:hover { border-color: rgba(108, 92, 231, 0.3); }
.top-seller-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.top-seller-info { flex: 1; min-width: 0; }
.top-seller-name { font-weight: 600; font-size: 0.88rem; }
.top-seller-stat { font-size: 0.78rem; color: var(--text-muted); }
.top-seller-value { font-weight: 800; color: var(--success); font-size: 0.9rem; }

/* ============================================================
   ORDERS
   ============================================================ */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
}
.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-card-hover);
    cursor: pointer;
    transition: var(--transition);
}
.order-header:hover { background: var(--bg-elevated); }
.order-id { font-weight: 700; font-size: 0.92rem; }
.order-date { font-size: 0.8rem; color: var(--text-muted); }
.order-body { padding: 24px; display: none; }
.order-body.open { display: block; }
.order-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; }
.order-item:last-child { border-bottom: none; }
.digital-content {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.84rem;
    color: var(--warning);
    margin-top: 8px;
    word-break: break-all;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab {
    padding: 12px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-family: var(--font);
    margin-bottom: -1px;
}
.tab.active, .tab:hover { color: var(--primary-light); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 0;
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 48px 0 40px;
}
.footer-brand { max-width: 280px; }
.footer-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-brand-title i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-brand p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.footer-col h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.86rem;
    padding: 5px 0;
    transition: var(--transition);
}
.footer-col a:hover { color: var(--text-primary); padding-left: 4px; }
.footer-col a i { width: 18px; margin-right: 6px; font-size: 0.8rem; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.8rem; }
.footer-bottom-links a:hover { color: var(--text-primary); }

/* old footer compat */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 48px 0 40px;
}
.footer-grid h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-grid h4 i { margin-right: 6px; }
.footer-grid p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.footer-grid a {
    display: block;
    color: var(--text-muted);
    font-size: 0.86rem;
    padding: 5px 0;
    transition: var(--transition);
}
.footer-grid a:hover { color: var(--text-primary); padding-left: 4px; }
.footer-bottom-bar {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .navbar-menu { display: none; }
    .navbar-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        gap: 4px;
    }
    .navbar-toggle { display: block; }
    .hero h1 { font-size: 1.8rem; }
    .cart-container { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .backup-codes { grid-template-columns: repeat(2, 1fr); }
    .top-sellers { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 24px 20px; }
    .cart-item { flex-direction: column; text-align: center; }
    .cart-item-qty { justify-content: center; }
    .footer-main { gap: 24px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-light) !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }
