/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #161f30;
    --bg-tertiary: #1f2d44;
    --accent-blue: #00e5ff;
    --accent-indigo: #6366f1;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 229, 255, 0.3);
    
    --glass-bg: rgba(22, 31, 48, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --font-sans: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Background Gradients/Glows */
.radial-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
    pointer-events: none;
}

.radial-glow-2 {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -150px;
    left: -150px;
    z-index: -1;
    pointer-events: none;
}

/* Layout Containers */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    color: var(--accent-blue);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-blue);
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.15);
}

/* Glass Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-hover);
}

/* Kiosk Layout */
.kiosk-container {
    max-width: 600px;
    margin: 4rem auto;
    width: 100%;
}

.kiosk-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.kiosk-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kiosk-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Form Design */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1);
    background: var(--bg-secondary);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    width: 100%;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-blue) 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35);
}

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

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

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
}

/* Success Pass Style */
.pass-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 2px solid var(--accent-blue);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 0;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.15);
}

.pass-header {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-blue) 100%);
    padding: 1.5rem;
    text-align: center;
    color: var(--bg-primary);
}

.pass-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
}

.pass-body {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-container {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    height: 220px;
}

.qr-container img {
    max-width: 100%;
    height: auto;
}

.pass-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
}

.sync-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sync-badge.warning {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.25rem !important;
}

.stat-val {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0.25rem 0;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.stat-icon {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

/* Live Device Banner */
.device-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(22, 31, 48, 0.5);
    border: 1px solid var(--glass-border);
    padding: 1.25rem 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.status-indicator.offline {
    background-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

/* Dashboard Tables */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-registered {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.badge-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Layout Columns */
.dashboard-columns {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Print Styling */
@media print {
    body * {
        visibility: hidden;
    }
    .pass-card, .pass-card * {
        visibility: visible;
    }
    .pass-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
        background: white !important;
        color: black !important;
    }
    .pass-header {
        background: #000 !important;
        color: #fff !important;
    }
    .qr-container {
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
    .info-val {
        color: #000 !important;
    }
    .sync-badge, .btn {
        display: none !important;
    }
}

/* Admin Layout with Sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    margin-bottom: 3rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.sidebar-item {
    width: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--accent-blue);
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.15);
}

.main-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    max-width: calc(100% - 280px);
}

