/* =============================================================
   JRLEduTech - STYLE GLOBAL
   Version V1
   ============================================================= */


/* =============================================================
   1. RESET & BASE
   ============================================================= */

:root {
    --color-brand-700: #1d4ed8;
    --color-brand-600: #2563eb;
    --color-brand-100: #dbeafe;
    --color-brand-50: #eff6ff;
    --color-page: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-text-strong: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-success: #16a34a;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #0891b2;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --radius-sm: 7px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Tahoma,
        Geneva,
        Verdana,
        sans-serif;

    background-color: var(--color-page);
    color: var(--color-text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--color-brand-600);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}



/* =============================================================
   2. MAIN APPLICATION LAYOUT
   ============================================================= */

.dashboard-layout {
    min-height: 100vh;
    display: flex;
}

.dashboard-content {
    flex: 1;
    min-width: 0;

    padding: 32px;

    background-color: var(--color-page);
}



/* =============================================================
   3. SIDEBAR
   ============================================================= */

.sidebar {
    width: 270px;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    flex-shrink: 0;

    padding: var(--space-5) var(--space-4);

    background-color: var(--color-surface);
    color: var(--color-text);

    border-right: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);

    position: sticky;
    top: 0;

    height: 100vh;

    overflow-y: auto;
}


.sidebar-brand {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 24px;
}


.sidebar-logo {
    width: 210px;
    max-height: 90px;

    object-fit: contain;

    padding: 10px;

    background-color: var(--color-surface);

    border-radius: 12px;
}


.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 5px;

    flex: 1;
}


.sidebar-nav a {
    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 11px 13px;

    border-radius: 8px;

    color: var(--color-muted);

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    transition:
        background-color 0.2s,
        color 0.2s,
        transform 0.1s;
}


.sidebar-nav a:hover {
    background-color: var(--color-brand-50);
    color: var(--color-brand-700);
}


.sidebar-nav a.active {
    background-color: var(--color-brand-600);
    color: var(--color-surface);

    font-weight: 600;
}


.nav-icon {
    width: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 17px;
}


.sidebar-footer {
    margin-top: 25px;
}


.logout {
    width: 100%;

    padding: 12px 16px;

    border: none;
    border-radius: 8px;

    background-color: var(--color-danger);
    color: var(--color-surface);

    font-weight: 600;

    transition:
        background-color 0.2s,
        transform 0.1s;
}


.logout:hover {
    background-color: #b91c1c;
}


.logout:active {
    transform: scale(0.98);
}



/* =============================================================
   4. PAGE HEADERS
   ============================================================= */

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

    gap: 20px;

    margin-bottom: 28px;
}


.dashboard-header h1 {
    margin-top: 4px;

    font-size: 30px;
    line-height: 1.2;

    color: var(--color-text-strong);
}


.dashboard-header p {
    margin-top: 7px;

    color: var(--color-muted);

    font-size: 15px;
    line-height: 1.6;
}


.page-label {
    margin: 0 !important;

    color: #2563eb !important;

    font-size: 12px !important;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}



/* =============================================================
   5. USER PROFILE IN DASHBOARD
   ============================================================= */

.dashboard-user {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 8px 12px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    background-color: var(--color-surface);
}


.user-avatar {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background-color: var(--color-brand-600);
    color: var(--color-surface);

    font-weight: 700;
}


.user-details {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.user-details strong {
    font-size: 14px;
    color: #0f172a;
}


.user-details small {
    font-size: 12px;
    color: #64748b;
}



/* =============================================================
   6. SCHOOL SUMMARY
   ============================================================= */

.school-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 24px;

    padding: 20px 24px;

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}


.school-summary small {
    display: block;

    margin-bottom: 5px;

    color: #64748b;

    font-size: 12px;
}


.school-summary h2 {
    color: #0f172a;

    font-size: 20px;
}


.school-year {
    text-align: right;
}


.school-year strong {
    color: #2563eb;

    font-size: 15px;
}



/* =============================================================
   7. DASHBOARD STATISTICS
   ============================================================= */

.stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 28px;
}


.stat-card {
    padding: 22px;

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.2s,
        box-shadow 0.2s;
}


.stat-card:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-md);
}


