* {
    box-sizing: border-box;
}

/* ================== BODY ================== */
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top, #111 0%, #000 60%);
    color: #f5d76e;
}

/* ================== NAVBAR ================== */
.navbar {
    background: linear-gradient(to right, #000, #141414, #000);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid gold;
    box-shadow: 0 3px 12px rgba(0,0,0,0.8);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-small {
    width: 60px; /* lebih besar tapi elegan */
    height: auto;
}

.school-name {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    color: gold;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ================== NAV RIGHT ================== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: linear-gradient(to bottom, gold, #c9a227);
    color: black;
    padding: 7px 18px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

.logout-btn:hover {
    background: #ffeaa7;
}

/* ================== CONTAINER ================== */
.container {
    padding: 30px;
    margin-bottom: 90px;
}

/* ================== CARD ================== */
.card {
    display: inline-block;
    padding: 14px 22px;
    background: linear-gradient(to bottom, gold, #d4af37);
    color: black;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    margin-right: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.8);
}

/* ================== FORM ================== */
form {
    max-width: 460px;
    background: linear-gradient(to bottom, #111, #0b0b0b);
    padding: 28px;
    border-radius: 14px;
    border: 1px solid #222;
    box-shadow: 0 5px 18px rgba(0,0,0,0.8);
}

label {
    display: block;
    margin-top: 14px;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 9px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: gold;
}

input:focus, select:focus {
    outline: none;
    border-color: gold;
}

/* ================== BUTTON ================== */
button {
    margin-top: 18px;
    width: 100%;
    padding: 11px;
    background: linear-gradient(to bottom, gold, #c9a227);
    border: none;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

button:hover {
    background: #ffeaa7;
}

/* ================== TABLE ================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    background: #0f0f0f;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 11px;
    text-align: center;
    border-bottom: 1px solid #333;
}

th {
    background: linear-gradient(to bottom, #222, #111);
    color: gold;
    font-weight: 700;
}

tr:nth-child(even) {
    background: #151515;
}

tr:hover {
    background: #1f1f1f;
}

/* ================== LOGIN ================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background: linear-gradient(to bottom, #111, #0b0b0b);
    padding: 32px;
    width: 340px;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.9);
}

.login-box img {
    width: 140px; /* logo login besar */
    margin-bottom: 10px;
}

/* ================== FOOTER ================== */
.footer {
    background: linear-gradient(to right, #000, #111, #000);
    color: gold;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    border-top: 1px solid gold;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.8);
}
/* ================== DASHBOARD BACKGROUND ================== */
.dashboard-bg {
    min-height: 100vh; 
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.70),
            rgba(0, 0, 0, 0.85)
        ),
        url("../img/hogwarts_bg.jpeg") no-repeat center center fixed;
    background-size: cover;
}

/* ================== CRUD MAPEL ================== */

/* wrapper halaman CRUD */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

/* judul halaman */
.page-title {
    text-align: center;
    font-size: 26px;
    margin-bottom: 25px;
    color: gold;
    letter-spacing: 1px;
}

/* toolbar tombol tambah */
.toolbar {
    text-align: right;
    margin-bottom: 15px;
}

/* tombol khusus CRUD */
.btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-add {
    background: linear-gradient(to bottom, #2ecc71, #27ae60);
    color: black;
}

.btn-add:hover {
    background: #55efc4;
}

.btn-edit {
    background: linear-gradient(to bottom, #f1c40f, #d4ac0d);
    color: black;
}

.btn-edit:hover {
    background: #ffeaa7;
}

.btn-delete {
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    color: white;
}

.btn-delete:hover {
    background: #ff7675;
}

/* tabel CRUD */
.table-crud {
    width: 100%;
    border-collapse: collapse;
    background: #0f0f0f;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.7);
}

.table-crud th,
.table-crud td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.table-crud th {
    background: linear-gradient(to bottom, #222, #111);
    color: gold;
    text-transform: uppercase;
    font-size: 14px;
}

.table-crud tr:nth-child(even) {
    background: #151515;
}

.table-crud tr:hover {
    background: #1f1f1f;
}

/* form CRUD */
.form-crud {
    max-width: 450px;
    margin: 0 auto;
    background: linear-gradient(to bottom, #111, #0b0b0b);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.85);
    border: 1px solid #222;
}

.form-crud h3 {
    text-align: center;
    margin-bottom: 20px;
    color: gold;
}

.form-crud label {
    margin-top: 12px;
    display: block;
    font-weight: 600;
}

.form-crud input {
    width: 100%;
    padding: 9px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: gold;
}

.form-crud input:focus {
    outline: none;
    border-color: gold;
}

.form-crud button {
    margin-top: 18px;
    width: 100%;
    padding: 11px;
    background: linear-gradient(to bottom, gold, #c9a227);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    .menu {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .card {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        text-align: center;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }

    .nav-left {
        flex-direction: column;
        gap: 6px;
        justify-content: center;
    }

    .nav-right {
        width: 100%;
        justify-content: center;
    }

    .logo-small {
        width: 50px;
    }

    table,
    .table-crud {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .login-box {
        width: 90%;
        padding: 25px;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .footer {
        font-size: 12px;
        padding: 10px;
    }
}
