/* Modern Form Styles - Reusable for all pages */



* {
    box-sizing: border-box;
}

.bold {
    font-weight: bold;
}

.table-header {
    background-color: #f8f9fa;
    border-top: 3px solid #667eea;
    font-weight: bold;
    padding: 15px 20px;
}

.modal {
    top: 40px;
}

/* Form Controls */
textarea,
input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="number"],
select {
    width: 100%;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #f9fafb;
    border: 1.5px solid #9C99AF);
    border-radius: 8px;
    outline: none;
    transition: all .2s;
}

    textarea:focus,
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="date"]:focus,
    input[type="time"]:focus,
    input[type="number"]:focus,
    select:focus {
        border-color: var(--primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(108, 99, 255, .1);
    }

    textarea::placeholder,
    input[type="text"]::placeholder {
        color: #cbd5e1;
    }

textarea {
    resize: vertical;
    min-height: 40px;
}

.note {
    display: block;
    font-size: 0.75rem;
    color: #F54927;
}
/* Character Count */
.char-count {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

    .char-count.warning {
        color: #d97706;
    }

    .char-count.limit {
        color: #dc2626;
    }
/* File Upload */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}

    .file-upload-label:hover {
        border-color: var(--primary);
        background: linear-gradient(135deg, #ede9ff 0%, #f5f3ff 100%);
    }

    .file-upload-label i {
        font-size: 1.8rem;
        color: var(--primary);
    }

    .file-upload-label span {
        display: block;
    }

    .file-upload-label .upload-title {
        font-weight: 600;
        color: var(--text);
        font-size: 0.95rem;
    }

    .file-upload-label .upload-subtitle {
        font-size: 0.8rem;
        color: var(--text-muted);
    }

.file-name {
    display: block;
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 4px;
    font-weight: 500;
}
/* Help Text */
.form-help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

    .form-help-text i {
        margin-right: 4px;
    }

.row-header {
    margin-bottom: 15px;
    margin-top: 15px;
}

.row {
    margin-bottom: 15px;
}

/* Input Group (for date picker with button) */
.input-group {
    display: flex;
    gap: 0;
}

    .input-group .form-control {
        flex: 1;
        border-radius: 8px 0 0 8px;
        margin: 0;
    }

.input-group-append {
    display: flex;
    align-items: center;
}

.input-group-text {
    padding: 12px 14px;
    background: #f9fafb;
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    font-size: 1rem;
}

    .input-group-text:hover {
        color: var(--primary);
        background: var(--primary-light);
        border-color: var(--primary);
    }
/* Datetimepicker Styling */
.bootstrap-datetimepicker-widget {
    box-shadow: 0 10px 40px rgba(0, 0, 0, .15) !important;
    border: none !important;
    border-radius: 8px !important;
}

    .bootstrap-datetimepicker-widget .picker-switch {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        border-radius: 8px 8px 0 0 !important;
    }

    .bootstrap-datetimepicker-widget table td.active,
    .bootstrap-datetimepicker-widget table td.today {
        background: var(--primary) !important;
        color: #fff;
    }

    .bootstrap-datetimepicker-widget table td:hover {
        background: var(--primary-light) !important;
    }
/* Validation Message */
.validation-message {
    font-size: 0.85rem;
    color: #dc2626;
    margin-top: 6px;
    display: block;
}

.validation-summary {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

    .validation-summary ul {
        margin: 0;
        padding-left: 20px;
    }

    .validation-summary li {
        color: #991b1b;
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

        .validation-summary li:last-child {
            margin-bottom: 0;
        }
/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}
/* Buttons */
/* Validation Errors */
.text-danger {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 6px;
    display: block;
}

.validation-summary-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

    .validation-summary-errors ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .validation-summary-errors li {
        color: #991b1b;
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

        .validation-summary-errors li:last-child {
            margin-bottom: 0;
        }
/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
    min-width: 800px;
}

.modal-header {
    border: none;
    padding: 8px 28px;
}

    .modal-header .modal-title {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .modal-header .close {
        color: #fff;
        opacity: .7;
    }

        .modal-header .close:hover {
            opacity: 1;
        }

.modal-body {
    padding: 10px 28px !important;
    text-align: center;
}

    .modal-body h2 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 8px;
    }

    .modal-body h6 {
        color: var(--text-muted);
        font-weight: 500;
    }

.delete-container {
    max-width: 700px;
    margin: 0 auto;
}

.delete-warning {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

    .delete-warning i {
        font-size: 1.3rem;
        color: #dc2626;
        flex-shrink: 0;
        margin-top: 2px;
    }

.delete-warning-content h3 {
    margin: 0 0 8px 0;
    color: #991b1b;
    font-size: 1.1rem;
    font-weight: 700;
}

.delete-warning-content p {
    margin: 0;
    color: #7f1d1d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.detail-item {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

    .detail-item:last-child {
        border-bottom: none;
    }

.detail-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .detail-label i {
        color: var(--primary);
        font-size: 0.9rem;
    }

.detail-value {
    flex: 1;
    color: var(--text-light);
    line-height: 1.5;
}

.delete-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

    .btn-delete:hover {
        background: #b91c1c;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    }
/* Spinner Animation */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto 16px;
}




.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-modern:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
    }

    .btn-modern.secondary {
        background: #f0f2f8;
        color: var(--text-light);
    }

        .btn-modern.secondary:hover {
            background: #e0e4f0;
            color: var(--text);
        }

.homework-grid {
    display: grid;
    gap: 4px;
}

.homework-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
}

    .homework-card:hover {
        box-shadow: 0 8px 24px rgba(108, 99, 255, 0.15);
        transform: translateY(-2px);
    }

.hw-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.hw-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
}

.hw-meta-action {
    display: flex;
    align-items: center;
    gap: 50px;
    font-weight: bold;
}

.hw-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}


.hw-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .hw-meta-item strong {
        color: var(--text);
    }

.hw-description {
    color: var(--text-light);
    line-height: 1.6;
    margin: 12px 0;
    font-size: 0.95rem;
}

.hw-image {
    margin-top: 12px;
    max-width: 200px;
}

    .hw-image img {
        width: 100%;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.2s;
        border: 2px solid var(--border);
    }

        .hw-image img:hover {
            transform: scale(1.05);
            border-color: var(--primary);
        }

.hw-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.hw-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

    .hw-action-link:hover {
        background: var(--primary);
        color: var(--text-muted);
        border-color: var(--primary);
    }

    .hw-action-link.delete {
        background: #fef2f2;
        color: var(--red);
        border-color: var(--red);
    }

        .hw-action-link.delete:hover {
            background: var(--red);
            color: #fff;
        }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 3rem;
        color: var(--border);
        margin-bottom: 16px;
    }

    .empty-state p {
        font-size: 1rem;
        margin: 0 0 20px 0;
    }
