/* ==========================================================================
   1. DESIGN SYSTEM VARIABLES & PALETTE
   ========================================================================== */
:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --dark: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Layout Properties */
    --surface-bg: rgba(255, 255, 255, 0.85);
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(79, 70, 229, 0.08), 0 8px 10px -6px rgba(79, 70, 229, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. GLOBAL RESET & BASE RULES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Times New Roman', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f8fafc;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ==========================================================================
   3. ABSTRACT ACCENT ARTWORK (BACKGROUND GRAPHICS)
   ========================================================================== */
.bg-graphic {
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.grid-pattern {
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

.dynamic-wave {
    bottom: -15%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
    border-radius: 50%;
}

.circle-top-left {
    top: -150px;
    left: -150px;
    width: 450px;
    height: 450px;
    background: conic-gradient(from 180deg, rgba(79, 70, 229, 0.06), rgba(248, 250, 252, 0));
    border-radius: 50%;
}

.floating-poly {
    top: 35%;
    left: 4%;
    width: 90px;
    height: 90px;
    border: 2px dashed rgba(79, 70, 229, 0.12);
    transform: rotate(45deg);
    border-radius: 16px;
}

/* ==========================================================================
   4. BRANDING IDENTITY CONSOLE (HEADER)
   ========================================================================== */
.main-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
}

.school-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 2px solid #fff;
}

.school-info {
    text-align: center;
    flex-grow: 1;
}

.school-info h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.school-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 9999px;
    font-weight: 600;
    margin-top: 6px;
}

.header-right-spacer { width: 72px; }

/* ==========================================================================
   5. ANNOUNCEMENT & UTILITY ELEMENTS
   ========================================================================== */
.ticker-wrapper {
    background: var(--dark);
    color: #fff;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.ticker-title {
    background: var(--danger);
    padding: 10px 24px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 0 4px 4px 0;
}

.ticker-text {
    padding: 0 1.5rem;
    width: 100%;
}

/* ==========================================================================
   6. PORTAL INTERACTION GRIDS
   ========================================================================== */
.portal-grid, .dashboard-content {
    display: flex;
    gap: 2rem;
    max-width: 1480px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.left-column {
    flex: 1.8;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.right-column {
    flex: 1.2;
    min-width: 360px;
}

/* Reusable Glass-Surface Cards */
.card, .form-section, .table-section {
    background: var(--surface-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover, .form-section:hover, .table-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.2);
}

h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   7. INPUT SYSTEMS & FORMS
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

input, select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--dark);
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background-color: #fff;
}

/* ==========================================================================
   8. INTERACTIVE BUTTONS
   ========================================================================== */
button, .portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.portal-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.portal-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

#cancel-btn {
    background: var(--text-muted);
    color: #fff;
    margin-top: 0.75rem;
}

#cancel-btn:hover { background: var(--text-main); }

.logout-btn {
    background: var(--danger-light);
    color: var(--danger);
    margin-top: 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.logout-btn:hover {
    background: var(--danger);
    color: #fff;
}

.hidden { display: none !important; }

/* ==========================================================================
   9. SLIDESHOW MODULE (MEDIA PORTAL)
   ========================================================================== */
.slideshow-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 400px;
    box-shadow: var(--shadow-md);
}

.mySlides {
    display: none;
    height: 100%;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.85) 80%);
    color: #fff;
    padding: 2rem 1.5rem 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.prev, .next1 {
    cursor: pointer;
    position: absolute;
    top: 90%;
    transform: translateY(-50%);
    padding: 14px 18px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 0 8px 8px 0;
    user-select: none;
    transition: var(--transition);
}

.next { right: 0; border-radius: 8px 0 0 8px; }
.prev:hover, .next:hover { background-color: rgba(79, 70, 229, 0.8); }

.dot-indicators { text-align: center; margin-top: 1rem; }
.dot {
    cursor: pointer;
    height: 8px;
    width: 8px;
    margin: 0 5px;
    background-color: var(--border);
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition);
}
.dot.active, .dot:hover { background-color: var(--primary); width: 20px; border-radius: 4px; }
.fade { animation: fadeEffect 0.8s ease-in-out; }
@keyframes fadeEffect { from {opacity: 0.6} to {opacity: 1} }

/* ==========================================================================
   10. SYSTEM NOTICES & ALERT BOXES
   ========================================================================== */
.message-box {
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.teacher-msg { background: var(--primary-light); border-left-color: var(--primary); }


.site-footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    width: 100%;
}
/* Container holding the footer contents */
.footer-container {
    display: flex;
    justify-content: space-between; /* Pushes text to left, links to right */
    align-items: center;            /* Perfectly centers items vertically */
    max-width: 1250px;              /* Adjust to match your website width */
    margin: 0 auto;
    padding: 0 20px;
}

/* Base footer styling */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 15px 0;
    width: 100%;
}

/* Remove default paragraph margins */
.footer-copy {
    margin: 0;
}

/* Links structure for a single row */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;                 /* Keeps individual links in a row */
    gap: 20px;                     /* Creates spacing between the links */
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive adjustment for small mobile screens */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;    /* Stack vertically only on mobile */
        gap: 10px;
        text-align: center;
    }
}

/* Dark background overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 1500px;
    position: relative;
    color: #333;
}
.close-btn {
    position: absolute;
    right: 15px; top: 10px;
    font-size: 24px;
    cursor: pointer;
}

.close-btn:hover {
    color: #000;
}