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

/* ═══════════════════════════════════════════════════════════
   ALXZY STORE — Premium Dark UI v2
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg:       #060608;
    --bg-card:  #0d0d14;
    --bg-card2: #13131e;
    --bg-glass: rgba(255,255,255,0.03);
    --border:   rgba(255,255,255,0.07);
    --border-hover: rgba(139,92,246,0.5);

    --primary:      #8b5cf6;
    --primary-d:    #7c3aed;
    --primary-light: rgba(139,92,246,0.12);
    --primary-glow:  rgba(139,92,246,0.35);

    --accent:       #06b6d4;
    --accent-light: rgba(6,182,212,0.1);
    --accent-glow:  rgba(6,182,212,0.25);

    --pink:         #ec4899;
    --pink-light:   rgba(236,72,153,0.12);

    --success:      #10b981;
    --success-light: rgba(16,185,129,0.1);
    --warning:      #f59e0b;
    --warning-light: rgba(245,158,11,0.1);
    --danger:       #ef4444;
    --danger-light:  rgba(239,68,68,0.1);

    --text:         #f1f5f9;
    --text-muted:   #94a3b8;
    --text-dim:     #475569;

    --radius:    14px;
    --radius-sm: 8px;
    --radius-xl: 22px;

    --shadow: 0 8px 32px rgba(0,0,0,0.5);
    --glow-p: 0 0 40px rgba(139,92,246,0.2);
    --glow-a: 0 0 40px rgba(6,182,212,0.15);

    --mono: 'JetBrains Mono', monospace;
    --font: 'Outfit', 'Inter', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Animated Mesh Background ──────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 10%, rgba(139,92,246,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 90%, rgba(6,182,212,0.08) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 0%, rgba(236,72,153,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: bgPulse 10s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0%   { opacity: 0.7; }
    100% { opacity: 1.0; }
}

/* ─── Floating Orbs ─────────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 8s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(30px) scale(1.05); }
}

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6,6,8,0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.04em;
    font-family: 'Outfit', sans-serif;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: var(--glow-p);
    animation: iconPulse 4s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(139,92,246,0.35); }
    50%       { box-shadow: 0 0 35px rgba(139,92,246,0.6); }
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }

.btn-nav {
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 0 24px var(--primary-glow);
    letter-spacing: -0.01em;
}
.btn-nav:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 32px var(--primary-glow); }

/* ─── Page Layout ───────────────────────────────────────── */
.page-wrap {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px 60px;
}

/* ─── Hero ───────────────────────────────────────────────── */
.page-header {
    text-align: center;
    padding: 72px 0 48px;
    position: relative;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1px solid rgba(139,92,246,0.2);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    animation: fadeSlideDown 0.6s ease both;
}

.page-title {
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    background: linear-gradient(135deg, #fff 0%, rgba(139,92,246,0.9) 40%, var(--accent) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
    animation: fadeSlideDown 0.6s 0.1s ease both;
}

.page-sub {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
    animation: fadeSlideDown 0.6s 0.2s ease both;
    font-weight: 400;
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Stats Bar ─────────────────────────────────────────── */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeSlideDown 0.6s 0.3s ease both;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 28px;
    text-align: center;
    min-width: 105px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--glow-p); }

.stat-num {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

/* ─── Tabs ──────────────────────────────────────────────── */
.tabs-wrap {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    animation: fadeSlideUp 0.5s 0.4s ease both;
}

.tab-btn {
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 7px;
}

.tab-btn:hover { color: var(--text); background: var(--bg-glass); }

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.tab-count {
    font-size: 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 7px;
    font-weight: 700;
}

/* ─── Products Grid ─────────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.tab-panel { animation: fadeSlideUp 0.35s ease both; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Product Card ──────────────────────────────────────── */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: cardIn 0.5s ease both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--pink));
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover::before { opacity: 1; }

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--glow-p);
    background: var(--bg-card2);
}

