/* ===== Reset & Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #5a4545;
    background-color: #fff5f2;
    line-height: 1.5;
}

a {
    color: #d47b82;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: #f3a6ad;
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    border-radius: 0 0 25px 25px;
    box-shadow: 0 4px 12px rgba(214, 132, 140, 0.2);
}

/* ===== Header & Navbar (Flexbox) ===== */
header h1 {
    font-size: 1.4rem;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}

header nav a {
    color: #fff;
    font-weight: 500;
}

header nav a:hover {
    text-decoration: none;
    color: #fff0f0
}

/* ===== Main Layout ===== */
main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section {
    background-color: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(190, 120, 120, 0.12);
    border-left: 5px solid #f6b6a8;
}

section h2 {
    margin-bottom: 1rem;
    color: #d47b82;
}

/* ===== Kartu Statistik (CSS Grid) ===== */
main section:nth-of-type(2) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    /* Menghilangkan barder kiri section statik*/
    border-left: none;
}

main section:nth-of-type(2) h2 {
    grid-column: 1 / -1;
}

main section:nth-of-type(2) article {
    background-color: #ffe0d6;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;

    /* shadow kartu */
    box-shadow: 0 4px 10px rgba(200, 130, 130, 0.1);
    /*animasi sederhana*/
    transition: 0.3s;
}

main section:nth-of-type(2) article:hover {
    transform: translateY(-5px);
    box-shadow: 0 7px 15px rgba(200, 130, 130, 0.18)
}

main section:nth-of-type(2) article h3 {
    font-size: 0.95rem;
    color: #c77b83;
    margin-bottom: 0.5rem;
}

main section:nth-of-type(2) article p {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d47b82;
}

/* ===== Tabel ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 15px;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #f3dede;
}

thead {
    background-color: #f3a6ad;
    color: #fff;
}

tbody tr:nth-child(even) {
    background-color: #fff8f6;
}

tbody tr:hover {
    background-color: #ffe9e3;
}

td button {
    padding: 0.4rem 0.8rem;
    margin-right: 0.35rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;

    transition: 0.2s;
}

td button:first-of-type {
    background-color: #f6b6a8;
    color: #fff;
}

td button:last-of-type {
    background-color: #e99a9f;
    color: #fff;
}

td button:hover {
    transform: scale(1.05);
    opacity: 0.85;
}

/* ===== Form ===== */
form p {
    margin-bottom: 1rem;
}

form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #6b5050;
}

form input,
form select {
    width: 100%;
    max-width: 400px;
    padding: 0.65rem 0.8rem;
    border: 2px solid #f1c7c2;
    border-radius: 15px;
    font-size: 1rem;
    background-color: #fffafa;

    outline: none;
}

form input:focus,
form select:focus {
    border-color: #f3a6ad;
    box-shadow: 0 0 0 3px rgba(243, 166, 173, 0.15);
}

form button[type="submit"] {
    background-color: #d98991;
    color: #fff;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;

    transition: 0.2s;
}

form button[type="submit"]:hover {
    background-color: #c8737c;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 1.25rem;
    color: #a88787;
    font-size: 0.9rem;
}

/* ===== Tabel Responsif ===== */
.table-responsive {
    overflow-x: auto;
}

/* ===== Hamburger Menu ===== */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #fff;
}

/* ===== Responsive Breakpoints ===== */

/* Tablet ke bawah */
@media (max-width: 768px) {
    main section:nth-of-type(2) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/*Mobile ke bawah*/
@media (max-width: 480px) {
    header {
        position: relative;
        }

    .nav-toggle-label {
        display: block;
    }

    header nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 1rem;
    }

    .nav-toggle:checked ~ nav {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    main section:nth-of-type(2) {
        grid-template-columns: 1fr;
    }

    form input,
    form select {
        max-width: 100%;
    }
}