/* ============================================================
   Steven-Systems Shop — Modern Storefront
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Dark Theme — Default */
    --bg:           #0a0d14;
    --bg-elev:      #11151f;
    --bg-card:      #161b29;
    --bg-hover:     #1c2233;
    --bg-input:     #0d1018;
    --bg-gradient:  radial-gradient(ellipse at top, #1a1530 0%, #0a0d14 50%);

    --border:        #1f2535;
    --border-strong: #2a3145;

    --text:        #e6e9ef;
    --text-soft:   #b1b8c5;
    --text-muted:  #6b7280;
    --text-dim:    #4a5060;

    --accent:        #a855f7;
    --accent-hover:  #c084fc;
    --accent-soft:   rgba(168, 85, 247, 0.10);
    --accent-border: rgba(168, 85, 247, 0.30);
    --accent2:       #ec4899;
    --accent-grad:   linear-gradient(135deg, #a855f7 0%, #ec4899 100%);

    --success:  #4ade80;
    --warning:  #fbbf24;
    --danger:   #ff6675;
    --info:     #60a5fa;

    --shadow-sm:  0 1px 2px rgba(0,0,0,0.25);
    --shadow:     0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg:  0 16px 48px rgba(0,0,0,0.55);
    --shadow-glow:0 0 32px rgba(168, 85, 247, 0.25);

    --r-sm: 6px;
    --r:    10px;
    --r-lg: 14px;
    --r-xl: 20px;

    color-scheme: dark;
}

[data-theme="light"] {
    --bg:           #f8f9fc;
    --bg-elev:      #ffffff;
    --bg-card:      #ffffff;
    --bg-hover:     #f1f3f9;
    --bg-input:     #ffffff;
    --bg-gradient:  radial-gradient(ellipse at top, #f5edff 0%, #f8f9fc 60%);

    --border:        #e6e8ee;
    --border-strong: #d0d4dd;

    --text:        #14171f;
    --text-soft:   #3f4658;
    --text-muted:  #6b7280;
    --text-dim:    #9aa1b2;

    --accent:        #7c3aed;
    --accent-hover:  #6d28d9;
    --accent-soft:   rgba(124, 58, 237, 0.08);
    --accent-border: rgba(124, 58, 237, 0.30);

    --shadow-sm:  0 1px 2px rgba(20, 30, 60, 0.04);
    --shadow:     0 4px 16px rgba(20, 30, 60, 0.08);
    --shadow-lg:  0 16px 48px rgba(20, 30, 60, 0.12);
    --shadow-glow:0 0 32px rgba(124, 58, 237, 0.20);

    color-scheme: light;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
    background: rgba(11, 14, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.85);
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; gap: 24px;
}
.topbar-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
.topbar-brand-icon {
    width: 32px; height: 32px;
    background: var(--accent-grad);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    box-shadow: var(--shadow-glow);
}
.topbar-nav {
    display: flex; align-items: center; gap: 4px;
    flex: 1;
}
.nav-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border-radius: var(--r-sm);
    font-size: 14px; font-weight: 500;
    color: var(--text-soft);
    transition: all 0.15s;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.topbar-end { display: flex; align-items: center; gap: 10px; }

.btn-icon {
    width: 36px; height: 36px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-soft);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline-block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.user-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 14px 4px 4px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: all 0.15s;
}
.user-chip:hover { background: var(--bg-hover); border-color: var(--accent-border); color: var(--text); }
.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text-soft); }

.btn-burger {
    display: none;
    flex-direction: column; gap: 4px;
    width: 36px; height: 36px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    align-items: center; justify-content: center;
}
.btn-burger span { width: 16px; height: 2px; background: var(--text-soft); border-radius: 2px; }

.cart-btn { position: relative; }
.cart-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    background: var(--accent-grad);
    color: #fff;
    border: 2px solid var(--bg);
    border-radius: 9px;
    font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.40);
}

/* Cart / Checkout */
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .cart-grid { grid-template-columns: 1fr; } }

