/**
 * Hotel PMS - Premium Dark Dashboard Design System
 * Inspired by modern SaaS dashboards (M Super, etc.)
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --bg-body: #0b0d12;
    --bg-sidebar: #0d0f14;
    --bg-card: #12141a;
    --bg-card-hover: #171922;
    --bg-input: #0d0f14;
    --bg-elevated: #1a1d26;
    --bg-tooltip: #1e212b;

    --text-primary: #f0f1f5;
    --text-secondary: #8b8f9a;
    --text-tertiary: #5c5f6b;
    --text-muted: #4a4d57;

    --border: #1a1d26;
    --border-light: #15181f;
    --border-hover: #252a36;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.25);

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.25);
    --info: #0ea5e9;
    --info-glow: rgba(14, 165, 233, 0.25);
    --pink: #ec4899;
    --cyan: #06b6d4;
    --orange: #f97316;
    --purple: #8b5cf6;
    --teal: #14b8a6;

    --gradient-purple: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-teal: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --gradient-cyan: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    --gradient-orange: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    --gradient-dark: linear-gradient(135deg, #1a1d26 0%, #12141a 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
    --shadow-glow: 0 0 30px var(--accent-glow);
    --shadow-success: 0 0 20px var(--success-glow);
    --shadow-danger: 0 0 20px var(--danger-glow);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Mode Variables */
html[data-theme="light"] {
    --bg-body: #f3f4f6;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-input: #ffffff;
    --bg-elevated: #f3f4f6;
    --bg-tooltip: #1e212b;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --text-muted: #d1d5db;

    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --border-hover: #d1d5db;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px var(--border);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1), 0 0 0 1px var(--border);

    --gradient-dark: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
}

/* ============================================
   BASE RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    margin: 0;
    padding: 0;
}

/* ============================================
   APP LAYOUT
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-body);
}

/* ============================================
   SIDEBAR (Premium Compact Dark)
   ============================================ */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    overflow: hidden;
}

.sidebar-brand-icon:has(img) {
    background: transparent;
    box-shadow: none;
}

.sidebar-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.sidebar-brand-text span {
    color: var(--accent-light);
}

.student-badge {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary);
}

.student-badge .student-id {
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 100px; }

.nav-section { margin-bottom: 4px; }

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 12px 12px 6px;
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    transition: height var(--transition-spring);
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-link.active::before { height: 24px; }

.nav-link i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.nav-link:hover i, .nav-link.active i { opacity: 1; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    background: var(--bg-body);
    transition: margin-left var(--transition-base);
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 13, 18, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--accent-light); }

.breadcrumb-separator { opacity: 0.3; font-size: 10px; }

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.module-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent-light);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   CONTENT WRAPPER
   ============================================ */
.content-wrapper {
    padding: 28px;
    max-width: 1440px;
    margin: 0 auto;
    animation: pageEnter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

.page-date {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ============================================
   CARDS (Premium Dark)
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-card);
    opacity: 0.5;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.card-header h5, .card-header h6 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body { padding: 22px; }

.card-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.01);
}

/* Card entrance stagger */
.row > [class*="col-"] > .card,
.row > [class*="col-"] > .kpi-card,
.row > [class*="col-"] > .stats-card {
    animation: cardRise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.row > [class*="col-"]:nth-child(1) > .card { animation-delay: 0.05s; }
.row > [class*="col-"]:nth-child(2) > .card { animation-delay: 0.1s; }
.row > [class*="col-"]:nth-child(3) > .card { animation-delay: 0.15s; }
.row > [class*="col-"]:nth-child(4) > .card { animation-delay: 0.2s; }

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

/* ============================================
   GRADIENT KPI CARDS (Reference Style)
   ============================================ */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-purple);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.kpi-card:hover::after { opacity: 1; }

.kpi-card.gradient-purple {
    background: var(--gradient-purple);
    border: none;
    color: white;
}

.kpi-card.gradient-purple .kpi-label,
.kpi-card.gradient-purple .kpi-value { color: white; }

.kpi-card.gradient-teal {
    background: var(--gradient-teal);
    border: none;
    color: white;
}

.kpi-card.gradient-pink {
    background: var(--gradient-pink);
    border: none;
    color: white;
}

.kpi-card.gradient-cyan {
    background: var(--gradient-cyan);
    border: none;
    color: white;
}

.kpi-card.gradient-dark {
    background: var(--gradient-dark);
    border: 1px solid var(--border);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--bg-elevated);
    color: var(--accent);
    border: 1px solid var(--border);
}

.kpi-icon.blue { color: var(--info); background: rgba(14, 165, 233, 0.1); border-color: rgba(14, 165, 233, 0.2); }
.kpi-icon.green { color: var(--success); background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }
.kpi-icon.red { color: var(--danger); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }
.kpi-icon.purple { color: var(--purple); background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.2); }
.kpi-icon.amber { color: var(--warning); background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }
.kpi-icon.cyan { color: var(--cyan); background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.2); }
.kpi-icon.pink { color: var(--pink); background: rgba(236, 72, 153, 0.1); border-color: rgba(236, 72, 153, 0.2); }
.kpi-icon.navy { color: var(--accent-light); background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); }

.kpi-content { flex: 1; min-width: 0; }

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-sparkline {
    width: 80px;
    height: 40px;
    flex-shrink: 0;
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
}

.kpi-change.up {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.kpi-change.down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* ============================================
   STATS CARDS (Simple number cards)
   ============================================ */
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-align: center;
}

.stats-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stats-card .number {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1;
}

.stats-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before { opacity: 1; }

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

.btn-primary {
    background: var(--gradient-purple);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-info {
    background: var(--info);
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.btn-warning {
    background: var(--warning);
    color: var(--bg-body);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-light);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 0 1px var(--accent);
}

.form-control::placeholder { color: var(--text-muted); }

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

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%235c5f6b' d='M4.5 6.5l3.5 3.5 3.5-3.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
}

/* ============================================
   TABLES (Ultra Clean Reference Style)
   ============================================ */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 0;
}

.table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    background: var(--bg-card);
    font-size: 13px;
    vertical-align: middle;
}

.table tbody tr { background: var(--bg-card); }

.table tbody tr:hover td { background: var(--bg-elevated); }

.table tbody tr:last-child td { border-bottom: none; }

/* Table row stagger */
.table tbody tr {
    animation: rowFadeIn 0.4s ease both;
}

.table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.table tbody tr:nth-child(6)  { animation-delay: 0.12s; }
.table tbody tr:nth-child(7)  { animation-delay: 0.14s; }
.table tbody tr:nth-child(8)  { animation-delay: 0.16s; }
.table tbody tr:nth-child(n+9) { animation-delay: 0.18s; }

@keyframes rowFadeIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Table overrides */
.table-bordered { border: none; }
.table-bordered th, .table-bordered td { border: none; border-bottom: 1px solid var(--border); }
.table-light th { background: var(--bg-elevated) !important; color: var(--text-tertiary) !important; }

/* Bootstrap table variants override */
.table-hover > tbody > tr:hover > * { background: var(--bg-elevated) !important; color: var(--text-primary) !important; }
.table-striped > tbody > tr:nth-of-type(odd) > td { background: var(--bg-card); }
.table-striped > tbody > tr:nth-of-type(even) > td { background: var(--bg-elevated); }
.table > :not(caption) > * > * { background: var(--bg-card); color: var(--text-primary); }

/* ============================================
   AVATARS (for tables)
   ============================================ */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 10px; }

.avatar-blue { background: var(--info); }
.avatar-green { background: var(--success); }
.avatar-red { background: var(--danger); }
.avatar-purple { background: var(--purple); }
.avatar-orange { background: var(--orange); }
.avatar-pink { background: var(--pink); }
.avatar-cyan { background: var(--cyan); }

.avatar + .avatar-name {
    margin-left: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   BADGES (Pill Style)
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    line-height: 1;
}

.badge.bg-primary, .badge-primary { background: rgba(99, 102, 241, 0.12) !important; color: var(--accent-light) !important; }
.badge.bg-success, .badge-success { background: rgba(16, 185, 129, 0.12) !important; color: var(--success) !important; }
.badge.bg-danger, .badge-danger { background: rgba(239, 68, 68, 0.12) !important; color: var(--danger) !important; }
.badge.bg-warning, .badge-warning { background: rgba(245, 158, 11, 0.12) !important; color: var(--warning) !important; }
.badge.bg-info, .badge-info { background: rgba(14, 165, 233, 0.12) !important; color: var(--info) !important; }
.badge.bg-secondary, .badge-secondary { background: rgba(255,255,255,0.06) !important; color: var(--text-secondary) !important; }

