/* 
 * EventPass Pro - Modern UI / UX Design System
 * Aesthetic: Sleek Slate & Violet Glassmorphism + Responsive VIP Cards
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --secondary: #0ea5e9;
    --accent: #ec4899;
    
    --bg-main: #fc9c44;
    --bg-card: rgba(18, 24, 38, 0.85);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-surface: #131b2e;
    --bg-input: #1b233a;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #ffffff;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 25px var(--primary-glow);
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(14, 165, 233, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation Bar */
.navbar {
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bg-card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--bg-card-border);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }
.badge-manager { background: rgba(14, 165, 233, 0.2); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.4); }
.badge-guest { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.4); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Glass Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-card-border);
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 4px;
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.2rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
}

.form-label .req {
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: #202b48;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Photo Upload Box */
.photo-upload-box {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    background: rgba(27, 35, 58, 0.4);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.photo-upload-box:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.photo-preview-wrap {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-full);
    margin: 0 auto 12px;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-glow);
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
}

.alert-success { background: var(--success-bg); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.alert-danger { background: var(--danger-bg); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-warning { background: var(--warning-bg); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.alert-info { background: var(--info-bg); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* Dashboard Metric Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

/* ========================================================
   DIGITAL EVENT PASS / REGISTRATION BADGE CARD
   ======================================================== */
.pass-ticket-wrapper {
    max-width: 480px;
    margin: 1rem auto;
    perspective: 1000px;
}

.event-pass-card {
    background: linear-gradient(145deg, #182238 0%, #0d1322 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.15);
    overflow: hidden;
}

/* Hologram foil header line */
.pass-hologram {
    height: 6px;
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6, #10b981, #f59e0b, #ec4899);
    background-size: 300% 100%;
    animation: hologramGlow 6s ease infinite;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

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

.pass-header {
    text-align: center;
    margin-bottom: 1rem;
}

.pass-event-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.pass-event-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Dual Visual Grid: Photo & QR Code Side-by-Side */
.pass-visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}

.pass-photo-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.pass-big-avatar {
    width: 175px;
    /*height: 140px;*/
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    background: #1e293b;
    display: block;
}

.pass-qr-box {
    background: #ffffff;
    padding: 8px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.pass-qr-box img {
    width: 135px;
    height: 135px;
    display: block;
    image-rendering: pixelated;
}

.pass-qr-instruction {
    font-size: 0.68rem;
    color: #334155;
    font-weight: 800;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Guest Identity Box */
.pass-guest-meta {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 14px;
    text-align: center;
    margin-bottom: 0.85rem;
}

.pass-guest-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.pass-guest-desig {
    font-size: 0.9rem;
    color: #38bdf8;
    font-weight: 700;
    margin-top: 2px;
}

.pass-guest-org {
    font-size: 0.82rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* High-Visibility Phone Banner */
.pass-phone-banner {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.pass-phone-banner .phone-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 1px;
}

.pass-encrypted-id {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #a5b4fc;
    word-break: break-all;
    text-align: center;
    margin-bottom: 0.85rem;
}

.pass-status-pill {
    text-align: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-card-border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--bg-card-border);
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* QR Gate Scanner UI */
.scanner-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.scanner-viewfinder {
    width: 100%;
    height: 340px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-glow);
    margin-bottom: 1.5rem;
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ef4444, #f43f5e, #ef4444, transparent);
    box-shadow: 0 0 15px #f43f5e;
    top: 0;
    animation: scanLaser 2.2s ease-in-out infinite;
    z-index: 10;
}

@keyframes scanLaser {
    0% { top: 5%; }
    50% { top: 95%; }
    100% { top: 5%; }
}

.scan-result-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Print Stylesheet for Pass */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    .pass-ticket-wrapper {
        margin: 0 auto;
        box-shadow: none;
    }
    .event-pass-card {
        border: 2px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    .pass-guest-name, .pass-event-title {
        color: #000 !important;
    }
    .pass-qr-box {
        border: 1px solid #ccc;
    }
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--bg-card-border);
    color: var(--text-dim);
    font-size: 0.85rem;
    text-align: center;
}