.stat-card-top {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 14px;

    color: #64748b;

    font-size: 13px;
    font-weight: 600;
}


.stat-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background-color: var(--color-brand-50);
}


.stat-card > strong {
    display: block;

    margin-bottom: 4px;

    color: #0f172a;

    font-size: 30px;
}


.stat-card > small {
    color: #64748b;

    font-size: 12px;
}



/* =============================================================
   8. DASHBOARD PANELS
   ============================================================= */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(300px, 0.65fr);

    gap: 20px;

    margin-bottom: 24px;
}


.dashboard-panel {
    padding: 24px;

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    box-shadow:
        0 1px 3px
        rgba(15, 23, 42, 0.04);
}


.panel-header,
.list-header,
.form-card-header,
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}


.panel-header {
    margin-bottom: 20px;
}


.panel-header h2,
.list-header h2,
.form-card-header h2,
.page-toolbar h2 {
    color: #0f172a;

    font-size: 18px;
}


.panel-header p,
.list-header p,
.form-card-header p,
.page-toolbar p {
    margin-top: 5px;

    color: #64748b;

    font-size: 13px;
    line-height: 1.5;
}


.panel-link {
    color: #2563eb;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}


.panel-link:hover {
    text-decoration: underline;
}



/* =============================================================
   9. QUICK ACTIONS
   ============================================================= */

.quick-actions {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}


.quick-action-card {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 15px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    background-color: var(--color-page);

    text-decoration: none;

    transition:
        border-color 0.2s,
        background-color 0.2s,
        transform 0.1s;
}


.quick-action-card:hover {
    border-color: #93c5fd;

    background-color: var(--color-brand-50);

    transform: translateY(-1px);
}


.quick-action-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background-color: #ffffff;

    font-size: 19px;
}


.quick-action-card strong {
    display: block;

    margin-bottom: 3px;

    color: #0f172a;

    font-size: 13px;
}


.quick-action-card small {
    color: #64748b;

    font-size: 11px;
}



/* =============================================================
   10. GENERIC CARDS
   ============================================================= */

.card-box,
.form-card {
    margin-bottom: 22px;

    padding: 24px;

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    box-shadow:
        0 1px 3px
        rgba(15, 23, 42, 0.04);
}


.form-card-header,
.list-header {
    margin-bottom: 20px;
}


.page-toolbar {
    margin-bottom: 22px;

    padding: 18px 20px;

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}



/* =============================================================
   11. BUTTONS
   ============================================================= */

.btn-primary,
.btn-secondary,
.btn-success,
.btn-save,
.btn-cancel,
.btn-excel-export,
.btn-excel-import {
    border: none;
    border-radius: 8px;

    padding: 10px 16px;

    font-size: 13px;
    font-weight: 600;

    transition:
        background-color 0.2s,
        transform 0.1s,
        opacity 0.2s;
}


.btn-primary {
    background-color: var(--color-brand-600);
    color: var(--color-surface);
}


.btn-primary:hover {
    background-color: #1d4ed8;
}


.btn-secondary {
    background-color: #0f766e;
    color: #ffffff;
}


.btn-secondary:hover {
    background-color: #115e59;
}


.btn-success,
.btn-save {
    background-color: var(--color-success);
    color: var(--color-surface);
}


.btn-success:hover,
.btn-save:hover {
    background-color: #15803d;
}


.btn-cancel {
    background-color: #e2e8f0;
    color: #334155;
}


.btn-cancel:hover {
    background-color: #cbd5e1;
}


.btn-excel-export {
    background-color: #16a34a;
    color: #ffffff;
}


.btn-excel-export:hover {
    background-color: #15803d;
}


.btn-excel-import {
    background-color: var(--color-info);
    color: var(--color-surface);
}


.btn-excel-import:hover {
    background-color: #0e7490;
}


.btn-primary:active,
.btn-secondary:active,
.btn-success:active,
.btn-save:active,
.btn-cancel:active,
.btn-excel-export:active,
.btn-excel-import:active {
    transform: scale(0.98);
}


button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}



/* =============================================================
   12. ACTION BUTTON CONTAINER
   ============================================================= */

