/*==================================================*
 * DATA PENGGUNA
 * Mengikuti tampilan DATA SISWA
 *==================================================*/


/*==================================================*
 * GLOBAL
 *==================================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #eef3fb;
    overflow-x: hidden;
}


/*==================================================*
 * NAVBAR
 *==================================================*/

.navbar {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .12);
    padding: 12px 25px;
}

.navbar-brand {
    color: #fff !important;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .3px;
}

.user-info {
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.user-info i {
    font-size: 22px;
}


/*==================================================*
 * SIDEBAR
 *==================================================*/

.sidebar {
    background: #16213e;
    color: #fff;
    min-height: 100vh;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
}

.logo {
    width: 90px;
    transition: .3s;
}

.logo:hover {
    transform: scale(1.05);
}

.sidebar h5 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.sidebar small {
    color: #cbd5e1;
    font-size: 12px;
}

.sidebar hr {
    border-color: rgba(255, 255, 255, .15);
}


/*==================================================*
 * MENU SIDEBAR
 *==================================================*/

.sidebar .nav-link {
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 6px;
    transition: .3s;
    font-size: 15px;
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.sidebar .nav-link:hover {
    background: #2563eb;
    color: #fff;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}


/*==================================================*
 * TOMBOL COLLAPSE SIDEBAR
 *==================================================*/

.menu-btn {
    width: 100%;
    border: none;
    background: none;
    color: #e2e8f0;
    text-align: left;
    padding: 12px 15px;
    border-radius: 12px;
    transition: .3s;
    font-size: 15px;
    font-weight: 500;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.menu-btn i {
    width: 22px;
}

.sidebar .collapse .nav-link {
    padding: 10px 15px;
    font-size: 14px;
}

.sidebar .collapse .nav-link:hover {
    background: #2563eb;
    color: #fff;
}


/*==================================================*
 * TOMBOL LOGOUT
 *==================================================*/

.sidebar .btn-danger {
    border-radius: 14px;
    font-weight: 600;
    transition: .3s;
}

.sidebar .btn-danger:hover {
    transform: translateY(-2px);
}


/*==================================================*
 * CONTENT
 *==================================================*/

.content {
    padding: 30px;
    background: #eef3fb;
    min-height: 100vh;
}


/*==================================================*
 * CARD UMUM
 *==================================================*/

.box {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    margin-bottom: 25px;
}


/*==================================================*
 * PAGE HEADER
 *==================================================*/

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.page-title i {
    color: #2563eb;
    margin-right: 8px;
}

.page-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
}

.page-header .btn {
    height: 45px;
    border-radius: 12px;
    font-weight: 600;
}


/*==================================================*
 * WELCOME CARD
 *==================================================*/

.welcome-card {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    border-radius: 22px;
    padding: 35px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .25);
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.welcome-card::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    top: -70px;
    right: -70px;
}

.welcome-card h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-card p {
    font-size: 15px;
    opacity: .9;
    margin-bottom: 0;
}

.welcome-card i {
    font-size: 90px;
    opacity: .2;
}


/*==================================================*
 * STATISTIK
 *==================================================*/

/*
   PENTING:
   HTML menggunakan col-lg-4.
   Bootstrap normalnya membuat 3 card/baris.

   Bagian di bawah mengubah khusus baris yang
   berisi .stat-card menjadi 5 kolom.
*/

.row:has(> .col-lg-4 > .stat-card) {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

.row:has(> .col-lg-4 > .stat-card) > .col-lg-4 {
    flex: 0 0 20%;
    max-width: 20%;
}


/* CARD STATISTIK */

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 17px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .07);
    transition: .3s;
    height: 105px;
    width: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, .11);
}


/* JUDUL STATISTIK */

.stats-title {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 6px;
    white-space: nowrap;
}


/* ANGKA STATISTIK */

.stats-number {
    font-size: 27px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}


/*==================================================*
 * ICON CIRCLE
 *==================================================*/

.icon-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 19px;
}


/*==================================================*
 * WARNA ICON CARD
 *==================================================*/

.bg-blue {
    background: #2563eb;
}

.bg-green {
    background: #22c55e;
}

.bg-red {
    background: #ef4444;
}

.bg-orange {
    background: #f59e0b;
}

.bg-purple {
    background: #8b5cf6;
}

.bg-yellow {
    background: #facc15;
    color: #222;
}


/*==================================================*
 * SEARCH BOX
 *==================================================*/

.search-box {
    height: 50px;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    padding: 0 15px;
    font-size: 15px;
    transition: .3s;
}

.search-box:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}

.form-control {
    border-radius: 12px;
}

.input-group .btn {
    border-radius: 0 12px 12px 0;
}


/*==================================================*
 * BUTTON
 *==================================================*/

.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: .3s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #2563eb;
    border: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: #22c55e;
    border: none;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-warning {
    background: #f59e0b;
    border: none;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    color: white;
}

.btn-danger {
    border: none;
}

