* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        #f4f7fb;

    color:
        #1f2937;

    min-height:
        100vh;
}


.page {
    width:
        100%;

    max-width:
        1100px;

    margin:
        0 auto;

    padding:
        30px 20px 60px;
}


.page-header {
    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        20px;

    margin-bottom:
        25px;
}


.page-header h1 {
    font-size:
        28px;

    color:
        #111827;
}


.page-header p {
    margin-top:
        6px;

    color:
        #6b7280;

    font-size:
        14px;
}


.card {
    background:
        #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius:
        14px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.05);

    overflow:
        hidden;
}


.card-header {
    padding:
        20px 25px;

    border-bottom:
        1px solid #e5e7eb;

    background:
        #fafbfc;
}


.card-header h2 {
    font-size:
        18px;
}


.card-body {
    padding:
        25px;
}


.alert {
    padding:
        14px 16px;

    border-radius:
        8px;

    margin-bottom:
        20px;

    font-size:
        14px;
}


.alert-success {
    background:
        #ecfdf5;

    color:
        #065f46;

    border:
        1px solid #a7f3d0;
}


.alert-error {
    background:
        #fef2f2;

    color:
        #991b1b;

    border:
        1px solid #fecaca;
}


.alert-error ul {
    padding-left:
        20px;
}


.form-grid {
    display:
        grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        20px;
}


.form-group {
    display:
        flex;

    flex-direction:
        column;

    gap:
        7px;
}


.form-group.full {
    grid-column:
        1 / -1;
}


label {
    font-size:
        14px;

    font-weight:
        600;

    color:
        #374151;
}


.required {
    color:
        #dc2626;
}


input,
textarea,
select {
    width:
        100%;

    border:
        1px solid #d1d5db;

    border-radius:
        8px;

    padding:
        12px 13px;

    font-size:
        14px;

    background:
        #ffffff;

    color:
        #111827;

    outline:
        none;

    transition:
        border-color .2s,
        box-shadow .2s;
}


textarea {
    min-height:
        110px;

    resize:
        vertical;
}


input:focus,
textarea:focus,
select:focus {
    border-color:
        #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .1);
}


input[type="file"] {
    padding:
        9px;
}


.help {
    color:
        #6b7280;

    font-size:
        12px;
}


.logo-preview {
    width:
        130px;

    height:
        130px;

    border:
        1px dashed #cbd5e1;

    border-radius:
        10px;

    display:
        flex;

    justify-content:
        center;

    align-items:
        center;

    overflow:
        hidden;

    margin-top:
        10px;

    background:
        #f8fafc;
}


.logo-preview img {
    width:
        100%;

    height:
        100%;

    object-fit:
        contain;

    display:
        none;
}


.logo-placeholder {
    text-align:
        center;

    color:
        #94a3b8;

    font-size:
        12px;

    padding:
        10px;
}


.actions {
    display:
        flex;

    justify-content:
        flex-end;

    gap:
        12px;

    margin-top:
        25px;

    padding-top:
        20px;

    border-top:
        1px solid #e5e7eb;
}


button {
    border:
        0;

    border-radius:
        8px;

    padding:
        12px 22px;

    font-size:
        14px;

    font-weight:
        600;

    cursor:
        pointer;

    transition:
        .2s;
}


.btn-primary {
    background:
        #2563eb;

    color:
        #ffffff;
}


.btn-primary:hover {
    background:
        #1d4ed8;
}


.btn-secondary {
    background:
        #e5e7eb;

    color:
        #374151;
}


.btn-secondary:hover {
    background:
        #d1d5db;
}


button:disabled {
    opacity:
        .6;

    cursor:
        not-allowed;
}


.field-error {
    color:
        #dc2626;

    font-size:
        12px;

    display:
        none;
}


@media (max-width: 700px) {

    .page {
        padding:
            20px 14px 40px;
    }


    .page-header {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .form-grid {
        grid-template-columns:
            1fr;
    }


    .form-group.full {
        grid-column:
            auto;
    }


    .card-body {
        padding:
            18px;
    }


    .actions {
        flex-direction:
            column;
    }


    button {
        width:
            100%;
    }
}

/* ============================================================
   SCHOOL MANAGEMENT SYSTEM
   ADMIN PORTAL CSS
   ============================================================ */

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e40af;

    --sidebar: #111827;
    --sidebar-hover: #1f2937;

    --background: #f5f7fb;
    --white: #ffffff;

    --text: #111827;
    --muted: #6b7280;

    --border: #e5e7eb;

    --danger: #dc2626;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 260px;

    background:
        var(--sidebar);

    color: white;

    overflow-y: auto;

    z-index: 1000;
}


.sidebar-brand {
    min-height: 75px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 15px 18px;

    border-bottom:
        1px solid rgba(255,255,255,.08);
}


.brand-logo {
    width: 42px;
    height: 42px;

    border-radius: 10px;

    background:
        var(--primary);

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    flex-shrink: 0;
}


.brand-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.brand-logo span {
    font-weight: 700;
    font-size: 15px;
}


.brand-info {
    min-width: 0;
}


