:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-2: #1f2937;
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #f59e0b;
    --accent-2: #fb923c;
    --border: rgba(255,255,255,0.1);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #020617 0%, #111827 100%);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
    font: inherit;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(2,6,23,0.72);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 1.2rem; color: var(--muted); }
.topbar-actions { display: flex; gap: 0.8rem; align-items: center; }
.pill { background: rgba(255,255,255,0.08); padding: 0.55rem 0.8rem; border-radius: 999px; color: var(--muted); font-size: 0.9rem; }
.icon-btn, .add-btn, .checkout-btn, .btn {
    border: none; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease;
}
.icon-btn:hover, .add-btn:hover, .checkout-btn:hover, .btn:hover { transform: translateY(-1px); }
.icon-btn {
    background: var(--accent); color: #111827; border-radius: 999px; padding: 0.6rem 0.9rem; font-weight: 700;
}
main { padding: 1.5rem 2rem 3rem; }
.page-shell { min-height: 100vh; padding: 2rem; display: flex; align-items: center; justify-content: center; }
.page-shell.wide { align-items: flex-start; }
.auth-card, .card-panel, .panel, .hero-card, .card, .product-card, .mini-card, .deal-banner, .stat-card {
    background: rgba(17,24,39,0.85); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.22);
}
.auth-card { padding: 2rem; width: min(480px, 100%); }
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: center; padding: 3rem 0 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.26em; font-size: 0.75rem; color: var(--accent); font-weight: 700; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0.3rem 0 0.8rem; line-height: 1.1; }
.hero p { color: var(--muted); max-width: 640px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; margin: 1.3rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.8rem 1rem; border-radius: 999px; font-weight: 700; }
.btn-primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #111827; }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.hero-stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.hero-stats div { background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 14px; padding: 0.8rem 1rem; min-width: 120px; }
.hero-stats strong { display: block; font-size: 1rem; }
.hero-stats span { color: var(--muted); font-size: 0.8rem; }
.hero-card { padding: 1.6rem; }
.hero-card ul { padding-left: 1rem; color: var(--muted); line-height: 1.8; }
.section { padding: 2rem 0; }
.section-heading { margin-bottom: 1rem; }
.category-grid, .product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card, .product-card { padding: 1.1rem; }
.card h3, .product-card h3 { margin: 0.2rem 0; }
.card p, .product-card p, .mini-card p { color: var(--muted); line-height: 1.6; }
.search-box { margin-bottom: 1rem; }
.search-box input, .stacked-form input, .stacked-form select, .stacked-form textarea {
    width: 100%; padding: 0.8rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text); margin-bottom: 0.75rem;
}
.stacked-form textarea { border-radius: 16px; resize: vertical; }
.product-card { position: relative; }
.product-badge { display: inline-block; background: rgba(245,158,11,0.2); color: #fde68a; padding: 0.3rem 0.6rem; border-radius: 999px; font-size: 0.77rem; margin-bottom: 0.8rem; }
.product-meta { color: var(--muted); margin: 0.8rem 0; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.add-btn, .checkout-btn { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #111827; padding: 0.65rem 0.85rem; border-radius: 999px; font-weight: 700; }
.deal-banner { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 1.5rem; margin: 1rem 0 2rem; }
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1rem; align-items: start; }
.mini-card { padding: 1.2rem; }
.card-panel { width: min(1200px, 100%); padding: 1.5rem; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.header-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.panel { padding: 1.2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.card-panel > .panel { margin-bottom: 1rem; }
.stat-card { padding: 1rem; }
.stat-card h3 { font-size: 1.6rem; margin: 0 0 0.3rem; }
.stat-card p { color: var(--muted); margin: 0; }
.table-list { display: grid; gap: 0.8rem; }
.list-item { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.8rem; background: rgba(255,255,255,0.04); border-radius: 14px; }
.list-item p { color: var(--muted); margin: 0.2rem 0 0; }
.alert { background: rgba(245,158,11,0.16); color: #fde68a; padding: 0.8rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.muted { color: var(--muted); }
.cart-panel { position: fixed; top: 0; right: -420px; width: min(380px, 100%); height: 100vh; background: #020617; border-left: 1px solid var(--border); padding: 1.2rem; transition: right 0.25s ease; z-index: 20; display: flex; flex-direction: column; }
.cart-panel.show { right: 0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; }
.cart-header button { background: transparent; color: var(--text); border: none; font-size: 1.2rem; cursor: pointer; }
.cart-items { flex: 1; margin: 1rem 0; color: var(--muted); display: grid; gap: 0.7rem; align-content: start; overflow-y: auto; }
.cart-item { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.8rem; background: rgba(255,255,255,0.05); border-radius: 12px; }
.cart-item-info strong { color: var(--text); }
.cart-item-total { font-weight: 700; color: var(--text); white-space: nowrap; }
.cart-empty { margin: 0; }
.cart-error { background: rgba(248,113,113,0.16); color: #fecaca; padding: 0.6rem 0.8rem; border-radius: 12px; margin: 0.8rem 0 0; font-size: 0.9rem; }
.qty-control { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; }
.qty-btn { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.08); color: var(--text); cursor: pointer; line-height: 1; }
.qty-value { min-width: 1.4rem; text-align: center; color: var(--text); font-weight: 600; }
.link-btn { background: transparent; border: none; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 0.85rem; padding: 0 0 0 0.3rem; }
.qty-btn:disabled, .add-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.cart-footer { display: flex; flex-direction: column; gap: 0.8rem; }
.checkout-btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; width: 100%; }
.summary-rows { display: grid; gap: 0.45rem; margin-top: 1rem; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.summary-total { border-top: 1px solid var(--border); padding-top: 0.6rem; margin-top: 0.2rem; font-size: 1.05rem; }
.empty-state { text-align: center; padding: 2.5rem 1.2rem; }
.empty-state h2 { margin-top: 0; }
.empty-state .btn { margin-top: 0.8rem; }
.order-list { display: grid; gap: 1rem; }
.order-card { padding: 1.2rem; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.order-head h2 { margin: 0 0 0.2rem; }
.order-cell { display: flex; align-items: center; gap: 0.8rem; white-space: nowrap; }
.status-badge { background: rgba(245,158,11,0.2); color: #fde68a; padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.hidden { display: none !important; }
@media (max-width: 900px) {
    .hero, .about-grid, .dashboard-grid { grid-template-columns: 1fr; }
    .category-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    main, .page-shell { padding: 1rem; }
    .topbar { padding: 1rem; flex-wrap: wrap; gap: 0.8rem; }
    .nav-links { width: 100%; justify-content: space-between; }
    .category-grid, .product-grid, .stats-grid { grid-template-columns: 1fr; }
    .deal-banner, .page-header, .order-head { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}
