:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #ffd700;
    --bg-dark: #000428;
    --bg-gradient: linear-gradient(135deg, #000428, #004e92);
    --glass: rgba(16, 18, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #8b9bb4;
    --success: #00f260;
    --error: #ff416c;
    --glow: 0 0 20px rgba(0, 242, 254, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-image: url('/apolo_face/assets/img/bg-login.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
}

/* Dark overlay for better text readability */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    backdrop-filter: blur(3px);
    /* Reduced blur */
}

.container {
    width: 100%;
    max-width: 420px;
    margin: auto;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: rgba(30, 35, 50, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* Subtle shine effect */
.glass-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    pointer-events: none;
}

.logo-container {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.logo {
    width: 150px;
    max-width: 80%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
    /* Removing complex animation for now to rule out rendering issues */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #8b9bb4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

p {
    line-height: 1.6;
    font-size: 0.95rem;
}

.btn {
    display: block;
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-decoration: none;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Inputs and other elements need to fit the theme */
.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    margin-left: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.1);
}

/* Camera and specialized elements */
.camera-container {
    background: #000;
    border-radius: 20px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    position: relative;
    width: 100%;
    /* Mobile-first: Square aspect ratio usually works best for portrait scan */
    aspect-ratio: 1/1;
    overflow: hidden;
}

video,
canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mirror effect for user cam */
    transform: scaleX(-1);
}

/* ... status badges ... */

/* Mobile specific adjustments */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .glass-card {
        padding: 25px 15px;
        border-radius: 20px;
    }

    .title {
        font-size: 1.6rem;
    }

    .logo {
        width: 120px;
        /* Slightly smaller on mobile but consistent */
    }

    .camera-container {
        /* On very small screens, maybe go taller? */
        min-height: 300px;
    }
}

/* =========================================
   Global Dark Mode & Dashboard Enhancements
   ========================================= */

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    /* Space between rows */
    margin-top: 10px;
    font-size: 0.9rem;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--glass-border);
}

td {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Horizontal Scroll for tables on mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Back Link */
.back-link {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: color 0.3s;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary);
}

.back-link span {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* User Grid for Admin */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Refined User Card */
.user-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.user-card:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.user-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.user-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.user-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.user-info small {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Section Headers */
h2.title {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}