.brand-info strong {
    display: block;

    font-size: 13px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.brand-info small {
    display: block;

    color: #9ca3af;

    margin-top: 3px;

    font-size: 11px;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.sidebar-nav {
    padding: 15px 10px 30px;
}


.nav-section-title {
    padding:
        16px 10px 7px;

    color:
        #6b7280;

    font-size:
        10px;

    font-weight:
        700;

    letter-spacing:
        1px;
}


.nav-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        11px 12px;

    margin-bottom:
        3px;

    color:
        #d1d5db;

    text-decoration:
        none;

    border-radius:
        8px;

    font-size:
        13px;

    transition:
        background .2s,
        color .2s;
}


.nav-item:hover {
    background:
        var(--sidebar-hover);

    color:
        white;
}


.nav-item.active {
    background:
        var(--primary);

    color:
        white;
}


.nav-icon {
    width: 20px;

    text-align: center;

    font-size: 15px;
}


.nav-logout {
    color:
        #fca5a5;
}


/* ============================================================
   MAIN
   ============================================================ */

.main-wrapper {
    margin-left:
        260px;

    min-height:
        100vh;

    display:
        flex;

    flex-direction:
        column;
}


.topbar {
    height:
        75px;

    background:
        white;

    border-bottom:
        1px solid var(--border);

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    padding:
        0 25px;

    position:
        sticky;

    top:
        0;

    z-index:
        900;
}


.topbar-left,
.topbar-right {
    display:
        flex;

    align-items:
        center;
}


.topbar-left {
    gap:
        15px;
}


.topbar-right {
    gap:
        20px;
}


.menu-toggle {
    display:
        none;

    border:
        0;

    background:
        transparent;

    font-size:
        24px;

    cursor:
        pointer;
}


.page-heading h1 {
    font-size:
        21px;
}


.topbar-button {
    position:
        relative;

    border:
        0;

    background:
        transparent;

    font-size:
        19px;

    cursor:
        pointer;
}


.notification-dot {
    position:
        absolute;

    top:
        0;

    right:
        0;

    width:
        7px;

    height:
        7px;

    background:
        #ef4444;

    border-radius:
        50%;
}


.user-menu {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;
}


.user-avatar {
    width:
        38px;

    height:
        38px;

    border-radius:
        50%;

    background:
        var(--primary);

    color:
        white;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-weight:
        700;
}


.user-details strong {
    display:
        block;

    font-size:
        13px;
}


.user-details small {
    display:
        block;

    color:
        var(--muted);

    margin-top:
        2px;

    font-size:
        11px;
}


/* ============================================================
   CONTENT
   ============================================================ */

.content {
    width:
        100%;

    max-width:
        1500px;

    margin:
        0 auto;

    padding:
        25px;

    flex:
        1;
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    min-height:
        60px;

    padding:
        15px 25px;

    background:
        white;

    border-top:
        1px solid var(--border);

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        15px;

    color:
        var(--muted);

    font-size:
        12px;
}


/* ============================================================
   OVERLAY
   ============================================================ */

.sidebar-overlay {
    display:
        none;

    position:
        fixed;

    inset:
        0;

    background:
        rgba(0,0,0,.45);

    z-index:
        950;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 900px) {

    .sidebar {
        transform:
            translateX(-100%);

        transition:
            transform .25s ease;
    }


    .sidebar.open {
        transform:
            translateX(0);
    }


    .sidebar-overlay.active {
        display:
            block;
    }


    .main-wrapper {
        margin-left:
            0;
    }


    .menu-toggle {
        display:
            block;
    }


    .content {
        padding:
            20px;
    }
}


@media (max-width: 600px) {

    .topbar {
        padding:
            0 15px;
    }


    .page-heading h1 {
        font-size:
            18px;
    }


    .user-details {
        display:
            none;
    }


    .footer {
        flex-direction:
            column;

        text-align:
            center;
    }
}
.school-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.school-table th,
.school-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.school-table th {
    font-weight: 600;
}

.school-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-edit,
.btn-delete {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

.btn-edit {
    background: #2563eb;
    color: #fff;
}

.btn-delete {
    background: #dc2626;
    color: #fff;
}

.btn-edit:hover,
.btn-delete:hover {
    opacity: 0.85;
}

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #f3f4f6;
    color: #374151;
}

.status-suspended {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {

    .school-table {
        min-width: 900px;
    }

    .school-actions {
        flex-direction: column;
        align-items: stretch;
    }

}

.page-wrapper {
    max-width: 1500px;
    margin: auto;
    padding: 25px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    color: #111827;
}

.page-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow:
        0 4px 20px rgba(0,0,0,.06);
}

.card-title {
    margin: 0 0 18px;
    font-size: 19px;
    color: #111827;
}

.stats {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 22px;
}

.stat {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow:
        0 3px 15px rgba(0,0,0,.05);
}

.stat-label {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 7px;
}

input,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    outline: none;
    font-size: 14px;
}

input:focus,
select:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 3px rgba(37,99,235,.10);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
}

.checkbox-row input {
    width: auto;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-secondary {
    background: #6b7280;
    color: #fff;
}

.btn-light {
    background: #eef2f7;
    color: #374151;
}

.alert {
    padding: 13px 15px;
    border-radius: 9px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

th,
td {
    padding: 12px;
    border-bottom:
        1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}

th {
    background: #f8fafc;
    font-weight: 700;
    color: #374151;
}

tr:hover td {
    background: #fafafa;
}

.component-name {
    font-weight: 700;
    color: #111827;
}

.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.badge-required {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-optional {
    background: #f3f4f6;
    color: #4b5563;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.actions .btn {
    padding: 7px 10px;
    font-size: 11px;
}

.filter-grid {
    display: grid;
    grid-template-columns:
        2fr repeat(3, 1fr);
    gap: 12px;
    align-items: end;
}

.edit-box {
    border-left: 4px solid #f59e0b;
}

.empty {
    text-align: center;
    padding: 45px 20px;
    color: #6b7280;
}

.help-text {
    margin-top: 5px;
    color: #6b7280;
    font-size: 11px;
}

@media (max-width: 1100px) {

    .form-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .filter-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}

@media (max-width: 650px) {

    .page-wrapper {
        padding: 15px;
    }

    .card {
        padding: 16px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 23px;
    }

}