/* ============================================================
   app.css — SDO Nueva Ecija Queue System
   ============================================================ */

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

:root {
    --primary:      #1a56db;
    --primary-dark: #1245b4;
    --accent:       #0ea5e9;
    --success:      #16a34a;
    --warning:      #d97706;
    --danger:       #dc2626;
    --bg-dark:      #0a1628;
    --bg-card:      #ffffff;
    --sidebar-w:    240px;
    --radius:       14px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f0f4f9;
    min-height: 100vh;
    color: #1e293b;
}

/* ---- Navbar ---- */
.app-navbar {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f2346 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 0.75rem 1.5rem;
}
.app-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1rem;
    color: #fff !important;
    letter-spacing: -0.3px;
}
.app-navbar .navbar-brand span { color: var(--accent); }
.app-navbar .nav-link { color: rgba(255,255,255,0.75) !important; font-size: 0.875rem; font-weight: 500; }
.app-navbar .nav-link:hover { color: #fff !important; }

/* ---- Auth pages ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f2346 60%, #1a3a6b 100%);
    padding: 2rem 1rem;
}
.auth-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}
.auth-logo {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    color: #fff; font-size: 1.5rem;
}
.auth-card h4 { font-weight: 800; color: var(--bg-dark); }
.auth-card .text-muted { font-size: 0.875rem; }
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* ---- Main layout ---- */
.main-content { padding: 2rem 1.5rem; max-width: 1200px; margin: 0 auto; }

/* ---- Domain cards ---- */
.domain-card {
    border-radius: var(--radius) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.domain-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important; }
.domain-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, rgba(26,86,219,0.1), rgba(14,165,233,0.1));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}

/* ---- Queue status page ---- */
.queue-number-big {
    font-family: 'DM Mono', monospace;
    font-size: 5rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1;
}
.queue-stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.queue-stat-value { font-size: 2.5rem; font-weight: 800; color: var(--bg-dark); }
.queue-stat-label { font-size: 0.8rem; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- Video room ---- */
.room-wrapper {
    background: #0a0f1e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    flex: 1;
}
.video-container {
    position: relative;
    background: #111827;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}
.video-container video {
    width: 100%; height: 100%;
    object-fit: cover;
}
.video-label {
    position: absolute; bottom: 10px; left: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff; font-size: 0.75rem; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    backdrop-filter: blur(4px);
}
.room-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    flex-wrap: wrap;
}
.btn-circle {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.15s, background 0.2s;
}
.btn-circle:hover { transform: scale(1.1); }
.btn-circle.btn-light { background: rgba(255,255,255,0.15); color: #fff; }
.btn-circle.btn-light:hover { background: rgba(255,255,255,0.25); }
.btn-circle.btn-danger { background: #dc2626; color: #fff; }
.btn-circle.btn-success { background: #16a34a; color: #fff; }
.btn-hangup { width: 60px !important; height: 60px !important; background: #dc2626 !important; font-size: 1.3rem !important; }

/* ---- Validator panel ---- */
.validator-header {
    background: linear-gradient(135deg, var(--bg-dark), #1a3a6b);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
.table { border-radius: var(--radius); overflow: hidden; }
.table thead th { background: var(--bg-dark); color: #fff; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; border: none; }
.table tbody tr:hover { background: rgba(26,86,219,0.04); }

/* ---- Admin panel ---- */
.admin-tabs .nav-link { font-weight: 600; border-radius: 10px 10px 0 0; }
.admin-tabs .nav-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Toast container ---- */
#toast-container {
    position: fixed; top: 1.5rem; right: 1.5rem;
    z-index: 9999; min-width: 280px;
}

/* ---- Page heading ---- */
.page-heading { font-weight: 800; font-size: 1.5rem; color: var(--bg-dark); }
.page-subheading { color: #64748b; font-size: 0.9rem; }

/* ---- Utility ---- */
.card { border-radius: var(--radius) !important; }
.badge { border-radius: 6px; font-weight: 600; }
.btn { font-weight: 600; }
.btn-sm { border-radius: 8px; }
.remark-panel textarea { border-radius: 10px; resize: none; }

/* ---- Pulse animation for "your turn" ---- */
@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
    50%       { box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); }
}
.pulse-success { animation: pulse-border 1.5s infinite; }

/* ---- Mobile ---- */
@media (max-width: 576px) {
    .video-grid { grid-template-columns: 1fr; }
    .queue-number-big { font-size: 3.5rem; }
    .auth-card { padding: 1.75rem; }
    .main-content { padding: 1rem; }
}