.product-card.selected {
    border-color: var(--primary);
    background: var(--bg-card2);
    box-shadow: 0 0 0 2px var(--primary-glow), var(--glow-p);
}

.product-card.selected::before { opacity: 1; }

.product-card-inner {
    padding: 24px;
}

/* row: badge + subtype pill side-by-side */
.product-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 6px;
    padding: 3px 10px;
}

/* auto-detect subtype pills */
.product-subtype-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 3px 9px;
    border: 1px solid transparent;
}

.product-subtype-private {
    color: #a78bfa;
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.25);
}
.product-subtype-public {
    color: var(--accent);
    background: var(--accent-light);
    border-color: rgba(6,182,212,0.25);
}
.product-subtype-shared {
    color: var(--warning);
    background: var(--warning-light);
    border-color: rgba(245,158,11,0.25);
}
.product-subtype-premium {
    color: var(--pink);
    background: var(--pink-light);
    border-color: rgba(236,72,153,0.25);
}
.product-subtype-starter {
    color: var(--success);
    background: var(--success-light);
    border-color: rgba(16,185,129,0.25);
}
.product-subtype-vip {
    color: #fbbf24;
    background: rgba(251,191,36,0.1);
    border-color: rgba(251,191,36,0.25);
}

.product-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.2;
}

.product-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.spec-item {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.spec-item:hover { border-color: rgba(139,92,246,0.2); }

.spec-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 6px;
    font-size: 11px;
    color: var(--primary);
    flex-shrink: 0;
}

.spec-val {
    color: var(--text);
    font-weight: 700;
    font-family: var(--mono);
    font-size: 11.5px;
}

.product-note {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--accent-light);
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 4px;
}

.product-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.product-price span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 3px;
}

.btn-order {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--font);
    box-shadow: 0 4px 16px var(--primary-glow);
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-order:active { transform: scale(0.97); }

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.6;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.empty-state p { font-size: 16px; margin-bottom: 8px; }
.empty-state .sub { font-size: 13px; opacity: 0.7; }

/* ─── Features Section ──────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 52px;
    margin-bottom: 60px;
    animation: fadeSlideUp 0.5s 0.5s ease both;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 26px 22px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.feature-card:hover::after { opacity: 1; }

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    background: var(--primary-light);
    border: 1px solid rgba(139,92,246,0.2);
}

.feature-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Payment & QRIS ────────────────────────────────────── */
.payment-container {
    max-width: 480px;
    margin: 0 auto;
    padding-top: 28px;
}

/* ─── Card ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: fadeSlideUp 0.4s ease both;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card2);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-body { padding: 22px; }

/* ─── Order Summary ─────────────────────────────────────── */
.order-summary { display: flex; flex-direction: column; gap: 8px; }

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bg-glass);
}

.order-summary-row:nth-child(odd) { background: transparent; }
.order-summary-row span:first-child { color: var(--text-muted); }

.order-summary-row.total {
    background: var(--primary-light);
    border: 1px solid rgba(139,92,246,0.2);
    font-weight: 700;
    margin-top: 4px;
}

/* ─── QRIS ──────────────────────────────────────────────── */
.qris-wrap {
    padding: 28px 22px;
    text-align: center;
}

.qris-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.qris-img {
    width: 220px;
    height: 220px;
    border-radius: var(--radius);
    border: 3px solid rgba(139,92,246,0.3);
    padding: 8px;
    background: #fff;
    display: block;
    margin: 0 auto 18px;
    box-shadow: var(--glow-p);
    animation: qrisPulse 3s ease-in-out infinite;
}

@keyframes qrisPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(139,92,246,0.2); }
    50%       { box-shadow: 0 0 40px rgba(139,92,246,0.45); }
}

.qris-amount {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.qris-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.countdown-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--warning-light);
    border: 1px solid rgba(245,158,11,0.25);
    color: var(--warning);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    font-family: var(--mono);
}

.countdown-wrap.danger {
    background: var(--danger-light);
    border-color: rgba(239,68,68,0.3);
    color: var(--danger);
}