/* Modal Styles */
.modal-lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.95);
    animation: fadeIn 0.3s ease;
}

    .modal-lightbox.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.modal-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
}

.modal-lightbox img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.modal-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .modal-lightbox-close:hover {
        background: var(--primary-dark);
    }

.modal-lightbox-caption {
    margin-top: 12px;
    text-align: center;
    color: var(--text);
    font-weight: 600;
}

.jconfirm-box {
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 500px;
}

div.title-c .title {
    color: #dc2626;
}

.editable-buttons .editable-cancel {
    margin-left: 7px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
}

.bs-example {
    margin: 2px 1px 0;
}

.popover-title .close {
    position: relative;
    bottom: 3px;
}

.popover {
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
/* Modern Table Styling */
table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 5px 5px;
}

    table thead {
        background: var(--thead-bg);
        color: white;
    }

    table th {
        padding: 16px;
        text-align: left;
        font-weight: 600;
        font-size: 0.95rem;
        border: none;
    }

        table th a {
            color: white;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }

            table th a:hover {
                opacity: 0.9;
            }

    table tbody tr {
        border-bottom: 1px solid var(--border);
        transition: background-color 0.2s;
    }

        table tbody tr:hover {
            background-color: var(--trho-bg);
        }

        table tbody tr:last-child {
            border-bottom: none;
        }

    table td {
        padding: 14px 16px;
    }

        table td a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
            transition: opacity 0.2s;
        }

            table td a:hover {
                opacity: 0.8;
                text-decoration: underline;
            }

            table td a.delete-link {
                color: #dc2626;
            }
