/* =============================================
   LoyaltyQR - Custom Styles
   ============================================= */

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --sidebar-width: 250px;
    --sidebar-bg: #1a1a2e;
    --topbar-height: 56px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background: #f8f9fc;
    color: #1a1a2e;
}

/* ─── HERO ─── */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #6c63ff 100%);
    padding-top: 80px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #1a1a2e 0%, #6c63ff 100%) !important;
}

.cta-section {
    background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
}

.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

/* ─── HERO QR DEMO ─── */
.hero-qr-demo { perspective: 800px; }
.qr-demo-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    transform: rotate3d(0.2, -1, 0, 8deg);
    max-width: 280px;
    margin: 0 auto;
}
.qr-demo-screen { text-align: center; }
.demo-qr-box {
    width: 120px;
    height: 120px;
    background: #f8f9fc;
    border-radius: 16px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── STEP CIRCLES ─── */
.step-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6c63ff, #4f46e5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(108,99,255,0.4);
}

/* ─── FEATURE CARDS ─── */
.feature-card {
    border-radius: 16px !important;
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1) !important;
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── SOFT BACKGROUNDS ─── */
.bg-primary-soft   { background: rgba(108, 99, 255, 0.12) !important; }
.bg-success-soft   { background: rgba(16, 185, 129, 0.12) !important; }
.bg-warning-soft   { background: rgba(245, 158, 11, 0.12) !important; }
.bg-danger-soft    { background: rgba(239, 68, 68, 0.12) !important; }
.bg-info-soft      { background: rgba(59, 130, 246, 0.12) !important; }
.bg-purple-soft    { background: rgba(168, 85, 247, 0.12) !important; }
.text-purple       { color: #a855f7 !important; }
.text-primary      { color: var(--primary) !important; }

/* ─── AUTH PAGES ─── */
.auth-page { background: #f8f9fc; }
.admin-logo-circle {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── DASHBOARD LAYOUT ─── */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.admin-sidebar { background: #0f0f1a; }

.sidebar-brand {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav {
    padding-top: 12px;
}

.nav-section-label {
    color: rgba(255,255,255,0.3);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 8px 12px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 2px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    text-decoration: none;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s;
}

.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-area {
    min-height: calc(100vh - var(--topbar-height));
}

/* ─── STAT CARDS ─── */
.stat-card {
    border-radius: 16px !important;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── QR CARDS ─── */
.qr-card {
    border-radius: 16px !important;
    transition: box-shadow 0.2s;
}
.qr-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important; }
.qr-display {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-display canvas,
.qr-display img { border-radius: 8px; }
.stat-mini { padding: 8px; background: #f8f9fc; border-radius: 10px; }

/* ─── TABLES ─── */
.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    border-bottom-width: 1px;
}
.table td { vertical-align: middle; }

/* ─── SCAN PAGE ─── */
.scan-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #6c63ff 100%);
}
.success-checkmark { animation: pop 0.4s cubic-bezier(0.175,0.885,0.32,1.275); }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.points-badge { padding: 16px; background: linear-gradient(135deg, #f0f0ff, #e8e6ff); border-radius: 16px; }
.avatar-circle {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-sm {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

/* ─── CAMPAIGN CARD ─── */
.campaign-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── API ENDPOINT ─── */
.api-endpoint { padding: 10px; background: #f8f9fc; border-radius: 8px; }

/* ─── TOAST ─── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}
.toast-msg {
    background: #1a1a2e;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
    font-size: 0.9rem;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .hero-section { text-align: center; }
    .hero-qr-demo { display: none; }
}

/* ─── SCROLLBAR ─── */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* ─── NAVBAR ─── */
.navbar { backdrop-filter: blur(10px); }