/* Status badges */
.badge-available, .badge-vacant { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.badge-occupied, .badge-checked_in { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.badge-pending, .badge-reserved { background: rgba(99, 102, 241, 0.12); color: var(--accent-light); }
.badge-cleaning { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.badge-maintenance { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.badge-cancelled, .badge-no_show { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.35s ease;
    border: 1px solid transparent;
    margin-bottom: 16px;
}

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

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.alert-info {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(12px);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 13px;
}

.modal-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(255,255,255,0.01);
}

.modal-sm { width: 440px; }
.modal-md { width: 540px; }
.modal-lg { width: 760px; }
.modal-xl { width: 960px; }

/* ============================================
   TOASTS
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 28px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 13px;
    animation: toastIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--warning); }

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

/* ============================================
   LIST GROUP
   ============================================ */
.list-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.list-group-item {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-primary);
    padding: 14px 20px;
    transition: all var(--transition-fast);
    font-size: 14px;
    border-width: 0 0 1px 0;
}

.list-group-item:last-child { border-bottom: none; }

.list-group-item:hover {
    background: rgba(255,255,255,0.02);
    color: var(--text-primary);
}

.list-group-item.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ============================================
   DROPDOWN
   ============================================ */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
    animation: scaleIn 0.2s ease;
}

.dropdown-menu.show { display: block !important; }

.dropdown-item {
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border);
    margin: 6px 0;
}

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

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    gap: 6px;
}

.page-item .page-link {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.page-item .page-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.page-item.disabled .page-link {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   NAV TABS
   ============================================ */
.nav-tabs {
    border-bottom: 1px solid var(--border);
    gap: 4px;
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    margin-bottom: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.nav-tabs .nav-link.active {
    background: var(--bg-card);
    color: var(--accent-light);
    border-bottom: 2px solid var(--accent);
}

.nav-pills .nav-link {
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
}

.nav-pills .nav-link:hover {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.nav-pills .nav-link.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

/* ============================================
   PROGRESS
   ============================================ */
.progress {
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-purple);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.bg-success { background: var(--gradient-teal); }
.progress-bar.bg-danger { background: var(--gradient-pink); }
.progress-bar.bg-warning { background: var(--gradient-orange); }

/* ============================================
   ACCORDION
   ============================================ */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 8px;
}

.accordion-button {
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 16px 20px;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion-button:not(.collapsed) { background: rgba(255,255,255,0.02); }
.accordion-button:focus { box-shadow: none; }

.accordion-body {
    padding: 0 20px 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
    background-clip: padding-box;
    border: 2px solid transparent;
}

/* ============================================
   FOCUS STATES
   ============================================ */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.page-link:focus-visible,
.accordion-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================
   POS TERMINAL
   ============================================ */
.pos-container {
    display: flex;
    height: calc(100vh - 64px);
    gap: 16px;
    padding: 20px;
}

.pos-catalog {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pos-cart {
    width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pos-venue-tabs {
    display: flex;
    gap: 6px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.pos-venue-tab {
    padding: 10px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.pos-venue-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.pos-venue-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.pos-categories {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.pos-category-pill {
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.pos-category-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.pos-category-pill.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-light);
    border-color: var(--accent);
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 14px;
    overflow-y: auto;
}

.pos-product-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.pos-product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.pos-search {
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.pos-search .input-group-text {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--text-tertiary);
}

.pos-cart-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.pos-cart-totals {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pos-total-row.grand {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
}

.pos-cart-actions {
    padding: 14px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.pos-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.pos-cart-item:last-child { border-bottom: none; }

.pos-cart-item-info { flex: 1; min-width: 0; }

.pos-cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.pos-cart-item-price {
    font-size: 11px;
    color: var(--text-tertiary);
}

.pos-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pos-qty-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pos-product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.pos-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-light);
}

.pos-product-card.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* POS wrapper override to remove content-wrapper padding */
.pos-wrapper {
    padding: 0 !important;
    max-width: none !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-slide-up { animation: slideUp 0.6s ease both; }
.animate-scale-in { animation: scaleIn 0.3s ease both; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Glow pulse for live indicators */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow); }
}

.glow-pulse { animation: glowPulse 2s ease-in-out infinite; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.04);
    max-width: 460px;
    width: 90%;
    animation: cardRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-logo i {
    font-size: 52px;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   MISC OVERRIDES
   ============================================ */
.text-muted { color: var(--text-secondary) !important; }
.text-primary { color: var(--accent-light) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-light { background: var(--bg-elevated) !important; }
.bg-white { background: var(--bg-card) !important; }
.bg-dark { background: var(--bg-sidebar) !important; }

.border { border-color: var(--border) !important; }
.border-top { border-top-color: var(--border) !important; }
.border-bottom { border-bottom-color: var(--border) !important; }

hr { border-color: var(--border); opacity: 0.5; }

pre, code {
    background: var(--bg-elevated);
    color: var(--accent-light);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-container-sm { height: 200px; }

/* ============================================
   LIGHT MODE SPECIFIC OVERRIDES
   ============================================ */
html[data-theme="light"] .sidebar-brand-text {
    color: #111827;
}

html[data-theme="light"] .topbar {
    background: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

html[data-theme="light"] .nav-section-title {
    color: #9ca3af;
}

html[data-theme="light"] .nav-link {
    color: #374151;
}

html[data-theme="light"] .nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

html[data-theme="light"] .nav-link.active {
    background: #f3f4f6;
    color: #111827;
}

html[data-theme="light"] .nav-link.active::before {
    background: var(--accent);
}

html[data-theme="light"] .student-badge {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

html[data-theme="light"] .table tbody tr:hover td {
    background: #f9fafb;
}

html[data-theme="light"] .list-group-item {
    color: #111827;
    border-color: #e5e7eb;
}

html[data-theme="light"] .list-group-item:hover {
    background: #f9fafb;
}

html[data-theme="light"] .alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

html[data-theme="light"] .alert-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

html[data-theme="light"] .alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

html[data-theme="light"] .alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

html[data-theme="light"] .modal-overlay {
    background: rgba(0,0,0,0.3);
}

html[data-theme="light"] .modal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
    border-color: var(--accent);
    background: #ffffff;
}

html[data-theme="light"] .dropdown-menu {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

html[data-theme="light"] .dropdown-item:hover {
    background: #f3f4f6;
}

/* Theme toggle button */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ============================================
   DASHBOARD SIMULATION CARDS
   ============================================ */
.sim-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.sim-section-title i {
    color: var(--accent);
    font-size: 14px;
}

.sim-title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.sim-card {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 100%;
}

.sim-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    border-color: transparent;
}

.sim-card-bg {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.sim-booking .sim-card-bg {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(99,102,241,0.03));
}

.sim-pos .sim-card-bg {
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.03));
}

.sim-inventory .sim-card-bg {
    background: linear-gradient(135deg, rgba(14,165,233,0.12), rgba(14,165,233,0.03));
}

.sim-card:hover .sim-card-bg { opacity: 1; }

.sim-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.03) 45%,
        rgba(255,255,255,0.06) 50%,
        rgba(255,255,255,0.03) 55%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.sim-card:hover .sim-card-shine {
    transform: translateX(100%);
}

.sim-card-content {
    position: relative;
    z-index: 2;
}

.sim-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.sim-booking .sim-icon-wrap {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(99,102,241,0.05));
    color: #818cf8;
    box-shadow: 0 4px 16px rgba(99,102,241,0.15);
}

.sim-pos .sim-icon-wrap {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
    color: #34d399;
    box-shadow: 0 4px 16px rgba(16,185,129,0.15);
}

.sim-inventory .sim-icon-wrap {
    background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(14,165,233,0.05));
    color: #38bdf8;
    box-shadow: 0 4px 16px rgba(14,165,233,0.15);
}

.sim-card:hover .sim-icon-wrap {
    transform: scale(1.1) rotate(-3deg);
}

.sim-card h5 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 8px;
    transition: color 0.2s ease;
}

.sim-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 20px;
    line-height: 1.5;
}

.sim-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sim-booking .sim-btn {
    background: rgba(99,102,241,0.1);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.15);
}

.sim-pos .sim-btn {
    background: rgba(16,185,129,0.1);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.15);
}

.sim-inventory .sim-btn {
    background: rgba(14,165,233,0.1);
    color: #38bdf8;
    border: 1px solid rgba(14,165,233,0.15);
}

.sim-card:hover .sim-btn {
    transform: translateX(4px);
}

.sim-booking:hover .sim-btn {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.3);
}

.sim-pos:hover .sim-btn {
    background: rgba(16,185,129,0.2);
    border-color: rgba(16,185,129,0.3);
}

.sim-inventory:hover .sim-btn {
    background: rgba(14,165,233,0.2);
    border-color: rgba(14,165,233,0.3);
}

/* ============================================
   SIMULATION CONTAINER & LOCK OVERLAYS
   ============================================ */
.sim-container-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.sim-container-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(90deg, rgba(99,102,241,0.04), transparent);
    border-bottom: 1px solid var(--border);
}