.action-buttons {
    display: flex;
    align-items: center;

    gap: 9px;

    flex-wrap: wrap;
}



/* =============================================================
   13. FORMS
   ============================================================= */

.grid-form {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.form-group {
    display: flex;
    flex-direction: column;

    gap: 6px;
}


.form-group-full {
    grid-column: 1 / -1;
}


.form-group label {
    color: #334155;

    font-size: 13px;
    font-weight: 600;
}


.form-group input,
.form-group select,
.form-group textarea,
.login-form input {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);

    background-color: var(--color-surface);
    color: var(--color-text);

    font-size: 14px;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


.form-group textarea {
    resize: vertical;

    min-height: 100px;
}


.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.login-form input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.12);
}


.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}


.field-help {
    color: #64748b;

    font-size: 11px;
    line-height: 1.5;
}


.form-actions {
    grid-column: 1 / -1;

    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 5px;
}



/* =============================================================
   14. SEARCH
   ============================================================= */

.search-bar {
    width: 100%;

    margin-bottom: 18px;
}


.search-bar input {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background-color: var(--color-surface);

    font-size: 14px;
}


.search-bar input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.1);
}



/* =============================================================
   15. STUDENT / TEACHER / PARENT / CLASS CARDS
   ============================================================= */

.student-grid,
.student-list-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(280px, 1fr)
        );

    gap: 15px;
}


.student-card {
    min-width: 0;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 15px;

    padding: 17px;

    position: relative;

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


.student-card:hover {
    border-color: #cbd5e1;

    box-shadow:
        0 4px 12px
        rgba(15, 23, 42, 0.05);
}


.student-card strong {
    display: block;

    color: #0f172a;

    font-size: 15px;
}


.student-card small {
    display: block;

    margin-top: 6px;

    color: #64748b;

    font-size: 12px;

    word-break: break-word;
}


.info-tag {
    display: inline-flex;
    align-items: center;

    margin-top: 6px;

    padding: 3px 8px;

    border-radius: 999px;

    background-color: var(--color-border);
    color: #334155;

    font-size: 11px;
    font-weight: 600;
}



/* =============================================================
   16. THREE DOT MENU
   ============================================================= */

.menu-container {
    position: relative;

    flex-shrink: 0;
}


.btn-more {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 7px;

    background-color: transparent;
    color: #64748b;

    font-size: 21px;
}


.btn-more:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}


.dropdown-menu {
    display: none;

    min-width: 150px;

    position: absolute;
    top: calc(100% + 5px);
    right: 0;

    overflow: hidden;

    z-index: 100;

    background-color: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 8px;

    box-shadow:
        0 10px 24px
        rgba(15, 23, 42, 0.12);
}


.dropdown-menu.show {
    display: block;
}


.dropdown-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 10px 13px;

    border: none;

    background-color: transparent;
    color: #334155;

    text-align: left;

    font-size: 13px;
}


.dropdown-item:hover {
    background-color: #f8fafc;
}


.dropdown-item.delete {
    color: #dc2626;
}


.dropdown-item.delete:hover {
    background-color: #fef2f2;
}



/* =============================================================
   17. TABLES
   ============================================================= */

.table-responsive {
    width: 100%;

    overflow-x: auto;
}


.grade-table,
.attendance-table,
.report-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}


.grade-table thead,
.attendance-table thead,
.report-table thead {
    background-color: var(--color-page);
}


.grade-table th,
.grade-table td,
.attendance-table th,
.attendance-table td,
.report-table th,
.report-table td {
    padding: 12px 14px;

    border-bottom: 1px solid var(--color-border);

    text-align: left;

    font-size: 13px;
}


