/* ===== MERONGA SERVER — GLOBAL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-base: #050a14;
    --bg-card: #0b1425;
    --bg-panel: #0d1b2e;
    --bg-hover: #111e33;
    --border: #1a2e4a;
    --border-bright: #1e3d6b;
    --neon: #00d4ff;
    --neon-dim: #0099bb;
    --neon-glow: rgba(0, 212, 255, 0.15);
    --accent: #3b82f6;
    --accent-bright: #60a5fa;
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --orange: #f97316;
    --purple: #8b5cf6;
    --text-primary: #e2e8f0;
    --text-secondary: #8ba3c1;
    --text-muted: #4a6380;
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-neon: 0 0 20px rgba(0,212,255,0.2), 0 4px 24px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-dim); }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

a { color: var(--neon); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-bright); }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(5, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--neon) !important;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(0,212,255,0.5);
}

.navbar-brand span { color: var(--text-primary); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    letter-spacing: 0.03em;
}
.nav-links a:hover { color: var(--neon); }

.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59,130,246,0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.45);
    color: white;
}

.btn-neon {
    background: transparent;
    color: var(--neon);
    border: 1px solid var(--neon);
    box-shadow: 0 0 15px rgba(0,212,255,0.15);
}
.btn-neon:hover {
    background: var(--neon);
    color: var(--bg-base);
    box-shadow: 0 0 25px rgba(0,212,255,0.4);
    transform: translateY(-1px);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.35);
}
.btn-whatsapp:hover {
    background: linear-gradient(135deg, #2eea72, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(37,211,102,0.5);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #dc2626);
    color: white;
}
.btn-danger:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-bright); color: var(--text-primary); }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s;
}
.card:hover { border-color: var(--border-bright); box-shadow: var(--shadow); }

.card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(59,130,246,0.12);
}
.card-featured:hover { box-shadow: 0 0 40px rgba(59,130,246,0.2); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-ready { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-kosong { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.badge-limited { background: rgba(245,158,11,0.12); color: var(--yellow); border: 1px solid rgba(245,158,11,0.25); }
.badge-featured { background: rgba(59,130,246,0.15); color: var(--accent-bright); border: 1px solid rgba(59,130,246,0.3); }
.badge-low { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.badge-medium { background: rgba(59,130,246,0.1); color: var(--accent-bright); border: 1px solid rgba(59,130,246,0.25); }
.badge-high { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.badge-premium { background: rgba(245,158,11,0.12); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }

/* ===== STATUS BADGES ===== */
.status-pending { background: rgba(245,158,11,0.12); color: var(--yellow); border: 1px solid rgba(245,158,11,0.25); }
.status-waiting { background: rgba(249,115,22,0.12); color: var(--orange); border: 1px solid rgba(249,115,22,0.25); }
.status-processing { background: rgba(59,130,246,0.12); color: var(--accent-bright); border: 1px solid rgba(59,130,246,0.25); }
.status-done { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.status-cancel { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.status-replace { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}
.form-control {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--bg-panel); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { border-bottom: 1px solid var(--border-bright); }
th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
td { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(26,46,74,0.6); }
tr:hover td { background: rgba(11,20,37,0.7); }
tr:last-child td { border-bottom: none; }

/* ===== ALERTS ===== */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border-left: 3px solid;
}
.alert-success { background: rgba(16,185,129,0.08); border-color: var(--green); color: #6ee7b7; }
.alert-danger { background: rgba(239,68,68,0.08); border-color: var(--red); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.08); border-color: var(--yellow); color: #fcd34d; }
.alert-info { background: rgba(59,130,246,0.08); border-color: var(--accent); color: var(--accent-bright); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1.5rem; }
.pagination .page-item .page-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: all 0.2s;
}
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: white; }
.pagination .page-item .page-link:hover { border-color: var(--accent); color: var(--accent-bright); }

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 86vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 5rem 2rem;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 60% 40%, rgba(0,212,255,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 20% 70%, rgba(59,130,246,0.08) 0%, transparent 55%),
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(26,46,74,0.3) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(26,46,74,0.3) 40px);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 620px; }
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.85;
}
.hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: white;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
.hero-title .highlight {
    background: linear-gradient(90deg, var(--neon), var(--accent-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.hero-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon);
}
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ===== SECTION ===== */
.section { padding: 5rem 2rem; }
.section-title {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 3rem; }

/* ===== PRODUCT CARDS ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.product-card:hover { border-color: var(--border-bright); transform: translateY(-4px); box-shadow: var(--shadow-neon); }
.product-card:hover::before { opacity: 1; }

.product-card-featured {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 30px rgba(59,130,246,0.1);
}
.product-card-featured::before { opacity: 0.5; background: linear-gradient(90deg, transparent, var(--neon), transparent); }

.product-cat { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.product-name { font-size: 1.3rem; color: white; margin-bottom: 0.4rem; }
.product-specs { font-family: var(--font-mono); font-size: 0.8rem; color: var(--neon); background: rgba(0,212,255,0.06); border: 1px solid rgba(0,212,255,0.15); padding: 0.6rem 0.8rem; border-radius: 6px; margin: 1rem 0; line-height: 1.8; }
.product-price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: white; margin: 1rem 0 0.3rem; }
.product-price span { font-size: 1rem; color: var(--text-secondary); font-weight: 400; }
.product-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

/* ===== ADMIN LAYOUT ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}
.admin-sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon);
    letter-spacing: 0.05em;
}
.admin-sidebar-brand span { color: var(--text-secondary); font-size: 0.7rem; display: block; font-family: var(--font-body); font-weight: 400; margin-top: 0.2rem; letter-spacing: 0.1em; text-transform: uppercase; }

.admin-nav { padding: 1rem 0; flex: 1; }
.admin-nav-label { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.15em; text-transform: uppercase; padding: 0.75rem 1.25rem 0.4rem; }
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    margin: 0.1rem 0;
}
.admin-nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); border-left-color: var(--border-bright); }
.admin-nav-item.active { color: var(--neon); background: rgba(0,212,255,0.06); border-left-color: var(--neon); }
.admin-nav-icon { font-size: 1rem; width: 18px; text-align: center; }

.admin-main { flex: 1; overflow-y: auto; }
.admin-topbar {
    height: 56px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}
.admin-topbar-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.admin-content { padding: 2rem; }

/* ===== STAT CARDS ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-bright); }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: white; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.stat-accent-neon .stat-value { color: var(--neon); }
.stat-accent-green .stat-value { color: var(--green); }
.stat-accent-yellow .stat-value { color: var(--yellow); }
.stat-accent-purple .stat-value { color: #a78bfa; }

/* ===== USER DASHBOARD ===== */
.user-layout { display: flex; min-height: 100vh; }
.user-sidebar {
    width: 240px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}
.user-main { flex: 1; }

/* ===== UTILITIES ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.text-neon { color: var(--neon); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-mono { font-family: var(--font-mono); }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; color: white; margin-bottom: 0.3rem; }
.page-header p { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .nav-links { display: none; }
    .hero { padding: 3rem 1rem; min-height: 70vh; }
    .hero-stats { gap: 1.5rem; }
    .section { padding: 3rem 1rem; }
    .product-grid { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-content { padding: 1rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .user-sidebar { display: none; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-neon {
    0%, 100% { box-shadow: 0 0 10px rgba(0,212,255,0.2); }
    50% { box-shadow: 0 0 25px rgba(0,212,255,0.5); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fade-up { animation: fadeUp 0.6s ease forwards; }
.animate-fade-up-2 { animation: fadeUp 0.6s 0.15s ease forwards; opacity: 0; }
.animate-fade-up-3 { animation: fadeUp 0.6s 0.3s ease forwards; opacity: 0; }
.animate-float { animation: float 4s ease-in-out infinite; }

/* ===== GLITCH DECORATION ===== */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}
