/* ==========================================================================
   1. GLOBAL SYSTEM THEME VARIABLES & CORES
   ========================================================================== */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #2563eb;
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #475569;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --accent: #d97706;
    --disclaimer-bg: #fef3c7;
    --disclaimer-text: #92400e;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --bg-main: #0f172a;
    --bg-light: #1e293b;
    --text-dark: #f8fafc;
    --text-light: #94a3b8;
    --border-color: #334155;
    --white: #1e293b;
    --disclaimer-bg: #78350f;
    --disclaimer-text: #fef3c7;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Base Browser Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-light { background-color: var(--bg-light); }
section { padding: 60px 0; }

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* Student Disclaimer Banner */
.disclaimer-banner {
    background-color: var(--disclaimer-bg);
    color: var(--disclaimer-text);
    padding: 10px 15px;
    text-align: center;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ==========================================================================
   2. PUBLIC HEADER, LOGO, BUTTONS & SIDE MENU DRAWER
   ========================================================================== */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease-in-out;
}

.header-hidden { transform: translateY(-100%); }

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.logo {
    flex-shrink: 0;
}

.logo h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 800;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Button UI Components */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-btn { background-color: var(--primary-color); color: #ffffff; }
.primary-btn { background-color: var(--accent); color: #ffffff; text-decoration: none; }
.secondary-btn { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-dark); }
.issue-btn-nav { background-color: #ef4444; color: white; width: 100%; justify-content: center; }

.hamburger { background: none; border: none; font-size: 1.3rem; color: var(--text-dark); cursor: pointer; }

/* Public App Drawer Navigation (Mobile State default view) */
header nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    z-index: 110;
    padding: 80px 30px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header nav.active { right: 0; }

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 500;
}

.nav-links a.active {
    color: var(--secondary-color);
    font-weight: 700;
}

/* ==========================================================================
   3. MAIN HOMEPAGE COMPONENT MODULE CARDS
   ========================================================================== */
.grid-stack { display: flex; flex-direction: column; gap: 20px; }

.hero { padding: 80px 20px; background: linear-gradient(135deg, rgba(30,58,138,0.05), rgba(37,99,235,0.1)); text-align: center; }
.hero h1 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 15px; font-weight: 800; }
.hero p { color: var(--text-light); margin-bottom: 25px; }

.notice-board { display: flex; flex-direction: column; gap: 15px; }
.notice-row { background: var(--white); border-left: 4px solid var(--primary-color); padding: 15px; border-radius: 0 8px 8px 0; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.notice-row .date { font-size: 0.8rem; font-weight: 700; color: var(--secondary-color); }
.read-notice-btn { align-self: flex-start; background: none; border: none; color: var(--secondary-color); font-weight: 700; cursor: pointer; }

.card { background: var(--white); padding: 30px 20px; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border-color); }
.card i { color: var(--primary-color); margin-bottom: 15px; }
.link-btn { color: var(--secondary-color); text-decoration: none; font-weight: 700; display: inline-block; margin-top: 15px; }

.faculty-card { background: var(--white); padding: 25px; text-align: center; border-radius: 12px; box-shadow: var(--shadow); }
.faculty-card img { border-radius: 50%; margin-bottom: 15px; }

.rank-table-wrapper { overflow-x: auto; border-radius: 8px; box-shadow: var(--shadow); }
.rank-table { width: 100%; border-collapse: collapse; background: var(--white); text-align: left; }
.rank-table th, .rank-table td { padding: 12px 15px; border-bottom: 1px solid var(--border-color); }
.rank-table th { background: var(--primary-color); color: #ffffff; }

.grid-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }

/* ==========================================================================
   4. JOURNAL & BLOG STREAM SPECIFIC MODULE LAYOUTS
   ========================================================================== */
.blog-hero { padding: 50px 20px; background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(15,23,42,0.02)); text-align: center; border-bottom: 1px solid var(--border-color); }
.blog-hero h1 { font-size: 2.2rem; color: var(--primary-color); font-weight: 800; }

/* Password Visibility Alignment Utilities */
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 40px !important; /* Forces layout spacing protection for icon */
    width: 100%;
}