.grade-table th,
.attendance-table th,
.report-table th {
    color: #475569;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}


.grade-table tbody tr:hover,
.attendance-table tbody tr:hover {
    background-color: var(--color-page);
}


.text-center {
    text-align: center !important;
}


.empty-table-cell {
    padding: 28px !important;

    color: #64748b;

    text-align: center !important;
}



/* =============================================================
   18. ATTENDANCE
   ============================================================= */

.attendance-filter-form {
    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        auto;

    gap: 15px;

    align-items: end;
}


.attendance-filter-action {
    display: flex;
    align-items: flex-end;
}


.attendance-filter-action button {
    min-height: 42px;
}


.attendance-legend {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;

    margin-bottom: 18px;
}


.attendance-legend-item {
    padding: 6px 10px;

    background-color: #f1f5f9;

    border-radius: 999px;

    color: #475569;

    font-size: 11px;
    font-weight: 600;
}



/* =============================================================
   19. MODALS
   ============================================================= */

.modal-overlay {
    width: 100%;
    height: 100%;

    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background-color:
        rgba(15, 23, 42, 0.6);
}


.modal-content {
    width: 100%;
    max-width: 520px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 24px;

    background-color: var(--color-surface);

    border-radius: var(--radius-lg);

    box-shadow:
        0 25px 50px
        rgba(15, 23, 42, 0.22);
}


.modal-large {
    max-width: 900px;
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 15px;

    margin-bottom: 20px;
}


.modal-header h2 {
    color: #0f172a;

    font-size: 20px;
}


.modal-header p {
    margin-top: 5px;

    color: #64748b;

    font-size: 12px;
}


.modal-close-button {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: none;
    border-radius: 8px;

    background-color: #f1f5f9;
    color: #475569;

    font-size: 24px;
    line-height: 1;
}


.modal-close-button:hover {
    background-color: #e2e8f0;

    color: #0f172a;
}


.modal-actions {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 22px;
}



/* =============================================================
   20. INFO PANEL
   ============================================================= */

.info-panel {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    margin-bottom: 22px;

    padding: 18px 20px;

    background-color: #eff6ff;

    border: 1px solid #bfdbfe;
    border-radius: 10px;
}


.info-panel-icon {
    font-size: 21px;
}


.info-panel strong {
    display: block;

    margin-bottom: 4px;

    color: #1e3a8a;

    font-size: 13px;
}


.info-panel p {
    color: #475569;

    font-size: 12px;
    line-height: 1.6;
}



/* =============================================================
   21. EMPTY STATES
   ============================================================= */

.empty-dashboard-state {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    grid-column: 1 / -1;

    gap: 8px;

    padding: 35px 20px;

    color: #64748b;

    text-align: center;
}


.empty-dashboard-state span {
    font-size: 28px;
}


.empty-dashboard-state p {
    font-size: 13px;
}



/* =============================================================
   22. WELCOME DASHBOARD
   ============================================================= */

.welcome-dashboard {
    display: flex;
    align-items: center;

    gap: 15px;

    margin-bottom: 24px;

    padding: 24px;

    background-color: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
}


.welcome-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background-color: #eff6ff;

    font-size: 24px;
}


.welcome-dashboard h2 {
    margin-bottom: 5px;

    color: #0f172a;

    font-size: 18px;
}


.welcome-dashboard p {
    color: #64748b;

    font-size: 13px;
    line-height: 1.6;
}



/* =============================================================
   23. DASHBOARD FOOTER
   ============================================================= */

.dashboard-footer {
    display: flex;
    justify-content: space-between;

    gap: 15px;

    padding-top: 15px;

    border-top: 1px solid #e2e8f0;

    color: #94a3b8;

    font-size: 11px;
}



/* =============================================================
   24. GRADEBOOK
   ============================================================= */

.subjects-grid,
#subjectsContainer {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(200px, 1fr)
        );

    gap: 15px;

    margin-bottom: 20px;

    padding: 18px;

    background-color: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 10px;
}


.subjects-grid > div,
#subjectsContainer > div {
    display: flex;
    flex-direction: column;

    gap: 6px;
}


.subjects-grid label,
#subjectsContainer label {
    color: #334155;

    font-size: 12px;
    font-weight: 600;
}


.subjects-grid input,
#subjectsContainer input {
    width: 100%;

    padding: 10px;

    border: 1px solid #cbd5e1;
    border-radius: 7px;

}

.school-context-detail {
    margin-top: var(--space-1);
    color: var(--color-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.admin-dashboard-summary {
    margin-bottom: var(--space-6);
}

.dashboard-summary-status {
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-muted);
}

.dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-percentage {
    color: var(--color-brand-600);
    font-size: 28px;
}

.summary-count-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.summary-count-grid > div {
    min-width: 0;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-page);
}

