* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f4f8;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === HALAMAN LOGIN === */
.body-login {
    background: linear-gradient(135deg, #0d9488, #5eead4);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.kotak-login {
    background: white;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.kotak-login h1 {
    color: #0d9488;
    font-size: 32px;
    margin-bottom: 5px;
}

.kotak-login p {
    color: #6b7280;
    margin-bottom: 25px;
}

.pesan-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.form-grup {
    margin-bottom: 15px;
    text-align: left;
}

.form-grup label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
}

.form-grup input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
}

.form-grup input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.btn {
    width: 100%;
    padding: 11px;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #0f766e;
}

/* === HEADER ATAS === */
.header {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.toggle-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 20px;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 15px;
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.3);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-right: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-keluar {
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 6px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.btn-keluar:hover {
    background: rgba(255,255,255,0.3);
}

/* === WRAPPER: Sidebar + Konten === */
.wrapper {
    display: flex;
    margin-top: 55px;
    flex: 1;
}

/* === SIDEBAR === */
.sidebar {
    width: 240px;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    min-height: calc(100vh - 55px);
    transition: all 0.3s ease;
    position: fixed;
    left: 0;
    top: 55px;
    bottom: 0;
    overflow-y: auto;
    z-index: 99;
}

.sidebar.sembunyi {
    width: 0;
    overflow: hidden;
    opacity: 0;
}

.sidebar nav ul {
    list-style: none;
    padding: 15px 0;
}

.sidebar nav ul li a {
    display: block;
    padding: 11px 25px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar nav ul li a:hover {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #0d9488;
}

.sidebar nav ul li a.aktif {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #0d9488;
    font-weight: 600;
}

.sidebar .judul-menu {
    padding: 20px 25px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === KONTEN UTAMA === */
.konten {
    flex: 1;
    padding: 25px;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
}

.sidebar.sembunyi + .konten,
.konten.expand {
    margin-left: 0;
}

.konten h2 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 22px;
}

.konten p {
    color: #6b7280;
    margin-bottom: 25px;
}

.grid-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.box {
    background: white;
    padding: 25px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.box h3 {
    color: #4b5563;
    font-size: 15px;
    margin-bottom: 12px;
}

.box .angka {
    font-size: 32px;
    font-weight: 700;
    color: #0d9488;
}

/* === FOOTER === */
.footer {
    background: white;
    text-align: center;
    padding: 15px;
    margin-left: 240px;
    color: #6b7280;
    font-size: 13px;
    border-top: 1px solid #e5e7eb;
    transition: margin-left 0.3s ease;
}

.sidebar.sembunyi ~ .footer,
.footer.expand {
    margin-left: 0;
}

/* === Kart Form === */
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.card h3 {
    color: #374151;
    margin-bottom: 20px;
    font-size: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.form-biasa {
    max-width: 700px;
}

.form-biasa .baris-dua {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-biasa input,
.form-biasa select,
.form-biasa textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
}

.form-biasa input:focus,
.form-biasa select:focus,
.form-biasa textarea:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* === Tabel Data === */
.tabel-data {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tabel-data th,
.tabel-data td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.tabel-data th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.tabel-data tbody tr:hover {
    background: #f9fafb;
}

.tabel-data .tengah {
    text-align: center;
}

.btn-link {
    color: #0d9488;
    text-decoration: none;
    font-size: 14px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-link.hapus {
    color: #dc2626;
}

.label-aktif {
    background: #d1fae5;
    color: #065f46;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.label-nonaktif {
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.pesan-sukses {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.baris-dua {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .baris-dua {
        grid-template-columns: 1fr;
    }
}