.sim-container-header .btn-outline {
    font-size: 12px;
    padding: 6px 14px;
}

.sim-card.locked {
    cursor: not-allowed;
    opacity: 0.65;
}

.sim-card.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.sim-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 13, 18, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    gap: 8px;
}

html[data-theme="light"] .sim-lock-overlay {
    background: rgba(240, 242, 247, 0.75);
}

.sim-lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 20px;
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

.sim-lock-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    padding: 0 16px;
}

.sim-meta {
    margin-bottom: 8px;
}

.sim-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.sim-status.unlocked {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.sim-status.locked {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ============================================
   UNIFIED TRAINING MODULE CARDS - ADVANCED TECH
   Scenarios + Simulations merged with holographic FX
   ============================================ */
.module-card {
    --mod-c1: #6366f1;
    --mod-c2: #818cf8;
    --mod-c1-rgb: 99, 102, 241;
    position: relative;
    border-radius: 18px;
    border: 1px solid var(--border-hover);
    background:
        linear-gradient(135deg, rgba(var(--mod-c1-rgb), 0.04), transparent 60%),
        var(--bg-card);
    box-shadow:
        0 4px 16px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.025),
        inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.5s ease,
                border-color 0.4s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    isolation: isolate;
}

.module-booking    { --mod-c1: #6366f1; --mod-c2: #818cf8; --mod-c1-rgb: 99, 102, 241; }
.module-pos        { --mod-c1: #10b981; --mod-c2: #34d399; --mod-c1-rgb: 16, 185, 129; }
.module-inventory  { --mod-c1: #0ea5e9; --mod-c2: #38bdf8; --mod-c1-rgb: 14, 165, 233; }

.module-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 28px 50px rgba(0,0,0,0.45),
        0 0 0 1px rgba(var(--mod-c1-rgb), 0.35),
        0 0 40px rgba(var(--mod-c1-rgb), 0.18);
    border-color: rgba(var(--mod-c1-rgb), 0.4);
}

/* ----- Holographic animated border ----- */
.module-holo-border {
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(var(--mod-c1-rgb), 0.6) 90deg,
        transparent 180deg,
        rgba(var(--mod-c1-rgb), 0.6) 270deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    animation: holoSpin 6s linear infinite;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s ease;
}

.module-card:hover .module-holo-border { opacity: 1; }
@keyframes holoSpin { to { transform: rotate(360deg); } }

/* ----- Scan line ----- */
.module-scanline {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--mod-c1-rgb), 0.8), transparent);
    transform: translateY(0);
    animation: scanMove 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    opacity: 0.6;
}
@keyframes scanMove {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(280px); opacity: 0.2; }
}

/* ----- Glow orb (top-right) ----- */
.module-glow-orb {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--mod-c1-rgb), 0.25), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
    animation: orbPulse 5s ease-in-out infinite;
}
@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.15); opacity: 1; }
}

/* ----- Lock overlay ----- */
.module-card.locked .module-scanline,
.module-card.locked .module-glow-orb { opacity: 0.15; animation: none; }
.module-card.locked:hover { transform: none; }

.module-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 13, 18, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-radius: 18px;
}

.module-lock-overlay .lock-icon-wrap {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--mod-c1-rgb), 0.2), rgba(var(--mod-c1-rgb), 0.05));
    border: 1px solid rgba(var(--mod-c1-rgb), 0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    color: rgba(var(--mod-c1-rgb), 0.9);
    box-shadow: 0 0 30px rgba(var(--mod-c1-rgb), 0.25);
}
.module-lock-overlay .lock-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ----- Meta row (level + status) ----- */
.module-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    position: relative;
    z-index: 3;
}

.module-level {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(var(--mod-c1-rgb), 0.95);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(var(--mod-c1-rgb), 0.1);
    border: 1px solid rgba(var(--mod-c1-rgb), 0.2);
}
.module-level i { font-size: 9px; }

.module-status {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-elevated);
}
.module-status .status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}
.status-mastered { color: #f59e0b; border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.08); }
.status-mastered .status-dot { animation: dotPulse 1.6s ease-in-out infinite; }
.status-progress { color: rgba(var(--mod-c1-rgb), 1); border-color: rgba(var(--mod-c1-rgb), 0.35); background: rgba(var(--mod-c1-rgb), 0.08); }
.status-progress .status-dot { animation: dotPulse 1.6s ease-in-out infinite; }
.status-idle     { color: var(--text-tertiary); }
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 4px currentColor; }
    50%      { box-shadow: 0 0 12px currentColor, 0 0 20px currentColor; }
}

/* ----- Icon with rotating ring ----- */
.module-icon-wrap {
    position: relative;
    width: 60px; height: 60px;
    margin-bottom: 14px;
    z-index: 3;
}

.module-icon-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px dashed rgba(var(--mod-c1-rgb), 0.4);
    animation: ringSpin 12s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.module-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--mod-c1), var(--mod-c2));
    box-shadow:
        0 8px 24px rgba(var(--mod-c1-rgb), 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}
.module-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.3), transparent 50%);
    pointer-events: none;
}

.module-card:hover .module-icon {
    transform: scale(1.08) rotate(-5deg);
}

.module-card h5 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 17px;
    margin: 0 0 6px;
    position: relative;
    z-index: 3;
}

.module-card p {
    color: var(--text-secondary);
    font-size: 12.5px;
    margin: 0 0 16px;
    line-height: 1.55;
    position: relative;
    z-index: 3;
}

/* ----- Stats grid ----- */
.module-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
    position: relative;
    z-index: 3;
}

.module-stat {
    text-align: center;
    padding: 10px 6px;
    border-radius: 10px;
    background: rgba(var(--mod-c1-rgb), 0.05);
    border: 1px solid rgba(var(--mod-c1-rgb), 0.1);
    transition: all 0.3s ease;
}

.module-card:hover .module-stat {
    background: rgba(var(--mod-c1-rgb), 0.09);
    border-color: rgba(var(--mod-c1-rgb), 0.2);
}

.module-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    font-feature-settings: 'tnum';
}

.module-stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-top: 3px;
}

/* ----- Progress bar with shimmer ----- */
.module-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    z-index: 3;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.module-progress-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--mod-c1), var(--mod-c2));
    transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(var(--mod-c1-rgb), 0.5);
}

.module-progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,0.5),
        transparent);
    animation: shimmer 2.2s ease-in-out infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ----- Primary CTA ----- */
.module-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #fff !important;
    background: linear-gradient(135deg, var(--mod-c1), var(--mod-c2));
    box-shadow:
        0 4px 14px rgba(var(--mod-c1-rgb), 0.35),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 3;
    margin-top: auto;
}
.module-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.module-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 24px rgba(var(--mod-c1-rgb), 0.5),
        inset 0 1px 0 rgba(255,255,255,0.25);
    color: #fff;
}
.module-cta:hover::before { transform: translateX(100%); }

.module-cta-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.module-cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    font-size: 11px;
}
.module-cta:hover .module-cta-arrow { transform: translateX(4px); background: rgba(255,255,255,0.3); }

.module-cta.disabled {
    background: var(--bg-elevated);
    color: var(--text-tertiary) !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    border: 1px solid var(--border);
}

/* ----- Sandbox secondary link ----- */
.module-sandbox-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-decoration: none;
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.25s ease;
    position: relative;
    z-index: 3;
}
.module-sandbox-link:hover {
    color: rgba(var(--mod-c1-rgb), 1);
    background: rgba(var(--mod-c1-rgb), 0.08);
}

/* ============================================
   CERTIFICATE BAR (compact footer)
   ============================================ */
.hub-cert-bar {
    position: relative;
    border-radius: var(--radius-lg);
    margin-top: 24px;
    padding: 20px 24px;
    overflow: hidden;
    border: 1px solid var(--border-hover);
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.hub-cert-bar.pending { opacity: 0.7; }

.hub-cert-bar-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.06), transparent 70%);
    pointer-events: none;
}