/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-sm.btn-primary {
        background-color: var(--primary);
        color: white;
    }

        .btn-sm.btn-primary:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

    .btn-sm.btn-secondary {
        background-color: #f3f4f6;
        color: var(--text);
        border: 1px solid var(--border);
    }

        .btn-sm.btn-secondary:hover {
            background-color: #e5e7eb;
        }
/* Toolbar */
.toolbar {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

    .toolbar a, .toolbar button {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: opacity 0.2s;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

        .toolbar a:hover, .toolbar button:hover {
            opacity: 0.8;
        }

        .toolbar a i, .toolbar button i {
            font-size: 1rem;
        }


.quick-actions {
    margin-bottom: 15px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 85px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
    padding: 15px 15px;
    /*background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);*/
    border-radius: 12px;
    text-decoration: none;
    transition: all .25s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 4px 12px rgba(22, 163, 74, .15);
    border: 1px solid rgba(255, 255, 255, .1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

    .quick-action-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, .15);
        transition: left .3s ease;
    }

    .quick-action-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 28px rgba(22, 163, 74, .25);
    }

        .quick-action-card:hover::before {
            left: 100%;
        }

    /* Color variations for each card */
    .quick-action-card:nth-child(1) {
        /*background: linear-gradient(135deg, #16a34a 0%, #15803d 100%)*/;
        box-shadow: 0 4px 12px rgba(22, 163, 74, .15);
    }

        .quick-action-card:nth-child(1):hover {
            box-shadow: 0 12px 28px rgba(22, 163, 74, .25);
        }

    .quick-action-card:nth-child(2) {
        box-shadow: 0 4px 12px rgba(37, 99, 235, .15);
    }

        .quick-action-card:nth-child(2):hover {
            box-shadow: 0 12px 28px rgba(37, 99, 235, .25);
        }

    .quick-action-card:nth-child(3) {
        box-shadow: 0 4px 12px rgba(217, 119, 6, .15);
    }

        .quick-action-card:nth-child(3):hover {
            box-shadow: 0 12px 28px rgba(217, 119, 6, .25);
        }

    .quick-action-card:nth-child(4) {
        box-shadow: 0 4px 12px rgba(124, 58, 237, .15);
    }

        .quick-action-card:nth-child(4):hover {
            box-shadow: 0 12px 28px rgba(124, 58, 237, .25);
        }

.qa-icon {
    width: 48px;
    height: 24px;
    background: rgba(255, 255, 255, .25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    flex-shrink: 0;
    transition: all .25s;
}

.quick-action-card:hover .qa-icon {
    background: rgba(255, 255, 255, .35);
    transform: scale(1.1);
}

.qa-content {
    flex: 1;
    color: var(--text);
    width: 100%;
}

    .qa-content h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: .5px;
        text-transform: uppercase;
    }

    .qa-content p {
        margin: 4px 0 0;
        font-size: 0.75rem;
        opacity: .9;
        font-weight: 500;
    }

.qa-arrow {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, .2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all .25s;
    opacity: 0;
}

.quick-action-card:hover .qa-arrow {
    background: rgba(255, 255, 255, .3);
    transform: translateY(4px);
    opacity: 1;
}


/*---------------from layout--------------------------------*/


a {
    font-size: 12px;
    font-weight: 700;
    color: var(--bs-gray-dark);
    text-decoration: underline;
}
/* SIDEBAR */
.sidebar {
    width: 230px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width .25s;
    overflow: hidden;
    height: 100vh;
}



.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 22px 5px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-white);
    white-space: nowrap;
    flex-shrink: 0;
}

    .sidebar-logo i {
        font-size: 1.5rem;
        flex-shrink: 0;
    }

.nav-section {
    padding: 12px 0;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    overflow-x: hidden;
}

    .sidebar-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }

        .sidebar-scroll::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

