* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #fbe8d3;
    color: #333;
}

/* HEADER */
.header {
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
}

.header h1 {
    font-size: 22px;
    color: #800000;
}

.header p {
    font-size: 14px;
    color: #555;
}

.header-right .btn {
    margin-left: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn.tambah {
    background: #a00000;
    color: #fff;
    text-decoration: none;
}

.btn.keluar {
    background: #f6e58d;
    color: #333;
    text-decoration: none;
}

/* AREA KONTROL */
.control-panel {
    background: #fff;
    margin: 1rem auto;
    padding: 15px 20px;
    border-radius: 12px;
    max-width: 1000px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.switch-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.switch {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.murid {
    background: #74b9ff;
    color: #fff;
}

.guru {
    background: #55efc4;
    color: #fff;
}

.import {
    background: #ffeaa7;
    color: #333;
}

.switch.active {
    opacity: 0.8;
    transform: scale(0.98);
}

.switch:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}


.search-bar {
    display: flex;
    width: 100%;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.search-bar .btn.search {
    background: #f6e58d;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
}


.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1000px;
    margin: 1rem auto;
}

.stat-box {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h2 {
    font-size: 14px;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 22px;
    font-weight: bold;
}

/* Warna lingkaran lan angka */
.stat-box.merah .icon-circle {
    background: #d62828;
}

.stat-box.hijau .icon-circle {
    background: #2ecc71;
}

.stat-box.oranye .icon-circle {
    background: #e67e22;
}

.stat-box.biru .icon-circle {
    background: #2980b9;
}

.stat-box.merah .stat-info p {
    color: #d62828;
}

.stat-box.hijau .stat-info p {
    color: #2ecc71;
}

.stat-box.oranye .stat-info p {
    color: #e67e22;
}

.stat-box.biru .stat-info p {
    color: #2980b9;
}

/* TABEL */
.table-section {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    max-width: 1000px;
    margin: 1rem auto;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

thead {
    background: #fff;
}

th,
td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    background: #fff;
}

tr:nth-child(even) {
    background: #fff;
}

/* STATUS */
.status {
    display: inline-block;
    width: 20px;
    height: 12px;
    border-radius: 6px;
}

.status.aktif {
    background: green;
}

.status.nonaktif {
    background: gray;
}

.btn-reset {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-reset:hover {
    background: #a93226;
}

/* Arrow */
.pagination {
    display: flex;
    justify-content: center;
    margin: 1rem 0 3rem;
    gap: 8px;
}

.pagination .btn {
    padding: 6px 12px;
    border: 1px solid #aaa;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.pagination .btn.active {
    background: #800000;
    color: #fff;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #aaa;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.pagination button.active {
    background: #800000;
    color: #fff;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .control-panel {
        padding: 15px;
    }

    .search-bar {
        flex-direction: column;
    }
}

/* Button umum */
.btn {
    cursor: pointer;
    border: none;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
button {
    cursor: pointer;
    border: none;
    transition: all 0.2s ease-in-out;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-red {
    background: #d62828;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
}

.btn-red:hover {
    background: #b71c1c;
}

.btn-green {
    background: #2ecc71;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
}

.btn-green:hover {
    background: #27ae60;
}

.btn-yellow {
    background: #f1c40f;
    color: #333;
    padding: 8px 14px;
    border-radius: 8px;
}

.btn-yellow:hover {
    background: #d4ac0d;
}

.btn-blue {
    background: #2980b9;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
}

.btn-blue:hover {
    background: #21618c;
}

/* input */
/* FORM CONTAINER */
.form-container {
    background: #fff;
    padding: 35px 40px;
    border-radius: 14px;
    margin: 50px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 92%;
    max-width: 950px;
    margin-top: 150px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 35px;
}

label {
    font-weight: bold;
    margin-bottom: 6px;
    display: block;
    color: #800000;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #a33;
    font-size: 15px;
    box-sizing: border-box;
}

textarea {
    min-height: 150px;
    resize: none;
}

.btn-submit {
    grid-column: span 2;
    padding: 15px;
    background-color: #8b0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover {
    background-color: #a10000;
}

p.note {
    grid-column: span 2;
    text-align: center;
    font-size: 13px;
    margin-top: 6px;
    color: #a33;
}

/* FOOTER */
footer {
    background-color: #8b0000;
    color: white;
    padding: 14px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 100px;
    height: 5.5dvh;
}

.footer-text {
    font-weight: bold;
    font-size: 15px;
}

.footer-btn {
    position: absolute;
    right: 24px;
    background: #fff;
    color: #8b0000;
    border: none;
    padding: 7px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.footer-btn:hover {
    background: #f0f0f0;
}