.hub-cert-bar.earned .hub-cert-bar-glow {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1), transparent 70%);
}

.hub-cert-bar-content {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.hub-cert-bar-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.hub-cert-bar.pending .hub-cert-bar-icon {
    background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(239,68,68,0.03));
    color: #ef4444;
    box-shadow: 0 4px 12px rgba(239,68,68,0.1);
}

.hub-cert-bar.earned .hub-cert-bar-icon {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
    color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245,158,11,0.15);
    animation: certGlow 3s ease-in-out infinite;
}

.hub-cert-bar-text { flex: 1; min-width: 200px; }

.hub-cert-bar-text h6 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 3px;
}

.hub-cert-bar-text p {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

.hub-cert-bar-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 160px;
}

.hub-cert-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hub-cert-bar-btn.earned {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0f172a;
    border: none;
}

.hub-cert-bar-btn.earned:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.3);
    color: #0f172a;
}

.hub-cert-bar-btn.disabled {
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    cursor: not-allowed;
    pointer-events: none;
    border: 1px solid var(--border);
}

.hub-cert-bar-number {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 500;
    font-family: monospace;
    letter-spacing: 0.05em;
}

.hub-cert-bar-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
}

.hub-cert-bar-track {
    width: 100%;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 100px;
    overflow: hidden;
}

.hub-cert-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 1s ease;
}

.hub-cert-bar-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .module-card { padding: 20px 18px 18px; }
    .module-card:hover { transform: translateY(-3px); }
    .module-icon-wrap, .module-icon { width: 52px; height: 52px; }
    .module-icon { font-size: 20px; border-radius: 14px; }
    .module-stats { gap: 6px; }
    .module-stat { padding: 8px 4px; }
    .module-stat-value { font-size: 13px; }
    .hub-cert-bar-content { flex-direction: column; text-align: center; }
    .hub-cert-bar-action { align-items: center; width: 100%; }
    .hub-cert-bar-progress { align-items: center; }
    .hub-cert-bar { padding: 18px 20px; }
}

/* ============================================
   SIDEBAR NAV LOCK ICONS
   ============================================ */
.nav-link.locked {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-link.locked:hover {
    background: transparent;
    color: var(--text-secondary);
}

.nav-lock {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-tertiary);
    opacity: 0.7;
}

.sidebar.collapsed .nav-link.locked { opacity: 0.45; }

/* ============================================
   SIDEBAR COLLAPSE / EXPAND
   ============================================ */
.sidebar-collapse-btn {
    position: absolute;
    top: 18px;
    right: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: 2px solid var(--bg-sidebar);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(99,102,241,0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.8);
}

.sidebar:hover .sidebar-collapse-btn,
.sidebar.collapsed .sidebar-collapse-btn {
    opacity: 1;
    transform: scale(1);
}

.sidebar-collapse-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(99,102,241,0.5);
}

.sidebar.collapsed .sidebar-collapse-btn {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-collapse-btn:hover {
    transform: rotate(180deg) scale(1.15);
}

/* Collapsed sidebar state */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px 16px;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .student-badge {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
    transition: opacity 0.15s ease;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .logout-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 8px;
    gap: 0;
}

.sidebar.collapsed .nav-link i {
    width: 24px;
    height: 24px;
    font-size: 16px;
    opacity: 0.8;
}

.sidebar.collapsed .nav-link.active i { opacity: 1; }

.sidebar.collapsed .nav-link::before { display: none; }

.sidebar.collapsed .nav-link.active {
    background: var(--gradient-purple);
    color: white;
}

.sidebar.collapsed .nav-link.active i { color: white; }

.sidebar.collapsed .nav-section { margin-bottom: 2px; }

.sidebar.collapsed .sidebar-nav { padding: 12px 8px; }

.sidebar.collapsed .sidebar-footer {
    padding: 10px 8px;
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .logout-link {
    justify-content: center;
    padding: 12px 8px;
    gap: 0;
}

.sidebar.collapsed .logout-link i { font-size: 16px; }

.sidebar.collapsed .nav-section-links { display: block !important; }

/* Main content adjusts with sidebar collapse */
.main-content {
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.sidebar-collapsed {
    margin-left: 72px;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link,
.sidebar.collapsed .logout-link {
    position: relative;
}

.sidebar.collapsed .nav-link::after,
.sidebar.collapsed .logout-link::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 2000;
}

.sidebar.collapsed .nav-link:hover::after,
.sidebar.collapsed .logout-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Nav section collapse/expand */
.nav-section-title {
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-section-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 0;
    transition: color 0.2s ease;
}
.nav-section-link:hover {
    color: var(--accent);
}
.nav-section-link .nav-lock {
    font-size: 9px;
    opacity: 0.6;
}

.nav-section-toggle {
    cursor: pointer;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.2s ease;
    color: var(--text-tertiary);
    font-size: 10px;
    margin-right: -4px;
}

.nav-section-toggle:hover {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.nav-section.collapsed .nav-section-toggle i {
    transform: rotate(-90deg);
}

.nav-section.collapsed .nav-section-links {
    display: none;
}

/* Light mode overrides for collapsed sidebar */
html[data-theme="light"] .sidebar.collapsed .nav-link.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

html[data-theme="light"] .sidebar.collapsed .nav-link::after,
html[data-theme="light"] .sidebar.collapsed .logout-link::after {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ============================================
   TRAINING HUB - ADVANCED TECH DESIGN
   ============================================ */
.training-hub {
    position: relative;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    transition: all 0.4s ease;
}

/* Animated gradient border glow */
.training-hub::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(16,185,129,0.3), rgba(14,165,233,0.4), rgba(236,72,153,0.3));
    background-size: 300% 300%;
    animation: techBorderGlow 8s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

@keyframes techBorderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scanline overlay */
.training-hub::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(99,102,241,0.03) 2px,
        rgba(99,102,241,0.03) 4px
    );
    pointer-events: none;
    z-index: 2;
    border-radius: var(--radius-xl);
}

/* Floating particles */
.tech-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    border-radius: var(--radius-xl);
}

.tech-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: techFloat 15s infinite ease-in-out;
    opacity: 0.6;
}

.tech-particle:nth-child(1) {
    left: 10%; top: 20%; animation-delay: 0s; animation-duration: 15s;
    background: #818cf8;
    box-shadow: 0 0 10px 2px rgba(99,102,241,0.5);
}
.tech-particle:nth-child(2) {
    left: 20%; top: 60%; animation-delay: -5s; animation-duration: 12s;
    background: #34d399;
    box-shadow: 0 0 10px 2px rgba(16,185,129,0.5);
}
.tech-particle:nth-child(3) {
    left: 70%; top: 30%; animation-delay: -8s; animation-duration: 18s;
    background: #38bdf8;
    box-shadow: 0 0 10px 2px rgba(14,165,233,0.5);
}
.tech-particle:nth-child(4) {
    left: 50%; top: 80%; animation-delay: -2s; animation-duration: 10s;
    background: #f472b6;
    box-shadow: 0 0 10px 2px rgba(236,72,153,0.5);
}

@keyframes techFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 0.7; }
    50% { transform: translateY(-10px) translateX(-10px); opacity: 0.5; }
    75% { transform: translateY(-30px) translateX(5px); opacity: 0.6; }
}

.training-hub-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(90deg, rgba(99,102,241,0.06), rgba(16,185,129,0.04), rgba(14,165,233,0.06));
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.training-hub-header:hover {
    background: linear-gradient(90deg, rgba(99,102,241,0.1), rgba(16,185,129,0.06), rgba(14,165,233,0.1));
}

.hub-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.hub-title i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(14,165,233,0.1));
    color: #818cf8;
    box-shadow: 0 0 20px rgba(99,102,241,0.15);
}

.hub-toggle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(14,165,233,0.08));
    border: 1px solid rgba(99,102,241,0.2);
    color: #818cf8;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.hub-toggle:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(14,165,233,0.15));
    color: white;
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 20px rgba(99,102,241,0.25);
    transform: scale(1.08);
}

.training-hub.collapsed .hub-toggle i {
    transform: rotate(-90deg);
}

.training-hub-body {
    position: relative;
    z-index: 3;
    padding: 28px;
    transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.4s ease;
    max-height: 3000px;
    opacity: 1;
    overflow: hidden;
}

.training-hub.collapsed .training-hub-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Light mode overrides for Training Hub */
html[data-theme="light"] .training-hub {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(255,255,255,0.5);
}

html[data-theme="light"] .training-hub::before {
    background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(16,185,129,0.4), rgba(14,165,233,0.5), rgba(236,72,153,0.4));
}

