
/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #eef3f8;
    color: #334155;
    font-size: 13px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: #303a52;
    color: #fff;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all .3s ease;
    box-shadow: 3px 0 15px rgba(0,0,0,.08);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18);
    border-radius: 10px;
}

.sidebar-logo {
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo img {
    max-width: 145px;
    max-height: 42px;
    object-fit: contain;
}

.logo-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.school-info {
    padding: 17px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.school-info h6 {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
}

.school-info small {
    color: #aeb8c8;
    font-size: 9px;
    line-height: 1.5;
}

.menu-section {
    padding: 17px 18px 5px;
    color: #9ca8bc;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.sidebar-menu {
    padding: 0 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 9px 12px;
    color: #d6ddea;
    border-radius: 5px;
    margin-bottom: 3px;
    font-size: 11px;
    transition: .2s ease;
}

.sidebar-menu a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.sidebar-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar-menu a.active {
    background: #2196e9;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(33,150,243,.2);
}

.sidebar-footer {
    padding: 15px 10px 20px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffb3b3;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 11px;
}

.logout-btn:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

/* =========================================================
   COLLAPSE
========================================================= */

body.sidebar-collapsed .sidebar {
    width: 68px;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: 68px;
}

body.sidebar-collapsed .school-info,
body.sidebar-collapsed .menu-section,
body.sidebar-collapsed .sidebar-menu span,
body.sidebar-collapsed .sidebar-footer span,
body.sidebar-collapsed .logo-text {
    display: none;
}

body.sidebar-collapsed .sidebar-logo {
    justify-content: center;
    padding: 0;
}

body.sidebar-collapsed .sidebar-menu {
    padding: 0 8px;
}

body.sidebar-collapsed .sidebar-menu a {
    justify-content: center;
    padding: 11px 0;
}

/* =========================================================
   MAIN
========================================================= */

.main-wrapper {
    margin-left: 220px;
    min-height: 100vh;
    transition: all .3s ease;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    height: 54px;
    background: #1976d2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,.13);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,.12);
}

.top-title {
    font-size: 13px;
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 7px;
}

.top-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
}

.top-icon:hover {
    background: rgba(255,255,255,.13);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    padding: 4px 7px;
    border-radius: 20px;
}

.user-profile:hover {
    background: rgba(255,255,255,.12);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 10px;
    font-weight: 500;
}

/* =========================================================
   CONTENT
========================================================= */

.content {
    padding: 17px 22px 30px;
}

.breadcrumb-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.breadcrumb {
    margin: 0;
    font-size: 10px;
}

.breadcrumb-item a {
    color: #2196f3;
}

.breadcrumb-item.active {
    color: #8a96a8;
}

.page-date {
    font-size: 10px;
    color: #8995a6;
}

/* =========================================================
   ALERT
========================================================= */

.custom-alert {
    border-radius: 5px;
    border: none;
    font-size: 10px;
    margin-bottom: 15px;
}

/* =========================================================
   STAT CARD
========================================================= */

.stat-card {
    position: relative;
    min-height: 108px;
    padding: 16px 17px;
    border-radius: 5px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 5px 12px rgba(0,0,0,.08);
    transition: .25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,.13);
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    right: -35px;
    bottom: -60px;
    background: rgba(255,255,255,.07);
}

.stat-blue {
    background: #2789df;
}

.stat-green {
    background: #35b51a;
}

.stat-orange {
    background: #ff7414;
}

.stat-red {
    background: #f80043;
}