.summary-count-grid span,
.summary-count-grid strong {
    display: block;
}

.summary-count-grid span {
    color: var(--color-muted);
    font-size: 12px;
}

.summary-count-grid strong {
    margin-top: var(--space-1);
    color: var(--color-text-strong);
    font-size: 20px;
}

.enrollment-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: var(--space-4);
}

.summary-coverage,
.dashboard-empty-message {
    margin-top: var(--space-4);
    color: var(--color-muted);
    font-size: 13px;
}

.dashboard-summary-list {
    display: grid;
    gap: var(--space-2);
}

.dashboard-summary-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-summary-list-item {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.dashboard-summary-list-item > div {
    min-width: 0;
}

.dashboard-summary-list-item strong,
.dashboard-summary-list-item small {
    display: block;
    overflow-wrap: anywhere;
}

.dashboard-summary-list-item small {
    margin-top: var(--space-1);
    color: var(--color-muted);
}

.summary-status {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--color-brand-50);
    color: var(--color-brand-700);
    font-size: 11px;
    font-weight: 700;
}

.summary-status-accepted {
    color: var(--color-success);
}

.summary-status-rejected {
    color: var(--color-danger);
}


.subjects-grid input:focus,
#subjectsContainer input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.1);
}


.grade-summary {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 20px;
}


.grade-summary > div {
    padding: 16px;

    background-color: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 8px;
}


.grade-summary small {
    display: block;

    margin-bottom: 5px;

    color: #64748b;

    font-size: 11px;
}


.grade-summary strong {
    color: #0f172a;

    font-size: 18px;
}



/* =============================================================
   25. REPORT CARD
   ============================================================= */

.report-card-preview {
    padding: 30px;

    background-color: #ffffff;

    color: #1e293b;

    border: 1px solid #cbd5e1;
    border-radius: 8px;
}


.report-school-header {
    display: flex;
    align-items: center;

    gap: 18px;

    padding-bottom: 18px;
    margin-bottom: 18px;

    border-bottom: 3px double #0f172a;
}


.report-school-logo {
    width: 75px;
    height: 75px;

    object-fit: contain;

    flex-shrink: 0;
}


.report-school-info {
    flex: 1;

    text-align: center;
}


.report-school-info h2 {
    margin-bottom: 4px;

    color: #0f172a;

    font-size: 20px;
}


.report-school-info p {
    margin: 2px 0;

    color: #475569;

    font-size: 11px;
}


.report-title {
    margin-bottom: 20px;

    padding: 10px;

    background-color: #f1f5f9;

    border: 1px solid #cbd5e1;

    text-align: center;
}


.report-title h2 {
    color: #0f172a;

    font-size: 17px;
}


.report-title p {
    margin-top: 3px;

    color: #475569;

    font-size: 12px;
}


.report-student-info {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 20px;
}


.report-student-info > div {
    padding: 10px 12px;

    background-color: #f8fafc;

    border-radius: 6px;
}


.report-student-info small {
    display: block;

    margin-bottom: 3px;

    color: #64748b;

    font-size: 10px;

    text-transform: uppercase;
}


.report-student-info strong {
    color: #0f172a;

    font-size: 13px;
}


.report-attendance {
    margin-top: 22px;
}


.report-attendance h3,
.report-remark h3 {
    margin-bottom: 10px;

    color: #0f172a;

    font-size: 14px;
}


.report-attendance-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}


.report-attendance-grid > div {
    padding: 12px;

    text-align: center;

    background-color: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 6px;
}


.report-attendance-grid small {
    display: block;

    margin-bottom: 4px;

    color: #64748b;

    font-size: 10px;
}


.report-attendance-grid strong {
    color: #0f172a;

    font-size: 17px;
}


.report-remark {
    margin-top: 22px;

    padding: 15px;

    background-color: #fafafa;

    border: 1px solid #e2e8f0;
    border-radius: 6px;
}


.report-remark p {
    color: #475569;

    font-size: 12px;
    line-height: 1.6;
}


.report-signatures {
    display: flex;
    justify-content: space-between;

    gap: 30px;

    margin-top: 50px;
}


