/* ==========================================================================
   GLOBAL APP STYLES & LAYOUT (From layouts/app.blade.php)
   ========================================================================== */
:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 72px;
    --sidebar-bg: #132418; /* Elegant deep forest green from logo */
    --sidebar-text: #a8bfae; /* Soft sage green */
    --sidebar-active-bg: #1e3827; /* Dark green selection highlight */
    --sidebar-active-text: #ffffff;
    --topbar-height: 60px;
    --accent: #e88323; /* Logo vibrant orange */
    --accent-hover: #d1721b;
    --accent-yellow: #eea92f; /* Logo golden yellow (decorative only, low text contrast) */
    --accent-yellow-text: #92400e; /* Dark amber-gold — use for text/badges instead of accent-yellow */
    --accent-green: #339146; /* Logo primary green (decorative dots/borders, ~4:1 contrast) */
    --accent-green-text: #1a7a4a; /* Darker green for text/buttons/badges — proper AA contrast */
    --accent-green-dark: #1e3827; /* Deep forest green from logo ribbon shadow */

    /* Bootstrap 5.3 theme variable overrides so every default component
       (badges, outline buttons, pagination, form checks, links, nav-pills,
       progress bars, spinners) picks up the Discoveryland palette instead
       of Bootstrap's default blue/gray/cyan. Uses the *-text shades so
       text/badges/buttons keep AA-readable contrast. */
    --bs-primary: #e88323;
    --bs-primary-rgb: 232, 131, 35;
    --bs-secondary: #1a7a4a;
    --bs-secondary-rgb: 26, 122, 74;
    --bs-info: #92400e;
    --bs-info-rgb: 146, 64, 14;
    --bs-success: #1a7a4a;
    --bs-success-rgb: 26, 122, 74;
    --bs-dark: #132418;
    --bs-dark-rgb: 19, 36, 24;
    --bs-link-color: #e88323;
    --bs-link-color-rgb: 232, 131, 35;
    --bs-link-hover-color: #d1721b;
    --bs-link-hover-color-rgb: 209, 114, 27;
}

/* ── Bootstrap component polish (buttons, badges, forms, pagination, nav) ── */
.btn { border-radius: 8px; font-weight: 500; }
.btn-secondary {
    background-color: var(--accent-green-text) !important;
    border-color: var(--accent-green-text) !important;
    color: #fff !important;
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
    background-color: #145c38 !important;
    border-color: #145c38 !important;
}
.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-bg: var(--accent);
    --bs-btn-active-border-color: var(--accent);
}
.btn-outline-secondary {
    --bs-btn-color: var(--accent-green-text);
    --bs-btn-border-color: var(--accent-green-text);
    --bs-btn-hover-bg: var(--accent-green-text);
    --bs-btn-hover-border-color: var(--accent-green-text);
    --bs-btn-active-bg: var(--accent-green-text);
    --bs-btn-active-border-color: var(--accent-green-text);
}
.btn-check:checked + .btn,
.btn.active,
.btn:active {
    box-shadow: none;
}
.form-check-input:checked {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}
.form-check-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(232, 131, 35, 0.15) !important;
}
.form-switch .form-check-input:checked {
    background-color: var(--accent-green-text) !important;
    border-color: var(--accent-green-text) !important;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--accent) !important;
}
.page-link { color: var(--accent); }
.page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
}
.progress-bar { background-color: var(--accent); }
.progress-bar.bg-success { background-color: var(--accent-green-text) !important; }
.spinner-border.text-primary, .spinner-grow.text-primary { color: var(--accent) !important; }

/* ── Theme Button & Accent Overrides ── */
.btn-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #d1721b !important;
    border-color: #d1721b !important;
}
.text-primary {
    color: var(--accent) !important;
}
.border-primary {
    border-color: var(--accent) !important;
}
.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff6ed !important;
    color: #2b2b2b !important;
    padding: 5px 14px 5px 6px !important;
    border-radius: 999px !important;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.user-badge:hover, .user-badge:focus {
    background: #ffecd9 !important;
    box-shadow: 0 0 0 1px rgba(232, 131, 35, 0.25);
}
.user-badge-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.user-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}
.user-badge-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b2b2b;
}
.user-badge-role {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}
.sidebar-brand h6 {
    color: var(--accent-yellow) !important;
}
.sidebar-menu a.active {
    border-left: 3px solid var(--accent-yellow) !important;
}

