:root {
    --bg: #0b1220;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-dark: #111827;
    --border: #dbe3ef;
    --text: #111827;
    --muted: #64748b;
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --accent: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 42%, #eef2f7 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-main { min-height: 68vh; padding-bottom: 48px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
    background: rgba(11, 18, 32, 0.88);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}
.brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: white;
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.brand strong { display: block; font-size: 1.05rem; }
.brand span { display: block; color: rgba(255,255,255,0.7); font-size: 0.88rem; }

.main-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.main-nav a {
    color: rgba(255,255,255,0.88);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.96rem;
    transition: 0.2s ease;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.nav-counter {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 0.8rem;
    padding: 0 6px;
    font-weight: 700;
}

.hero {
    padding: 56px 0 34px;
}
.hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(22, 163, 74, 0.22), transparent 25%), linear-gradient(135deg, #0b1220, #0f172a 55%, #1e293b 100%);
    color: white;
    border-radius: 36px;
    padding: 34px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.hero-copy .eyebrow { color: rgba(255,255,255,0.75); }
.hero-copy h1 {
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 0.98;
    margin: 8px 0 14px;
}
.hero-copy p {
    margin: 0;
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
    max-width: 60ch;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.metric {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 20px;
}
.metric strong { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.metric span { color: rgba(255,255,255,0.72); font-size: 0.92rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.2s ease;
}
.button:hover { transform: translateY(-1px); background: var(--primary-dark); }
.button.secondary { background: #fff; color: var(--text); }
.button.outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
}
.button.light {
    background: #eef2ff;
    color: var(--primary-dark);
}
.button.danger { background: var(--danger); }
.button-sm { padding: 10px 16px; font-size: 0.9rem; }
.button.full { width: 100%; }

.section { padding: 24px 0; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 22px;
}
.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.76rem;
    color: var(--primary);
    font-weight: 700;
}
.section-header h2, .page-heading h1 {
    margin: 6px 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.05;
}
.subtext, .section-header p { color: var(--muted); margin: 0; max-width: 64ch; }

.panel, .card, .auth-card, .checkout-layout, .admin-shell, .table-card, .summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.panel { padding: 26px; }
.page-heading { padding: 34px 0 14px; }

.filters {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr auto;
    gap: 14px;
    padding: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.field, input, select, textarea {
    width: 100%;
    font: inherit;
}
input, select, textarea {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08); }
textarea { min-height: 128px; resize: vertical; }
label { display: block; font-weight: 700; margin-bottom: 8px; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field-help { color: var(--muted); font-size: 0.88rem; margin-top: 7px; }

.grid-products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.product-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}
.product-card:hover { transform: translateY(-5px); }
.product-media {
    aspect-ratio: 4 / 3;
    background: #dbeafe;
    overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 18px; }
.product-meta { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.product-tag {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
}
.product-card h3 { margin: 10px 0 8px; font-size: 1.12rem; }
.product-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
}
.price {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
}
.stock { color: var(--muted); font-size: 0.88rem; }

.alert {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    font-weight: 600;
}
.alert.success { background: #ecfdf3; border-color: #a7f3d0; color: #065f46; }
.alert.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert.info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.auth-wrap {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 24px;
    padding: 30px 0;
    align-items: stretch;
}
.auth-card { padding: 28px; }
.auth-side {
    border-radius: 32px;
    padding: 32px;
    color: white;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 60%, #2563eb 100%);
    box-shadow: var(--shadow);
}
.auth-side ul { padding-left: 18px; margin: 18px 0 0; color: rgba(255,255,255,0.86); }
.auth-side li + li { margin-top: 10px; }

.cart-layout, .checkout-layout, .account-layout, .admin-layout { display: grid; gap: 24px; }
.cart-layout, .checkout-layout, .account-layout { grid-template-columns: 1.2fr 0.8fr; }
.checkout-layout, .account-layout, .summary-card, .table-card { overflow: hidden; }
.summary-card, .table-card { padding: 24px; }

.cart-item, .order-mini, .order-item-row {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 16px;
    padding: 14px 0;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child, .order-mini:last-child, .order-item-row:last-child { border-bottom: none; }
.cart-thumb {
    width: 92px;
    height: 72px;
    object-fit: cover;
    border-radius: 16px;
    background: #e2e8f0;
}
.qty-input { max-width: 92px; }
.empty-state {
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(255,255,255,0.52);
}

.summary-list { display: grid; gap: 12px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    color: var(--muted);
}
.summary-row.total { font-size: 1.2rem; font-weight: 800; color: var(--text); padding-top: 10px; border-top: 1px solid var(--border); }

.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}
th, td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
th { color: var(--muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.08em; }
td strong { display: block; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #e5e7eb;
    color: #111827;
}
.badge.primary { background: #dbeafe; color: #1d4ed8; }
.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.info { background: #e0f2fe; color: #075985; }
.badge.danger { background: #fee2e2; color: #991b1b; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.stat {
    padding: 20px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.stat span { color: var(--muted); display: block; margin-bottom: 10px; }
.stat strong { font-size: 1.8rem; }

.admin-shell {
    background: linear-gradient(180deg, #0b1220, #111827);
    color: white;
    padding: 26px;
    margin-bottom: 24px;
}
.admin-shell .subtext, .admin-shell .eyebrow { color: rgba(255,255,255,0.72); }
.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.admin-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 700;
}
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,0.18); }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.site-footer {
    background: #0b1220;
    color: rgba(255,255,255,0.78);
    padding: 34px 0;
    margin-top: 36px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 24px;
}
.site-footer strong, .site-footer h4 { color: #fff; margin: 0 0 10px; }
.site-footer p { margin: 0 0 8px; }

.muted { color: var(--muted); }
.spacer-top { margin-top: 20px; }
.text-right { text-align: right; }

@media (max-width: 980px) {
    .hero-card,
    .auth-wrap,
    .cart-layout,
    .checkout-layout,
    .account-layout,
    .filters,
    .stats-grid,
    .footer-grid,
    .grid-products {
        grid-template-columns: 1fr;
    }
    .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { flex-direction: column; align-items: start; }
    .main-nav { width: 100%; }
}

@media (max-width: 720px) {
    .container { width: min(100% - 22px, 1180px); }
    .hero-card, .panel, .auth-card, .summary-card, .table-card, .admin-shell { padding: 20px; border-radius: 24px; }
    .hero-metrics { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .cart-item, .order-mini, .order-item-row { grid-template-columns: 1fr; }
    .cart-thumb { width: 100%; height: 180px; }
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.86);
    font-size: 0.88rem;
    font-weight: 700;
}
.section-tight { padding-top: 10px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.info-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255,255,255,0.78);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}
.info-card:hover { transform: translateY(-4px); }
.info-card h3 {
    margin: 8px 0 10px;
    font-size: 1.15rem;
}
.info-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.text-link {
    display: inline-flex;
    margin-top: 16px;
    font-weight: 700;
    color: var(--primary-dark);
}
.cta-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 30px 32px;
    border-radius: 32px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #2563eb 100%);
    box-shadow: var(--shadow);
}
.cta-banner .eyebrow,
.cta-banner p {
    color: rgba(255,255,255,0.82);
}
.cta-banner h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}
.site-footer a { color: inherit; }

@media (max-width: 1100px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .cta-banner { flex-direction: column; align-items: start; }
}

@media (max-width: 720px) {
    .feature-grid { grid-template-columns: 1fr; }
    .cta-banner { padding: 22px; border-radius: 24px; }
}