.status-polling {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin: 12px 0;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulseDot 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
}

@keyframes pulseDot {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    70%  { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16,185,129,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ─── Form ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    padding: 11px 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder { color: var(--text-dim); }
.form-mono { font-family: var(--mono); font-size: 13px; }

.input-hint {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 5px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px var(--primary-glow); }

.btn-secondary {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }

.btn-danger {
    background: var(--danger-light);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 12.5px; }

/* ─── Modal ─────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -20px 80px rgba(0,0,0,0.6);
    animation: modalUp 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}

@media (min-width: 580px) {
    .modal-overlay { align-items: center; }
    .modal { border-radius: 24px; animation: modalScale 0.3s cubic-bezier(0.34,1.56,0.64,1) both; }
}

@keyframes modalUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes modalScale {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
    flex-shrink: 0;
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.modal-close {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover { color: var(--text); border-color: var(--border-hover); }

.modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-card2);
}

/* ─── Success Page ──────────────────────────────────────── */
.success-container {
    max-width: 520px;
    margin: 0 auto;
    padding-top: 32px;
}

.success-icon {
    font-size: 56px;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.server-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.server-info-item {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.server-info-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.server-info-value {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text);
}

/* ─── Renewal ───────────────────────────────────────────── */
.renewal-container {
    max-width: 640px;
    margin: 0 auto;
    padding-top: 28px;
}

.duration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.duration-option {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-option:hover { border-color: var(--border-hover); }

.duration-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 16px var(--primary-glow);
}

.duration-days {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.duration-label {
    font-size: 11px;
    color: var(--text-muted);
    margin: 3px 0;
}

.duration-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

/* ─── Admin styles ──────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 66px);
}

.admin-sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
    position: sticky;
    top: 66px;
    height: calc(100vh - 66px);
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    padding: 28px;
    min-width: 0;
}

.sidebar-section {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 14px 10px 6px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    user-select: none;
}

.sidebar-item:hover { color: var(--text); background: var(--bg-glass); }
.sidebar-item.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.sidebar-item i { width: 16px; text-align: center; }

/* Removed display: none for admin-section */

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.admin-section-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
}

.stat-card:hover { border-color: var(--border-hover); }

.stat-value {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

thead th {
    background: var(--bg-card2);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-glass); }
tbody td { padding: 12px 16px; vertical-align: middle; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-done, .badge-success { background: var(--success-light); color: var(--success); }
.badge-pending, .badge-deploying { background: var(--warning-light); color: var(--warning); }
.badge-failed, .badge-cancelled, .badge-expired { background: var(--danger-light); color: var(--danger); }

/* ─── Toast ─────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
    min-width: 240px;
    max-width: 380px;
}

.toast.success { border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.08); }
.toast.error   { border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.08); }
.toast.warning { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }

@keyframes toastIn {
    from { transform: translateX(40px) scale(0.9); opacity: 0; }
    to   { transform: translateX(0) scale(1); opacity: 1; }
}

/* ─── Footer ────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px;
    font-size: 12.5px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover { color: var(--accent); }

/* ─── Spinner ───────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Position helpers ──────────────────────────────────── */
.position-relative { position: relative; }
.text-muted        { color: var(--text-muted); }
.mt-8              { margin-top: 8px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 0 18px; }
    .page-wrap { padding: 0 18px 48px; }
    .products-grid { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-content { padding: 18px; }
    .server-info-grid { grid-template-columns: 1fr; }
    .toast-container { bottom: 16px; right: 16px; left: 16px; }
    .toast { min-width: unset; }
}

@media (max-width: 480px) {
    .page-title { font-size: 36px; }
    .stat-card { min-width: 80px; padding: 12px 16px; }
    .stats-bar { gap: 8px; }
    .features-grid { grid-template-columns: 1fr; }
    .duration-grid { grid-template-columns: repeat(3, 1fr); }
}
