/* GLOBAL VARIABLES
   The brand values now live in css/brand.css, which loads ahead of this file.
   These names stay because ~450 rules reference --venture-green and ~230
   reference --danger-red; aliasing means the brand palette reaches all of them
   without a rename. New work should use the --vma-* tokens directly. */
:root {
    /* BRAND COLORS */
    --venture-green: var(--vma-green);
    --venture-black: #000000;
    --venture-dark-grey: #1a1a1a;
    --venture-light-grey: #2c2c2c;
    --text-white: var(--vma-white);
    --text-muted: #888888;

    /* UTILITY COLORS */
    --danger-red: var(--vma-danger);   /* Keep for 'Delete' or 'Error' actions only */
    --success-green: var(--vma-ok);    /* Slightly different green for success messages if needed */
}

/* RESET & TYPOGRAPHY */
body { 
    background: var(--venture-black); 
    color: var(--text-white); 
    font-family: 'Arial', sans-serif; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    height: 100dvh; 
    overflow: hidden; 
}

h1, h2, h3, h4 {
    font-family: 'Arial Black', sans-serif; /* bold headers matching the site */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 🟢 GLOBAL SCROLLBAR STYLES */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb {
    background-color: var(--venture-green);
    border-radius: 10px;
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--venture-green) transparent;
}

/* --- APP LAYOUT (GRID) --- */
.app-layout { 
    display: flex; 
    height: 100dvh; 
    width: 100vw; 
    overflow: hidden; 
}

/* SIDEBAR NAVIGATION */
.sidebar {
    width: 300px;
    background: var(--venture-dark-grey);
    border-right: 2px solid var(--venture-light-grey);
    display: flex;
    flex-direction: column;
    padding: 20px 20px 60px 20px; 
    box-sizing: border-box; /* 🟢 Added to prevent padding from expanding the height */
    box-shadow: 4px 0 15px rgba(0,0,0,0.5);
    z-index: 10;

    height: 100dvh; /* 🟢 CHANGED */
    overflow-y: auto;
    overflow-x: hidden;
    
    scrollbar-width: thin;
    scrollbar-color: var(--venture-green) var(--venture-dark-grey);
}

/* 🟢 THE VISUAL STYLES: Custom scrollbar for Chrome, Safari, and Edge */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: var(--venture-dark-grey);
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--venture-green);
    border-radius: 10px;
}

/* --- MOBILE & RESPONSIVE UI --- */

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none; /* Hidden by default */
    background: var(--venture-dark-grey);
    padding: 15px 20px;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--venture-light-grey);
    z-index: 20;
}

#hamburger-btn {
    background: none;
    border: none;
    color: var(--venture-green);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

/* Media Query for Tablets and Phones */
@media (max-width: 992px) {
    .mobile-header { display: flex; }

    .sidebar {
        position: fixed;
        /* The sidebar's full width (.sidebar above). At -260px a 40px strip of it
           stayed over the left edge of every view on a phone. */
        left: -300px;
        top: 0;
        bottom: 0;
        transition: left 0.3s ease;
        z-index: 100;
    }

    /* Slides the sidebar in when this class is added via JS */
    .sidebar.mobile-open {
        left: 0;
    }

    /* Dark overlay to dim the background when menu is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.8);
        z-index: 90;
        cursor: pointer;
    }
    
    .sidebar-overlay.active { display: block; }
}

.sidebar-header { 
    padding-bottom: 20px; 
    margin-bottom: 30px; 
    border-bottom: 1px solid var(--venture-light-grey); 
}

.brand-logo {
    color: var(--text-white);
    margin: 0;
    font-size: 1.8rem;
    font-style: italic; /* Matches the dynamic feel of the logo */
}

.nav-group { margin-bottom: 30px; }
.nav-group label { 
    font-size: 0.7rem; 
    color: var(--venture-green); /* Green headers for sections */
    font-weight: bold; 
    margin-bottom: 10px; 
    display: block; 
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-item {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ccc;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
}

.nav-item:hover { 
    background: rgba(140, 198, 63, 0.1); /* Subtle green tint */
    color: white; 
}

.nav-item.active { 
    background: linear-gradient(90deg, rgba(140,198,63,0.2) 0%, rgba(0,0,0,0) 100%);
    color: var(--venture-green);
    border-left-color: var(--venture-green);
}

.nav-item.logout { 
    margin-top: auto; 
    border-top: 1px solid var(--venture-light-grey); 
    padding-top: 20px; 
    color: var(--text-muted); 
}
.nav-item.logout:hover { color: var(--danger-red); }

/* CONTENT AREA */
.content-area { 
    flex: 1; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    background: var(--venture-black); 
    overflow: hidden; 
    background-image: radial-gradient(circle at top right, #1a1a1a 0%, #000 40%); /* Subtle depth */
}

.view-container { 
    padding: 40px; 
    height: 100%; 
    overflow-y: auto; 
    box-sizing: border-box; 
    display: none; /* Hidden by default */
    flex-direction: column;
}

.view-container.active { display: flex; }

/* UTILITY CLASSES */
.btn-refresh { 
    background: transparent; 
    border: 1px solid var(--venture-light-grey); 
    color: var(--venture-green);
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    transition: 0.3s; 
    font-size: 1.2rem; 
}
.btn-refresh:hover { 
    background: var(--venture-green); 
    color: var(--venture-black); 
    border-color: var(--venture-green); 
    transform: rotate(180deg); 
}

/* Should Test — clickable student name row */
.st-student-link { color: white; text-decoration: none; transition: color 0.2s; }
.st-student-link:hover { color: var(--venture-green); }

/* Should Test table — row hover highlight */
#st-table-body tr:hover td {
    background: rgba(140, 198, 63, 0.06);
}

/* Should Test — turn name link green and show pointer when hovering anywhere in the name cell */
#st-table-body td.st-name-cell { cursor: pointer; }
#st-table-body td.st-name-cell:hover .st-student-link {
    color: var(--venture-green);
}

/* --- Collapsible Sidebar Styles --- */
.nav-group label {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
    user-select: none;
}

.nav-group label:hover {
    color: var(--venture-green);
}

.nav-group label::after {
    content: '▼';
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.nav-group.collapsed label::after {
    transform: rotate(-90deg);
}

.nav-group.collapsed .nav-item {
    display: none;
}

/* Invert native calendar and clock icons to be visible on black backgrounds */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { 
    color-scheme: dark; 
    cursor: pointer; 
}

/* --- NOTIFICATION BADGES --- */
.nav-badge {
    background: var(--danger-red);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    box-shadow: 0 0 8px rgba(227, 30, 36, 0.5);
}

/* ==========================================
   GLOBAL CONFIRMATION MODAL
   ========================================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 20000;
    justify-content: center;
    align-items: center;
}

.confirm-modal-card {
    background: #111;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--danger-red);
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.confirm-modal-title {
    color: white;
    margin-top: 0;
}

.confirm-modal-desc {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
}

/* Make both buttons span equally */
.confirm-modal-actions .btn-vma {
    flex: 1;
}

/* The default styling for the primary "Yes" button */
.confirm-modal-yes-btn {
    background: var(--danger-red);
    color: white;
    border: none;
}
/* ── DOC READER MODAL ── */
#modal-doc-reader {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 300px; /* stay right of sidebar so nav remains visible */
    z-index: 9999;
    flex-direction: column;
    background: #0d0d0d;
    border-left: 2px solid #2c2c2c;
}

@media (max-width: 992px) {
    #modal-doc-reader { left: 0; border-left: none; }
}