html[data-theme="light"] .training-hub::after {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(99,102,241,0.05) 2px,
        rgba(99,102,241,0.05) 4px
    );
}

html[data-theme="light"] .training-hub-header {
    background: linear-gradient(90deg, rgba(99,102,241,0.08), rgba(16,185,129,0.05), rgba(14,165,233,0.08));
    border-bottom-color: #e5e7eb;
}

/* ===== Light mode: Module cards (advanced tech, polished) ===== */
html[data-theme="light"] .module-card {
    background:
        linear-gradient(135deg, rgba(var(--mod-c1-rgb), 0.05), transparent 60%),
        #ffffff;
    border-color: rgba(var(--mod-c1-rgb), 0.18);
    box-shadow:
        0 4px 16px rgba(0,0,0,0.06),
        0 0 0 1px rgba(var(--mod-c1-rgb), 0.04),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

html[data-theme="light"] .module-card:hover {
    box-shadow:
        0 24px 50px rgba(0,0,0,0.12),
        0 0 0 1px rgba(var(--mod-c1-rgb), 0.4),
        0 0 40px rgba(var(--mod-c1-rgb), 0.18);
    border-color: rgba(var(--mod-c1-rgb), 0.5);
    transform: translateY(-8px);
}

html[data-theme="light"] .module-card.locked {
    opacity: 0.6;
    background: #f9fafb;
}

html[data-theme="light"] .module-lock-overlay {
    background: rgba(255, 255, 255, 0.85);
}
html[data-theme="light"] .module-lock-overlay .lock-icon-wrap {
    background: linear-gradient(135deg, rgba(var(--mod-c1-rgb), 0.15), rgba(var(--mod-c1-rgb), 0.04));
    border-color: rgba(var(--mod-c1-rgb), 0.25);
    color: rgba(var(--mod-c1-rgb), 1);
    box-shadow: 0 8px 24px rgba(var(--mod-c1-rgb), 0.18);
}
html[data-theme="light"] .module-lock-overlay .lock-text { color: #4b5563; }

html[data-theme="light"] .module-glow-orb {
    background: radial-gradient(circle, rgba(var(--mod-c1-rgb), 0.18), transparent 70%);
    filter: blur(24px);
}

html[data-theme="light"] .module-scanline {
    opacity: 0.4;
    background: linear-gradient(90deg, transparent, rgba(var(--mod-c1-rgb), 0.55), transparent);
}

html[data-theme="light"] .module-icon-ring {
    border-color: rgba(var(--mod-c1-rgb), 0.5);
}

html[data-theme="light"] .module-status {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #6b7280;
}
html[data-theme="light"] .status-mastered {
    color: #b45309;
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.3);
}
html[data-theme="light"] .status-progress {
    color: rgba(var(--mod-c1-rgb), 1);
    background: rgba(var(--mod-c1-rgb), 0.1);
    border-color: rgba(var(--mod-c1-rgb), 0.3);
}
html[data-theme="light"] .status-idle { color: #9ca3af; }

html[data-theme="light"] .module-progress-bar {
    background: #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

html[data-theme="light"] .module-stat {
    background: rgba(var(--mod-c1-rgb), 0.06);
    border-color: rgba(var(--mod-c1-rgb), 0.12);
}
html[data-theme="light"] .module-card:hover .module-stat {
    background: rgba(var(--mod-c1-rgb), 0.1);
    border-color: rgba(var(--mod-c1-rgb), 0.25);
}
html[data-theme="light"] .module-stat-value { color: #111827; }
html[data-theme="light"] .module-stat-label { color: #6b7280; }

html[data-theme="light"] .module-cta.disabled {
    background: #f3f4f6;
    color: #9ca3af !important;
    border-color: #e5e7eb;
}
html[data-theme="light"] .module-sandbox-link { color: #6b7280; }
html[data-theme="light"] .module-sandbox-link:hover {
    background: rgba(var(--mod-c1-rgb), 0.1);
    color: rgba(var(--mod-c1-rgb), 1);
}

/* Reduced motion: disable advanced module animations */
@media (prefers-reduced-motion: reduce) {
    .module-holo-border,
    .module-scanline,
    .module-glow-orb,
    .module-icon-ring,
    .module-progress-shimmer,
    .module-status .status-dot { animation: none !important; }
    .module-card,
    .module-card:hover,
    .module-icon,
    .module-cta { transition: none !important; transform: none !important; }
}

html[data-theme="light"] .hub-cert-bar {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

html[data-theme="light"] .hub-toggle {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(14,165,233,0.08));
    border-color: rgba(99,102,241,0.25);
    color: #6366f1;
}

html[data-theme="light"] .hub-toggle:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(14,165,233,0.15));
    color: #ffffff;
    border-color: rgba(99,102,241,0.4);
}

html[data-theme="light"] .hub-cert-bar-btn.earned {
    color: #1f2937;
}

html[data-theme="light"] .hub-cert-bar-btn.earned:hover {
    color: #1f2937;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); width: 260px !important; }
    .sidebar.active { transform: translateX(0); }
    .sidebar.collapsed { width: 260px !important; }
    .sidebar.collapsed .sidebar-brand-text,
    .sidebar.collapsed .student-badge,
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .nav-link span,
    .sidebar.collapsed .logout-link span { opacity: 1; width: auto; }
    .sidebar.collapsed .nav-link { justify-content: flex-start; padding: 10px 12px; }
    .sidebar.collapsed .nav-link i { width: 20px; height: 20px; font-size: 14px; }
    .sidebar.collapsed .nav-link::before { display: block; }
    .sidebar.collapsed .nav-link.active { background: var(--bg-card); color: var(--text-primary); }
    .sidebar.collapsed .nav-link.active i { color: inherit; }
    .sidebar.collapsed .sidebar-nav { padding: 12px 12px; }
    .sidebar.collapsed .sidebar-footer { padding: 12px; justify-content: flex-start; }
    .sidebar.collapsed .logout-link { justify-content: flex-start; padding: 10px 12px; }
    .sidebar-collapse-btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .main-content.sidebar-collapsed { margin-left: 0 !important; }
    .modal-overlay { left: 0; }
    .mobile-toggle { display: flex; }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(8px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    .sidebar-overlay.active { opacity: 1; visibility: visible; }
}

@media (max-width: 768px) {
    .content-wrapper { padding: 16px; }
    .page-title { font-size: 22px; }
    .card { border-radius: var(--radius-md); }
    .btn-lg { padding: 12px 24px; font-size: 14px; }
    .pos-container { flex-direction: column; height: auto; }
    .pos-cart { width: 100%; }
    .kpi-card { padding: 16px; }
    .kpi-value { font-size: 22px; }
    .sim-card { padding: 22px 18px; }
    .sim-card:hover { transform: translateY(-3px); }
    .sim-icon-wrap { width: 44px; height: 44px; font-size: 18px; }
    .sim-card h5 { font-size: 15px; }
    .sim-card p { font-size: 12px; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================
   WELCOME NOTIFICATION MODAL
   ============================================ */

/* Backdrop + centering wrapper — covers ENTIRE viewport from left:0, above sidebar */
.wn-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999; /* Above sidebar (1000) and everything else */
    display: none; /* Hidden by default, shown via inline style when modal is active */
    align-items: center;
    justify-content: center;
    animation: wnFadeIn 0.35s ease both;
    padding: 20px;
    margin: 0;
}

.wn-backdrop.wn-closing {
    animation: wnFadeOut 0.42s ease both;
    pointer-events: none;
}

@keyframes wnFadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes wnFadeOut { from { opacity:1; } to { opacity:0; } }

/* Modal container — sits inside the flex backdrop, perfectly centered, NO SCROLLBAR */
.wn-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: visible; /* NO scrollbar */
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px 32px 28px;
    z-index: 10000;
    text-align: center;
    box-shadow: 
        0 32px 80px rgba(0,0,0,0.7), 
        0 0 0 1px rgba(255,255,255,0.04),
        0 0 40px rgba(99,102,241,0.3);
    animation: wnPulseGlow 1.5s ease-in-out infinite !important;
    display: none; /* Hidden by default, shown via inline style when modal is active */
    transition: border-color 0.3s ease;
}

.wn-modal.wn-closing {
    animation: wnModalOut 0.4s cubic-bezier(0.4,0,0.2,1) both !important;
}

@keyframes wnModalIn {
    from { opacity:0; transform: translate(-50%, -50%) scale(0.88) translateY(20px); }
    to   { opacity:1; transform: translate(-50%, -50%) scale(1) translateY(0); }
}
@keyframes wnModalOut {
    from { opacity:1; transform: translate(-50%, -50%) scale(1) translateY(0); }
    to   { opacity:0; transform: translate(-50%, -50%) scale(0.92) translateY(12px); }
}

/* CRAZY Pulsing glow effect — INTENSE blinking with border pulse */
@keyframes wnPulseGlow {
    0% { 
        box-shadow: 
            0 32px 80px rgba(0,0,0,0.7), 
            0 0 0 1px rgba(255,255,255,0.04),
            0 0 40px rgba(99,102,241,0.4);
        border-color: rgba(99,102,241,0.3);
        filter: brightness(1);
        opacity: 0.9;
    }
    50% { 
        box-shadow: 
            0 32px 80px rgba(0,0,0,0.7), 
            0 0 0 4px rgba(99,102,241,0.9),
            0 0 100px rgba(99,102,241,1),
            0 0 80px rgba(99,102,241,1),
            0 0 150px rgba(99,102,241,0.8),
            0 0 200px rgba(99,102,241,0.6);
        border-color: rgba(99,102,241,1);
        filter: brightness(1.3);
        opacity: 1;
    }
    100% { 
        box-shadow: 
            0 32px 80px rgba(0,0,0,0.7), 
            0 0 0 1px rgba(255,255,255,0.04),
            0 0 40px rgba(99,102,241,0.4);
        border-color: rgba(99,102,241,0.3);
        filter: brightness(1);
        opacity: 0.9;
    }
}

/* Icon pulsing ring animation */
.wn-icon-ring {
    animation: wnRingPulse 3s ease-in-out infinite;
}
.wn-icon-ring-1 { animation-delay: 0s; }
.wn-icon-ring-2 { animation-delay: 0.5s; }

@keyframes wnRingPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.08); opacity: 0.9; }
}

/* Badge dot blinking */
.wn-badge-dot {
    animation: wnDotBlink 2s ease-in-out infinite;
}

@keyframes wnDotBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50%      { opacity: 0.3; box-shadow: 0 0 4px var(--accent); }
}

/* CTA button shimmer effect */
.wn-cta-btn {
    position: relative;
    overflow: hidden;
}

.wn-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: wnShimmer 3s ease-in-out infinite;
}

