/* ============================================
   SaaS WiFi Voucher System - Global Style
   ============================================ */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e1b4b;
    --light-bg: #f8f9ff;
    --card-shadow: 0 4px 24px rgba(79,70,229,.10);
}

body {
    background: var(--light-bg);
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #374151;
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(160deg, #1e1b4b 0%, #312e81 100%);
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-brand {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1.5rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .92rem;
    transition: all .2s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left-color: #818cf8;
}
.sidebar-nav .nav-section {
    padding: .8rem 1.5rem .3rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.4);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .82rem;
    color: rgba(255,255,255,.5);
}

/* Main content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    padding: 0;
}

.topbar {
    background: #fff;
    padding: .9rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.page-body { padding: 2rem; }

/* Cards */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #ede9fe;
}

.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .85rem;
    color: #6b7280;
    margin-top: .3rem;
}

/* Status badge */
.badge-active   { background: #d1fae5; color: #065f46; border-radius: 8px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600; }
.badge-expired  { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600; }
.badge-new      { background: #ede9fe; color: #5b21b6; border-radius: 8px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600; }
.badge-used     { background: #e0f2fe; color: #075985; border-radius: 8px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600; }

/* Countdown */
.countdown-box {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-align: center;
}
.countdown-box .countdown-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.countdown-box .countdown-label {
    font-size: .8rem;
    opacity: .75;
    margin-top: .2rem;
}
.countdown-expired {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Voucher code display */
.voucher-code {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: .8rem 1.5rem;
    display: inline-block;
    color: var(--dark);
}

/* Table */
.table-custom {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.table-custom thead th {
    background: #f5f3ff;
    color: #5b21b6;
    font-weight: 600;
    font-size: .85rem;
    border-bottom: none;
    padding: 1rem 1.2rem;
}
.table-custom tbody td { padding: .85rem 1.2rem; vertical-align: middle; }
.table-custom tbody tr:last-child td { border-bottom: none; }

/* Buttons */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .6rem 1.4rem;
    font-weight: 600;
    transition: all .2s;
}
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; }

/* Form */
.form-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #ede9fe;
}

/* Hotspot login page */
.hotspot-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 50%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.hotspot-card {
    background: #fff;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    text-align: center;
}
.hotspot-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}
