@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --pink: #e98eae;
    --pink-dark: #d96b96;
    --pink-soft: #fff0f5;
    --pink-light: #fff8fb;
    --white: #ffffff;
    --text: #654b59;
    --muted: #a58b98;
    --border: #f5dce6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--pink-light);
    color: var(--text);
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font: inherit;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    padding: 28px 18px;
    background: var(--white);
    border-right: 1px solid var(--border);
}

.sidebar h2 {
    color: var(--pink-dark);
    font-size: 23px;
    margin-bottom: 38px;
}

.side-label {
    font-size: 11px;
    color: var(--muted);
    margin: 15px 10px;
}

.sidebar a {
    display: block;
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 8px;
    color: #947382;
    transition: .25s;
}

.sidebar a:hover,
.sidebar a.active {
    background: var(--pink-soft);
    color: var(--pink-dark);
    font-weight: 600;
}

/* KONTEN UTAMA */
.main {
    margin-left: 240px;
    padding: 30px;
}

.topbar,
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.topbar {
    margin-bottom: 28px;
}

.topbar h1 {
    font-size: 25px;
    color: #bd6286;
    margin-bottom: 5px;
}

.topbar p,
.panel-heading p,
.form-card > p {
    color: var(--muted);
    font-size: 13px;
}

.profile {
    background: white;
    border: 1px solid var(--border);
    padding: 11px 16px;
    border-radius: 20px;
}

/* KARTU DASHBOARD */
.stat-card {
    background: linear-gradient(135deg, #f8b8ce, #e98eae);
    color: white;
    border-radius: 22px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 400px;
    margin-bottom: 28px;
    box-shadow: 0 10px 25px #e98eae35;
}

.stat-card h2 {
    font-size: 35px;
    margin: 8px 0;
}

.stat-card p,
.stat-card span {
    font-size: 12px;
}

.stat-icon {
    font-size: 38px;
    background: #ffffff45;
    padding: 15px;
    border-radius: 18px;
}

/* PANEL DAN FORM */
.panel,
.form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 7px 25px #d889a515;
}

.panel-heading {
    margin-bottom: 22px;
}

.panel-heading h2,
.form-card h2 {
    font-size: 20px;
    color: #bd6286;
    margin-bottom: 5px;
}

/* TOMBOL */
.btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 10px 16px;
    color: white;
    background: var(--pink);
    text-align: center;
    transition: .25s;
}

.btn:hover {
    background: var(--pink-dark);
    transform: translateY(-1px);
}

.btn-reset {
    background: #fff0f5;
    color: #bd6286;
}

.btn-reset:hover {
    background: #f9dce8;
    color: #a94f75;
}

.btn-edit {
    background: #ffe6ef;
    color: #bd6286;
    padding: 7px 11px;
}

.btn-edit:hover {
    background: #fbd1e0;
}

.btn-delete {
    background: #fff0f0;
    color: #d45c75;
    padding: 7px 11px;
}

.btn-delete:hover {
    background: #ffdce2;
}

/* PENCARIAN DAN FILTER */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #f0d8e2;
    border-radius: 12px;
    padding: 11px 13px;
    color: var(--text);
    background: white;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px #e98eae20;
}

.filter-form input {
    flex: 2 1 190px;
    width: auto;
}

.filter-form select {
    flex: 1 1 150px;
    width: auto;
}

/* TABEL SISWA */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

th {
    background: #fff0f5;
    color: #bd6286;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .4px;
}

th, td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #f7e6ed;
}

td {
    font-size: 12px;
}

tbody tr {
    transition: .2s;
}

tbody tr:hover {
    background: #fff9fb;
}

.badge {
    background: #ffe6ef;
    color: #bd6286;
    border-radius: 9px;
    padding: 5px 10px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.actions form {
    margin: 0;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 35px;
}

/* FORM TAMBAH DAN EDIT */
.form-page,
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: linear-gradient(135deg, #fff0f5, #fff9fc);
}

.form-card {
    width: 100%;
    max-width: 580px;
    padding: 32px;
}

.form-card > p {
    margin-bottom: 24px;
}

.form-card label,
.login-card label {
    display: block;
    font-weight: 500;
    margin: 15px 0 7px;
    color: #855c70;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* HALAMAN LOGIN */
.login-card {
    width: 100%;
    max-width: 410px;
    padding: 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 15px 45px #d889a525;
}

.logo {
    font-size: 42px;
    margin-bottom: 15px;
}

.login-card h2 {
    font-size: 23px;
    color: #bd6286;
    margin-bottom: 5px;
}

.login-card > p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.full {
    width: 100%;
    margin-top: 18px;
    padding: 13px;
}

.alert {
    background: #fff0f3;
    color: #c74769;
    padding: 12px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .sidebar {
        width: 190px;
    }

    .main {
        margin-left: 190px;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        position: static;
        width: 100%;
        padding: 15px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar h2 {
        margin-bottom: 15px;
    }

    .side-label {
        display: none;
    }

    .sidebar a {
        display: inline-block;
        padding: 9px;
        margin: 3px;
    }

    .main {
        margin-left: 0;
        padding: 15px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .panel,
    .form-card,
    .login-card {
        padding: 18px;
    }

    .stat-card {
        max-width: none;
    }

    .filter-form input,
    .filter-form select,
    .filter-form button,
    .filter-form a {
        width: 100%;
        flex: 1 1 100%;
    }

    .form-card {
        max-width: 100%;
    }
}