@keyframes wnShimmer {
    0%   { left: -100%; }
    50%, 100% { left: 100%; }
}

@media (max-width: 600px) {
    .wn-modal { 
        padding: 24px 18px 20px;
        width: 100%;
    }
    .wn-backdrop { padding: 12px; }
}

/* Animated background orbs with INTENSE pulsing */
.wn-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(40px);
    opacity: 0.8;
}
.wn-orb-1 {
    width: 220px; height: 220px;
    top: -80px; left: -60px;
    background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, transparent 70%);
    animation: wnOrb1 3s ease-in-out infinite alternate, wnOrbPulse1 1.2s ease-in-out infinite;
}
.wn-orb-2 {
    width: 180px; height: 180px;
    bottom: -60px; right: -40px;
    background: radial-gradient(circle, rgba(16,185,129,0.35) 0%, transparent 70%);
    animation: wnOrb2 3.5s ease-in-out infinite alternate, wnOrbPulse2 1.2s ease-in-out infinite;
    animation-delay: 0s, 0.4s;
}
.wn-orb-3 {
    width: 120px; height: 120px;
    top: 40%; left: 60%;
    background: radial-gradient(circle, rgba(245,158,11,0.3) 0%, transparent 70%);
    animation: wnOrb3 2.8s ease-in-out infinite alternate, wnOrbPulse3 1.2s ease-in-out infinite;
    animation-delay: 0s, 0.8s;
}
@keyframes wnOrb1 { from { transform:translate(0,0) scale(1); } to { transform:translate(25px,20px) scale(1.2); } }
@keyframes wnOrb2 { from { transform:translate(0,0) scale(1); } to { transform:translate(-20px,-25px) scale(1.25); } }
@keyframes wnOrb3 { from { transform:translate(0,0) scale(1); } to { transform:translate(-15px,15px) scale(1.15); } }

@keyframes wnOrbPulse1 {
    0%, 100% { opacity: 0.5; filter: blur(40px) brightness(1); }
    50% { opacity: 1; filter: blur(60px) brightness(1.5); }
}
@keyframes wnOrbPulse2 {
    0%, 100% { opacity: 0.4; filter: blur(40px) brightness(1); }
    50% { opacity: 0.95; filter: blur(65px) brightness(1.6); }
}
@keyframes wnOrbPulse3 {
    0%, 100% { opacity: 0.35; filter: blur(40px) brightness(1); }
    50% { opacity: 0.85; filter: blur(55px) brightness(1.4); }
}

/* Grid overlay with INTENSE pulse */
.wn-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    animation: wnGridPulse 1.5s ease-in-out infinite;
}

@keyframes wnGridPulse {
    0%, 100% { 
        opacity: 0.3; 
        background-image:
            linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    }
    50% { 
        opacity: 1; 
        background-image:
            linear-gradient(rgba(99,102,241,0.15) 1px, transparent 1px),
            linear-gradient(90deg, rgba(99,102,241,0.15) 1px, transparent 1px);
    }
}

/* Close button */
.wn-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 30px; height: 30px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 50%;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
    z-index: 1;
}
.wn-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* Icon with rings */
.wn-icon-wrap {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
}
.wn-icon-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(99,102,241,0.3);
    animation: wnRingPulse 2s ease-in-out infinite;
}
.wn-icon-ring-1 { width: 80px; height: 80px; animation-delay: 0s; }
.wn-icon-ring-2 { width: 100px; height: 100px; animation-delay: 0.3s; opacity: 0.5; }
@keyframes wnRingPulse {
    0%,100% { 
        transform: scale(1); 
        opacity: 0.3; 
        border-color: rgba(99,102,241,0.3);
    }
    50% { 
        transform: scale(1.15); 
        opacity: 1; 
        border-color: rgba(99,102,241,0.8);
        box-shadow: 0 0 20px rgba(99,102,241,0.6);
    }
}
.wn-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: var(--gradient-purple);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: white;
    box-shadow: 0 8px 24px rgba(99,102,241,0.45);
    position: relative; z-index: 1;
    animation: wnIconGlow 1.2s ease-in-out infinite, wnIconBounce 2s ease-in-out infinite;
}

@keyframes wnIconGlow {
    0%, 100% { 
        box-shadow: 0 8px 24px rgba(99,102,241,0.45);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 
            0 8px 40px rgba(99,102,241,0.9), 
            0 0 50px rgba(99,102,241,0.7),
            0 0 80px rgba(99,102,241,0.4);
        filter: brightness(1.3);
    }
}

@keyframes wnIconBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-4px) scale(1.05); }
}

/* Badge */
.wn-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
    animation: wnBadgePulse 1.2s ease-in-out infinite;
}

@keyframes wnBadgePulse {
    0%, 100% { 
        background: rgba(99,102,241,0.1);
        border-color: rgba(99,102,241,0.2);
        box-shadow: 0 0 0 rgba(99,102,241,0);
        transform: scale(1);
    }
    50% { 
        background: rgba(99,102,241,0.25);
        border-color: rgba(99,102,241,0.6);
        box-shadow: 0 0 30px rgba(99,102,241,0.5);
        transform: scale(1.03);
    }
}

/* Title */
.wn-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.2;
}
.wn-wave { display: inline-block; animation: wnWave 1.5s ease-in-out 0.8s 2; }
@keyframes wnWave {
    0%,100% { transform: rotate(0deg); }
    25%      { transform: rotate(20deg); }
    75%      { transform: rotate(-10deg); }
}

/* Subtitle */
.wn-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 22px;
    padding: 0 8px;
}

/* Feature grid (2x2) */
.wn-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.wn-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
    text-align: left;
    animation: wnFeaturePulse 1.2s ease-in-out infinite;
}
.wn-feature:nth-child(1) { animation-delay: 0s; }
.wn-feature:nth-child(2) { animation-delay: 0.15s; }
.wn-feature:nth-child(3) { animation-delay: 0.3s; }
.wn-feature:nth-child(4) { animation-delay: 0.45s; }

@keyframes wnFeaturePulse {
    0%, 100% { 
        border-color: var(--border);
        box-shadow: 0 0 0 rgba(99,102,241,0);
        transform: scale(1);
        background: var(--bg-elevated);
    }
    50% { 
        border-color: rgba(99,102,241,0.5);
        box-shadow: 0 0 25px rgba(99,102,241,0.4), inset 0 0 20px rgba(99,102,241,0.1);
        transform: scale(1.02);
        background: rgba(99,102,241,0.05);
    }
}