.cart-line {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 16px; align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.cart-line:last-child { border-bottom: none; }
.cart-line .img {
    width: 80px; height: 80px;
    background: var(--bg-input);
    border-radius: var(--r-sm);
    overflow: hidden; flex-shrink: 0;
}
.cart-line .img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .img .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--text-dim); }
.cart-line .name { font-weight: 600; font-size: 15px; }
.cart-line .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.qty-control {
    display: inline-flex; align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
}
.qty-control button {
    background: transparent; border: none; color: var(--text-soft);
    width: 32px; height: 32px;
    cursor: pointer; font-size: 16px;
    transition: all 0.15s;
}
.qty-control button:hover { background: var(--bg-hover); color: var(--text); }
.qty-control input {
    width: 50px; height: 32px;
    background: transparent; border: 0; color: var(--text);
    text-align: center; font-size: 14px; font-weight: 600;
    -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-line .line-total { font-weight: 700; font-size: 15px; min-width: 90px; text-align: right; }
.cart-line .remove {
    background: none; border: none; color: var(--text-dim);
    width: 32px; height: 32px;
    border-radius: var(--r-sm); cursor: pointer; font-size: 16px;
    transition: all 0.15s;
}
.cart-line .remove:hover { background: rgba(255,102,117,0.08); color: var(--danger); }

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    position: sticky; top: 90px;
}
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cart-summary .row.total {
    border-top: 1px solid var(--border);
    margin-top: 10px; padding-top: 14px;
    font-size: 18px; font-weight: 800;
}
.cart-summary .row.total .v { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Payment Method Cards (Checkout) */
.payment-methods { display: grid; gap: 10px; }
.payment-method {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    transition: all 0.15s;
}
.payment-method:hover { border-color: var(--border-strong); }
.payment-method input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.payment-method .icon { font-size: 22px; }
.payment-method .label { font-weight: 600; }
.payment-method .desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.payment-method.selected { border-color: var(--accent); background: var(--accent-soft); }

/* Order Status Badges */
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.status-pending     { background: rgba(251,191,36,0.10);  color: var(--warning); border: 1px solid rgba(251,191,36,0.30); }
.status-processing  { background: rgba(96,165,250,0.10);  color: var(--info);    border: 1px solid rgba(96,165,250,0.30); }
.status-shipped     { background: rgba(168,85,247,0.10);  color: var(--accent);  border: 1px solid var(--accent-border); }
.status-delivered   { background: rgba(74,222,128,0.10);  color: var(--success); border: 1px solid rgba(74,222,128,0.30); }
.status-cancelled   { background: rgba(255,102,117,0.10); color: var(--danger);  border: 1px solid rgba(255,102,117,0.30); }
.pay-pending  { background: rgba(251,191,36,0.10); color: var(--warning); border: 1px solid rgba(251,191,36,0.30); }
.pay-paid     { background: rgba(74,222,128,0.10); color: var(--success); border: 1px solid rgba(74,222,128,0.30); }
.pay-failed   { background: rgba(255,102,117,0.10); color: var(--danger); border: 1px solid rgba(255,102,117,0.30); }
.pay-refunded { background: var(--bg-elev); color: var(--text-muted); border: 1px solid var(--border); }

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 40px 24px; }

.section-title {
    font-size: 24px; font-weight: 800; letter-spacing: -0.02em;
    margin-bottom: 22px;
}
.section-subtitle {
    font-size: 14px; color: var(--text-muted); margin-top: -16px; margin-bottom: 22px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    text-align: center;
    padding: 80px 24px 60px;
    max-width: 880px; margin: 0 auto;
    position: relative;
}
.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 60%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: clamp(15px, 1.5vw, 18px);
    color: var(--text-soft);
    max-width: 600px; margin: 0 auto 28px;
}
.hero-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--accent-grad);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.30);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(168, 85, 247, 0.50); color: #fff !important; }

.btn-ghost {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-soft);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }

.btn-danger { color: var(--danger) !important; border-color: rgba(255,102,117,0.30) !important; }
.btn-danger:hover { background: rgba(255,102,117,0.08) !important; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ============================================================
   Category Pills (Storefront-Filterzeile)
   ============================================================ */
.category-pills {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 30px;
}
.category-pill {
    padding: 8px 18px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px; font-weight: 500;
    color: var(--text-soft);
    transition: all 0.15s;
}
.category-pill:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }
.category-pill.active {
    background: var(--accent-grad);
    color: #fff;
    border-color: transparent;
}