.nav-label {
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 6px 22px 4px;
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 22px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all .18s;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

    .nav-item:hover {
        color: var(--primary);
        background: var(--primary-light);
    }

    .nav-item.active {
        color: #fff;
        background: var(--primary);
        border-radius: 10px;
        margin: 0 10px;
        padding: 10px 14px;
    }

    .nav-item i {
        width: 20px;
        text-align: center;
        font-size: 12px;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .nav-item.active i {
        color: #fff;
    }

.nav-arrow {
    margin-left: auto;
    font-size: .7rem;
    transition: transform .2s;
}

.nav-sub {
    padding-left: 54px;
    display: none;
}

    .nav-sub.open {
        display: block;
    }

    .nav-sub a {
        display: block;
        padding: 6px 0;
        font-size: 12px;
        font-weight: 600;
        color: var(--ink);
        text-decoration: none;
        transition: color .15s;
    }

        .nav-sub a:hover, .nav-sub a.active {
            color: var(--text-muted);
            background: var(--primary-light);
        }

        .nav-sub a::before {
            content: '\2022';
            margin-right: 8px;
            color: var(--primary);
        }

.sidebar-footer {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: auto;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

    .sidebar-footer .nav-item {
        padding: 10px 22px;
    }

    .sidebar-footer .nav-sub {
        max-height: 300px;
        overflow-y: auto;
    }

    .sidebar-footer img {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

.sf-name {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
}

.sf-role {
    font-size: .72rem;
    color: var(--text-muted);
}

.main {
    margin-left: 230px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left .25s;
}

.topbar {
    height: 64px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}


.topbar-toggle {
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.1rem;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--body-bg);
    border-radius: 30px;
    padding: 4px 16px;
    flex: 1;
    max-width: 340px;
}

    .topbar-search i {
        color: var(--text-muted);
        font-size: .9rem;
    }

    .topbar-search input {
        border: none;
        background: none;
        outline: none;
        font-family: 'Nunito',sans-serif;
        font-size: .88rem;
        color: var(--text);
        width: 100%;
    }

        .topbar-search input::placeholder {
            color: var(--text-muted);
        }

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-icon {
    position: relative;
    color: var(--text-light);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color .15s;
}

    .topbar-icon:hover {
        color: var(--primary);
    }

.topbar-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    width: 17px;
    height: 17px;
    background: var(--red);
    border-radius: 50%;
    font-size: .6rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid var(--primary-light);
}

.schoolname {
    font-size: 2.0rem;
    font-weight: 600;
}

.year {
    font-size: 1.0rem;
    font-weight: 400;
}

.content {
    padding: 28px;
    flex: 1;
}



.page-breadcrumb {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

    .page-breadcrumb span {
        color: var(--primary);
    }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@@media(max-width:1100px) {
    .grid-4 {
        grid-template-columns: repeat(2,1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2,1fr);
    }
}

@@media (max-width: 768px) {
    .content {
        padding: 20px 5px;
        flex: 1;
    }

    .schoolname {
        font-size: 0.8rem;
        font-weight: 600;
    }

    .year {
        font-size: 0.5rem;
        font-weight: 400;
    }
}

@@media(max-width:700px) {
    .grid-3, .grid-4, .grid-2 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .profile-card img {
        width: 72px;
        height: 72px;
        border-radius: 10px;
        object-fit: cover;
        flex-shrink: 0;
    }

.pname {
    font-size: .95rem;
    font-weight: 700;
}

.pemail {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
}

.badge-green {
    background: #edfaf3;
    color: var(--green);
}

.badge-blue {
    background: #ebf8ff;
    color: #3182ce;
}

.badge-purple {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-orange {
    background: #fff7eb;
    color: #dd6b20;
}

.stat-label {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.stat-meta {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-bar {
    height: 5px;
    border-radius: 99px;
    background: var(--border);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .6s ease;
}

.progress-blue {
    background: #63b3ed;
}

.progress-green {
    background: var(--green);
}

.progress-red {
    background: var(--red);
}

.progress-yellow {
    background: var(--yellow);
}

.social-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

    .social-icon.fb {
        background: #e7f0fd;
        color: #1877f2;
    }

    .social-icon.yt {
        background: #fdecea;
        color: #ff0000;
    }

    .social-icon.tw {
        background: #e8f5fe;
        color: #1da1f2;
    }

    .social-icon.ig {
        background: #fde8f5;
        color: #c13584;
    }

.scount {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
}

.sdesc {
    font-size: .75rem;
    color: var(--text-muted);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.btn-sm {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: .78rem;
    font-weight: 700;
    font-family: 'Nunito',sans-serif;
    cursor: pointer;
    transition: background .15s;
}

    .btn-sm:hover {
        background: var(--primary-dark);
    }





.chart-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg,#f7f5ff,#e9f0ff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 600;
    flex-direction: column;
    gap: 6px;
}

    .chart-placeholder i {
        font-size: 2rem;
        opacity: .4;
    }

.mini-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mini-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.icon-purple {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-green {
    background: #edfaf3;
    color: var(--green);
}

.icon-red {
    background: #fff5f5;
    color: var(--red);
}

.icon-yellow {
    background: #fffaf0;
    color: var(--yellow);
}

.mvalue {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

.mlabel {
    font-size: .73rem;
    color: var(--text-muted);
    font-weight: 600;
}

.mchange {
    font-size: .73rem;
    font-weight: 700;
    margin-top: 1px;
}

.change-up {
    color: var(--green);
}

.change-down {
    color: var(--red);
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qa-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--body-bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: all .15s;
    font-family: 'Nunito',sans-serif;
}

    .qa-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

    .qa-btn i {
        font-size: 1.2rem;
    }

@@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeUp .4s ease both;
}

.grid-3 .card:nth-child(2) {
    animation-delay: .07s;
}

.grid-3 .card:nth-child(3) {
    animation-delay: .14s;
}

.grid-4 .card:nth-child(2) {
    animation-delay: .05s;
}

.grid-4 .card:nth-child(3) {
    animation-delay: .1s;
}

.grid-4 .card:nth-child(4) {
    animation-delay: .15s;
}

.sidebar.collapsed {
    width: 60px;
}

    .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-item span, .sidebar.collapsed .nav-arrow, .sidebar.collapsed .nav-sub, .sidebar.collapsed .sidebar-logo span, .sidebar.collapsed .sf-name, .sidebar.collapsed .sf-role {
        display: none;
    }

    .sidebar.collapsed .nav-item {
        padding: 12px;
        justify-content: center;
        background: linear-gradient(135deg, var(--card-bg) 70%, var(--card-bg) 100%);
        margin: 0;
        border-radius: 0;
    }

        .sidebar.collapsed .nav-item.active {
            background: var(--primary);
            background: linear-gradient(135deg, var(--card-bg) 70%, var(--card-bg) 100%);
            border-radius: 0;
        }

    .sidebar.collapsed + .main {
        margin-left: 60px;
    }



/* BASE CONTROL
                .form-control {
                    display: block;
                    width: 100%;
                    padding: 9px 13px;
                    border: 1.5px solid var(--border);
                    border-radius: var(--radius);
                    font-family: inherit;
                    font-size: .875rem;
                    color: var(--ink);
                    background: #fff;
                    outline: none;
                    transition: all .18s;
                    appearance: none;
                }

                    .form-control::placeholder {
                        color: #b0b8c8;
                    }

                    .form-control:hover {
                        border-color: #a0aec0;
                    }

                    .form-control:focus {
                        border-color: var(--accent);
                        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
                    }

                    .form-control.error {
                        border-color: var(--red);
                        box-shadow: 0 0 0 3px rgba(220,38,38,.1);
                    }

                    .form-control.valid {
                        border-color: var(--green);
                    }

                textarea.form-control {
                    resize: vertical;
                    min-height: 96px;
                }

                /* SELECT
                select.form-control {
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath fill='none' stroke='%236e7787' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
                    background-repeat: no-repeat;
                    background-position: right 13px center;
                    padding-right: 36px;
                    cursor: pointer;
                }

                /* ICON INPUT
                .input-wrap {
                    position: relative;
                }

                    .input-wrap .form-control {
                        padding-left: 38px;
                    }

                    .input-wrap .input-wrap .form-control {
                        padding-left: 13px;
                        padding-right: 38px;
                    }

                .i-left, .i-right {
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    color: var(--muted);
                    font-size: .82rem;
                    pointer-events: none;
                }

                .i-left {
                    left: 13px;
                }

                .i-right {
                    right: 13px;
                }

                /* INPUT GROUP
                .input-group {
                    display: flex;
                }

                    .input-group .form-control {
                        border-radius: 0;
                        flex: 1;
                    }

                        .input-group .form-control:first-child {
                            border-radius: var(--radius) 0 0 var(--radius);
                        }

                        .input-group .form-control:last-child {
                            border-radius: 0 var(--radius) var(--radius) 0;
                        }
        */
.ig-addon {
    display: flex;
    align-items: center;
    padding: 0 13px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    font-size: .82rem;
    color: var(--muted);
    white-space: nowrap;
    font-family: 'DM Mono', monospace;
}

    .ig-addon:first-child {
        border-radius: var(--radius) 0 0 var(--radius);
        border-right: none;
    }

    .ig-addon:last-child {
        border-radius: 0 var(--radius) var(--radius) 0;
        border-left: none;
    }

/* CHECKBOX & RADIO PILLS */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    transition: all .15s;
}

    .pill:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .pill input {
        display: none;
    }

    .pill.checked {
        background: var(--accent-light);
        border-color: var(--accent);
        color: var(--accent);
    }

.pill-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    flex-shrink: 0;
    transition: all .15s;
}

.pill.checked .pill-dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 2.5px #fff;
}

.pill-box {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 2px solid var(--border);
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    font-size: .55rem;
    color: #fff;
}

.pill.checked .pill-box {
    border-color: var(--accent);
    background: var(--accent);
}

/* SWITCH */
.switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.switch {
    position: relative;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

    .switch input {
        display: none;
    }

.sw-track {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: var(--border);
    transition: background .2s;
}

.switch input:checked ~ .sw-track {
    background: var(--accent);
}

.sw-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: left .2s;
}

.switch input:checked ~ .sw-thumb {
    left: 23px;
}

.switch-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink2);
    cursor: pointer;
}

/* RANGE */
.range-wrap {
    padding: 4px 0;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 99px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

    input[type=range]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: var(--accent);
        border: 2px solid #fff;
        box-shadow: 0 1px 4px rgba(37,99,235,.3);
        transition: transform .15s;
    }

        input[type=range]::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: var(--muted);
    margin-top: 6px;
}

/* COLOR */
input[type=color] {
    width: 44px;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 3px;
    cursor: pointer;
    background: #fff;
}

/* FILE */
.file-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--bg);
    transition: all .18s;
}

    .file-drop:hover {
        border-color: var(--accent);
        background: var(--accent-light);
    }

    .file-drop i {
        font-size: 1.6rem;
        color: var(--accent);
        margin-bottom: 8px;
        display: block;
    }

    .file-drop p {
        font-size: .83rem;
        color: var(--muted);
    }

    .file-drop span {
        font-size: .75rem;
        color: #b0b8c8;
        display: block;
        margin-top: 4px;
    }

    .file-drop input {
        display: none;
    }

