:root {
  --primary: #1a56db; --primary-dark: #1e40af; --primary-light: #dbeafe;
  --success: #059669; --success-light: #d1fae5;
  --danger: #dc2626; --danger-light: #fee2e2;
  --warning: #d97706; --warning-light: #fef3c7;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb;
  --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280;
  --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--gray-100); color: var(--gray-800); min-height: 100vh; padding-bottom: 80px; }
.app-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 16px 20px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.app-header h1 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.app-header .subtitle { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.header-row { display: flex; justify-content: space-between; align-items: center; }
.header-user { font-size: 13px; background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; cursor: pointer; }
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 12px 16px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #7c3aed); padding: 20px; }
.login-box { background: white; border-radius: 20px; padding: 40px 30px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); text-align: center; }
.login-box h2 { font-size: 22px; color: var(--gray-800); margin-bottom: 4px; }
.login-box .logo-icon { font-size: 48px; margin-bottom: 12px; }
.login-box p { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-input { width: 100%; padding: 12px 14px; border: 2px solid var(--gray-200); border-radius: 10px; font-size: 15px; transition: border-color 0.2s; outline: none; font-family: inherit; }
.form-input:focus { border-color: var(--primary); }
.form-select { width: 100%; padding: 12px 14px; border: 2px solid var(--gray-200); border-radius: 10px; font-size: 15px; background: white; outline: none; font-family: inherit; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; width: 100%; }
.btn-primary { background: var(--primary); color: white; } .btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; } .btn-success:hover { background: #047857; }
.btn-danger { background: var(--danger); color: white; } .btn-danger:hover { background: #b91c1c; }
.btn-outline { background: transparent; border: 2px solid var(--gray-200); color: var(--gray-600); } .btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn-admin-link { background: none; border: none; color: var(--primary); font-size: 14px; cursor: pointer; font-weight: 600; margin-top: 16px; font-family: inherit; }
.autocomplete-wrapper { position: relative; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 2px solid var(--gray-200); border-radius: 10px; margin-top: 4px; max-height: 200px; overflow-y: auto; z-index: 50; box-shadow: var(--shadow-lg); display: none; }
.autocomplete-item { padding: 12px 14px; cursor: pointer; font-size: 14px; border-bottom: 1px solid var(--gray-100); transition: background 0.15s; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--primary-light); }
.page { display: none; } .page.active { display: block; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; display: flex; border-top: 1px solid var(--gray-200); z-index: 100; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 4px; cursor: pointer; font-size: 11px; color: var(--gray-400); transition: all 0.2s; border: none; background: none; font-family: inherit; gap: 4px; }
.nav-item.active { color: var(--primary); }
.nav-item .nav-icon { font-size: 22px; }
.member-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.member-item:last-child { border-bottom: none; }.member-info h4 { font-size: 15px; font-weight: 600; }
.member-info .member-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.member-status { text-align: right; }
.status-paid { background: var(--success-light); color: var(--success); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-unpaid { background: var(--danger-light); color: var(--danger); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-partial { background: var(--warning-light); color: var(--warning); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.week-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; justify-content: center; }
.week-selector .week-label { font-size: 14px; font-weight: 600; min-width: 180px; text-align: center; }
.week-nav-btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gray-200); background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s; }
.week-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: var(--gray-50); padding: 10px 8px; text-align: left; font-weight: 600; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid var(--gray-100); }
.data-table tr:hover td { background: var(--gray-50); }
.checkbox-group { display: flex; gap: 8px; flex-wrap: wrap; }
.checkbox-item { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.summary-card { background: white; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.summary-card .label { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.summary-card .value { font-size: 20px; font-weight: 700; margin-top: 4px; }
.summary-card.income .value { color: var(--success); } .summary-card.expense .value { color: var(--danger); } .summary-card.balance .value { color: var(--primary); }
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 16px; }
.tab { padding: 10px 20px; font-size: 14px; font-weight: 600; color: var(--gray-400); cursor: pointer; border: none; background: none; font-family: inherit; position: relative; transition: color 0.2s; }
.tab.active { color: var(--primary); } .tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--primary); }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; align-items: flex-end; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: white; border-radius: 20px 20px 0 0; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; padding: 24px; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--gray-100); cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-blue { background: var(--primary-light); color: var(--primary); } .badge-green { background: var(--success-light); color: var(--success); }
.badge-red { background: var(--danger-light); color: var(--danger); } .badge-yellow { background: var(--warning-light); color: var(--warning); }
.admin-badge { background: var(--warning); color: white; font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.notification { position: fixed; top: 20px; right: 20px; background: white; border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow-lg); z-index: 300; font-size: 14px; font-weight: 500; animation: slideIn 0.3s ease; max-width: 350px; }
.notification.success { border-left: 4px solid var(--success); } .notification.error { border-left: 4px solid var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.empty-state { text-align: center; padding: 40px 20px; color: var(--gray-400); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; } .empty-state p { font-size: 14px; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.action-row { display: flex; gap: 8px; margin-top: 12px; } .action-row .btn { flex: 1; }
.debt-alert { background: var(--danger-light); border: 1px solid #fca5a5; border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; font-size: 13px; color: var(--danger); font-weight: 500; }
.export-area { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-200); }
@media (min-width: 600px) {
  .modal { border-radius: 20px; margin-bottom: 40px; }
  .modal-overlay { align-items: center; }
  .summary-grid { grid-template-columns: 1fr 1fr 1fr; }
}@media print { .bottom-nav, .app-header, .btn { display: none !important; } .page { display: block !important; } body { padding: 0; background: white; } .card { box-shadow: none; border: 1px solid #ddd; margin: 8px; } }
.cat-dishub { background: #dbeafe; color: #1d4ed8; } .cat-gaji { background: #d1fae5; color: #047857; }
.cat-security { background: #fef3c7; color: #b45309; } .cat-ambon { background: #ede9fe; color: #6d28d9; }
.cat-kebersihan { background: #ccfbf1; color: #0f766e; } .cat-sarana { background: #fce7f3; color: #be185d; }
.cat-sakit { background: #fee2e2; color: #dc2626; }
.dropdown-wrapper { position: relative; }
.dropdown-menu { position: absolute; top: 100%; right: 0; background: white; border-radius: 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200); min-width: 180px; z-index: 50; display: none; overflow: hidden; }
.dropdown-menu.show { display: block; }
.dropdown-item { padding: 12px 16px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; border: none; background: none; width: 100%; text-align: left; font-family: inherit; transition: background 0.15s; }
.dropdown-item:hover { background: var(--gray-50); } .dropdown-item.danger { color: var(--danger); }
.toggle { position: relative; width: 44px; height: 24px; } .toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--gray-300); border-radius: 24px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--success); } .toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.hidden { display: none !important; }