@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #080b14;
    --bg-surface: #0d1117;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --accent-green: #00ff88;
    --text-primary: #e2e8f0;
    --text-muted: #64748b;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.03) 0%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

/* ── Glassmorphism card ──────────────────────────────────────────────────── */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.08);
}

/* ── Gradient text ───────────────────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Neon glow button ────────────────────────────────────────────────────── */
.mud-button-root.btn-glow {
    background: linear-gradient(135deg, #00d4ff, #0099cc) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35) !important;
    color: #080b14 !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
    border-radius: 10px !important;
}

.mud-button-root.btn-glow:hover {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.6) !important;
    transform: translateY(-1px);
}

.mud-button-root.btn-glow:disabled {
    opacity: 0.5 !important;
    transform: none !important;
}

/* ── Pulsing glow animation for submit ───────────────────────────────────── */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.35); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.7), 0 0 60px rgba(0, 212, 255, 0.3); }
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

.btn-pulse:hover,
.btn-pulse:disabled {
    animation: none;
}

/* ── Pass type selector cards ────────────────────────────────────────────── */
.pass-type-card {
    background: var(--bg-glass);
    border: 2px solid var(--border-glass);
    border-radius: 16px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    user-select: none;
}

.pass-type-card:hover {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.04);
    transform: translateY(-2px);
}

.pass-type-card.selected {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2), inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.pass-type-card.selected .pass-type-icon {
    color: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.8));
}

/* ── Logo glow ───────────────────────────────────────────────────────────── */
.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    line-height: 1;
}

/* ── Stats card value ────────────────────────────────────────────────────── */
.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 6px;
}

/* ── Success overlay ─────────────────────────────────────────────────────── */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.success-checkmark {
    font-size: 5rem;
    color: var(--accent-green);
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.8));
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── MudBlazor overrides ─────────────────────────────────────────────────── */
.mud-drawer {
    background: #080b14 !important;
    border-right: 1px solid rgba(255,255,255,0.06) !important;
}

.mud-appbar {
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

.mud-main-content {
    background: transparent !important;
}

.mud-table-root {
    background: transparent !important;
}

.mud-table-container {
    background: transparent !important;
}

.mud-table-cell {
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    color: var(--text-primary) !important;
}

.mud-table-head .mud-table-cell {
    background: rgba(0,0,0,0.2) !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.mud-table-row:hover .mud-table-cell {
    background: rgba(0,212,255,0.03) !important;
}

/* Input fields */
.mud-input-root {
    color: var(--text-primary) !important;
}

.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255,255,255,0.15) !important;
    transition: all 0.2s ease;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(0,212,255,0.4) !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 0 2px rgba(0,212,255,0.15) !important;
}

.mud-input-label {
    color: var(--text-muted) !important;
}

.mud-input-label.mud-input-label-animated.mud-label-focused {
    color: var(--accent-cyan) !important;
}

/* Select/dropdown */
.mud-select-input {
    color: var(--text-primary) !important;
}

.mud-popover-paper {
    background: #0d1117 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
}

.mud-list-item:hover {
    background: rgba(0,212,255,0.06) !important;
}

.mud-list-item-selected {
    background: rgba(0,212,255,0.1) !important;
    color: var(--accent-cyan) !important;
}

/* Chips */
.mud-chip {
    font-size: 0.75rem !important;
    height: 22px !important;
    font-weight: 500 !important;
}

/* Dialog */
.mud-dialog {
    background: #0d1117 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 0 80px rgba(0,212,255,0.1) !important;
}

.mud-dialog-title {
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    padding-bottom: 16px !important;
}

.mud-dialog-actions {
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    padding-top: 16px !important;
}

/* Snackbar */
.mud-snackbar {
    border-radius: 10px !important;
}

/* Switches */
.mud-switch-base.mud-checked .mud-switch-thumb {
    background: var(--accent-cyan) !important;
}

.mud-switch-base.mud-checked + .mud-switch-track {
    background: rgba(0,212,255,0.3) !important;
}

/* Progress */
.mud-progress-linear {
    background: rgba(0,212,255,0.15) !important;
}

.mud-progress-linear-bar {
    background: var(--accent-cyan) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,212,255,0.3);
}

/* Alert overrides */
.mud-alert {
    border-radius: 10px !important;
}

/* Date/time pickers */
.mud-picker-inline-paper {
    background: #0d1117 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.mud-picker-calendar-header {
    background: rgba(0,212,255,0.06) !important;
}

.mud-day:hover {
    background: rgba(0,212,255,0.1) !important;
}

.mud-day.mud-current {
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
}

.mud-day.mud-selected {
    background: var(--accent-cyan) !important;
    color: #080b14 !important;
}

/* Nav overrides */
.mud-nav-link {
    border-radius: 8px !important;
    margin: 2px 0 !important;
}

/* Checkbox */
.mud-checkbox .mud-icon-root {
    color: var(--text-muted) !important;
}

.mud-checkbox.mud-checked .mud-icon-root {
    color: var(--accent-cyan) !important;
}

/* Toggle button (used in notify) */
.mud-toggle-button-group .mud-toggle-button.mud-selected {
    background: rgba(0,212,255,0.1) !important;
    color: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
}

/* Helper text */
.mud-input-helper-text {
    color: var(--text-muted) !important;
}

/* Divider */
.mud-divider {
    border-color: rgba(255,255,255,0.06) !important;
}

/* Tooltip */
.mud-tooltip {
    background: #1a2035 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    font-size: 0.8rem !important;
}

/* -- Custom Modal Overlay (replaces MudDialog for Blazor 8 compatibility) -- */
.pp-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.pp-modal {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.06), 0 24px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}
.pp-modal-title {
    padding: 24px 28px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pp-modal-body {
    padding: 24px 28px;
    flex: 1;
    overflow-y: auto;
}
.pp-modal-actions {
    padding: 16px 28px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Native form controls inside pp-modal (MudSelect popovers can render behind the overlay) */
.pp-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.pp-select {
    width: 100%;
    padding: 12px 14px;
    background: #0d1117;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font: inherit;
    outline: none;
}
.pp-select:focus {
    border-color: var(--accent-cyan);
}
.pp-select option {
    background: #0d1117;
    color: var(--text-primary);
}