.wn-feature:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateY(-2px) scale(1.03);
    animation: none; /* Stop pulse on hover */
}
.wn-feature-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: var(--fb);
    color: var(--fc);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    animation: wnFeatureIconGlow 1.2s ease-in-out infinite;
}
.wn-feature:nth-child(1) .wn-feature-icon { animation-delay: 0s; }
.wn-feature:nth-child(2) .wn-feature-icon { animation-delay: 0.15s; }
.wn-feature:nth-child(3) .wn-feature-icon { animation-delay: 0.3s; }
.wn-feature:nth-child(4) .wn-feature-icon { animation-delay: 0.45s; }

@keyframes wnFeatureIconGlow {
    0%, 100% { 
        box-shadow: 0 0 0 rgba(99,102,241,0);
        transform: scale(1) rotate(0deg);
    }
    50% { 
        box-shadow: 0 0 20px var(--fc), 0 0 30px var(--fc);
        transform: scale(1.1) rotate(5deg);
    }
}

/* Steps row */
.wn-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.wn-step {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.wn-step strong { color: var(--text-primary); }
.wn-step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sc);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--sc);
    animation: wnStepDotBlink 1s ease-in-out infinite;
}
.wn-step:nth-child(1) .wn-step-dot { animation-delay: 0s; }
.wn-step:nth-child(3) .wn-step-dot { animation-delay: 0.2s; }
.wn-step:nth-child(5) .wn-step-dot { animation-delay: 0.4s; }
.wn-step:nth-child(7) .wn-step-dot { animation-delay: 0.6s; }

@keyframes wnStepDotBlink {
    0%, 100% { 
        box-shadow: 0 0 6px var(--sc);
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px var(--sc), 0 0 30px var(--sc), 0 0 40px var(--sc);
        opacity: 1;
        transform: scale(1.3);
    }
}
.wn-step-sep {
    width: 1px; height: 14px;
    background: var(--border);
    flex-shrink: 0;
}

/* Primary CTA button */
.wn-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-purple);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
    animation: wnCtaPulse 1.2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

@keyframes wnCtaPulse {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(99,102,241,0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 8px 36px rgba(99,102,241,0.8), 
            0 0 50px rgba(99,102,241,0.6),
            0 0 80px rgba(99,102,241,0.3);
        transform: scale(1.02);
    }
}

.wn-cta-btn:hover {
    box-shadow: 0 6px 24px rgba(99,102,241,0.55);
    transform: translateY(-1px) scale(1.02);
    color: white;
    animation: none; /* Stop pulse on hover */
}
.wn-cta-arrow { margin-left: auto; transition: transform var(--transition-fast); }
.wn-cta-btn:hover .wn-cta-arrow { transform: translateX(4px); }

/* Secondary row */
.wn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.wn-maybe {
    background: none; border: none;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}
.wn-maybe:hover { color: var(--text-primary); }
.wn-dont-show {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
    cursor: pointer;
    user-select: none;
}
.wn-dont-show input { cursor: pointer; accent-color: var(--accent); }
.wn-dont-show:hover { color: var(--text-secondary); }

/* Light mode overrides */
html[data-theme="light"] .wn-modal {
    background: #ffffff;
    box-shadow: 0 32px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
}
html[data-theme="light"] .wn-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

/* ============================================
   USER MANUAL — ADVANCED TECH DESIGN
   ============================================ */

/* placeholder — new styles appended below */


/* =============================================
   USER MANUAL — HERO HEADER
   ============================================= */
.um-page { padding-bottom: 60px; }

.um-hero {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 28px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Animated background */
.um-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.um-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}
.um-hero-orb-1 {
    width: 400px; height: 400px;
    top: -120px; left: -80px;
    background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 65%);
    animation: umOrb1 8s ease-in-out infinite alternate;
}
.um-hero-orb-2 {
    width: 300px; height: 300px;
    bottom: -80px; right: -60px;
    background: radial-gradient(circle, rgba(16,185,129,0.18) 0%, transparent 65%);
    animation: umOrb2 10s ease-in-out infinite alternate;
}
.um-hero-orb-3 {
    width: 200px; height: 200px;
    top: 30%; left: 55%;
    background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 65%);
    animation: umOrb3 6s ease-in-out infinite alternate;
}
@keyframes umOrb1 { from{transform:translate(0,0) scale(1);} to{transform:translate(30px,20px) scale(1.15);} }
@keyframes umOrb2 { from{transform:translate(0,0) scale(1);} to{transform:translate(-20px,-25px) scale(1.1);} }
@keyframes umOrb3 { from{transform:translate(0,0);} to{transform:translate(-15px,15px);} }

/* Dot grid */
.um-hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Scanline sweep */
.um-hero-scanline {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.06), transparent);
    animation: umScanline 4s linear infinite;
}
@keyframes umScanline { from{left:-60%;} to{left:110%;} }

/* Hero content */
.um-hero-content {
    position: relative;
    z-index: 1;
    padding: 48px 32px;
}

.um-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.um-hero-badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: umDotPulse 2s ease-in-out infinite;
}
@keyframes umDotPulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* Hero icon */
.um-hero-icon-wrap {
    position: relative;
    width: 88px; height: 88px;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
}
.um-hero-icon-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(99,102,241,0.2);
    animation: umRingPulse 3s ease-in-out infinite;
}
.um-hero-icon-ring-1 { width: 88px; height: 88px; }
.um-hero-icon-ring-2 { width: 112px; height: 112px; animation-delay: 0.6s; opacity: 0.5; }
@keyframes umRingPulse { 0%,100%{transform:scale(1);opacity:0.4;} 50%{transform:scale(1.06);opacity:0.9;} }

.um-hero-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: var(--gradient-purple);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: white;
    box-shadow: 0 8px 32px rgba(99,102,241,0.5);
    position: relative; z-index: 1;
}

.um-hero-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    margin-bottom: 10px;
    line-height: 1.1;
}

.um-hero-sub {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.um-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 20px;
    gap: 16px;
}
.um-hero-stat {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.um-hero-stat span {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-right: 4px;
}
.um-hero-stat-div {
    width: 1px; height: 16px;
    background: var(--border);
}

/* =============================================
   USER MANUAL — QUICK NAV
   ============================================= */
.um-quicknav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    position: sticky;
    top: 68px;
    z-index: 90;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.um-qn-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.um-qn-item i { font-size: 11px; }
.um-qn-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--text-primary);
}
.um-qn-item.active {
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.3);
    color: var(--accent-light);
}

/* =============================================
   USER MANUAL — SECTIONS
   ============================================= */
.um-section {
    margin-bottom: 40px;
    scroll-margin-top: 130px;
}

.um-section-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
    /* per-section color via CSS var */
    background: rgba(var(--sl-rgb, 99,102,241), 0.08);
    border-color: rgba(var(--sl-rgb, 99,102,241), 0.2);
    color: var(--sl, var(--accent-light));
}

.um-section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    line-height: 1.2;
}

.um-section-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* =============================================
   USER MANUAL — GRID LAYOUTS
   ============================================= */
.um-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.um-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* =============================================
   USER MANUAL — CARDS
   ============================================= */
.um-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}
.um-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.um-card-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--ca, var(--accent));
    opacity: 0;
    transition: opacity var(--transition-base);
}
.um-card:hover .um-card-accent { opacity: 1; }

.um-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.um-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}
.um-card-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    background: var(--cib, rgba(99,102,241,0.1));
    color: var(--ci, var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.04);
}
.um-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Tag row */
.um-tag-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.um-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--tb, rgba(99,102,241,0.1));
    border: 1px solid var(--tc, var(--accent));
    border-color: color-mix(in srgb, var(--tc, var(--accent)) 30%, transparent);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tc, var(--accent-light));
}

/* Inline tag */
.um-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(99,102,241,0.1);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tc, var(--accent-light));
}

/* =============================================
   USER MANUAL — FLOW DIAGRAM
   ============================================= */
.um-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.um-flow-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    transition: border-color var(--transition-fast);
}
.um-flow-item:hover { border-color: var(--border-hover); }
.um-flow-item strong { color: var(--text-primary); }
.um-flow-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--fn, var(--accent));
    color: white;
    font-size: 11px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px color-mix(in srgb, var(--fn, var(--accent)) 50%, transparent);
}
.um-flow-line {
    width: 2px;
    height: 14px;
    background: var(--border);
    margin-left: 24px;
}

/* =============================================
   USER MANUAL — CALLOUTS
   ============================================= */