body { background: #f4f6fb; font-family: 'Segoe UI', sans-serif; }

/* ── Sidebar ───────────────────────────────── */
#sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.25s ease, transform 0.25s ease;
}
.sidebar-brand {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-brand h5 { color: #fff; font-weight: 700; margin: 0; font-size: 1rem; }
.sidebar-brand small { color: var(--sidebar-text); font-size: 0.75rem; }

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 1.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    transition: background 0.15s ease;
    white-space: nowrap;
    position: relative;
}
.sidebar-profile:hover {
    background: rgba(255,255,255,0.05);
}
.sidebar-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.sidebar-profile-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
}
.sidebar-profile-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-profile-role {
    color: var(--sidebar-text);
    font-size: 0.72rem;
}

.sidebar-menu { padding: 0.75rem 0; list-style: none; margin: 0; }
.sidebar-menu .menu-label {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
    color: rgba(168, 191, 174, 0.55); padding: 1.1rem 1.6rem 0.5rem;
    text-transform: uppercase;
    white-space: nowrap;
}
.sidebar-menu li { padding: 0 0.85rem; margin-bottom: 0; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 0.5rem 0.9rem; color: var(--sidebar-text);
    text-decoration: none; font-size: 0.875rem; border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    position: relative;
}
.sidebar-menu a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-menu a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: 0 4px 14px rgba(232, 131, 35, 0.35);
}
.sidebar-menu a.active .sidebar-count {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}
.sidebar-menu a .bi { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }

/* ── Main area ─────────────────────────────── */
#main { margin-left: var(--sidebar-width); min-height: 100vh; transition: margin-left 0.25s ease; }

/* ── Topbar ────────────────────────────────── */
#topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e8ebf0;
    display: flex; align-items: center;
    padding: 0 1.5rem;
    position: sticky; top: 0; z-index: 999;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}
#topbar .page-title { font-weight: 600; font-size: 1rem; flex: 1; color: #1f2430; }

.topbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50%;
    color: #5b6472;
    font-size: 1.05rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.topbar-icon-btn:hover, .topbar-icon-btn:focus {
    background: #f1f3f8;
    color: var(--accent);
}
.topbar-divider {
    width: 1px;
    height: 24px;
    background: #e8ebf0;
    margin: 0 2px;
}

/* ── Content ───────────────────────────────── */
.content-area { padding: 1.5rem; }

/* ── Cards ─────────────────────────────────── */
.card { border: 1px solid #e8ebf0; border-radius: 12px; box-shadow: none; }
.card-header { background: #fff; border-bottom: 1px solid #e8ebf0; font-weight: 600; padding: 1rem 1.25rem; }

/* ── Stat cards ─────────────────────────────── */
.stat-card {
    background: #fff; border-radius: 12px; padding: 1.2rem 1.5rem;
    border: 1px solid #e8ebf0;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: block;
    color: inherit;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-color: var(--accent);
    cursor: pointer;
}
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.8rem; color: #6c757d; }

/* ── Focus overrides ─────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: none !important;
}

/* ── Tables ─────────────────────────────────── */
.table th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.05em; color: #6c757d; background: #f8f9fa; }
.table td { vertical-align: middle; }

/* ── Badges ─────────────────────────────────── */
.badge-active   { background: #f0faf5; color: var(--accent-green); font-weight: 500; }
.badge-completed{ background: #eaf3ec; color: var(--accent-green-dark); font-weight: 500; }
.badge-inactive { background: #fef3f2; color: #b42318; font-weight: 500; }
.badge-pending  { background: #fffaeb; color: #b54708; font-weight: 500; }

/* ── Alerts ─────────────────────────────────── */
.alert { border-radius: 10px; border: none; font-size: 0.875rem; }

/* ── Font weight utilities (Bootstrap 5 missing these) ── */
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
    #sidebar { transform: translateX(-100%); }
    #sidebar.open { transform: translateX(0); }
    #main { margin-left: 0; }
}

/* ── DataTables Overrides ───────────────────── */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.5rem;
}
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    margin-left: 0.5rem;
    background-color: #fff;
    color: #495057;
    transition: border-color 0.15s ease-in-out;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent) !important;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    padding: 0.25rem 1.75rem 0.25rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    background-color: #fff;
    color: #495057;
}
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--accent) !important;
}
.dataTables_wrapper .dataTables_info {
    font-size: 0.8rem;
    color: #6c757d;
    padding-top: 0.5rem;
}
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}
.dataTables_wrapper .page-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    color: var(--accent);
    border-color: #e8ebf0;
}
.dataTables_wrapper .page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.dataTables_wrapper .page-link:focus {
    box-shadow: none;
}
table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
}
table.dataTable thead th {
    border-bottom: 1px solid #e8ebf0 !important;
}