/* ============================================================
   Product-Grid (Cards)
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all 0.22s;
    display: flex; flex-direction: column;
    color: inherit;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lg);
    color: inherit;
}
.product-card-image {
    aspect-ratio: 4/3;
    background: var(--bg-input);
    overflow: hidden;
    position: relative;
}
.product-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-card-image img { transform: scale(1.06); }
.product-card-image .placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    color: var(--text-dim);
    background: linear-gradient(135deg, var(--bg-input), var(--bg-card));
}
.product-card-body {
    padding: 18px 20px;
    flex: 1;
    display: flex; flex-direction: column;
}
.product-card-cat {
    font-size: 11px; font-weight: 600;
    color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.product-card-name {
    font-size: 16px; font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-card-desc {
    font-size: 13px; color: var(--text-muted);
    line-height: 1.5; margin-bottom: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}
.product-card-price {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
}
.price {
    font-size: 22px; font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.price-tax {
    font-size: 11px; color: var(--text-muted);
}
.featured-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--accent-grad);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.06em;
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   Product-Detail-Page
   ============================================================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}
.product-detail-image {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-image .placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 80px; color: var(--text-dim);
}
.product-detail-info { display: flex; flex-direction: column; gap: 14px; }
.product-detail-info h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.product-detail-info .cat-link {
    font-size: 12px; font-weight: 600;
    color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.product-detail-info .price {
    font-size: 40px; margin-top: 8px;
}
.product-detail-info .description {
    font-size: 15px; color: var(--text-soft);
    line-height: 1.7;
    white-space: pre-line;
    margin-top: 8px;
}
.product-detail-meta {
    margin-top: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: 13px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-value { font-weight: 600; }

/* ============================================================
   Forms & Cards (gemeinsam)
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.field-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.field-input, .field-textarea, .field-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s;
}
.field-input:focus, .field-textarea:focus, .field-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-textarea { resize: vertical; min-height: 100px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-stack { display: flex; flex-direction: column; gap: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.checkbox-row label { font-size: 14px; }

.auth-page {
    min-height: calc(100vh - 100px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px 36px;
    width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.auth-box h1 {
    font-size: 28px; font-weight: 800; letter-spacing: -0.01em;
    margin-bottom: 6px;
}
.auth-box .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.auth-box form { display: flex; flex-direction: column; gap: 14px; }
.auth-box .btn { margin-top: 6px; }
.auth-divider {
    display: flex; align-items: center; gap: 12px; margin: 20px 0 12px;
    color: var(--text-dim); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.alert-error {
    background: rgba(255, 102, 117, 0.10);
    border: 1px solid rgba(255, 102, 117, 0.30);
    color: var(--danger);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 13px;
}
.alert-success {
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.30);
    color: var(--success);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 13px;
}
.alert-info {
    background: rgba(96, 165, 250, 0.10);
    border: 1px solid rgba(96, 165, 250, 0.30);
    color: var(--info);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 13px;
}

/* ============================================================
   Admin Layout
   ============================================================ */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 70px); }
.admin-sidebar {
    background: var(--bg-elev);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
}
.admin-sidebar-title {
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.10em;
    padding: 8px 12px 12px;
}
.admin-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 2px;
    transition: all 0.15s;
}
.admin-nav-link:hover { background: var(--bg-hover); color: var(--text); }
.admin-nav-link.active { background: var(--accent-soft); color: var(--accent); }
.admin-content { padding: 32px 36px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.admin-header .subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   Tabellen (Admin)
   ============================================================ */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead tr { background: var(--bg-elev); }
th {
    padding: 14px 18px; text-align: left;
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
tbody tr { border-top: 1px solid var(--border); transition: background 0.15s; }
tbody tr:hover { background: var(--bg-hover); }
td { padding: 14px 18px; vertical-align: middle; }
.td-img {
    width: 44px; height: 44px;
    background: var(--bg-input);
    border-radius: var(--r-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.td-img img { width: 100%; height: 100%; object-fit: cover; }
.td-actions { white-space: nowrap; }
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-on  { background: rgba(74,222,128,0.12); color: var(--success); border: 1px solid rgba(74,222,128,0.30); }
.badge-off { background: var(--bg-elev); color: var(--text-muted); border: 1px solid var(--border); }
.badge-featured { background: var(--accent-grad); color: #fff; }

.no-results { padding: 50px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: fade-in 0.15s ease-out;
}
[data-theme="light"] .modal-backdrop { background: rgba(20, 30, 60, 0.30); }
.modal-backdrop.hidden { display: none; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    padding: 30px 32px;
    width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: pop-in 0.18s ease-out;
}
.modal h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 18px; }
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px;
    flex-wrap: wrap;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ============================================================
   Empty States
   ============================================================ */
.empty-state {
    padding: 80px 20px; text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-xl);
}
.empty-state .icon { font-size: 50px; margin-bottom: 14px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    padding: 36px 24px 24px;
    margin-top: 80px;
}
.footer-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px;
    font-size: 13px; color: var(--text-muted);
}

/* ============================================================
   Toast
   ============================================================ */
.toast-stack {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 250;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 360px;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-left-width: 4px;
    border-radius: var(--r);
    padding: 13px 16px;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    display: flex; align-items: center; gap: 10px;
    animation: toast-in 0.22s ease-out;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-info    { border-left-color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 900px) {
    .topbar-inner { padding: 12px 16px; gap: 12px; }
    .topbar-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        display: none;
    }
    .topbar-nav.mobile-open { display: flex; }
    .btn-burger { display: inline-flex; }
    .user-name { display: none; }

    .container { padding: 28px 16px; }
    .product-detail { grid-template-columns: 1fr; gap: 28px; }
    .product-detail-info h1 { font-size: 28px; }
    .product-detail-info .price { font-size: 30px; }
    .field-row { grid-template-columns: 1fr; }

    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: 16px; }
    .admin-content { padding: 24px 18px; }

    .toast-stack { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}