/* DATE / TIME */
input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=week] {
    font-family: inherit;
}

/* NUMBER SPINNER */
.spinner {
    display: flex;
    align-items: center;
}

    .spinner .form-control {
        text-align: center;
        border-radius: 0;
        border-left: none;
        border-right: none;
        width: 70px;
    }

.spin-btn {
    width: 36px;
    height: 38px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
    font-size: .9rem;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .spin-btn:first-child {
        border-radius: var(--radius) 0 0 var(--radius);
    }

    .spin-btn:last-child {
        border-radius: 0 var(--radius) var(--radius) 0;
    }

    .spin-btn:hover {
        background: var(--accent-light);
        color: var(--accent);
        border-color: var(--accent);
    }

/* TAGS INPUT */
.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    background: #fff;
    cursor: text;
    transition: all .18s;
    min-height: 40px;
}

    .tags-wrap:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 99px;
    padding: 2px 10px;
    font-size: .76rem;
    font-weight: 700;
}

    .tag button {
        background: none;
        border: none;
        color: var(--accent);
        cursor: pointer;
        font-size: .7rem;
        padding: 0;
        line-height: 1;
    }

.tags-input {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: .83rem;
    color: var(--ink);
    flex: 1;
    min-width: 80px;
    background: transparent;
}

/* RATING */
.stars {
    display: flex;
    gap: 4px;
    padding-top: 4px;
}

    .stars i {
        font-size: 1.3rem;
        color: var(--border);
        cursor: pointer;
        transition: color .15s;
    }

        .stars i.lit {
            color: #f59e0b;
        }

        .stars i:hover ~ i {
            color: var(--border) !important;
        }

    .stars:hover i {
        color: #f59e0b;
    }