/* ==========================================================================
   LOGIN PAGE ANIMATED STYLES (From auth/login.blade.php)
   ========================================================================== */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.login-body {
    background: linear-gradient(-45deg, #132418, #1e3827, #23432e, #1a3020);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background Particles */
.bg-bubbles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}
.bubble {
    position: absolute;
    background: rgba(232, 131, 35, 0.08);
    bottom: -150px;
    width: 40px; height: 40px;
    border-radius: 50%;
    animation: floatUp 25s infinite linear;
}
.bubble:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-delay: 0s; animation-duration: 18s; }
.bubble:nth-child(2) { left: 20%; width: 120px; height: 120px; animation-delay: 2s; animation-duration: 22s; }
.bubble:nth-child(3) { left: 25%; width: 60px; height: 60px; animation-delay: 4s; }
.bubble:nth-child(4) { left: 40%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 20s; background: rgba(51, 145, 70, 0.08); }
.bubble:nth-child(5) { left: 70%; width: 90px; height: 90px; animation-delay: 7s; }
.bubble:nth-child(6) { left: 80%; width: 120px; height: 120px; animation-delay: 3s; animation-duration: 16s; background: rgba(51, 145, 70, 0.06); }
.bubble:nth-child(7) { left: 90%; width: 70px; height: 70px; animation-delay: 12s; }

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
        border-radius: 50%;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-1200px) rotate(600deg);
        opacity: 0;
        border-radius: 20%;
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 410px;
    box-shadow: 0 30px 80px rgba(10, 25, 15, 0.35), 0 0 50px rgba(232, 131, 35, 0.04);
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    z-index: 2;
}
.input-group {
    border: 1px solid rgba(19, 36, 24, 0.12);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}