.toggle-password-trigger {
    color: var(--text-light);
    transition: color 0.2s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-trigger:hover {
    color: var(--primary-color);
}

.category-bar { background-color: var(--white); border-bottom: 1px solid var(--border-color); padding: 12px 0; position: sticky; top: 60px; z-index: 90; }
.tags-wrapper { display: flex; gap: 10px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tags-wrapper::-webkit-scrollbar { display: none; }
.blog-tag { background: var(--bg-light); color: var(--text-light); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border-color); transition: all 0.2s; }
.blog-tag.active, .blog-tag:hover { background: var(--primary-color); color: #ffffff; border-color: var(--primary-color); }

.featured-blog-card { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border-color); display: flex; flex-direction: column; margin-top: 30px; }
.featured-img-frame img { width: 100%; height: 220px; object-fit: cover; }
.featured-blog-content { padding: 25px; }
.blog-badge { background: #ef4444; color: white; font-size: 0.7rem; text-transform: uppercase; font-weight: 800; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.blog-meta { font-size: 0.8rem; color: var(--text-light); margin: 8px 0 15px; }
.blog-excerpt { color: var(--text-light); margin-bottom: 20px; }

.article-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post-img-holder { position: relative; }
.post-img-holder img { width: 100%; height: 200px; object-fit: cover; }
.post-category-badge { position: absolute; bottom: 10px; left: 10px; background: rgba(15, 23, 42, 0.75); color: #ffffff; font-size: 0.7rem; font-weight: 700; padding: 4px 8px; border-radius: 4px; }
.article-content { padding: 20px; }

/* ==========================================================================
   5. INTERACTIVE SYSTEM POPUP MODALS FRAMEWORK
   ========================================================================== */
.modal { display: none; position: fixed; z-index: 200; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }
.modal-content { background-color: var(--white); margin: 20% auto; padding: 25px; border-radius: 16px; width: 90%; max-width: 400px; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.2); animation: zoomUp 0.25s ease-out; }
@keyframes zoomUp { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.6rem; cursor: pointer; color: var(--text-light); }
.input-group { margin-top: 15px; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.input-group input, .input-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); background: var(--bg-main); color: var(--text-dark); border-radius: 6px; }
.full-width { width: 100%; margin-top: 20px; }
.form-actions { margin-top: 12px; text-align: right; }
.modal-link { font-size: 0.85rem; color: var(--secondary-color); cursor: pointer; font-weight: 600; }
.modal-desc { font-size: 0.9rem; color: var(--text-light); margin-top: 8px; }
.modal-header-badge { display: inline-block; background: var(--bg-light); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: var(--primary-color); }

.dev-modal-card { text-align: center; }
.dev-avatar { width: 70px; height: 70px; background: var(--bg-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; color: var(--primary-color); }
.dev-title { font-size: 0.85rem; color: var(--secondary-color); font-weight: 700; margin-bottom: 10px; }

/* Public Base Footers */
footer { background: var(--bg-light); border-top: 1px solid var(--border-color); padding: 40px 0 20px; font-size: 0.9rem; }
.footer-content { display: flex; flex-direction: column; gap: 30px; }
.social-links a { display: flex; align-items: center; gap: 8px; color: var(--text-light); text-decoration: none; margin-top: 12px; }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-color); padding-top: 20px; color: var(--text-light); margin-top: 20px; }
.dev-credits { margin-top: 8px; font-size: 0.85rem; }
.dev-link { color: var(--secondary-color); cursor: pointer; text-decoration: underline; }

/* ==========================================================================
   6. PRIVATE STUDENT PORTAL APPLICATION DASHBOARD LAYOUTS
   ========================================================================== */
.dashboard-body {
    display: flex;
    background-color: var(--bg-light);
    min-height: 100vh;
}

.dash-main-wrapper {
    flex-grow: 1;
    margin-left: 260px;
    min-height: 100vh;
    width: calc(100% - 260px);
}

.dash-top-nav {
    height: 70px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-trigger {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.menu-toggle { display: none; background: none; border: none; font-size: 1.3rem; color: var(--text-dark); cursor: pointer; }
.page-title { font-size: 1.2rem; color: var(--primary-color); font-weight: 700; }
.dash-content { padding: 30px; }

/* Dashboard Core Grid Parameters */
.dash-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.dash-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

/* Sidebar Navigation Drawer Panels (Desktop Native Layout) */
.dash-sidebar {
    width: 260px;
    height: 100vh;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-sidebar { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-dark); cursor: pointer; }

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-nav ul { list-style: none; }
.sidebar-nav a, .sub-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--primary-color);
    background: rgba(30, 58, 138, 0.05);
}

