:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --success: #10b981;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --border-color: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); padding-bottom: 80px; font-size: 14px; }

/* NAVBAR MOBILE-FRIENDLY */
.navbar { background-color: var(--card-bg); padding: 1rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.nav-brand { font-size: 1.05rem; color: var(--primary); font-weight: 600; text-align: center; flex-grow: 1; }

.container { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }
.form-wrapper { background: var(--card-bg); border-radius: 12px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); overflow: hidden; }

/* TAB MENU WRAPPING UNTUK HP */
.tab-menu { display: flex; background: #f8fafc; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.tab-btn { flex: 1; min-width: 110px; padding: 1rem 0.5rem; border: none; background: none; font-size: 0.9rem; font-weight: 600; color: var(--secondary); cursor: pointer; transition: 0.3s; text-align: center; }
.tab-btn:hover { background: #e2e8f0; }
.tab-btn.active { background: white; color: var(--primary); border-bottom: 3px solid var(--primary); }

.tab-content { display: none; padding: 1.5rem; }
.tab-content.active { display: block; }

h2 { font-size: 1.35rem; letter-spacing: -0.025em; margin-bottom: 0.5rem; line-height: 1.3; }
.subtitle { color: var(--secondary); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.5; }

.input-card { background: #ffffff; padding: 1.2rem; border: 1px solid var(--border-color); border-radius: 10px; }

/* FORM GROUP: DIUBAH JADI LIST VERTIKAL (STACKING) */
.form-group { display: flex; flex-direction: column; width: 100%; margin-bottom: 1.2rem; }

label { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; color: #334155; text-transform: uppercase; letter-spacing: 0.05em; }
input, select { padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.95rem; outline: none; transition: 0.2s; background: #fff; width: 100%; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
optgroup { font-weight: 700; color: var(--secondary); font-style: normal; }
option { font-weight: 400; color: var(--text-main); }

/* TOMBOL RESPONSIVE */
.btn { padding: 0.8rem 1.2rem; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 0.95rem; text-align: center; display: inline-block; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: var(--warning-hover); }
.btn-success { background: var(--success); color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: 6px; }

/* GROUP TOMBOL SIMPAN/BATAL: STACK DI HP */
.btn-group-right { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; width: 100%; }

/* TABEL: TETAP BISA DI-GESER (SCROLL) DI HP */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 1rem; border-radius: 8px; border: 1px solid var(--border-color); }
.data-table { width: 100%; border-collapse: collapse; min-width: 750px; font-size: 0.85rem; }
.data-table th, .data-table td { padding: 0.8rem 0.6rem; border-bottom: 1px solid var(--border-color); text-align: center; vertical-align: middle; }
.data-table th { background: #f8fafc; color: #475569; font-weight: 600; }
.data-table td.text-left { text-align: left; line-height: 1.4; }
.text-right { text-align: right !important; }
.nowrap { white-space: nowrap; }

/* TAB 3: PENGATURAN DIUBAH JADI LIST VERTIKAL */
.settings-list { display: flex; flex-direction: column; gap: 1.2rem; }
.settings-card { padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 10px; background: #ffffff; display: flex; flex-direction: column; }
.settings-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.border-danger { border-color: #fecaca; }

/* FOOTER & MODAL */
.floating-footer { position: fixed; bottom: 0; left: 0; right: 0; background: white; padding: 1rem; text-align: center; border-top: 1px solid var(--border-color); font-size: 0.8rem; color: var(--secondary); box-shadow: 0 -4px 6px -1px rgba(0,0,0,0.05); z-index: 10; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 9999; backdrop-filter: blur(2px); }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-box { background: white; width: 90%; max-width: 350px; border-radius: 12px; padding: 1.5rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.modal-header { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-main); }
.modal-body { color: var(--secondary); margin-bottom: 1.5rem; line-height: 1.5; font-size: 0.9rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* MEDIA QUERY EXTRA UNTUK HP KECIL */
@media (max-width: 480px) {
    .container { margin: 0.5rem auto; }
    .tab-content { padding: 1rem; }
    .nav-brand { font-size: 0.95rem; }
}