/* AUTOCOMPLETE */
.autocomplete {
    position: relative;
}

.ac-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 99;
    display: none;
    max-height: 180px;
    overflow-y: auto;
}

    .ac-list.open {
        display: block;
    }

.ac-item {
    padding: 9px 13px;
    font-size: .85rem;
    cursor: pointer;
    transition: background .12s;
    color: var(--ink);
}

    .ac-item:hover {
        background: var(--accent-light);
        color: var(--accent);
    }

    .ac-item mark {
        background: none;
        color: var(--accent);
        font-weight: 700;
    }

/* PROGRESS STEPS */
.step-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    transition: all .2s;
    position: relative;
    z-index: 1;
}

.step-item.done .step-circle {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.step-item.active .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-top: -16px;
}

.step-item.done + .step-line {
    background: var(--green);
}

.step-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 6px;
}

.step-item.active .step-label {
    color: var(--accent);
}

.step-item.done .step-label {
    color: var(--green);
}



/* FORM FOOTER */
.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}


/* STAGGER ANIMATION */
.card:nth-child(1) {
    animation-delay: .0s;
}

.card:nth-child(2) {
    animation-delay: .06s;
}

.card:nth-child(3) {
    animation-delay: .12s;
}

.card:nth-child(4) {
    animation-delay: .18s;
}