.stat-title {
    font-size: 10px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-footer {
    font-size: 9px;
}

.stat-icon {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 39px;
    height: 39px;
    border-radius: 50%;
    background: rgba(255,255,255,.24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

/* =========================================================
   PANEL
========================================================= */

.panel {
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 5px;
    box-shadow: 0 3px 12px rgba(32,54,74,.04);
    overflow: hidden;
}

.panel-header {
    min-height: 53px;
    padding: 12px 17px;
    border-bottom: 1px solid #e8edf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
}

.panel-title i {
    color: #2196f3;
    margin-right: 6px;
}

.panel-body {
    padding: 17px;
}

/* =========================================================
   FILTER
========================================================= */

.filter-wrapper {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa6b5;
    font-size: 12px;
}

.search-box input {
    width: 220px;
    height: 34px;
    border: 1px solid #dce3eb;
    border-radius: 4px;
    padding: 0 10px 0 30px;
    font-family: 'Poppins';
    font-size: 10px;
    outline: none;
}

.search-box input:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33,150,243,.08);
}

.filter-select {
    height: 34px;
    border: 1px solid #dce3eb;
    border-radius: 4px;
    padding: 0 10px;
    font-family: 'Poppins';
    font-size: 10px;
    color: #64748b;
    outline: none;
}

.filter-select:focus {
    border-color: #2196f3;
}

.btn-search {
    height: 34px;
    border: none;
    background: #1976d2;
    color: #fff;
    border-radius: 4px;
    padding: 0 13px;
    font-size: 10px;
    font-family: 'Poppins';
}

.btn-search:hover {
    background: #1565c0;
    color: #fff;
}

.btn-reset {
    height: 34px;
    border: 1px solid #dce3eb;
    background: #fff;
    color: #64748b;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 10px;
    font-family: 'Poppins';
}

.btn-reset:hover {
    background: #f5f7fa;
}

.btn-detail {
    height: 34px;
    border: none;
    background: #2196e9;
    color: #fff;
    border-radius: 4px;
    padding: 0 13px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-detail:hover {
    background: #1976d2;
    color: #fff;
}

/* =========================================================
   TABLE
========================================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    margin: 0;
}

.data-table th {
    background: #f7f9fb;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 11px 10px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.data-table td {
    color: #697586;
    font-size: 10px;
    padding: 10px;
    border: 1px solid #e5eaf0;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: .15s;
}

.data-table tbody tr:hover {
    background: #f8fbfe;
}

.number-cell {
    width: 45px;
    text-align: center;
    color: #8a96a5 !important;
}

.class-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.class-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 7px;
    background: #eaf4ff;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.class-detail strong {
    display: block;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 2px;
}

.class-detail small {
    display: block;
    color: #9aa4b2;
    font-size: 8px;
}

/* =========================================================
   BADGE
========================================================= */

.level-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    font-size: 8px;
    font-weight: 500;
}

.wali-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 20px;
    background: #eaf4ff;
    color: #2165a6;
    font-size: 8px;
    font-weight: 500;
}

.wali-empty {
    color: #a0a8b3;
    font-size: 9px;
    font-style: italic;
}

.capacity-wrapper {
    min-width: 100px;
}

.capacity-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 8px;
    color: #64748b;
}

.capacity-bar {
    height: 5px;
    background: #edf1f5;
    border-radius: 10px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: #2196f3;
    border-radius: 10px;
}

.capacity-full {
    background: #f80043;
}

.capacity-warning {
    background: #ff7414;
}

.student-count {
    color: #1976d2;
    font-weight: 600;
}

/* =========================================================
   ACTION
========================================================= */

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.action-btn {
    width: 31px;
    height: 31px;
    border: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    transition: .2s;
}

.action-detail {
    background: #2196e9;
}

.action-detail:hover {
    background: #1976d2;
    color: #fff;
}

/* =========================================================
   FOOTER TABLE
========================================================= */

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.showing-text {
    color: #8a95a5;
    font-size: 9px;
}

.pagination {
    margin: 0;
}

.pagination .page-link {
    color: #1976d2;
    border-color: #dfe5eb;
    font-size: 9px;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
}

.pagination .page-item.active .page-link {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #a8b1bd;
    background: #fff;
}

/* =========================================================
   EMPTY
========================================================= */

.empty-data {
    text-align: center;
    padding: 45px 20px !important;
}

.empty-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.empty-data strong {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-bottom: 4px;
}

.empty-data span {
    color: #9aa4b2;
    font-size: 9px;
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    border-top: 1px solid #dfe5eb;
    margin-top: 25px;
    padding: 15px 0;
    color: #8a95a5;
    font-size: 9px;
}

.footer a {
    color: #2196f3;
}

/* =========================================================
   MOBILE
========================================================= */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1040;
}

@media (max-width:1199px) {

    .sidebar {
        width: 210px;
    }

    .main-wrapper {
        margin-left: 210px;
    }

    .stat-value {
        font-size: 18px;
    }
}

@media (max-width:991px) {

    .sidebar {
        transform: translateX(-100%);
        width: 220px;
    }

    .main-wrapper {
        margin-left: 0;
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open .sidebar-overlay {
        display: block;
    }

    .content {
        padding: 15px;
    }
}

@media (max-width:767px) {

    .filter-wrapper {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .btn-search,
    .btn-reset {
        flex: 1;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width:575px) {

    .top-title {
        display: none;
    }

    .user-name {
        display: none;
    }

    .content {
        padding: 12px;
    }

    .breadcrumb-area {
        display: block;
    }

    .page-date {
        margin-top: 6px;
    }

    .stat-value {
        font-size: 17px;
    }
}