.report-signatures > div {
    width: 180px;

    text-align: center;
}


.report-signatures span {
    display: block;

    margin-bottom: 6px;
}


.report-signatures small {
    color: #475569;

    font-size: 10px;
}



/* =============================================================
   26. RESOURCES
   ============================================================= */

.resource-filters,
.notification-filters {
    display: grid;

    grid-template-columns:
        minmax(250px, 2fr)
        minmax(180px, 1fr);

    gap: 15px;

    align-items: end;

    margin-bottom: 20px;
}


.notification-filters {
    grid-template-columns:
        minmax(250px, 2fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr);
}


.resource-filters .search-bar,
.notification-filters .search-bar {
    margin-bottom: 0;
}



/* =============================================================
   27. NOTIFICATIONS
   ============================================================= */

.notification-list,
.dashboard-notifications {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.notification-badge {
    min-width: 19px;
    height: 19px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: auto;

    padding: 0 5px;

    border-radius: 999px;

    background-color: #ef4444;
    color: #ffffff;

    font-size: 10px;
    font-weight: 700;
}



/* =============================================================
   28. LOGIN PAGE
   ============================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 20px;

    background:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #1e3a8a 55%,
            #2563eb 100%
        );
}


.login-wrapper {
    width: 100%;
    max-width: 430px;
}


.login-card {
    padding: 34px;

    background-color: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 25px 60px
        rgba(15, 23, 42, 0.28);
}


.login-brand {
    text-align: center;

    margin-bottom: 25px;
}


.login-logo {
    width: 170px;

    padding: 8px;

    background-color: #ffffff;

    border-radius: 10px;
}


.login-brand-label {
    margin-top: 10px;

    color: #64748b;

    font-size: 12px;
}


.login-header {
    margin-bottom: 22px;

    text-align: center;
}


.login-header h1 {
    color: #0f172a;

    font-size: 26px;
}


.login-header p {
    margin-top: 7px;

    color: #64748b;

    font-size: 13px;
    line-height: 1.5;
}


.login-form {
    display: flex;
    flex-direction: column;

    gap: 16px;
}


.password-field {
    position: relative;
}


.password-field input {
    padding-right: 45px;
}


.password-toggle {
    width: 36px;
    height: 36px;

    position: absolute;
    right: 4px;
    top: 50%;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 6px;

    background-color: transparent;

    font-size: 16px;
}


.password-toggle:hover {
    background-color: #f1f5f9;
}


.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    font-size: 11px;
}


.remember-me {
    display: flex;
    align-items: center;

    gap: 6px;

    color: #475569;
}


.remember-me input {
    width: auto;
}


.link-button {
    border: none;

    background-color: transparent;
    color: #2563eb;

    font-size: 11px;
    font-weight: 600;
}


.link-button:hover {
    text-decoration: underline;
}


.login-submit {
    width: 100%;

    padding: 12px;

    border: none;
    border-radius: 8px;

    background-color: #2563eb;
    color: #ffffff;

    font-weight: 700;

    transition:
        background-color 0.2s,
        transform 0.1s;
}


.login-submit:hover {
    background-color: #1d4ed8;
}


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


.login-security {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    margin-top: 20px;

    padding-top: 17px;

    border-top: 1px solid #e2e8f0;

    color: #64748b;
}


.login-security p {
    font-size: 10px;
    line-height: 1.5;
}


.login-footer {
    margin-top: 18px;

    color: rgba(255, 255, 255, 0.85);

    text-align: center;
}


.login-footer p {
    font-size: 13px;
    font-weight: 700;
}


.login-footer small {
    font-size: 10px;
}



/* =============================================================
   29. RESPONSIVE - TABLET
   ============================================================= */

@media (max-width: 1100px) {

    .stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


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

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


    .notification-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .notification-filters .search-bar {
        grid-column: 1 / -1;
    }
}



/* =============================================================
   30. RESPONSIVE - SMALL TABLET
   ============================================================= */

@media (max-width: 850px) {

    .dashboard-layout {
        flex-direction: column;
    }


    .sidebar {
        width: 100%;
        min-height: auto;
        height: auto;

        position: static;

        padding: 16px;
    }


    .sidebar-brand {
        margin-bottom: 12px;
    }


    .sidebar-logo {
        width: 145px;
    }


    .sidebar-nav {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 6px;
    }


    .sidebar-footer {
        margin-top: 14px;
    }


    .dashboard-content {
        padding: 22px;
    }


    .dashboard-header,
    .school-summary,
    .page-toolbar,
    .form-card-header,
    .list-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .school-year {
        text-align: left;
    }


    .action-buttons {
        width: 100%;
    }


    .grid-form {
        grid-template-columns: 1fr;
    }


    .form-group-full {
        grid-column: auto;
    }


    .form-actions {
        grid-column: auto;
    }


    .attendance-filter-form {
        grid-template-columns: 1fr 1fr;
    }


    .attendance-filter-action {
        grid-column: 1 / -1;
    }


    .attendance-filter-action button {
        width: 100%;
    }


    .resource-filters,
    .notification-filters {
        grid-template-columns: 1fr;
    }


    .notification-filters .search-bar {
        grid-column: auto;
    }
}



/* =============================================================
   31. RESPONSIVE - MOBILE
   ============================================================= */

@media (max-width: 600px) {

    .dashboard-content {
        padding: 15px;
    }


    .sidebar-nav {
        grid-template-columns: 1fr;
    }


    .dashboard-header h1 {
        font-size: 24px;
    }


    .dashboard-user {
        width: 100%;
    }


    .stats {
        grid-template-columns: 1fr;
    }

    .summary-count-grid,
    .enrollment-counts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-summary-list-item {
        align-items: flex-start;
        flex-direction: column;
    }


    .quick-actions {
        grid-template-columns: 1fr;
    }


    .student-grid,
    .student-list-grid {
        grid-template-columns: 1fr;
    }


    .attendance-filter-form {
        grid-template-columns: 1fr;
    }


    .attendance-filter-action {
        grid-column: auto;
    }


    .grade-summary {
        grid-template-columns: 1fr;
    }


    .report-student-info {
        grid-template-columns: 1fr;
    }


    .report-attendance-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .report-school-header {
        flex-direction: column;

        text-align: center;
    }


    .report-signatures {
        flex-direction: column;
        align-items: center;
    }


    .action-buttons {
        flex-direction: column;
    }


    .action-buttons button {
        width: 100%;
    }


    .form-actions,
    .modal-actions {
        flex-direction: column-reverse;
    }


    .form-actions button,
    .modal-actions button {
        width: 100%;
    }


    .dashboard-footer {
        flex-direction: column;

        text-align: center;
    }


    .login-card {
        padding: 26px 20px;
    }


    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* =============================================================
   32. PRINT / PDF
   ============================================================= */

@media print {

    body {
        background-color: #ffffff;
    }


    .sidebar,
    .dashboard-header,
    .page-toolbar,
    .modal-header,
    .modal-actions,
    .info-panel {
        display: none !important;
    }


    .report-card-preview {
        border: none;

        box-shadow: none;

        padding: 0;
    }
}

/* Teacher authority management: academic and DAILY scopes remain visually separate. */
.authority-shell {
    margin-top: 24px;
}

.authority-heading,
.authority-panel > header {
    margin-bottom: 18px;
}

.authority-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.authority-year-field {
    display: grid;
    gap: 6px;
    min-width: 180px;
    font-weight: 700;
}

.authority-year-field input,
.authority-form select {
    min-height: 44px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 9px 11px;
}

.authority-panel {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #dbe4ee;
    border-left: 5px solid #2563eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.authority-panel-daily {
    border-left-color: #0f766e;
}

.authority-panel h3 {
    margin: 0 0 5px;
}

.authority-panel p {
    margin: 0;
    color: #526174;
}

.authority-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 18px 0;
}

.authority-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.authority-table-wrap {
    overflow-x: auto;
}

.authority-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.authority-table th,
.authority-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.authority-status-button {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.authority-notice {
    min-height: 24px;
    color: #334155;
}

.authority-notice.error {
    color: #b91c1c;
}

.authority-empty {
    padding: 18px 0 4px;
    text-align: center;
}

@media (max-width: 900px) {
    .authority-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .authority-form {
        grid-template-columns: 1fr;
    }
}