.sidebar-nav .sub-label { cursor: default; color: var(--primary-color); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; margin-top: 15px; }
.sub-menu a { padding-left: 50px; font-size: 0.9rem; }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }
.logout-link { color: #ef4444; text-decoration: none; font-weight: bold; display: flex; align-items: center; gap: 8px; }

/* Section A: Profile Identity Details Card */
.profile-info-card { display: flex; flex-direction: column; justify-content: center; }
.profile-header { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.student-photo { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; border: 3px solid var(--primary-color); }
.student-basic h3 { font-size: 1.3rem; color: var(--text-dark); }
.student-basic p { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.info-box { background: var(--bg-light); padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); }
.info-box small { display: block; color: var(--text-light); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; }
.info-box strong { color: var(--text-dark); font-size: 0.95rem; display: block; margin-top: 4px; }

/* Section C: Today's High-Visibility Status Alert */
.today-attendance h3 { font-size: 1rem; margin-bottom: 15px; color: var(--text-dark); }
.status-wrap { display: flex; align-items: center; gap: 15px; }
.status-circle { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.status-circle.present { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-details p { font-size: 0.9rem; margin-bottom: 2px; color: var(--text-dark); }
.present-tag { background: #10b981; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.small-text { font-size: 0.75rem; color: var(--text-light); }

/* Section B: Statistical Reports & Horizontal Tabs Sliders */
.stats-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 15px; }
.stats-header h2 { font-size: 1.3rem; color: var(--primary-color); }
.semester-tabs-container { overflow: hidden; width: auto; }
.semester-tabs { display: flex; gap: 6px; background: var(--bg-light); padding: 6px; border-radius: 8px; border: 1px solid var(--border-color); }
.tab-btn { padding: 8px 16px; border: none; background: none; border-radius: 6px; cursor: pointer; color: var(--text-light); font-weight: 700; font-size: 0.85rem; white-space: nowrap; transition: 0.2s; }
.tab-btn.active { background: var(--primary-color); color: #ffffff; }

.stats-content-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
.chart-container-wrapper { display: flex; flex-direction: column; justify-content: center; }
.chart-container { height: 180px; position: relative; margin: 0 auto; width: 100%; max-width: 180px; }
.chart-summary { display: flex; justify-content: space-around; margin-top: 20px; border-top: 1px solid var(--border-color); padding-top: 15px; gap: 10px; }
.stat-mini { text-align: center; }
.stat-mini span { font-size: 0.75rem; color: var(--text-light); display: block; margin-bottom: 2px; }
.stat-mini strong { font-size: 1.05rem; color: var(--text-dark); }
.text-success { color: #10b981; }

/* Subject/Paper-wise Collapsible Data Tables Layouts */
.paper-stats h3 { font-size: 1.1rem; margin-bottom: 15px; color: var(--text-dark); }
.table-responsive-wrapper { width: 100%; overflow-x: auto; border-radius: 8px; border: 1px solid var(--border-color); }
.paper-table { width: 100%; border-collapse: collapse; background: var(--bg-main); }
.paper-table th, .paper-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.paper-table th { background: var(--bg-light); color: var(--text-light); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }
.paper-table td { color: var(--text-dark); }

/* Global Hidden Container Indicator for Mobile App View Nav Components */
.mobile-bottom-nav { display: none; }

/* ==========================================================================
   7. ADAPTIVE MEDIA VIEW BREAKPOINT INJECTIONS (RESPONSIVE ENGINE)
   ========================================================================== */

/* --- COMPREHENSIVE DESKTOP STANDARDS (LARGE MONITOR LAYOUT RULES) --- */
@media (min-width: 768px) {
    .hamburger { display: none; }
    
    header nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding: 0;
        margin-left: auto;
        margin-right: 25px;
        display: block;
    }
    
    .nav-links {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }
    
    .issue-btn-nav { width: auto; }

    .grid-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
    #academics .grid-stack { grid-template-columns: repeat(4, 1fr); }
    .grid-gallery { grid-template-columns: repeat(4, 1fr); }
    .gallery-img { height: 180px; }
    .blog-grid { grid-template-columns: repeat(3, 1fr) !important; }
    
    .hero h1, .blog-hero h1 { font-size: 3rem; }
    .footer-content { flex-direction: row; justify-content: space-between; }
    .modal-content { margin: 10% auto; }

    .featured-blog-card { flex-direction: row; align-items: center; }
    .featured-img-frame { flex: 1.2; }
    .featured-blog-content { flex: 1; padding: 40px; }
    .featured-img-frame img { height: 100%; min-height: 340px; }
}

@media (max-width: 767px) {
    header nav { margin-left: 0; margin-right: 0; }
}

/* --- ADAPTIVE MOBILE LAYOUT TRANSFORMATIONS (TABLETS & PHONE COMPACTION) --- */
@media (max-width: 992px) {
    body { padding-bottom: 75px; } /* Allocates navigation cushion room space for structural phone bars */
    
    .dash-main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    /* Fixed mobile view layout alignment for student top header navigation */
    .dash-top-nav { 
        padding: 0 12px; 
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .menu-toggle { display: block; }
    .page-title { font-size: 1rem; }
    .dash-content { padding: 12px; }
    .container-fluid { padding-left: 0; padding-right: 0; }

    /* Collapses multi-column sections to fluid vertical block sequences */
    .dash-row, .stats-content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Converts fixed tab buttons block structures to an infinite horizontal touch sliding strip */
    .semester-tabs-container {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .semester-tabs-container::-webkit-scrollbar { display: none; }
    .semester-tabs { width: max-content; padding: 4px; }
    .tab-btn { padding: 6px 14px; font-size: 0.8rem; }
    .chart-container { height: 150px; max-width: 150px; }

    /* Side Dashboard Nav Overwrite to turn drawer sliding panel layout mechanism on */
    .dash-sidebar { left: -100%; }
    .dash-sidebar.active { left: 0; }
    .close-sidebar { display: block; }

    /* Mounts and renders native App-Style Bottom Nav Interface Bar Component */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: var(--white);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-light);
        font-size: 0.75rem;
        font-weight: 600;
        gap: 4px;
        position: relative;
        flex: 1;
        justify-content: center;
        height: 100%;
    }

    .mobile-nav-item i { font-size: 1.2rem; }
    .mobile-nav-item.active { color: var(--primary-color); }

    .badge-mini {
        position: absolute;
        top: 6px;
        right: 22%;
        background-color: #ef4444;
        color: white;
        font-size: 0.65rem;
        padding: 1px 5px;
        border-radius: 10px;
        font-weight: 700;
    }
}/* ==========================================================================
   AUTHENTICATION LAYOUT OVERLAY INTERFACES (MODAL ADDITIONS)
   ========================================================================== */
.auth-modal-card {
    max-width: 420px;
    margin: 8% auto;
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.auth-icon-header {
    width: 65px;
    height: 65px;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.auth-modal-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Form Layout Metric Definitions */
.auth-modal-card .input-group {
    text-align: left;
    margin-bottom: 18px;
}

.auth-modal-card .input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.auth-modal-card .input-group label i {
    margin-right: 4px;
    color: var(--text-light);
}

.auth-modal-card .input-group input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.92rem;
    border-radius: 8px;
    outline: none;
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease-in-out;
}

.auth-modal-card .input-group input:focus {
    border-color: var(--secondary-color);
    background-color: var(--bg-main);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Interactive Alert Feedbacks Frameworks */
.auth-alert {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.4;
}

.auth-alert.error {
    background-color: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

.auth-alert.success {
    background-color: #def7ec;
    color: #03543f;
    border: 1px solid #bcf0da;
}

.hidden {
    display: none !important;
}

/* Processing Spinner System Indicators */
.btn-spinner i {
    margin-right: 6px;
}

/* Mobile Responsiveness Fine-Tuning Optimization overrides */
@media (max-width: 576px) {
    .auth-modal-card {
        width: 92%;
        margin: 20% auto;
        padding: 22px 18px;
    }
}
/* Multi-View Visibility Engine Rules */
.auth-view.hidden, .hidden {
    display: none !important;
}

/* Modal Inner Structures adjustments */
.modal-content {
    max-width: 420px;
    width: 90%;
    position: relative;
    padding: 25px;
    border-radius: 8px;
    background: var(--card-bg, #fff); /* Fallback to adapt context themes naturally */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.view-instruction {
    font-size: 0.88rem;
    color: var(--text-muted, #666);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Inline Dynamic View Actions Navigation Footer Links */
.auth-view-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-view-links a, .back-to-login-link {
    font-size: 0.85rem;
    color: var(--primary-accent, #0056b3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-view-links a:hover, .back-to-login-link:hover {
    text-decoration: underline;
}

/* Interactive Feedback Messages Styling Box */
.auth-feedback-msg {
    margin-bottom: 15px;
    padding: 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    text-align: center;
}

.auth-feedback-msg.success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.auth-feedback-msg.error {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ==========================================
   AUTHENTICATION MODAL CORE ARCHITECTURE
   ========================================== */

/* The outer dark background wrap covering the viewport */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Translucent backdrop shading */
    z-index: 9999; /* Higher than any standard content layers */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* Base structural layout adjustments for the active container card */
.modal-content {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 440px; /* Comfortable standard form box constraint */
    max-height: 90vh; /* Prevents long views from spilling off screen boundaries */
    overflow-y: auto; /* Adds a scrollbar safely within the card if needed */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    box-sizing: border-box; /* Crucial padding behavior normalization */
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visibility Control Utility Engine Class */
.auth-view.hidden,
.modal-overlay.hidden,
.hidden {
    display: none !important;
}

/* Form Structure Typography Adjustments */
.auth-view h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 600;
}

.view-instruction {
    font-size: 0.88rem;
    color: #666666;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* ==========================================
   INPUT FORM LAYER DESIGN ELEMENTS
   ========================================== */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444444;
}

/* Native field sizing fixes */
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 1px solid #cccccc;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* Inline password input wrapper overlay engine */
.password-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.toggle-password-icon {
    position: absolute;
    right: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 1.1rem;
    opacity: 0.7;
    z-index: 5;
    transition: opacity 0.2s ease;
}

.toggle-password-icon:hover {
    opacity: 1;
}

/* Options Bar Spacing Rules */
.form-options {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.remember-me-label {
    font-size: 0.88rem;
    color: #555555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Submit Activation Action Buttons */
.auth-submit-btn {
    width: 100%;
    padding: 13px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #0056b3;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.auth-submit-btn:hover {
    background-color: #004085;
}

.auth-submit-btn:active {
    transform: scale(0.99);
}

/* Close [X] Exit Button Layout Alignment */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaaaaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal-btn:hover {
    color: #333333;
}

/* ==========================================
   NAVIGATION LINKS & ASYNC NOTIFICATIONS
   ========================================== */
.auth-view-links {
    margin-top: 22px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #eeeeee;
    padding-top: 16px;
}

.auth-view-links a, 
.back-to-login-link {
    font-size: 0.85rem;
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
}

.auth-view-links a:hover, 
.back-to-login-link:hover {
    text-decoration: underline;
}

/* Feedback Status Block Box Configuration Rules */
.auth-feedback-msg {
    margin-top: 16px;
    padding: 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.auth-feedback-msg.success {
    background-color: rgba(40, 167, 69, 0.12);
    color: #1e7e34;
    border: 1px solid rgba(40, 167, 69, 0.25);
}

.auth-feedback-msg.error {
    background-color: rgba(220, 53, 69, 0.12);
    color: #bd2130;
    border: 1px solid rgba(220, 53, 69, 0.25);
}

/* ==========================================
   DARK THEME LAYER INTEGRATION COMPATIBILITY
   ========================================== */
body.dark-theme-mode .modal-content {
    background: #1e1e1e; /* Swaps the background card to match the dark color matrix profile */
    color: #f5f5f5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.dark-theme-mode .auth-view h2 {
    color: #ffffff;
}

body.dark-theme-mode .view-instruction,
body.dark-theme-mode .form-group label,
body.dark-theme-mode .remember-me-label {
    color: #b0b0b0;
}

body.dark-theme-mode .form-group input[type="text"],
body.dark-theme-mode .form-group input[type="password"] {
    background-color: #2d2d2d;
    border-color: #444444;
    color: #ffffff;
}

body.dark-theme-mode .form-group input:focus {
    border-color: #3788d8;
    box-shadow: 0 0 0 3px rgba(55, 136, 216, 0.25);
}

body.dark-theme-mode .auth-view-links {
    border-top-color: #2d2d2d;
}

body.dark-theme-mode .auth-view-links a, 
body.dark-theme-mode .back-to-login-link {
    color: #3788d8;
}

body.dark-theme-mode .close-modal-btn:hover {
    color: #ffffff;
}

/* Dynamic CSS Slide Animation Configuration */
@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}