.um-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid transparent;
}
.um-callout-icon {
    width: 28px; height: 28px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.um-callout div { color: var(--text-secondary); }
.um-callout div strong { color: var(--text-primary); }
.um-callout code {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    color: var(--accent-light);
}

.um-callout-info {
    background: rgba(14,165,233,0.07);
    border-color: rgba(14,165,233,0.18);
}
.um-callout-info .um-callout-icon { background: rgba(14,165,233,0.12); color: var(--info); }

.um-callout-warning {
    background: rgba(245,158,11,0.07);
    border-color: rgba(245,158,11,0.18);
}
.um-callout-warning .um-callout-icon { background: rgba(245,158,11,0.12); color: var(--warning); }

.um-callout-success {
    background: rgba(16,185,129,0.07);
    border-color: rgba(16,185,129,0.18);
}
.um-callout-success .um-callout-icon { background: rgba(16,185,129,0.12); color: var(--success); }

.um-callout-purple {
    background: rgba(99,102,241,0.07);
    border-color: rgba(99,102,241,0.18);
}
.um-callout-purple .um-callout-icon { background: rgba(99,102,241,0.12); color: var(--accent-light); }

/* =============================================
   USER MANUAL — MODULE BANNER
   ============================================= */
.um-module-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--mb1, #1a1d26), var(--mb2, #12141a));
    border: 1px solid var(--border);
    border-left: 3px solid var(--mba, var(--accent));
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 20px;
}
.um-module-banner-glow {
    position: absolute;
    top: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, var(--mbg, rgba(99,102,241,0.15)) 0%, transparent 70%);
    pointer-events: none;
}
.um-module-banner-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-md);
    background: var(--mbib, rgba(99,102,241,0.12));
    color: var(--mbi, var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.06);
}
.um-module-banner-text { flex: 1; min-width: 0; }
.um-module-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}
.um-module-banner-sub {
    font-size: 12px;
    color: var(--text-secondary);
}
.um-module-banner-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--mbb, var(--accent));
    border-color: color-mix(in srgb, var(--mbb, var(--accent)) 40%, transparent);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    color: var(--mbb, var(--accent-light));
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* =============================================
   USER MANUAL — FEATURE CARDS
   ============================================= */
.um-feature-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
    transition: all var(--transition-base);
}
.um-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--fca, var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}
.um-feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.um-feature-card:hover::before { transform: scaleX(1); }

.um-feature-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--fib, rgba(99,102,241,0.1));
    color: var(--fi, var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: box-shadow var(--transition-base);
}
.um-feature-card:hover .um-feature-icon {
    box-shadow: 0 0 16px color-mix(in srgb, var(--fi, var(--accent)) 40%, transparent);
}
.um-feature-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.um-feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Mini steps inside feature cards */
.um-steps-mini {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.um-step-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.um-step-mini span {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--accent-light);
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.um-step-mini strong { color: var(--text-primary); }

/* =============================================
   USER MANUAL — SCORE BARS
   ============================================= */
.um-score-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.um-score-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.um-score-bar-label {
    width: 130px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.um-score-bar-track {
    flex: 1;
    height: 7px;
    background: var(--bg-elevated);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.um-score-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--sbf, var(--accent));
    box-shadow: 0 0 8px color-mix(in srgb, var(--sbf, var(--accent)) 60%, transparent);
    transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.um-score-bar-pct {
    width: 34px;
    text-align: right;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    flex-shrink: 0;
}

/* =============================================
   USER MANUAL — CERTIFICATE SHOWCASE
   ============================================= */
.um-cert-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.um-cert-left h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.um-cert-req-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.um-cert-req {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    transition: border-color var(--transition-fast);
}
.um-cert-req:hover { border-color: var(--border-hover); }
.um-cert-req strong { color: var(--text-primary); }
.um-cert-req-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--cri, var(--accent)) 12%, transparent);
    color: var(--cri, var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Certificate card preview */
.um-cert-card {
    position: relative;
    background: linear-gradient(145deg, #1a1d26 0%, #0f1117 100%);
    border: 1px solid rgba(212,168,67,0.25);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,67,0.1);
}
.um-cert-card-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(212,168,67,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(99,102,241,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.um-cert-card-border-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4a843, #f59e0b, #d4a843, transparent);
}
.um-cert-card-icon {
    font-size: 48px;
    color: #d4a843;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 16px rgba(212,168,67,0.5));
    animation: umCertFloat 3s ease-in-out infinite;
}
@keyframes umCertFloat { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-6px);} }
.um-cert-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.um-cert-card-name {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.um-cert-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,168,67,0.3), transparent);
    margin-bottom: 18px;
}
.um-cert-card-modules {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.um-cert-card-modules span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
}
.um-cert-card-seal {
    font-size: 22px;
    color: #d4a843;
    opacity: 0.7;
}

/* =============================================
   USER MANUAL — TIPS GRID
   ============================================= */
.um-tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.um-tip-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
    transition: all var(--transition-base);
    animation: cardRise 0.5s cubic-bezier(0.2,0.8,0.2,1) both;
}
.um-tip-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.um-tip-num {
    position: absolute;
    top: 14px; right: 16px;
    font-size: 28px;
    font-weight: 900;
    color: rgba(255,255,255,0.03);
    letter-spacing: -0.04em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.um-tip-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    background: var(--tib, rgba(99,102,241,0.1));
    color: var(--ti, var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    margin-bottom: 12px;
    transition: box-shadow var(--transition-base);
}
.um-tip-card:hover .um-tip-icon {
    box-shadow: 0 0 14px color-mix(in srgb, var(--ti, var(--accent)) 40%, transparent);
}
.um-tip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.um-tip-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================
   USER MANUAL — FOOTER CTA
   ============================================= */
.um-footer-cta {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    overflow: hidden;
    margin-top: 8px;
}
.um-footer-cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.um-footer-cta-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
}
.um-footer-cta-orb-1 {
    width: 300px; height: 300px;
    top: -100px; left: -60px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
}
.um-footer-cta-orb-2 {
    width: 200px; height: 200px;
    bottom: -60px; right: -40px;
    background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
}
.um-footer-cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.um-footer-cta-icon {
    width: 60px; height: 60px;
    border-radius: var(--radius-lg);
    background: var(--gradient-purple);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
    animation: umCertFloat 3s ease-in-out infinite;
}
.um-footer-cta-text { flex: 1; min-width: 200px; }
.um-footer-cta-text h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.um-footer-cta-text p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}
.um-footer-cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* =============================================
   USER MANUAL — LIGHT MODE OVERRIDES
   ============================================= */
html[data-theme="light"] .um-hero {
    background: #ffffff;
}
html[data-theme="light"] .um-hero-grid {
    background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
}
html[data-theme="light"] .um-quicknav {
    background: rgba(255,255,255,0.9);
}
html[data-theme="light"] .um-card,
html[data-theme="light"] .um-feature-card,
html[data-theme="light"] .um-tip-card,
html[data-theme="light"] .um-footer-cta {
    background: #ffffff;
}
html[data-theme="light"] .um-flow-item,
html[data-theme="light"] .um-cert-req,
html[data-theme="light"] .um-module-banner {
    background: #f9fafb;
}
html[data-theme="light"] .um-cert-card {
    background: linear-gradient(145deg, #f9fafb 0%, #f3f4f6 100%);
    border-color: rgba(212,168,67,0.3);
}
html[data-theme="light"] .um-tip-num {
    color: rgba(0,0,0,0.04);
}

/* =============================================
   RESPONSIVE — MANUAL & MODAL
   ============================================= */
@media (max-width: 900px) {
    .um-grid-2, .um-cert-showcase { grid-template-columns: 1fr; }
    .um-grid-3, .um-tips-grid { grid-template-columns: 1fr 1fr; }
    .um-hero-title { font-size: 26px; }
}
@media (max-width: 600px) {
    .um-grid-3, .um-tips-grid { grid-template-columns: 1fr; }
    .um-hero { min-height: 220px; }
    .um-hero-title { font-size: 22px; }
    .um-hero-icon { width: 56px; height: 56px; font-size: 22px; }
    .um-quicknav { top: 64px; gap: 4px; padding: 10px 12px; }
    .um-qn-item span { display: none; }
    .um-footer-cta-content { flex-direction: column; text-align: center; }
    .wn-modal { padding: 28px 20px 22px; }
    .wn-features { grid-template-columns: 1fr 1fr; }
    .wn-steps { flex-direction: column; align-items: flex-start; }
    .wn-step-sep { display: none; }
}