.card:nth-child(5) {
    animation-delay: .24s;
}

.card:nth-child(6) {
    animation-delay: .30s;
}

.card:nth-child(7) {
    animation-delay: .36s;
}
/* ═══════════════ OVERLAY ═══════════════ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,17,23,.55);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

    .overlay.open {
        opacity: 1;
        pointer-events: all;
    }



    /* SIDE DRAWER */
    .overlay.drawer {
        align-items: stretch;
        justify-content: flex-end;
    }

    .overlay.drawer-left {
        align-items: stretch;
        justify-content: flex-start;
    }

.drawer-panel {
    background: #fff;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 32px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    opacity: 1;
    border-radius: 0;
}

.overlay.drawer.open .drawer-panel {
    transform: translateX(0);
}

.drawer-left .drawer-panel {
    box-shadow: 4px 0 32px rgba(0,0,0,.12);
    transform: translateX(-100%);
}

.overlay.drawer-left.open .drawer-panel {
    transform: translateX(0);
}

/* BOTTOM SHEET */
.overlay.bottom {
    align-items: flex-end;
}

.bottom-sheet {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 32px rgba(0,0,0,.12);
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    opacity: 1;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.overlay.bottom.open .bottom-sheet {
    transform: translateY(0);
}

.bottom-handle {
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: var(--border);
    margin: 12px auto 0;
}

/* FORM INSIDE MODAL */
.modal-form .field {
    margin-bottom: 14px;
}

.modal-form label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink2);
    margin-bottom: 5px;
}

.modal-form .fc {
    display: block;
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: inherit;
    font-size: .875rem;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: all .18s;
    appearance: none;
}

    .modal-form .fc:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    }

    .modal-form .fc::placeholder {
        color: #b0b8c8;
    }

.modal-form .half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

select.fc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath fill='none' stroke='%236e7787' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
    cursor: pointer;
}

/* IMAGE LIGHTBOX */
.lightbox-img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.lightbox-caption {
    text-align: center;
    font-size: .82rem;
    color: var(--muted);
    margin-top: 12px;
}

/* SCROLLABLE LIST */
.scroll-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.scroll-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

    .scroll-item:last-child {
        border-bottom: none;
    }

.scroll-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.scroll-item .name {
    font-size: .88rem;
    font-weight: 600;
}

.scroll-item .sub {
    font-size: .75rem;
    color: var(--muted);
}

/* NESTED / STACKED shadows for layered modals */
.overlay.layer2 {
    z-index: 1100;
}

/* TABS INSIDE MODAL */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.modal-tab {
    padding: 12px 16px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .15s;
}

    .modal-tab.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }

.tab-pane {
    display: none;
}

    .tab-pane.active {
        display: block;
    }

