:root{
    --primary:#003E91;
    --secondary:#005BD3;
    --success:#16A34A;
    --warning:#FACC15;
    --danger:#EF4444;
    --bg:#F4F8FC;
    --text:#1E293B;
    --muted:#64748B;
    --white:#FFFFFF;
    --border:#DBEAFE;
    --shadow:0 18px 45px rgba(0,62,145,.14);
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:'Poppins',Arial,sans-serif;
    background:linear-gradient(180deg,#eaf3ff 0%,#f8fbff 45%,#ffffff 100%);
    color:var(--text);
    min-height:100vh;
}

a{
    text-decoration:none;
}

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.login-card{
    width:100%;
    max-width:430px;
    background:rgba(255,255,255,.94);
    border-radius:28px;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
    overflow:hidden;
    animation:fadeUp .65s ease;
}

.login-header{
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    padding:34px 24px 42px;
    text-align:center;
    color:white;
    position:relative;
}

.login-header::after{
    content:"";
    position:absolute;
    width:180px;
    height:180px;
    right:-70px;
    top:-70px;
    background:rgba(255,255,255,.13);
    border-radius:50%;
}

.logo-box{
    width:92px;
    height:92px;
    margin:0 auto 14px;
    background:white;
    border-radius:24px;
    padding:10px;
    box-shadow:0 12px 30px rgba(0,0,0,.14);
}

.logo-box img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.login-header h1{
    margin:8px 0 4px;
    font-size:27px;
    font-weight:800;
    letter-spacing:.5px;
}

.login-header p{
    margin:0;
    color:#FFE58A;
    font-size:14px;
    font-weight:600;
}

.login-body{
    padding:26px 24px 24px;
}

.page-title{
    text-align:center;
    margin-bottom:22px;
}

.page-title h2{
    margin:0 0 6px;
    color:var(--primary);
    font-size:23px;
}

.page-title span{
    color:var(--muted);
    font-size:14px;
}

.form-group{
    margin-bottom:17px;
}

.form-group label{
    display:block;
    font-weight:700;
    font-size:14px;
    color:#12396F;
    margin-bottom:8px;
}

.form-control{
    width:100%;
    border:1px solid #BFDBFE;
    border-radius:16px;
    padding:15px 16px;
    font-size:15px;
    outline:none;
    background:#fff;
    transition:.25s;
}

.form-control:focus{
    border-color:var(--secondary);
    box-shadow:0 0 0 5px rgba(0,91,211,.12);
}

.btn-primary{
    width:100%;
    border:0;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:white;
    padding:16px 18px;
    border-radius:17px;
    font-weight:800;
    font-size:16px;
    cursor:pointer;
    box-shadow:0 12px 25px rgba(0,91,211,.22);
    transition:.25s;
}

.btn-primary:hover{
    transform:translateY(-2px);
}

.btn-primary:active{
    transform:scale(.98);
}

.alert{
    padding:13px 15px;
    border-radius:15px;
    margin-bottom:17px;
    font-size:14px;
    font-weight:700;
}

.alert-danger{
    background:#FEE2E2;
    color:#991B1B;
    border:1px solid #FECACA;
}

.alert-warning{
    background:#FEF9C3;
    color:#854D0E;
    border:1px solid #FDE68A;
}

.login-note{
    margin-top:19px;
    padding:14px;
    border-radius:17px;
    background:#EFF6FF;
    color:#1E3A8A;
    font-size:13px;
    line-height:1.6;
}

.footer-small{
    text-align:center;
    padding:0 20px 22px;
    color:#64748B;
    font-size:12px;
}

/* DASHBOARD */
.app-header{
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:white;
    padding:24px 18px 86px;
    border-bottom-left-radius:34px;
    border-bottom-right-radius:34px;
    position:relative;
    overflow:hidden;
}

.app-header::before{
    content:"";
    position:absolute;
    width:210px;
    height:210px;
    background:rgba(255,255,255,.12);
    right:-80px;
    top:-80px;
    border-radius:50%;
}

.app-header-content{
    max-width:980px;
    margin:auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    position:relative;
    z-index:2;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand-logo{
    width:62px;
    height:62px;
    background:white;
    border-radius:18px;
    padding:7px;
}

.brand-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.brand h1{
    margin:0;
    font-size:21px;
}

.brand p{
    margin:3px 0 0;
    color:#FFE58A;
    font-size:13px;
    font-weight:600;
}

.logout-btn{
    background:rgba(255,255,255,.16);
    color:white;
    padding:10px 14px;
    border-radius:13px;
    font-size:13px;
    font-weight:700;
}

.app-wrap{
    max-width:980px;
    margin:-58px auto 35px;
    padding:0 15px;
    position:relative;
    z-index:5;
}

.card{
    background:white;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    border-radius:24px;
    padding:22px;
    margin-bottom:17px;
    animation:fadeUp .65s ease;
}

.card-title{
    margin:0 0 17px;
    color:var(--primary);
    font-size:19px;
    display:flex;
    align-items:center;
    gap:9px;
}

.grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:17px;
}

.data-row{
    display:grid;
    grid-template-columns:145px 1fr;
    gap:10px;
    padding:11px 0;
    border-bottom:1px solid #EDF2F7;
}

.data-row:last-child{
    border-bottom:0;
}

.data-label{
    color:#334155;
    font-weight:800;
    font-size:14px;
}

.data-value{
    color:#0F172A;
    font-size:14px;
    word-break:break-word;
}

.result-card{
    text-align:center;
    background:linear-gradient(135deg,#ECFDF5,#FFFFFF);
    border-color:#BBF7D0;
}

.result-card h2{
    margin:0;
    color:var(--success);
    font-size:32px;
}

.result-card p{
    margin:8px 0;
    color:#475569;
}

.big-class{
    font-size:54px;
    font-weight:900;
    color:var(--secondary);
    letter-spacing:2px;
    margin:8px 0;
}

.wa-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
}

.wa-btn{
    background:#22C55E;
    color:white;
    padding:14px 20px;
    border-radius:16px;
    font-weight:900;
    white-space:nowrap;
    box-shadow:0 12px 24px rgba(34,197,94,.24);
    animation:pulse 1.8s infinite;
}

.teacher-box{
    background:#F8FAFC;
    border:1px dashed #CBD5E1;
    border-radius:18px;
    padding:16px;
}

.info-list{
    margin:0;
    padding-left:20px;
    color:#334155;
    line-height:1.8;
    font-size:14px;
}

.password-wrap{
    display:flex;
    align-items:center;
    gap:8px;
}

.password-toggle{
    border:0;
    background:#EFF6FF;
    color:var(--primary);
    padding:7px 10px;
    border-radius:10px;
    cursor:pointer;
    font-size:12px;
    font-weight:800;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(20px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes pulse{
    0%{
        box-shadow:0 0 0 0 rgba(34,197,94,.45);
    }
    70%{
        box-shadow:0 0 0 12px rgba(34,197,94,0);
    }
    100%{
        box-shadow:0 0 0 0 rgba(34,197,94,0);
    }
}

@media(max-width:720px){
    .login-page{
        align-items:flex-start;
        padding-top:20px;
    }

    .login-card{
        border-radius:25px;
    }

    .login-header{
        padding:30px 20px 38px;
    }

    .login-header h1{
        font-size:24px;
    }

    .logo-box{
        width:84px;
        height:84px;
    }

    .app-header{
        padding-bottom:76px;
    }

    .app-header-content{
        align-items:flex-start;
    }

    .brand-logo{
        width:56px;
        height:56px;
    }

    .brand h1{
        font-size:18px;
    }

    .logout-btn{
        padding:9px 11px;
        font-size:12px;
    }

    .grid-2{
        grid-template-columns:1fr;
    }

    .card{
        padding:18px;
        border-radius:21px;
    }

    .data-row{
        grid-template-columns:1fr;
        gap:4px;
    }

    .big-class{
        font-size:44px;
    }

    .wa-box{
        flex-direction:column;
        align-items:stretch;
    }

    .wa-btn{
        text-align:center;
        width:100%;
    }
}
/* =========================
   ADMIN GLOBAL STYLE
========================= */

.admin-menu{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.admin-menu a{
    background:#eff6ff;
    color:#003E91;
    padding:10px 14px;
    border-radius:13px;
    font-weight:800;
    font-size:13px;
}

.admin-menu a.active{
    background:#003E91;
    color:white;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
    font-size:14px;
}

.admin-table th,
.admin-table td{
    padding:12px;
    border-bottom:1px solid #e2e8f0;
    text-align:left;
    vertical-align:top;
}

.admin-table th{
    background:#eff6ff;
    color:#003E91;
}

.admin-action{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.btn-small{
    display:inline-block;
    padding:8px 11px;
    border-radius:10px;
    font-size:12px;
    font-weight:800;
    color:white;
}

.btn-edit{
    background:#005BD3;
}

.btn-delete{
    background:#EF4444;
}

.btn-add{
    display:inline-block;
    background:#16A34A;
    color:white;
    padding:12px 16px;
    border-radius:14px;
    font-weight:900;
}

.admin-top{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    margin-bottom:16px;
    flex-wrap:wrap;
}

.admin-search{
    display:flex;
    gap:8px;
    flex:1;
    max-width:430px;
}

.status-aktif{
    color:#16A34A;
    font-weight:900;
}

.status-nonaktif{
    color:#EF4444;
    font-weight:900;
}

.toast{
    position:fixed;
    left:50%;
    bottom:24px;
    transform:translateX(-50%) translateY(20px);
    background:#0f172a;
    color:white;
    padding:12px 18px;
    border-radius:14px;
    font-size:13px;
    font-weight:800;
    opacity:0;
    z-index:9999;
    transition:.3s;
}

.toast.show{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

.ripple{
    position:absolute;
    width:18px;
    height:18px;
    background:rgba(255,255,255,.45);
    border-radius:50%;
    transform:scale(1);
    animation:ripple .6s linear;
    pointer-events:none;
}

.btn-primary{
    position:relative;
    overflow:hidden;
}

@keyframes ripple{
    to{
        transform:scale(18);
        opacity:0;
    }
}

@media(max-width:800px){
    .admin-table thead{
        display:none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td{
        display:block;
        width:100%;
    }

    .admin-table tr{
        background:white;
        border:1px solid #dbeafe;
        border-radius:16px;
        margin-bottom:12px;
        padding:10px;
    }

    .admin-table td{
        border:0;
        padding:7px 4px;
    }

    .admin-table td::before{
        content:attr(data-label);
        display:block;
        font-weight:900;
        color:#003E91;
        margin-bottom:3px;
    }

    .admin-search{
        max-width:none;
        width:100%;
    }
}
/* ======================================================
   TABEL DATA SISWA
====================================================== */

.app-wrap{
    max-width:1400px;
    margin:auto;
}

.card{
    overflow:hidden;
}

.table-responsive{
    width:100%;
    overflow-x:auto;
    border-radius:20px;
}

.admin-table{
    width:100%;
    min-width:1250px;
    border-collapse:separate;
    border-spacing:0;
    font-size:14px;
}

.admin-table thead th{
    background:#f4f8ff;
    color:#003E91;
    padding:15px;
    font-weight:800;
    border-bottom:2px solid #dbeafe;
    white-space:nowrap;
}

.admin-table tbody td{
    padding:15px;
    border-bottom:1px solid #edf2f7;
    vertical-align:middle;
}

.admin-table tbody tr{
    transition:.25s;
}

.admin-table tbody tr:hover{
    background:#f8fbff;
}

/* Nomor */

.admin-table td:nth-child(1){
    width:55px;
    text-align:center;
}

/* Nama */

.admin-table td:nth-child(2){
    min-width:240px;
    font-weight:700;
}

/* NISN */

.admin-table td:nth-child(3){
    min-width:120px;
}

/* TTL */

.admin-table td:nth-child(4){
    min-width:140px;
}

/* JK */

.admin-table td:nth-child(5){
    min-width:100px;
}

/* Agama */

.admin-table td:nth-child(6){
    min-width:110px;
}

/* NIS */

.admin-table td:nth-child(7){
    min-width:90px;
}

/* EMAIL */

.admin-table td:nth-child(8){
    min-width:300px;
    word-break:break-all;
}

/* KELAS */

.admin-table td:nth-child(9){
    width:90px;
    text-align:center;
    font-weight:800;
}

/* AKSI */

.admin-table td:last-child{
    width:130px;
}

.admin-action{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.btn-small{
    display:block;
    width:100%;
    text-align:center;
    padding:9px 0;
    border-radius:10px;
    font-size:12px;
    font-weight:800;
    color:white;
}

.btn-edit{
    background:#005BD3;
}

.btn-delete{
    background:#ef4444;
}

.btn-edit:hover{
    background:#0046ad;
}

.btn-delete:hover{
    background:#dc2626;
}

/* ======================================================
   MOBILE
====================================================== */

@media(max-width:900px){

    .admin-table{
        min-width:100%;
    }

    .admin-table thead{
        display:none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td{
        display:block;
        width:100%;
    }

    .admin-table tr{
        margin-bottom:15px;
        background:white;
        border:1px solid #dbeafe;
        border-radius:18px;
        padding:12px;
        box-shadow:0 8px 20px rgba(0,0,0,.05);
    }

    .admin-table td{
        border:0;
        padding:7px 4px;
    }

    .admin-table td::before{
        content:attr(data-label);
        display:block;
        font-weight:800;
        color:#003E91;
        margin-bottom:4px;
    }

    .admin-action{
        flex-direction:row;
    }

    .btn-small{
        width:auto;
        flex:1;
    }

}