body, div, h1, h2, h3, h4, h5, p, ul, li, form, label, span, strong, table, thead, tbody, tr, th, td, header, aside, footer, input, button, select, textarea {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.5;
}

input[type="radio"] {
    display: none;
}

#layar-masuk {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
}

.box-login {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #6b7280;
}

#menu-kiri {
    width: 260px;
    background: #111827;
    color: #f9fafb;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
    z-index: 999;
    transition: transform 0.3s ease;
}

.logo {
    padding: 30px 25px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1.5px;
    border-bottom: 1px solid #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-kiri ul {
    list-style: none;
    margin-top: 15px;
}

#menu-kiri ul li label {
    display: block;
    padding: 16px 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#menu-kiri ul li label:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

#area-utama {
    margin-left: 260px;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
    transition: margin-left 0.3s ease;
}

.topbar {
    background: #ffffff;
    padding: 20px 40px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: #111827;
    padding: 5px;
    cursor: pointer;
    width: auto;
}

.hamburger-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

.topbar h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.info-waktu {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.konten-pembungkus {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.halaman-box {
    display: none;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#dashboard:checked ~ #layar-app #hal-dashboard { display: block; }
#sifat:checked ~ #layar-app #hal-sifat { display: block; }
#kategori:checked ~ #layar-app #hal-kategori { display: block; }
#teman:checked ~ #layar-app #hal-teman { display: block; }
#tugas:checked ~ #layar-app #hal-tugas { display: block; }

#dashboard:checked ~ #layar-app #menu-kiri ul li:nth-child(1) label,
#sifat:checked ~ #layar-app #menu-kiri ul li:nth-child(2) label,
#kategori:checked ~ #layar-app #menu-kiri ul li:nth-child(3) label,
#teman:checked ~ #layar-app #menu-kiri ul li:nth-child(4) label,
#tugas:checked ~ #layar-app #menu-kiri ul li:nth-child(5) label {
    background: rgba(79, 70, 229, 0.1);
    color: #ffffff;
    border-left-color: #4f46e5;
}

.flex-stat {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
}

.kartu-angka {
    flex: 1;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
}

.kartu-angka::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #818cf8);
}

.label-kecil {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.05em;
    display: block;
}

.angka-gede {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin-top: 10px;
}

.status-badge {
    font-size: 13px;
    font-weight: 600;
    background: #d1fae5;
    color: #059669;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 12px;
}

.layout-grid {
    display: flex;
    gap: 24px;
}

.grid-kiri, .grid-kanan {
    flex: 1;
}

.papan {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    margin-bottom: 24px;
}

.papan h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

input[type="text"], input[type="date"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s ease;
    outline: none;
}

input[type="color"] {
    width: 100%;
    height: 45px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
}

input:focus, select:focus, textarea:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

button {
    width: 100%;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
    background: #4338ca;
}

button:active {
    transform: scale(0.98);
}

.btn-tutup {
    background: #f3f4f6;
    color: #374151;
    margin-top: 12px;
}

.btn-tutup:hover {
    background: #e5e7eb;
}

.header-aksi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-aksi h3 {
    font-size: 20px;
    font-weight: 600;
}

.btn-tambah {
    width: auto;
    padding: 10px 20px;
}

.list-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}

.item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.item-header strong {
    font-size: 15px;
    color: #111827;
}

.item-header span {
    font-size: 13px;
    color: #6b7280;
}

.item-body {
    font-size: 13px;
    color: #4b5563;
}

.tag-merah {
    background: #fee2e2;
    color: #ef4444;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kaki-web {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kaki-web p {
    font-size: 13px;
    color: #6b7280;
}

.modal {
    background-color: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal.open {
    opacity: 1;
    z-index: 1000;
    pointer-events: auto;
}

.modal-create {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.open .modal-create {
    transform: translateY(0);
}

.centang-favorit {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.centang-favorit input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.centang-favorit label {
    margin-bottom: 0;
    cursor: pointer;
}

.tabel-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
}

th, td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #4b5563;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

td {
    font-size: 14px;
    color: #1f2937;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

td button {
    width: auto;
    padding: 6px 14px;
    font-size: 12px;
    background: #10b981;
    margin-left: 5px;
    margin-bottom: 5px;
}

td button:hover {
    background: #059669;
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* KODE RESPONSIVE UNTUK DEVICE / HP */
@media (max-width: 992px) {
    .layout-grid {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }

    #menu-kiri {
        transform: translateX(-100%);
    }

    #menu-kiri.open {
        transform: translateX(0);
    }

    #sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    #sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    #area-utama {
        margin-left: 0;
    }

    .topbar {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .info-waktu {
        width: 100%;
        justify-content: space-between;
    }

    .konten-pembungkus {
        padding: 20px;
    }

    .flex-stat {
        flex-direction: column;
        gap: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .header-aksi {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-tambah {
        width: 100%;
    }
    
    .box-login {
        padding: 30px 20px;
    }
}