/* ==========================================================================
   GLOBAL THEME & VARIABLES
   ========================================================================== */
:root {
    --primary-bg: #f8f9fa;
    --secondary-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;

    /* Branding Colors */
    --accent-color: #5a7d7c;
    --accent-color-hover: #4a6b69;
    --accent-color-light: #7FB4B2;
    --accent-gold: #c5a059;
    /* Assuming a gold accent from header styles */
    --light-accent-bg: #eef2f2;
    --header-text-color: #ffffff;

    /* Utility Colors */
    --error-color: #dc3545;
    --success-color: #28a745;
    --danger-color: #dc3545;

    /* Dynamic Spacing (from Dashboard) */
    --sidebar-width: clamp(280px, 20vw, 320px);
    --container-padding: clamp(15px, 2vw, 25px);
    --card-padding: clamp(16px, 1.5vw, 22px);
    --gap-size: clamp(15px, 1.5vw, 22px);
    --font-scale: clamp(0.85, 1vw, 1);
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
*,
*:before,
*:after {
    box-sizing: border-box;
}

/* Default hidden toggle button */
.menu-toggle-btn {
    display: none;
}

/* Default hidden overlay */
.sidebar-overlay {
    display: none;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.container {
    max-width: 900px;
    /* Default for forms */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==========================================================================
   HEADER STYLES (Shared across Login/Register)
   ========================================================================== */
.site-header {
    background: linear-gradient(100deg, var(--accent-color) 0%, var(--accent-color-light) 100%);
    color: var(--header-text-color);
    padding: 15px 40px;
    width: 100%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
    border-top: 3px solid var(--accent-gold);
    flex-shrink: 0;
}

.header-content {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}

.header-logo {
    height: 65px;
    width: auto;
    flex-shrink: 0;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.university-name {
    font-size: 2.3em;
    font-weight: 700;
    line-height: 1.2;
}

.department-name {
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.9;
}

/* Response adjustments for Header */
@media (max-width: 768px) {
    .header-content {
        text-align: center;
        justify-content: center;
        flex-direction: column;
    }

    .university-name {
        font-size: 1.5em;
    }

    .department-name {
        font-size: 1em;
    }

    .header-logo {
        height: 60px;
    }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--secondary-bg);
    padding: 30px 0;
    flex-shrink: 0;
    margin-top: auto;
    /* Push to bottom if content is short */
}

.footer-content {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.footer-content p {
    margin: 0;
}

.social-links a {
    color: var(--text-secondary);
    margin-left: 20px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .social-links a {
        margin: 0 10px;
    }
}

/* ==========================================================================
   FORM & INPUT STYLES (Registration/Login)
   ========================================================================== */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    /* Standardize margin */
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.input-group input,
.input-group select,
.input-group textarea {
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--accent-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.radio-group>label {
    margin-bottom: 0;
}

.radio-group>div {
    display: flex;
    align-items: center;
    gap: 25px;
}

.radio-group>div>label {
    font-weight: 400;
    color: var(--text-primary);
}

.submit-btn,
.btn-login {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 20px;
    display: block;
    text-align: center;
}

.submit-btn:hover,
.btn-login:hover {
    background-color: var(--accent-color-hover);
}

/* Field Error Highlight */
.field-error {
    border-color: var(--error-color) !important;
}

/* ==========================================================================
   REGISTRATION PAGE SPECIFIC (.accordion, form headers)
   ========================================================================== */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 2.5em;
    margin: 0;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1.1em;
}

.accordion-item {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.accordion-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header h2 {
    font-size: 1.2em;
    font-weight: 600;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 20px;
}

.accordion-item.active .accordion-content {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.conditional-section,
.sub-accordion {
    display: none;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 10px;
    color: var(--accent-color);
}


/* ==========================================================================
   LOGIN PAGE SPECIFIC
   ========================================================================== */
.login-main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.page-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    background-color: var(--secondary-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.branding-panel {
    flex: 1;
    background: #f1f3f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.branding-panel img {
    width: 350px;
    height: auto;
}

.branding-panel p {
    color: var(--text-secondary);
    font-size: 1.1em;
    font-weight: 400;
    margin-top: 10px;
    max-width: 300px;
}

.login-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
}

.login-panel h2 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-panel .subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password-link {
    font-size: 0.8em;
    color: var(--accent-color);
}

.register-link {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
}

.register-link a {
    color: var(--accent-color);
    font-weight: 500;
}

.error-message {
    color: var(--error-color);
    background-color: rgba(220, 53, 69, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 992px) {
    .page-container {
        flex-direction: column;
        min-height: auto;
        width: 100%;
        max-width: 450px;
    }

    .branding-panel {
        display: none;
    }

    .login-panel {
        padding: 40px 30px;
    }
}

/* ==========================================================================
   STUDENT DASHBOARD SPECIFIC
   ========================================================================== */
.dashboard-body {
    font-size: calc(14px * var(--font-scale));
}

.dashboard-container {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: var(--container-padding);
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: var(--gap-size);
    align-items: start;
    min-height: 100vh;
}

/* Sidebar */
.profile-sidebar {
    background: var(--secondary-bg);
    border-radius: clamp(8px, 1vw, 12px);
    padding: var(--card-padding);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: var(--container-padding);
    height: auto;
    max-height: calc(100vh - 2 * var(--container-padding));
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Prevents scroll chaining to parent */
    border-top: clamp(3px, 0.4vw, 5px) solid var(--accent-color);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    /* Hide by default in Firefox */
    transition: scrollbar-color 0.3s;
}

.profile-sidebar:hover {
    scrollbar-color: var(--accent-color) transparent;
    /* Show in Firefox on hover */
}

/* Webkit Scrollbar Styling */
.profile-sidebar::-webkit-scrollbar {
    width: 6px;
}

.profile-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.profile-sidebar::-webkit-scrollbar-thumb {
    background-color: transparent;
    /* Hidden by default */
    border-radius: 20px;
}

.profile-sidebar:hover::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    /* Visible on hover */
}

.profile-photo {
    width: clamp(100px, 10vw, 130px);
    height: clamp(100px, 10vw, 130px);
    border-radius: 50%;
    object-fit: cover;
    border: clamp(3px, 0.3vw, 4px) solid var(--light-accent-bg);
    margin-bottom: clamp(12px, 1.2vw, 18px);
    display: block;
    margin: 0 auto clamp(12px, 1.2vw, 18px);
}

.profile-name {
    font-size: clamp(1.1em, 1.4vw, 1.4em);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.3;
}

.profile-meta {
    color: var(--text-secondary);
    font-size: clamp(0.8em, 0.9vw, 0.9em);
    margin-bottom: 5px;
}

.profile-badge {
    display: inline-block;
    background: var(--light-accent-bg);
    color: var(--accent-color);
    padding: clamp(4px, 0.5vw, 6px) clamp(10px, 1vw, 14px);
    border-radius: 20px;
    font-size: clamp(0.75em, 0.85vw, 0.85em);
    font-weight: 500;
    margin-top: clamp(8px, 1vw, 12px);
}

.essential-links {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.8vw, 10px);
    margin-top: clamp(15px, 1.5vw, 22px);
    padding-top: clamp(15px, 1.5vw, 22px);
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.essential-links a {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
    padding: clamp(8px, 0.9vw, 12px) clamp(10px, 1vw, 14px);
    background-color: var(--primary-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: clamp(6px, 0.7vw, 8px);
    font-weight: 500;
    font-size: clamp(0.8em, 0.85vw, 0.9em);
    transition: all 0.3s ease;
}

.essential-links a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateX(clamp(3px, 0.4vw, 5px));
}

.essential-links a span.emoji {
    font-size: clamp(1em, 1.1vw, 1.2em);
    min-width: clamp(18px, 2vw, 22px);
    text-align: center;
}

/* Dashboard Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: var(--gap-size);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-bg);
    padding: clamp(15px, 1.5vw, 22px) clamp(18px, 2vw, 28px);
    border-radius: clamp(8px, 1vw, 12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: clamp(12px, 1.2vw, 16px);
}

.page-header h1 {
    font-size: clamp(1.3em, 1.6vw, 1.6em);
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    gap: clamp(8px, 1vw, 12px);
    flex-wrap: wrap;
}


.action-btn {
    padding: clamp(8px, 1vw, 12px) clamp(16px, 1.5vw, 22px);
    border-radius: clamp(5px, 0.6vw, 7px);
    font-size: clamp(0.85em, 0.95vw, 1em);
    white-space: nowrap;
    display: inline-block;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    font-weight: 500;
    font-family: inherit;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: translateY(0);
}

/* Button Variants */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    opacity: 0.85;
}

.btn-outline {
    background-color: #ffffff;
    border-color: #dadce0;
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    /* Darker red */
}

/* Dashboard Cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(320px, 35vw, 420px), 1fr));
    gap: var(--gap-size);
}

.card {
    background-color: var(--secondary-bg);
    border-radius: clamp(8px, 1vw, 12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: var(--card-padding);
    height: fit-content;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: clamp(1em, 1.1vw, 1.15em);
    margin-top: 0;
    margin-bottom: clamp(14px, 1.4vw, 20px);
    padding-bottom: clamp(8px, 0.9vw, 12px);
    border-bottom: 2px solid var(--light-accent-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.9vw, 12px);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 18vw, 200px), 1fr));
    gap: clamp(12px, 1.3vw, 18px);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.4vw, 5px);
}

.detail-item strong {
    color: var(--text-secondary);
    font-size: clamp(0.7em, 0.75vw, 0.78em);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span,
.detail-item a {
    font-size: clamp(0.88em, 0.95vw, 0.98em);
    color: var(--text-primary);
    font-weight: 500;
    word-wrap: break-word;
    line-height: 1.4;
}

.detail-item a {
    color: var(--accent-color);
}

.detail-item a:hover {
    color: var(--accent-color-hover);
    text-decoration: underline;
}

.academic-section {
    margin-top: clamp(14px, 1.4vw, 18px);
    padding-top: clamp(14px, 1.4vw, 18px);
    border-top: 1px solid var(--border-color);
}

.academic-section h4 {
    margin: 0 0 clamp(10px, 1.1vw, 14px) 0;
    color: var(--text-secondary);
    font-size: clamp(0.85em, 0.92vw, 0.95em);
    font-weight: 600;
    text-transform: uppercase;
}

/* Document Links in Card */
.document-links {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 12px);
}

.document-link-item {
    background-color: var(--primary-bg);
    border-radius: clamp(6px, 0.7vw, 8px);
    padding: clamp(10px, 1.2vw, 14px) clamp(12px, 1.3vw, 16px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.document-link-item:hover {
    border-color: var(--accent-color);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.document-link-item strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: clamp(0.85em, 0.92vw, 0.95em);
}

.document-link-item a {
    color: var(--accent-color);
    padding: clamp(5px, 0.6vw, 7px) clamp(10px, 1.1vw, 14px);
    background: var(--light-accent-bg);
    border-radius: clamp(4px, 0.5vw, 5px);
    font-size: clamp(0.82em, 0.9vw, 0.92em);
    text-decoration: none;
}

.document-link-item a:hover {
    background: var(--accent-color);
    color: white;
}

.scholarship-list {
    margin: clamp(8px, 1vw, 12px) 0 0 0;
    padding-left: clamp(18px, 2vw, 22px);
    list-style-type: none;
}

.scholarship-list li {
    padding: clamp(6px, 0.7vw, 8px) 0;
    position: relative;
    font-size: clamp(0.88em, 0.95vw, 0.98em);
}

.scholarship-list li::before {
    content: "✓";
    position: absolute;
    left: clamp(-18px, -2vw, -22px);
    color: var(--success-color);
    font-weight: bold;
}

/* Dashboard Responsive */
@media (max-width: 1400px) {
    :root {
        --sidebar-width: clamp(260px, 22vw, 300px);
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 100%;
        --container-padding: 15px;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
        margin-bottom: 15px;
    }

    .header-actions {
        width: 100%;
    }

    .action-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 600px) {
    :root {
        --container-padding: 10px;
        --card-padding: 15px;
        --gap-size: 12px;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
    }

    .details-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1920px) {
    :root {
        --sidebar-width: 320px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    }
}



/* ==========================================================================
   PRINT HELPERS (Screen View)
   ========================================================================== */
.print-header,
.print-footer {
    display: none;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    @page {
        size: A4;
        margin: 5mm;
    }

    .no-print,
    .profile-sidebar,
    .card-title span,
    .site-header,
    .site-footer {
        display: none !important;
    }

    body {
        background: white !important;
        font-size: 10pt !important;
        color: #000 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .dashboard-container {
        display: block !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .main-content,
    .content-grid {
        display: block !important;
    }

    /* Print Header */
    .print-header {
        display: flex !important;
        align-items: center;
        gap: 20px;
        margin-bottom: 25px;
        padding-bottom: 20px;
        border-bottom: 2px solid #000;
    }

    .print-photo {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #5a7d7c;
    }

    .print-info h1 {
        margin: 0;
        font-size: 20pt;
        color: #5a7d7c;
        text-transform: uppercase;
    }

    .print-info h2 {
        margin: 5px 0 0;
        font-size: 14pt;
        color: #333;
    }

    .print-meta {
        margin-top: 5px;
        font-size: 11pt;
        color: #666;
    }

    /* Cards in Print */
    .content-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Two columns for print content if space permits */
        gap: 20px;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none !important;
        margin-bottom: 0;
        padding: 15px;
        background-color: #fff !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .card-title {
        color: #000;
        border-bottom: 1px solid #eee;
    }

    .detail-item strong {
        color: #444;
    }

    .detail-item span {
        color: #000;
    }

    /* Remove URLs */
    a[href]:after {
        content: none !important;
    }

    /* Print Footer */
    .print-footer {
        display: flex !important;
        justify-content: space-between;
        margin-top: 30px;
        padding-top: 10px;
        border-top: 1px solid #ddd;
        font-size: 9pt;
        color: #666;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
    }
}

/* ==========================================================================
   MOBILE OPTIMIZATION (Responsive Sidebar & Layout)
   ========================================================================== */
@media (max-width: 900px) {

    /* Ensure Chart Grids Stack */
    .dashboard-main-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 15px;
        --gap-size: 15px;
    }

    /* 1. Layout: Remove Sidebar from Grid */
    .dashboard-container {
        display: block;
        /* Stack instead of grid */
        position: relative;
    }

    /* 2. Sidebar: Off-Canvas Menu */
    .profile-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        /* Hide off-screen */
        width: 280px;
        height: 100vh;
        z-index: 1000;
        background: var(--secondary-bg);
        overflow-y: auto;
        transition: left 0.3s ease-in-out;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
        border-radius: 0;
        margin: 0;
        border-top: none;
    }

    .profile-sidebar.mobile-active {
        left: 0;
        /* Slide in */
    }

    /* 3. Overlay (Backdrop) */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* 4. Hamburger Toggle Button */
    .menu-toggle-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: var(--secondary-bg);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        cursor: pointer;
        margin-right: 15px;
        flex-shrink: 0;
    }

    /* 5. Header Adjustments */
    .page-header {
        position: sticky;
        top: 0;
        /* Below sidebar but above content */
        margin-bottom: 15px;
        z-index: 900;
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        width: 100%;
        padding: 0 15px;
        max-width: 100%;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
        width: 100%;
        padding: 0;
        /* Let children handle padding if needed, or set small padding */
    }

    .title-group {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
        gap: 10px;
    }

    .action-btn {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    /* 6. Content Stacking */
    .quick-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        height: auto;
    }

    .quick-actions-bar>div {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .quick-actions-bar div[title] {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
        font-size: 1rem;
    }

    /* 7. Table Scrolling */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Hide news on very small screens if needed, or adjust */
    .news-scroll-window {
        height: 180px !important;
    }
}