/* ==========================================================================
   GLOBAL COMPONENTS & UI CLASSES
   ========================================================================== */

/* ==========================================================================
   ANTI-FOUC (Flash of Unstyled Content) PRE-FLIGHT
   Prevents the mobile layout from flashing on desktop while Tailwind CDN loads
   ========================================================================== */
.hidden { display: none !important; }

@media (min-width: 640px) {
    .sm\:hidden { display: none !important; }
    .sm\:flex { display: flex !important; }
    .sm\:block { display: block !important; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:flex { display: flex !important; }
    .md\:block { display: block !important; }
}

@media (min-width: 1024px) {
    .lg\:hidden { display: none !important; }
    .lg\:flex { display: flex !important; }
    .lg\:block { display: block !important; }
}
/* Base Styling */
body { 
    font-family: var(--font-family, 'Inter', sans-serif); 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    transition: background-color 0.2s ease, color 0.2s ease; 
}

/* Cards & Containers */
.bg-card { 
    background-color: var(--card-bg); 
    border: 1px solid var(--border-color); 
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Typography & Utilities */
.text-primary { color: var(--primary-color); }

/* Interactive Elements (Buttons & Inputs) */
.btn-primary { 
    background-color: var(--primary-color); 
    color: #ffffff; 
    transition: all 0.2s; 
}
.btn-primary:hover { 
    background-color: var(--primary-hover); 
    transform: translateY(-1px); 
}

.input-field { 
    background-color: var(--bg-color); 
    border: 1px solid var(--border-color); 
    color: var(--text-color); 
    transition: all 0.2s; 
}
.input-field:focus { 
    border-color: var(--primary-color); 
    outline: none; 
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); 
}

/* Navigation */
.nav-link { 
    transition: all 0.2s; 
    font-weight: 500; 
    font-size: 0.875rem; 
    color: #64748b; 
}
.nav-link:hover { color: var(--primary-color); }
.nav-link.active { 
    color: var(--primary-color); 
    font-weight: 600; 
    border-bottom: 2px solid var(--primary-color); 
    padding-bottom: 0.25rem; 
}

/* Accordions */
.collapsible-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out; }
.collapsible-content.active { max-height: 1000px; }
.collapsible-header { cursor: pointer; user-select: none; }

/* Smooth Evaluation Panel Sliding */
.notes-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease-out; }
.notes-wrapper.open { grid-template-rows: 1fr; }
.notes-inner { overflow: hidden; }

/* Status Badges */
.status-badge { padding: 0.25rem 0.5rem; border-radius: 9999px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.status-Submitted { background-color: #e0e7ff; color: #4338ca; }
.status-Reviewed { background-color: #fef3c7; color: #b45309; }
.status-Returned { background-color: #fee2e2; color: #b91c1c; border: 1px solid #fecaca;}
.status-Graded { background-color: #d1fae5; color: #047857; }
.badge-late { background-color: #fee2e2; color: #991b1b; }

/* Quill Rich Text Overrides */
.ql-html-editor { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; margin: 0 4px; cursor: pointer; }
#announcement-editor, #footer-editor { 
    min-height: 120px; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    border: 1px solid var(--border-color); 
    border-bottom-left-radius: 0.5rem; 
    border-bottom-right-radius: 0.5rem; 
    border-top: none; 
}
.ql-toolbar { 
    background-color: var(--card-bg); 
    border-top-left-radius: 0.5rem; 
    border-top-right-radius: 0.5rem; 
    border: 1px solid var(--border-color) !important; 
    padding: 8px !important; 
}

/* Theme Switcher Button */
.theme-button { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: transform 0.2s; }
.theme-button:hover { transform: scale(1.1); }
.theme-button.active { box-shadow: 0 0 0 2px var(--primary-color); }

/* Modals & Overlays */
.modal-overlay { background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(2px); z-index: 1000; }

/* Floating Action Bar */
#bulk-action-bar { transform: translateY(200%); transition: transform 0.3s ease; }
#bulk-action-bar.active { transform: translateY(0); }