/* TOAST */
.toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    pointer-events: all;
    min-width: 260px;
    animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) both;
}

    .toast.removing {
        animation: toastOut .25s ease forwards;
    }

    .toast i {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .toast.t-success {
        background: var(--green);
    }

    .toast.t-error {
        background: var(--red);
    }

    .toast.t-warning {
        background: var(--yellow);
    }

    .toast .toast-close {
        margin-left: auto;
        cursor: pointer;
        opacity: .7;
        font-size: .8rem;
        background: none;
        border: none;
        color: #fff;
    }
/* CSS */
.nav-sub2 {
    display: none; /* closed by default */
    padding-left: 20px
}

    .nav-sub2.open {
        display: block;
    }


/* =========================================
           GLOBAL NAVIGATION SEARCH
           ========================================= */

.global-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    z-index: 99999;
    padding-top: 90px;
}

    .global-search-overlay.open {
        display: block;
    }

.global-search-dialog {
    width: 650px;
    max-width: calc(100% - 30px);
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.30);
    overflow: hidden;
}

.global-search-header {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid #e5e7eb;
}

    .global-search-header > i {
        color: #64748b;
    }

#navigationSearchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
    color: #1e293b;
}

    #navigationSearchInput::placeholder {
        color: #94a3b8;
    }

.search-kbd {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
}

.global-search-results {
    max-height: 450px;
    overflow-y: auto;
}

    .global-search-results::-webkit-scrollbar {
        width: 6px;
    }

    .global-search-results::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 5px;
    }

.search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

    .search-result:hover,
    .search-result.selected {
        background: #f1f5ff;
    }

.search-result-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--primary);
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.search-result-path {
    margin-top: 2px;
    font-size: 11px;
    color: #94a3b8;
}

.search-result-category {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
}

.search-result-arrow {
    color: #94a3b8;
}

.search-empty {
    text-align: center;
    padding: 50px 20px;
    color: #64748b;
}

    .search-empty i {
        font-size: 25px;
        margin-bottom: 12px;
    }

    .search-empty div {
        font-weight: 700;
    }

    .search-empty small {
        color: #94a3b8;
    }

.global-search-footer {
    height: 42px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    font-size: 11px;
    color: #64748b;
}

    .global-search-footer kbd {
        background: white;
        border: 1px solid #cbd5e1;
        border-radius: 4px;
        padding: 2px 5px;
        font-size: 10px;
    }

.topbar-search {
    position: relative;
}

#globalSearchResults {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 500px;
    max-width: 80vw;
    max-height: 450px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .20);
    z-index: 999999;
}

    #globalSearchResults.open {
        display: block;
    }

    #globalSearchResults .search-result {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 15px;
        cursor: pointer;
        border-bottom: 1px solid #f1f5f9;
    }

        #globalSearchResults .search-result:hover,
        #globalSearchResults .search-result.selected {
            background: #f1f5ff;
        }

    #globalSearchResults .search-result-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #eef2ff;
        color: var(--primary);
        border-radius: 7px;
    }

    #globalSearchResults .search-result-content {
        flex: 1;
    }

    #globalSearchResults .search-result-title {
        font-size: 14px;
        font-weight: 700;
        color: #1e293b;
    }

    #globalSearchResults .search-result-path {
        margin-top: 2px;
        font-size: 11px;
        color: #94a3b8;
    }

    #globalSearchResults .search-result-arrow {
        color: #94a3b8;
    }

    #globalSearchResults .search-empty {
        padding: 25px;
        text-align: center;
        color: #64748b;
    }

@media (max-width: 1400px) {
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-card {
        padding: 20px 18px;
        flex-direction: row;
        text-align: left;
    }

    .qa-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .qa-content h3 {
        font-size: 0.9rem;
    }

    .qa-content p {
        font-size: 0.7rem;
    }

    .quick-action-card:hover .qa-arrow {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

        .page-header h1 {
            font-size: 1.4rem;
        }

    .hw-meta {
        flex-direction: column;
        gap: 8px;
    }

    .hw-actions {
        flex-direction: column;
    }

    .hw-action-link {
        width: 100%;
        justify-content: center;
    }

    table {
        font-size: 0.85rem;
    }

        table th, table td {
            padding: 10px 12px;
        }

    .toolbar {
        gap: 12px;
    }

        .toolbar a, .toolbar button {
            font-size: 0.85rem;
        }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