.input-group:focus-within {
    border-color: #e88323 !important;
    box-shadow: 0 0 0 4px rgba(232, 131, 35, 0.15) !important;
}
.input-group-text {
    border: none !important;
    background-color: transparent !important;
    color: #339146; /* Matching logo green */
}
.login-card .form-control {
    border: none !important;
    background: transparent !important;
}
.login-card .form-control:focus {
    box-shadow: none !important;
    background: transparent !important;
}
.btn-login {
    background: #16a34a; color: #fff; border: none;
    padding: 10px; font-weight: 600; border-radius: 12px;
    width: 100%; transition: all 0.3s ease;font-size: 16px;
}
.btn-login:hover {
    background: #15803d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}
.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

/* ── Flying Birds & Gliding Arrows Animation ── */
.bird-container {
    position: absolute;
    top: 25%;
    left: -10%;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
}
.bird-container-1 {
    animation: fly-cycle-1 18s linear infinite;
    top: 15%;
}
.bird-container-2 {
    animation: fly-cycle-2 24s linear infinite;
    animation-delay: 5s;
    top: 30%;
}
.bird-container-3 {
    animation: fly-cycle-3 15s linear infinite;
    animation-delay: 10s;
    top: 8%;
}

.bird {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" fill="%23eea92f"><path d="M 0 10 Q 6 0, 13 8 Q 20 0, 26 10 Q 20 15, 13 10 Q 6 15, 0 10 Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    width: 32px;
    height: 32px;
    animation: fly-flap 1.2s ease-in-out infinite;
}

.arrow-glider {
    position: absolute;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23e88323"><path d="M12 2L1 21h22L12 2zm0 4l7.5 13h-15L12 6z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
    transform: rotate(45deg);
}
.arrow-1 {
    animation: glide-arrow-1 20s linear infinite;
    top: 60%;
    left: -5%;
}
.arrow-2 {
    animation: glide-arrow-2 28s linear infinite;
    animation-delay: 8s;
    top: 75%;
    left: -5%;
}

@keyframes fly-cycle-1 {
    0% { transform: translate(-10vw, 0) scale(0.6); }
    100% { transform: translate(110vw, -100px) scale(0.6); }
}
@keyframes fly-cycle-2 {
    0% { transform: translate(-10vw, 0) scale(0.4); }
    100% { transform: translate(110vw, -50px) scale(0.4); }
}
@keyframes fly-cycle-3 {
    0% { transform: translate(-10vw, 0) scale(0.5); }
    100% { transform: translate(110vw, 50px) scale(0.5); }
}

@keyframes fly-flap {
    0%, 100% { transform: scaleY(1) rotate(0deg); }
    50% { transform: scaleY(0.4) rotate(-8deg); }
}

@keyframes glide-arrow-1 {
    0% { transform: translate(-10vw, 0) rotate(45deg) scale(0.8); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translate(110vw, -150px) rotate(45deg) scale(0.8); opacity: 0; }
}
@keyframes glide-arrow-2 {
    0% { transform: translate(-10vw, 0) rotate(45deg) scale(0.6); opacity: 0; }
    10% { opacity: 0.12; }
    90% { opacity: 0.12; }
    100% { transform: translate(110vw, -80px) rotate(45deg) scale(0.6); opacity: 0; }
}

/* ==========================================================================
   STUDENT FORM STYLES (From students/_form.blade.php)
   ========================================================================== */
.form-section-card {
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    height: 100%;
}
.form-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}
.form-section-title i {
    color: var(--accent, #e88323);
    font-size: 1.2rem;
}
.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.4rem;
}
.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: all 0.15s ease-in-out;
    background-color: #f8fafc;
}
.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--accent, #e88323);
    box-shadow: none;
}
.form-control::placeholder {
    color: #94a3b8;
}
.map-wrapper {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.active-toggle-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   STUDENT IMPORT STYLES (From students/import.blade.php)
   ========================================================================== */
.upload-zone {
    border: 2px dashed #c5cfee;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: #fafbff;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent);
    background: #fdf5ee;
}
.upload-zone .upload-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.step-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.col-pill {
    background: #fff6ed; color: var(--accent);
    border-radius: 6px; padding: 2px 10px;
    font-size: 0.78rem; font-weight: 600;
    display: inline-block; margin: 2px;
}
.col-pill.optional { background: #f0faf5; color: #1a7a4a; }
#file-name-display { font-size: 0.85rem; color: var(--accent); margin-top: 0.5rem; }
.progress-bar-import { display: none; }

/* ==========================================================================
   ROUTE MAP STYLES (From routes/map.blade.php)
   ========================================================================== */
#map { height: calc(100vh - 160px); min-height: 500px; border-radius: 12px; }
.map-sidebar {
    height: calc(100vh - 160px);
    min-height: 500px;
    overflow-y: auto;
    border-radius: 12px;
}
.stop-card {
    border-left: 3px solid var(--accent);
    background: #fff;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.stop-card:hover { background: #fff6ed; }
.stop-card.active { background: #fff6ed; border-left-color: var(--accent-yellow); }
.stop-card.picked-up { border-left-color: var(--accent-green); background: #f0faf5; }
.stop-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: #fff;
    background: var(--accent); flex-shrink: 0;
}
.stop-badge.picked-up { background: var(--accent-green); }
.traffic-on  { background: #e6f9f0; color: #1a7a4a; }
.traffic-off { background: #fff8e6; color: #b54708; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
#no-key-warning { display: none; }

/* ==========================================================================
   ERROR 403 STYLES (From errors/403.blade.php)
   ========================================================================== */
.error-body {
    background: linear-gradient(135deg, #132418 0%, #1e3827 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
}
.error-card {
    background: rgba(19, 36, 24, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}
.icon-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.8rem;
    color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
    animation: pulse 2s infinite;
}
.error-code {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #ef4444;
    margin-bottom: 0.5rem;
}
.error-title {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffffff;
}
.error-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}
.btn-action {
    font-weight: 600;
    border-radius: 12px;
    padding: 0.8rem 1.8rem;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
}
.btn-home {
    background: #e88323; /* Matching logo orange */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(232, 131, 35, 0.3);
}
.btn-home:hover {
    background: #d1721b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 131, 35, 0.4);
    color: #ffffff;
}
.btn-login:hover {
    color: #ffffff;
    transform: translateY(-2px);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ── Inline Style Replacements ── */
.brand-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}
.brand-panel-small {
    font-size: 0.7rem;
}
.sidebar-menu .sidebar-logout-item {
    margin-top: auto;
    margin-bottom: 0;
    padding: 1rem 0.85rem 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logout-item a:hover {
    background: rgba(220, 53, 69, 0.15) !important;
    color: #ff9494 !important;
}
.sidebar-logout-btn {
    all: unset;
    width: 100%;
    cursor: pointer;
}
.impersonation-alert {
    background-color: #fffbeb;
    color: #b45309;
    border-bottom: 1px solid #fde68a !important;
}
.impersonation-btn-stop {
    background-color: #f59e0b;
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    text-decoration: none;
}
.login-logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* ── Collapsible Sidebar (icon-only rail on desktop) ── */
body.collapsed-sidebar #sidebar {
    width: var(--sidebar-collapsed-width);
}
body.collapsed-sidebar #main {
    margin-left: var(--sidebar-collapsed-width) !important;
}
body.collapsed-sidebar .sidebar-brand {
    padding: 1.2rem 0;
    justify-content: center;
}
body.collapsed-sidebar .brand-logo-img {
    height: 34px;
    width: 34px;
    max-width: 34px;
    object-fit: contain;
}
body.collapsed-sidebar .sidebar-brand > div,
body.collapsed-sidebar #sidebar .link-text,
body.collapsed-sidebar #sidebar .sidebar-count {
    display: none;
}
body.collapsed-sidebar .sidebar-menu .menu-label {
    height: 0;
    padding: 10px 1.2rem 0;
    margin: 6px 0;
    font-size: 0;
    color: transparent;
    border-top: 1px solid rgba(255,255,255,0.08);
}
body.collapsed-sidebar .sidebar-menu li.menu-label:first-child {
    border-top: none;
    margin-top: 0;
}
body.collapsed-sidebar .sidebar-menu a {
    justify-content: center;
    padding: 0.75rem 0;
}
body.collapsed-sidebar .sidebar-menu a > span.d-flex {
    gap: 0 !important;
}
body.collapsed-sidebar .sidebar-profile {
    justify-content: center;
    padding: 0.9rem 0;
}
/* Flyout label shown on hover while collapsed */
body.collapsed-sidebar .sidebar-menu li {
    position: relative;
}
body.collapsed-sidebar #sidebar a[data-label]::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--sidebar-active-bg);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 2000;
}
body.collapsed-sidebar .sidebar-menu li:hover a[data-label]::after,
body.collapsed-sidebar .sidebar-profile:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ── Theme Switcher: Dark Theme Overrides ── */
body.dark-theme {
    background: #0f1319;
    color: #e2e8f0;
}
body.dark-theme #topbar {
    background: #161b22;
    border-bottom-color: #21262d;
    color: #fff;
}
body.dark-theme #topbar .btn {
    color: #e2e8f0;
}
body.dark-theme #topbar .page-title {
    color: #f1f3f8;
}
body.dark-theme .topbar-icon-btn {
    color: #8b949e;
}
body.dark-theme .topbar-icon-btn:hover, body.dark-theme .topbar-icon-btn:focus {
    background: #21262d;
    color: var(--accent);
}
body.dark-theme .topbar-divider {
    background: #21262d;
}
body.dark-theme .user-badge-name {
    color: #f1f3f8;
}
body.dark-theme .card {
    background: #161b22;
    border-color: #21262d;
    color: #e2e8f0;
}
body.dark-theme .card-header {
    background: #161b22;
    border-bottom-color: #21262d;
    color: #fff;
}
body.dark-theme .table th {
    background: #1f242c;
    color: #8b949e;
}
body.dark-theme .table {
    color: #e2e8f0;
    border-color: #21262d;
}
body.dark-theme .table-hover tbody tr:hover {
    background-color: #21262d;
}
body.dark-theme .form-control, body.dark-theme .form-select {
    background-color: #1f242c;
    border-color: #30363d;
    color: #fff;
}
body.dark-theme .form-control:focus, body.dark-theme .form-select:focus {
    background-color: #1f242c;
}
body.dark-theme .dataTables_wrapper .dataTables_filter input,
body.dark-theme .dataTables_wrapper .dataTables_length select {
    background-color: #1f242c;
    border-color: #30363d;
    color: #fff;
}
body.dark-theme .form-section-card {
    background: #161b22;
    border-color: #21262d;
}
body.dark-theme .form-section-title {
    color: #fff;
    border-bottom-color: #21262d;
}
body.dark-theme .active-toggle-container {
    background: #1f242c;
    border-color: #30363d;
}
body.dark-theme .text-muted {
    color: #8b949e !important;
}
body.dark-theme .modal-content {
    background-color: #161b22;
    border-color: #21262d;
    color: #e2e8f0;
}
body.dark-theme .modal-header, body.dark-theme .modal-footer {
    border-color: #21262d;
}
body.dark-theme .alert-warning {
    background-color: #2c2100;
    color: #f59e0b;
    border-color: #453300;
}
body.dark-theme .stop-card {
    background: #161b22;
    border-left-color: var(--accent);
}
body.dark-theme .stop-card:hover {
    background: #1f242c;
}
body.dark-theme .stop-card.active {
    background: #1f242c;
}
body.dark-theme .user-badge {
    background: #2c1a0c !important;
    color: var(--accent) !important;
}
.dropdown-menu {
    border-radius: 12px;
    padding: 6px;
    min-width: 190px;
}
.dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}
body.dark-theme .dropdown-menu {
    background-color: #161b22;
    border-color: #21262d;
}
body.dark-theme .dropdown-item {
    color: #e2e8f0;
}
body.dark-theme .dropdown-item:hover {
    background-color: #21262d;
    color: #fff;
}