.btn-sm {
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/*==================================================*
 * TABLE CARD
 *==================================================*/

.table-card {
    background: white;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.table-card .card-header {
    background: #2563eb;
    color: white;
    padding: 18px 25px;
    font-size: 18px;
    font-weight: 600;
    border: none;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background: #2563eb;
    color: white;
}

.table th {
    text-align: center;
    vertical-align: middle;
    padding: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    padding: 10px;
    height: 80px;
}

.table-hover tbody tr {
    transition: .3s;
}

.table-hover tbody tr:hover {
    background: #f8fbff;
}

.table tbody tr {
    height: 80px;
    border-bottom: 1px solid #edf2f7;
}


/*==================================================*
 * PASSWORD
 *==================================================*/

.password {
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
}

.input-group-sm .form-control {
    border-right: none;
}

.input-group-sm .btn {
    border-left: none;
    background: white;
}

.input-group-sm .btn:hover {
    background: #f8fafc;
}


/*==================================================*
 * BADGE
 *==================================================*/

.badge {
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.badge-aktif {
    background: #22c55e;
    color: white;
}

.badge-lulus {
    background: #2563eb;
    color: white;
}

.badge-pindah {
    background: #f59e0b;
    color: #222;
}

.badge-keluar {
    background: #ef4444;
    color: white;
}


/*==================================================*
 * PAGINATION
 *==================================================*/

.pagination {
    gap: 6px;
    margin-top: 20px;
}

.pagination .page-link {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 10px;
    color: #2563eb;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .08);
    transition: .3s;
}

.pagination .page-link:hover {
    background: #2563eb;
    color: white;
}

.pagination .page-item.active .page-link {
    background: #2563eb;
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: #eceff3;
    color: #adb5bd;
    box-shadow: none;
}


/*==================================================*
 * TOTAL DATA
 *==================================================*/

.total-data {
    color: #6b7280;
    font-size: 14px;
    margin-top: 18px;
    font-weight: 500;
}


/*==================================================*
 * CARD
 *==================================================*/

.card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.card-header {
    border-bottom: none;
}


/*==================================================*
 * FRAME FOTO SISWA
 *==================================================*/

.foto-frame {
    width: 70px;
    height: 70px;
    margin: auto;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #dbeafe;
    background: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}

.foto-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.foto-frame:hover {
    transform: scale(1.05);
    transition: .3s;
    border-color: #2563eb;
}


/*==================================================*
 * FORM CONTROL
 *==================================================*/

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    transition: .3s;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}


/*==================================================*
 * SCROLLBAR TABLE
 *==================================================*/

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #edf2f7;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 20px;
}


/*==================================================*
 * FOOTER
 *==================================================*/

.footer {
    margin-top: 35px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}


/*==================================================*
 * ANIMATION
 *==================================================*/

.box,
.table-card,
.search-card,
.stat-card,
.welcome-card {
    animation: fadeUp .4s ease;
}

@keyframes fadeUp {

    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*==================================================*
 * RESPONSIVE
 *==================================================*/

/*----------------------------------------
  LAYAR BESAR
  5 CARD DALAM 1 BARIS
----------------------------------------*/

@media (min-width: 993px) {

    .row:has(> .col-lg-4 > .stat-card) > .col-lg-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }

}


/*----------------------------------------
  TABLET
----------------------------------------*/

@media (max-width: 1200px) {

    .content {
        padding: 25px;
    }

    .stat-card {
        padding: 16px;
    }

    .stats-title {
        font-size: 11px;
    }

    .stats-number {
        font-size: 25px;
    }

    .icon-circle {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 18px;
    }

}


/*----------------------------------------
  TABLET / LAPTOP KECIL
----------------------------------------*/

@media (max-width: 992px) {

    .sidebar {
        min-height: auto;
    }

    .content {
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-title {
        font-size: 28px;
    }

    .welcome-card {
        text-align: center;
    }


    /*
       Pada layar <= 992px:
       Kembali menjadi 3 kolom
       agar tidak terlalu sempit.
    */

    .row:has(> .col-lg-4 > .stat-card) > .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

}


/*----------------------------------------
  TABLET KECIL
----------------------------------------*/

@media (max-width: 768px) {

    .table {
        font-size: 13px;
    }

    .page-title {
        font-size: 24px;
    }

    .stats-number {
        font-size: 28px;
    }

    .icon-circle {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 20px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .user-info {
        font-size: 13px;
    }


    /*
       Pada layar kecil:
       2 kolom
    */

    .row:has(> .col-lg-4 > .stat-card) > .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

}


/*----------------------------------------
  HP
----------------------------------------*/

@media (max-width: 576px) {

    .content {
        padding: 15px;
    }

    .welcome-card {
        padding: 20px;
    }

    .page-title {
        font-size: 22px;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .btn {
        font-size: 14px;
    }


    /*
       Pada HP:
       1 card per baris
    */

    .row:has(> .col-lg-4 > .stat-card) > .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

}