/* === KOSKITA - STYLESHEET === */

/* === FONT IMPORT === */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* === GLOBAL VARIABLES & THEME (Digunakan di: core.js, utils.js) === */
:root {
    /* Palet KosKita Teal — Premium */
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-light: #2dd4bf;
    --accent: #5eead4;
    --success: #64876a;
    --warning: #c58a42;
    --danger: #c45165;

    /* Light Mode — KosKita Teal & Soft */
    --bg: #f1faf8;
    --bg-elevated: #ffffff;
    --card: #ffffff;
    --text: #10302c;
    --text-muted: #5f7d78;

    /* Radius & Shadow */
    --radius: 20px;
    --radius-sm: 14px;
    --radius-lg: 26px;
    --shadow-sm: 0 2px 8px rgba(10, 51, 47, 0.04);
    --shadow-md: 0 4px 16px rgba(10, 51, 47, 0.08);
    --shadow-lg: 0 8px 32px rgba(10, 51, 47, 0.12);
    --shadow-xl: 0 16px 48px rgba(10, 51, 47, 0.16);

    /* Transisi & Font */
    --trans: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: "Plus Jakarta Sans", sans-serif;

    /* Glassmorphism & Border */
    --glass: rgba(241, 250, 248, 0.88);
    --nav-glass: rgba(255, 255, 255, 0.95);
    --border: rgba(17, 78, 72, 0.08);
    --border-strong: rgba(17, 78, 72, 0.15);
    --input-bg: #f5fbfa;

    /* Toast Notification */
    --toast-bg: #10302c;
    --toast-text: #ffffff;
}

/* --- DARK MODE: MIDNIGHT TEAL --- */
[data-theme="dark"] {
    color-scheme: dark;

    /* Background & Text */
    --bg: #000000;
    --bg-elevated: #0b1b19;
    --card: #10231f;
    --text: #e8fbf7;
    --text-muted: #8fb5af;

    /* Shadow — deeper and richer */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.65);

    /* Glassmorphism & Border */
    --glass: rgba(6, 16, 14, 0.94);
    --nav-glass: rgba(11, 27, 25, 0.97);
    --border: rgba(220, 255, 248, 0.08);
    --border-strong: rgba(94, 234, 212, 0.22);
    --input-bg: #16302c;

    /* Toast Notification */
    --toast-bg: #e8fbf7;
    --toast-text: #0b1b19;

    /* KosKita Teal — richer teal accents */
    --primary: #5eead4;
    --primary-dark: #2dd4bf;
    --primary-light: #0f766e;
    --accent: #99f6e4;
}

/* === RESET & GLOBAL BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Transisi halus global saat tema berganti (Digunakan di: core.js - applyTheme) */
body,
.app-shell,
.topbar,
.bottom-nav,
.list-card,
.summary-card,
.quick-item,
.setting-row,
.auth-card,
.sheet,
.notif-item,
.field input,
.summary-icon,
.quick-icon,
.btn,
.badge {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.2s ease;
}

/* Utility: sembunyikan elemen (Digunakan di: core.js, auth.js, pengelola.js, penghuni.js) */
.hidden {
    display: none !important;
}

/* Smooth scroll untuk container halaman (Digunakan di: core.js - pageContainer) */
.page-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Warna seleksi teks branded */
::selection {
    background: color-mix(in srgb, var(--primary) 25%, transparent);
    color: var(--text);
}

/* === AUTH SCREEN (Login & Register) - auth.js, index.html === */
/* Kunci scroll body saat di halaman auth agar tidak double scroll */
body:has(.auth-screen:not(.hidden)) {
    overflow: hidden;
    height: 100vh;
}

.auth-screen {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--primary);
    animation: fadeIn 0.5s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    text-align: center;
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Custom scrollbar untuk auth card */
.auth-card::-webkit-scrollbar {
    width: 4px;
}
.auth-card::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

/* Header Auth */
.auth-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 8px;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Tab Masuk / Daftar */
.auth-tabs {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 5px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--trans);
}

.auth-tab.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Form Auth & Spacing */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeIn 0.35s ease;
}

.auth-form .field {
    margin-bottom: 0;
}

.auth-form .btn-primary {
    margin-top: 8px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Lupa Password */
.login-forgot-wrap {
    text-align: center;
    margin-top: 4px;
    margin-bottom: 8px;
}

.login-forgot-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--trans);
    padding: 4px 8px;
}

.login-forgot-btn:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

/* Hint Text & Legal */
.auth-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    margin-top: 4px;
}

.auth-legal-wrap {
    text-align: center;
    margin-top: 16px;
}

.auth-legal-text {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-legal-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--trans);
}

.auth-legal-text a:hover {
    color: var(--primary-dark);
}

/* == FORM FIELDS (Input, Select, Textarea) Digunakan di: auth.js (Login/Register), pengelola.js (Form Kamar, Penghuni, Pembayaran, Wifi, Peraturan, Edit Kos), penghuni.js (Form Profil, Password) == */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    width: 100%;
    margin-bottom: 16px;
}

.field span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding-left: 2px;
    letter-spacing: 0.1px;
}

/* Gabungan styling dasar untuk semua elemen input */
.field input,
.field select,
.field textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--text);
    background: var(--input-bg);
    width: 100%;
    transition: var(--trans);
    outline: none;
    box-sizing: border-box;
}

/* Focus state - subtle highlight */
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary-light);
    background: var(--card);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent);
}

/* Placeholder styling */
.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Select custom arrow */
.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b7d6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Hover effect - subtle */
.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: var(--border-strong);
}

/* === BUTTONS (Tombol) Digunakan di: Seluruh file JS untuk aksi (Simpan, Hapus, Modal, Navigasi, FAB) === */
.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--trans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.96);
}

/* Variasi Warna Tombol */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 45%, transparent);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--danger) 40%, transparent);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--success) 40%, transparent);
}

/* Ukuran & Layout Tombol */
.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* Fokus untuk aksesibilitas (keyboard navigation) */
/* Digunakan di: core.js (navigasi keyboard pada tombol dan nav-item) */
.btn:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* === APP SHELL & LAYOUT UTAMA Digunakan di: core.js (masukAplikasi, navigate, renderNotif, setupIcons) === */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
}

/* Topbar (Header Utama) */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.top-kos-name {
    display: block;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.3px;
}

.top-kos-id {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    margin-top: 2px;
}

/* Tombol Lonceng Notifikasi */
.bell-btn {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bell-btn:hover {
    box-shadow: var(--shadow-md);
}

.bell-btn:active {
    transform: scale(0.9);
}

/* Badge Notifikasi (Angka merah di lonceng) */
.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: pop 0.3s ease;
    border: 2px solid var(--bg);
}

/* Container Halaman & Animasi Masuk */
/* Digunakan di: core.js (navigate function menginject HTML ke dalam .page-container) */
.page-container {
    flex: 1;
    padding: 8px 20px 90px; /* Padding bawah besar untuk mengakomodasi bottom-nav */
    overflow-y: auto;
}

.page {
    animation: pageIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* === GREETING CARD (Kartu Salam) Digunakan di: pengelola.js (renderBerandaPengelola), penghuni.js (renderBerandaPenghuni) === */
.greeting-card {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 60%,
        var(--accent) 130%
    );
    border-radius: var(--radius);
    padding: 26px 24px;
    color: #ffffff;
    box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 35%, transparent);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

/* Dekorasi lingkaran transparan (Glass effect background) */
.greeting-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -70px;
    right: -60px;
}

.greeting-card::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -50px;
    left: -40px;
}

.greeting-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    backdrop-filter: blur(10px);
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.greeting-role .pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}
.greeting-text {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.greeting-date {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Efek shadow jika list-card langsung menempel di bawah greeting-card */
.greeting-card + .list-card {
    margin-top: 0;
    box-shadow: var(--shadow-md);
}

/* === STATUS PILL (Khusus Dashboard Penghuni) Digunakan di: penghuni.js (renderBerandaPenghuni) untuk "Status Sewa" & "Sisa Hari" === */
.greeting-status {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.status-pill {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 12px 16px;
    flex: 1;
    min-width: 140px;
}

.status-pill .pill-label {
    font-size: 11px;
    opacity: 0.9;
    display: block;
    font-weight: 500;
}

.status-pill .pill-value {
    font-size: 16px;
    font-weight: 800;
    display: block;
    margin-top: 4px;
    letter-spacing: -0.3px;
}

/* === SUMMARY GRID (Ringkasan Statistik Pengelola) Digunakan di: pengelola.js (renderBerandaPengelola) untuk 4 kartu statistik atas === */
.section-title {
    font-size: 17px;
    font-weight: 800;
    margin: 32px 0 16px;
    letter-spacing: -0.3px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.summary-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--trans);
    cursor: pointer;
    animation: pop 0.4s ease backwards;
}

/* Animasi berurutan (staggered) untuk 4 kartu ringkasan */
.summary-card:nth-child(1) {
    animation-delay: 0.05s;
}
.summary-card:nth-child(2) {
    animation-delay: 0.1s;
}
.summary-card:nth-child(3) {
    animation-delay: 0.15s;
}
.summary-card:nth-child(4) {
    animation-delay: 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.summary-card:active {
    transform: scale(0.97);
}

/* Icon di dalam kartu ringkasan */
.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: transparent;
}

.summary-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
}

/* Variasi warna icon statistik */
.si-terisi {
    color: var(--primary);
}
.si-kosong {
    color: var(--accent);
}
.si-lunas {
    color: var(--success);
}
.si-nunggak {
    color: var(--danger);
}

.summary-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.summary-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.2px;
}

/* === QUICK GRID (Menu Cepat) Digunakan di: pengelola.js (renderBerandaPengelola), penghuni.js (renderBerandaPenghuni) === */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.quick-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    animation: pop 0.4s ease backwards;
}

/* Animasi berurutan (staggered) untuk 6 item menu cepat */
.quick-item:nth-child(1) {
    animation-delay: 0.06s;
}
.quick-item:nth-child(2) {
    animation-delay: 0.12s;
}
.quick-item:nth-child(3) {
    animation-delay: 0.18s;
}
.quick-item:nth-child(4) {
    animation-delay: 0.24s;
}
.quick-item:nth-child(5) {
    animation-delay: 0.3s;
}
.quick-item:nth-child(6) {
    animation-delay: 0.36s;
}

.quick-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.quick-item:active {
    transform: scale(0.95);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--primary);
}

.quick-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.8;
}

.quick-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
}

/* === BOTTOM NAVIGATION Digunakan di: core.js (bottomNav event listener, navigate function), index.html (struktur navigasi bawah) === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: var(--nav-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    border-top: 1px solid var(--border);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.nav-item {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--trans);
    padding: 6px 4px;
    border-radius: 12px;
    color: var(--text-muted);
}

.nav-item:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.nav-item.active {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}

/* Icon & Label Navigasi */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: var(--trans);
    filter: grayscale(1);
    opacity: 0.55;
}

.nav-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--trans);
    letter-spacing: 0.1px;
}

/* State Aktif Navigasi */
.nav-item.active .nav-icon {
    filter: none;
    opacity: 1;
    transform: translateY(-2px);
    color: var(--primary);
}

.nav-item.active .nav-label {
    color: var(--primary);
    font-weight: 700;
}

/* === LIST CARDS & DATA DISPLAY Digunakan di: pengelola.js, penghuni.js (renderKamar, renderPenghuni, renderPembayaran, renderPengumuman, renderWifi, dll) === */
.list-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 14px;
    animation: slideUp 0.35s ease backwards;
    transition: var(--trans);
}

.list-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.list-card:active {
    transform: scale(0.99);
}

.list-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.list-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.list-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.5;
}

.list-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* === BADGES (Label Status) Digunakan di: pengelola.js, penghuni.js (status kamar, status pembayaran, status pengaduan, frekuensi WiFi, dll) === */
.badge {
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.badge-success {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 20%, transparent);
}

.badge-danger {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
}

.badge-warning {
    background: color-mix(in srgb, var(--warning) 20%, transparent);
    color: var(--warning);
    border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
}

.badge-primary {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.badge-muted {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* === EMPTY STATES Digunakan di: pengelola.js, penghuni.js (tampilan saat data kamar, penghuni, riwayat, atau pengaduan kosong) === */
.empty-state {
    text-align: center;
    padding: 50px 24px;
    color: var(--text-muted);
    animation: fadeIn 0.4s ease;
}

.empty-state .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

/* === FLOATING ACTION BUTTON (FAB) Digunakan di: core.js (inject tombol "+" melayang di halaman kamar, penghuni, pengumuman, dan peraturan melalui fungsi navigate) === */
.fab {
    position: fixed;
    bottom: 100px;
    right: calc(
        50% - 296px
    ); /* Menyesuaikan dengan max-width 640px app-shell */
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 40%, transparent);
    transition: var(--trans);
    z-index: 45;
    animation: pop 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px color-mix(in srgb, var(--primary) 50%, transparent);
}

.fab:active {
    transform: scale(0.9) rotate(90deg);
}

/* === NOTIFICATIONS PANEL Digunakan di: core.js (renderNotif, ambilNotifikasi, event listener notifPanel) === */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px;
}

.notif-item {
    display: flex;
    gap: 12px;
    background: var(--bg-elevated);
    border-radius: 14px;
    padding: 14px;
    animation: slideUp 0.3s ease backwards;
    border: 1px solid var(--border);
    transition: var(--trans);
    cursor: pointer;
    position: relative;
    align-items: flex-start;
}

.notif-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.notif-item:active {
    transform: scale(0.98);
}

/* State Notifikasi: Belum Dibaca */
.notif-unread {
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-elevated));
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
    font-weight: 500;
}

.notif-unread .notif-text {
    color: var(--text);
    font-weight: 600;
}

/* State Notifikasi: Sudah Dibaca */
.notif-read {
    opacity: 0.7;
}

.notif-read:hover {
    opacity: 1;
}

/* Konten Notifikasi */
.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

.notif-icon svg {
    width: 18px;
    height: 18px;
}

.notif-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Dot Indicator "Belum Dibaca" */
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 8px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

/* Dark mode adjustment untuk notifikasi */
[data-theme="dark"] .notif-unread {
    background: color-mix(in srgb, var(--primary) 10%, var(--bg-elevated));
}

/* === SETTINGS ROW (Menu Pengaturan) Digunakan di: pengelola.js (renderPengaturan, renderPengaturanTentang), penghuni.js (renderPengaturanPenghuni) === */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 14px;
    gap: 14px;
    transition: var(--trans);
}

.setting-row:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.setting-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
    color: var(--primary);
}

.setting-icon svg {
    width: 22px;
    height: 22px;
}

.setting-label {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.2px;
}

.setting-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.4;
}

/* === PAGE HEADERS & BACK BUTTON Digunakan di: core.js (fungsi backRow), serta hampir semua fungsi render  halaman di pengelola.js dan penghuni.js === */
.back-row {
    margin: 8px 0 20px;
}

.page-title-big {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
}

/* === TOAST NOTIFICATION (Notifikasi Sementara) Digunakan di: utils.js (fungsi toast), index.html (elemen #toast) === */
.toast {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    z-index: 200;
    box-shadow: var(--shadow-xl);
    animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 90%;
    text-align: center;
    border: 1px solid var(--border);
}

/* === GLOBAL ANIMATIONS Digunakan di: Seluruh file JS untuk animasi masuk elemen (pageIn, pop, slideUp, fadeIn, toastIn). CATATAN: sheetUp dihapus karena class .sheet sudah tidak digunakan. == */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, 24px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* === HOUSE RULES LIST (Daftar Peraturan Kos) Digunakan di: pengelola.js (renderPeraturan), penghuni.js (renderPeraturanPenghuni) === */
.peraturan-list {
    list-style: none;
    counter-reset: peraturan-counter;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.peraturan-item {
    counter-increment: peraturan-counter;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    transition: var(--trans);
    position: relative;
}

.peraturan-item:hover {
    background: color-mix(in srgb, var(--primary) 8%, var(--bg));
    transform: translateX(2px);
}

/* Nomor otomatis dengan gradient bulat */
.peraturan-item::before {
    content: counter(peraturan-counter);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    margin-top: 1px;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--primary) 30%, transparent);
}

.peraturan-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    padding-top: 3px;
}

/* Tombol hapus minimalis di sebelah peraturan */
.btn-icon-danger {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0.5;
    transition: var(--trans);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-danger:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    transform: scale(1.1);
}

.btn-icon-danger:active {
    transform: scale(0.9);
}

/* Dark mode adjustment untuk peraturan */
[data-theme="dark"] .peraturan-item {
    background: var(--input-bg);
}

[data-theme="dark"] .peraturan-item:hover {
    background: color-mix(in srgb, var(--primary) 12%, var(--input-bg));
}

/* ==== STATISTICS & CHARTS (Halaman Statistik & Profil Pengelola) Digunakan di: pengelola.js (renderStatistik, renderProfilPengelola) === */
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    animation: slideUp 0.4s ease backwards;
}

/* Animasi berurutan untuk kartu statistik */
.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}
.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}
.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}
.stat-card:nth-child(4) {
    animation-delay: 0.2s;
}
.stat-card:nth-child(5) {
    animation-delay: 0.25s;
}

/* Header & Teks Statistik */
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.stat-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-trend {
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
}

.trend-up {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
}

.trend-down {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
}

/* --- Bar Chart (Pendapatan 6 Bulan) --- */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    width: 40px;
    text-align: right;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

.bar-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    width: 70px;
    flex-shrink: 0;
}

/* --- Progress Bar (Tingkat Okupansi) --- */
.progress-container {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
}

.progress-label-terisi {
    color: var(--success);
}
.progress-label-kosong {
    color: var(--warning);
}

/* --- Stat Detail Grid (Detail Okupansi) --- */
.stat-detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat-detail-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-detail-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
}

.stat-detail-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    display: block;
    line-height: 1;
}

.stat-detail-value.success {
    color: var(--success);
}
.stat-detail-value.warning {
    color: var(--warning);
}
.stat-detail-value.danger {
    color: var(--danger);
}

/* --- Stat Grid 3 (Metrik Pengaduan) --- */
.stat-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.stat-metric {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg);
    border-radius: 12px;
}

.stat-metric-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.stat-metric-value.success {
    color: var(--success);
}
.stat-metric-value.warning {
    color: var(--warning);
}

.stat-metric-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- Stat List (Daftar Nunggak & Penghuni Loyal) --- */
.stat-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 10px;
    transition: var(--trans);
}

.stat-list-item:hover {
    background: color-mix(in srgb, var(--primary) 8%, var(--bg));
}

.stat-list-info {
    flex: 1;
    min-width: 0;
}

.stat-list-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.stat-list-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-list-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    flex-shrink: 0;
    margin-left: 12px;
}

.stat-list-value.danger {
    color: var(--danger);
}
.stat-list-value.success {
    color: var(--success);
}

.stat-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg);
    border-radius: 10px;
    margin-top: 12px;
}

/* --- Dark Mode Adjustments untuk Statistik --- */
[data-theme="dark"] .stat-card {
    background: var(--bg-elevated);
}

[data-theme="dark"] .bar-track,
[data-theme="dark"] .progress-bar,
[data-theme="dark"] .stat-metric,
[data-theme="dark"] .stat-list-item,
[data-theme="dark"] .stat-empty {
    background: var(--input-bg);
}

/* === SETTINGS SECTION TITLE (Judul Bagian Pengaturan) Digunakan di: pengelola.js (renderPengaturan, renderPengaturanTentang), penghuni.js (renderPengaturanPenghuni) === */
.setting-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 12px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.setting-section-title:first-of-type {
    margin-top: 8px;
}

/* === PROFILE HERO & INFO CARD (Halaman Profil) Digunakan di: pengelola.js (renderProfilPengelola), penghuni.js (renderProfilPenghuni, renderHalamanPenghuni) === */
.profile-hero {
    text-align: center;
    padding: 32px 0 20px;
}

.profile-hero .avatar-big {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 12px 32px color-mix(in srgb, var(--primary) 35%, transparent);
    animation: pop 0.45s ease;
    border: 4px solid var(--card);
    letter-spacing: -1px;
}

.profile-hero h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.profile-email {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-family: monospace;
    font-weight: 600;
    margin: 0;
}

/* Kartu Info Profil */
.profile-info-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    animation: slideUp 0.4s ease backwards;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.profile-info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.profile-info-value.monospace {
    font-family: monospace;
    font-size: 12px;
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 6px;
}

.profile-info-divider {
    height: 1px;
    background: var(--border-strong);
    margin: 8px 0;
}

.profile-hero .badge-primary {
    margin-top: 16px;
    display: inline-block;
}

/* Dark mode untuk Profil */
[data-theme="dark"] .profile-hero .avatar-big {
    border-color: var(--bg-elevated);
}

[data-theme="dark"] .profile-info-card {
    background: var(--bg-elevated);
}

/* Tombol Edit Profil Kos di halaman Profil (Digunakan di: pengelola.js - renderProfilPengelola) */
#btnEditProfilKos {
    margin-top: 16px;
}

/* === SEGMENTED CONTROL (Pemilih Bahasa & Tampilan) Digunakan di: pengelola.js (renderPengaturan), penghuni.js (renderPengaturanPenghuni), core.js (event listener bahasa) === */
.lang-segmented {
    display: flex;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
    width: 100%;
}

.lang-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.15s ease;
}

.lang-option:hover {
    color: var(--text);
}

.lang-option:active {
    transform: scale(0.96);
}

.lang-option.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(44, 36, 22, 0.08);
    font-weight: 700;
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-name {
    letter-spacing: 0.2px;
}

/* Dark mode untuk Segmented Control */
[data-theme="dark"] .lang-option.active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==== RESPONSIVE DESIGN (Tablet & Desktop) Penyesuaian layout untuk layar > 640px dan > 768px === */
@media (min-width: 640px) {
    .summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .quick-item {
        padding: 26px 12px;
    }

    .greeting-text {
        font-size: 26px;
    }

    .page-container {
        padding: 8px 28px 130px;
    }
}

@media (min-width: 768px) {
    .app-shell {
        box-shadow: var(--shadow-xl);
        min-height: 100vh;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    /* Premium scrollbar (desktop only) */
    .page-container::-webkit-scrollbar {
        width: 6px;
    }

    .page-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .page-container::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--text-muted) 30%, transparent);
        border-radius: 3px;
    }

    .page-container::-webkit-scrollbar-thumb:hover {
        background: color-mix(in srgb, var(--text-muted) 50%, transparent);
    }
}

/* === SWITCH TOGGLE (Dark Mode & Pengaturan) Digunakan di: pengelola.js (renderPengaturan), penghuni.js (renderPengaturanPenghuni), core.js (event listener themeToggle) === */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 32px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--border-strong);
    border-radius: 32px;
    cursor: pointer;
    transition: var(--trans);
}

.slider::before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--trans);
}

.switch input:checked + .slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* === LEGAL DOCUMENTS (Dokumen Legal: Syarat, Privasi, Cookie, Kontak) Konten HTML di-generate di: legal.js Dirender melalui modal di: pengelola.js (fungsi showLegal) === */
/* == Konten Dokumen == */
.legal-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}

.legal-content h3 {
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content h4 {
    margin: 16px 0 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.legal-content p {
    margin: 10px 0;
    color: var(--text);
}

.legal-content ul {
    margin: 10px 0;
    padding-left: 24px;
}

.legal-content li {
    margin: 6px 0;
    color: var(--text);
    line-height: 1.6;
}

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
    transition: var(--trans);
}

.legal-content a:hover {
    color: var(--primary-dark);
}

.legal-content strong,
.legal-content b {
    color: var(--text);
    font-weight: 700;
}

/* == Intro & Avatar (Khusus Halaman Kontak) == */
.legal-intro {
    padding: 20px 0;
    text-align: center;
}

.legal-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 28px;
}

.legal-heading {
    margin-bottom: 8px;
    color: var(--text);
}

/* == Kartu Kontak == */
.legal-card {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.legal-card:last-of-type {
    margin-bottom: 0;
}

.legal-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.legal-head-content {
    flex: 1;
    min-width: 0;
}

.legal-list-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.legal-list {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* == Tautan Kontak == */
.legal-link,
.legal-email,
.legal-whatsapp {
    display: block;
    margin-top: 12px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.legal-email {
    color: var(--primary);
}

.legal-whatsapp {
    color: var(--success);
}

/* == Catatan & Tanggal Pembaruan == */
.legal-sub {
    margin: 24px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.legal-updated {
    margin-top: 24px !important;
    color: var(--text-muted) !important;
    font-size: 12px;
}

/* === LEGAL CHECKBOX (Form Pendaftaran)
   Digunakan di: index.html (Checkbox persetujuan Syarat & Ketentuan) === */
.legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 16px 0;
    cursor: pointer;
}

.legal-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.legal-checkbox span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.legal-checkbox a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.legal-checkbox a:hover {
    color: var(--primary-dark);
}

/* === LANGUAGE SELECTION SCREEN (Halaman Pilih Bahasa Awal) Digunakan di: index.html (languageScreen), core.js (selectFirstLang) === */
.lang-screen-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: hidden;
    position: relative;
}

.lang-screen-container.hidden {
    display: none;
}

.lang-header {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.4s ease;
}

.lang-header .app-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: #fff;
}

.lang-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px;
}

.lang-desc {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    max-width: 320px;
}

.lang-buttons-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeInUp 0.4s ease 0.1s both;
}

.lang-select-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    background: var(--card, #fff);
    border: 2px solid var(--border, #e5e7eb);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-muted);
}

.lang-select-btn:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, var(--card, #fff));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.lang-select-btn:active {
    transform: translateY(0);
}

.lang-btn-flag {
    font-size: 28px;
    flex-shrink: 0;
}

.lang-btn-content {
    flex: 1;
}

.lang-btn-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.lang-btn-arrow {
    font-size: 22px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.lang-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* Animasi */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.lang-screen-fading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* === INVOICE LAYOUT (Tampilan Cetak/Download PDF) Digunakan di: pengelola.js (fungsi renderInvoicePage) CATATAN: Warna di-hardcode (tidak pakai var) agar konsisten saat di-print/PDF. === */
/* --- Wrapper & Page --- */
.invoice-wrapper {
    width: 100%;
    background: #f5f5f5;
    padding: 12px;
    min-height: 100vh;
}

.invoice-page {
    width: 100%;
    background: #ffffff;
    padding: 20px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
}

/* --- Header & Company Info --- */
.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 2px solid #b8963e;
    margin-bottom: 20px;
    gap: 12px;
}

.inv-logo-section svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.inv-company-info {
    text-align: right;
    flex: 1;
}

.inv-company-name {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.inv-company-detail {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
}

/* --- Info Grid (No. Invoice, Tanggal, Tagihan Kepada) --- */
.inv-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.inv-info-col {
    display: flex;
    flex-direction: column;
}

.inv-info-right {
    align-items: flex-end;
    text-align: right;
}

.inv-label {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.inv-value {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}

.inv-value-large {
    font-size: 15px;
    margin-bottom: 3px;
}

.inv-detail {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.inv-status-badge {
    display: inline-block;
    background: #10b981;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* --- Logo Header--- */
.inv-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.inv-logo-wrapper svg {
    width: 100%;
    height: 100%;
}

/* --- Catatan Pembayaran --- */
.inv-payment-note {
    font-size: 11px;
    color: #4b5563;
    line-height: 1.4;
    margin-top: 6px;
    font-style: italic;
}

/* --- Table (Daftar Item Tagihan) --- */
.inv-table-wrapper {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 320px;
}

.inv-table thead {
    background: #1e3a5f;
    color: #ffffff;
}

.inv-table th {
    padding: 8px 10px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.inv-table td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.inv-table tbody tr:last-child td {
    border-bottom: none;
}

.inv-period {
    font-size: 10px;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.3;
}

/* --- Total Section (Subtotal, Diskon, Grand Total) --- */
.inv-total-section {
    margin-bottom: 20px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.inv-total-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: #6b7280;
}

.inv-total-row span:last-child {
    font-weight: 700;
    color: #1a1a1a;
}

.inv-grand-total {
    border-top: 2px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 10px;
    font-size: 13px;
}

.inv-grand-total span {
    color: #1e3a5f !important;
    font-size: 15px;
    font-weight: 800;
}

/* --- Payment Info (Metode & Tanggal Bayar) --- */
.inv-payment-info {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f0f4f8;
    border-left: 3px solid #1e3a5f;
    border-radius: 8px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.inv-payment-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.inv-payment-content {
    flex: 1;
}

.inv-payment-title {
    font-size: 11px;
    font-weight: 800;
    color: #1e3a5f;
    margin-bottom: 3px;
}

.inv-payment-detail {
    font-size: 11px;
    color: #4b5563;
    line-height: 1.4;
}

/* --- Signature (Tanda Tangan Pengelola) --- */
.inv-signature-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
}

.inv-signature-block {
    text-align: center;
    min-width: 140px;
}

.inv-signature-city {
    font-size: 11px;
    color: #1a1a1a;
    margin-bottom: 32px;
    font-weight: 500;
}

.inv-signature-label {
    font-size: 9px;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inv-signature-img {
    max-height: 45px;
    max-width: 120px;
    margin: 0 auto 6px;
    display: block;
}

.inv-signature-empty {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 18px;
    border-bottom: 1px dashed #d1d5db;
    margin-bottom: 6px;
}

.inv-signature-name {
    font-size: 11px;
    font-weight: 800;
    color: #1a1a1a;
    border-top: 1px solid #1a1a1a;
    padding-top: 5px;
    margin-top: 3px;
}

.inv-signature-role {
    font-size: 9px;
    color: #6b7280;
    margin-top: 2px;
}

/* --- Footer & Actions (Tombol Kembali & Download PDF) --- */
.inv-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px dashed #d1d5db;
    font-size: 10px;
    color: #9ca3af;
    line-height: 1.4;
}

.inv-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding: 0 12px 24px;
}

/* === PRINT STYLES (A4 Full Page for Invoice) Digunakan di: pengelola.js (fungsi cetakInvoice) saat window.print() dipanggil === */
@media print {
    @page {
        size: A4;
        margin: 0;
    }

    /* Sembunyikan semua elemen di halaman kecuali invoice */
    body * {
        visibility: hidden;
    }

    .invoice-wrapper,
    .invoice-wrapper * {
        visibility: visible;
    }

    .invoice-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        background: #ffffff;
    }

    .invoice-page {
        width: 100%;
        min-height: 297mm;
        padding: 20mm;
        box-shadow: none;
        border-radius: 0;
    }

    /* Sembunyikan elemen navigasi dan tombol saat dicetak */
    .inv-actions,
    .bottom-nav,
    .topbar,
    .back-row {
        display: none !important;
    }

    /* Paksa browser mencetak background warna (untuk header tabel & badge) */
    .inv-table thead,
    .inv-status-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .inv-table thead {
        background: #1e3a5f !important;
    }

    .inv-status-badge {
        background: #10b981 !important;
    }
}

/* === FORM & PAYMENT UTILITIES Digunakan di: pengelola.js (catatBayar, renderPembayaranPengelola) === */
/* Tombol Aksi Utama (Tambah Kamar, Penghuni, dll) */
.btn-section {
    margin-bottom: 20px;
}

/* Info Box (No. Invoice di form catat bayar) */
.form-info-box {
    background: var(--bg);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.form-info-box b {
    color: var(--text);
}

.form-info-box .mono {
    font-family: monospace;
    color: var(--primary);
}

/* Filter Bulan (Pembayaran) */
.filter-wrapper {
    margin-bottom: 16px;
}

.filter-select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-family: var(--font);
    width: 100%;
}

/* Total Calculation Box */
.total-box {
    background: color-mix(in srgb, var(--success) 10%, transparent);
    padding: 12px 14px;
    border-radius: 10px;
    margin-top: 4px;
    border: 1px solid color-mix(in srgb, var(--success) 20%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.total-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--success);
}

/* === SIGNATURE CANVAS (Tanda Tangan Digital) Digunakan di: pengelola.js (catatBayar - form tanda tangan) === */
.signature-box {
    margin-top: 16px;
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    padding: 14px;
    background: var(--bg);
}

.signature-box-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.signature-box-title .req {
    color: var(--danger);
}

.signature-canvas {
    display: block;
    width: 100%;
    height: 180px;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    touch-action: none;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* === PROFILE & STATS LAYOUTS (Halaman Profil Pengelola) Digunakan di: pengelola.js (renderProfilPengelola) === */
/* Grid Statistik di bawah Profil */
.stat-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.stat-box {
    background: var(--bg);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.stat-value-2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* === MODAL & PAYWALL UTILITIES Digunakan di: core.js (openModal, btnTentang), pengelola.js (showLegal, paywall) === */
/* Modal Center (Tentang Aplikasi) */
.modal-center {
    text-align: center;
    padding: 20px 0;
}

.modal-emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-divider {
    margin: 15px 0;
    border-top: 1px solid var(--border);
}

/* Warning Box (Konfirmasi/Hint) */
.warning-box {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--danger);
    margin-bottom: 16px;
}

.warning-box-title {
    margin: 0;
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
}

.warning-box-desc {
    margin: 8px 0 0 0;
    font-size: 13px;
}

/* Paywall Modal (Upgrade/Downgrade Plan) */
.paywall-body {
    text-align: center;
    padding: 10px 0;
}

.paywall-emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.paywall-title {
    margin-bottom: 8px;
}

.paywall-desc {
    margin-bottom: 20px;
}

.paywall-actions {
    display: grid;
    gap: 10px;
}

.paywall-divider {
    margin: 15px 0;
    border-top: 1px solid var(--border);
}

.paywall-warning {
    font-size: 11px;
    color: var(--danger);
}

/* === GLOBAL UTILITIES (Spacing, Text, Colors) Digunakan di: Seluruh file JS untuk formatting inline HTML CATATAN: Class duplikat (.mt-16, .mb-16) sudah digabungkan di sini. === */
/* --- Spacing --- */
.mt-8 {
    margin-top: 8px;
}
.mt-12 {
    margin-top: 12px;
}
.mt-14 {
    margin-top: 14px;
}
.mt-16 {
    margin-top: 20px;
}
.mt-20 {
    margin-top: 20px;
}
.mt-32 {
    margin-top: 32px;
}

.mb-14 {
    margin-bottom: 14px;
}
.mb-16 {
    margin-bottom: 16px;
}

/* --- Text & Alignment --- */
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 1px;
}
.font-bold {
    font-weight: 700;
}
.opacity-60 {
    opacity: 0.6;
}

/* --- Colors --- */
.text-muted {
    color: var(--text-muted);
}
.text-danger {
    color: var(--danger);
}
.text-success {
    color: var(--success);
}

/* Tanda bintang (*) untuk form wajib */
.req {
    color: var(--danger);
}

/* --- Misc --- */
.cursor-pointer {
    cursor: pointer;
}

/* === FORM & INPUT UTILITIES Digunakan di: penghuni.js (formProfilPenghuni, formPasswordPenghuni) === */
.form-section {
    margin-top: 16px;
}

/* ==== ANNOUNCEMENTS & COMPLAINTSb(Pengumuman & Pengaduan) Digunakan di: pengelola.js (renderPengumuman, renderPengaduan), penghuni.js (renderHalamanPenghuni - halaman pengaduan) === */
.icon-plus {
    font-size: 18px;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
}

.list-desc {
    margin-top: 8px;
    line-height: 1.6;
}

.reply-box {
    margin-top: 8px;
    background: var(--bg);
    padding: 10px;
    border-radius: 10px;
}

/* = WIFI INFO Digunakan di: pengelola.js (renderWifi), penghuni.js (renderHalamanPenghuni-halaman wifi) = */
.wifi-grid {
    display: grid;
    gap: 14px;
}

.wifi-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wifi-pass-box {
    margin-top: 12px;
    background: var(--bg);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wifi-pass-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.wifi-pass-value {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* === HOUSE RULES (Peraturan Kos) Digunakan di: pengelola.j (renderPeraturan), penghuni.js (renderPeraturanPenghuni) === */
.rules-header {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-count {
    margin-left: auto;
}

/* === SETTINGS LAYOUT (Pengaturan) Digunakan di: pengelola.js (renderPengaturan, renderPengaturanTentang), penghuni.js (renderPengaturanPenghuni) === */
.setting-row-column {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.setting-info-full {
    width: 100%;
}

.setting-row-clickable {
    cursor: pointer;
}

.chevron-icon {
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

/* === DANGER MODAL (Reset Data / Hapus Akun) Digunakan di: core.js (fungsi bukaModalBahaya) === */
.danger-modal {
    --tone: var(--danger);
    --tone-soft: rgba(196, 92, 74, 0.12);
    --tone-ring: rgba(196, 92, 74, 0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.danger-modal.is-warning {
    --tone: var(--warning);
    --tone-soft: rgba(212, 148, 58, 0.14);
    --tone-ring: rgba(212, 148, 58, 0.07);
}

.danger-hero {
    text-align: center;
    padding: 4px 4px 0;
}

.danger-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--tone);
    background: var(--tone-soft);
    box-shadow: 0 0 0 8px var(--tone-ring);
}

.danger-icon svg {
    width: 30px;
    height: 30px;
}

.danger-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.danger-list {
    list-style: none;
    margin: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
}

.danger-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.danger-list .dl-ico {
    flex: 0 0 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.danger-list .dl-del .dl-ico {
    color: var(--danger);
    background: rgba(196, 92, 74, 0.14);
}

.danger-list .dl-keep .dl-ico {
    color: var(--success);
    background: rgba(107, 142, 78, 0.16);
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}

.danger-actions .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* === ALERT CARDS & MODAL UTILITIES Digunakan di: core.js (modal Lupa Password, modal Tentang Aplikasi) === */
/* Alert Card untuk hasil pencarian Lupa Password */
.alert-card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert-card.warning {
    background: color-mix(in srgb, var(--warning) 10%, transparent);
    border: 1px solid var(--warning);
}
.alert-card.warning .list-title {
    color: var(--warning);
}

.alert-card.primary {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid var(--primary);
}
.alert-card.primary .list-title {
    color: var(--primary);
}

.alert-card.danger {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    border: 1px solid var(--danger);
}
.alert-card.danger .list-title {
    color: var(--danger);
}

/* Avatar untuk Modal "Tentang Aplikasi" */
.about-avatar {
    width: 64px;
    height: 64px;
    font-size: 28px;
    margin: 0 auto 16px;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Container scroll untuk dokumen legal di dalam modal */
.legal-scroll-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 8px;
}

/* === INLINE CSS REPLACEMENTS & SPECIFIC UTILITIES Menggantikan atribut style="..." lama pada string HTML di JS === */
/* Form Filter (Pembayaran) */
.field-flush {
    margin-bottom: 0;
}

/* Deskripsi Pengumuman & Balasan Pengaduan */
.list-desc-spaced {
    margin-top: 12px;
}

/* Badge Frekuensi Wi-Fi (2.4 GHz / 5 GHz) */
.badge.badge-freq {
    font-size: 10px;
}
.badge.badge-freq-5 {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
}
.badge.badge-freq-24 {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary);
}

/* Balasan Pengelola pada Pengaduan (Tampilan Penghuni) */
.reply-box.reply-box-accent {
    margin-top: 12px;
    padding: 12px;
    border-left: 3px solid var(--primary);
}
.reply-box-label {
    font-size: 12px;
    color: var(--primary);
}
.reply-box-text {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
}

/* Nomor Invoice di Daftar Pembayaran (Tampilan Penghuni) */
.list-sub.list-sub-invoice {
    margin-top: 4px;
    font-family: monospace;
    font-size: 11px;
    color: var(--primary);
}

/* Efek transisi memudar pada Layar Pilih Bahasa */
.lang-screen-fading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* === APP LOGO Digunakan di: core.js (setupIcons), index.html === */
.app-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 24px 0;
}

.app-logo svg {
    width: 100px;
    height: 100px;
    max-width: 30vw;
    max-height: 30vw;
    display: block;
}

/* Logo SVG di halaman Auth */
.auth-logo-wrapper {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo-svg {
    filter: drop-shadow(0 4px 12px rgba(184, 150, 62, 0.25));
}

/* === INVOICE STAMP (Stempel Lunas) === */
.inv-signature-section {
    position: relative;
}

.inv-stamp {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-16deg);
    padding: 6px 22px;
    border: 6px double #6b2fa0;
    border-radius: 12px;
    color: #6b2fa0;
    font-size: 54px;
    font-weight: 900;
    letter-spacing: 6px;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.14;
    pointer-events: none;
    user-select: none;
    z-index: 2;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

@media (max-width: 380px) {
    .inv-stamp {
        font-size: 44px;
        letter-spacing: 4px;
    }
}

/* === MODAL / SHEET BACKDROP (Pop-up dari Bawah) Digunakan di: index.html (elemen #modal menggunakan class .sheet-backdrop)  Dipanggil di: core.js (openModal, closeModal, showLegal, formKamar, dll)
   === */

/* Animasi naik dari bawah (Kembalikan ke blok Global Animations jika ingin lebih rapi) */
@keyframes sheetUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Backdrop gelap di belakang modal */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end; /* Memposisikan modal di bawah (bottom sheet) */
    justify-content: center;
    z-index: 90;
    animation: fadeIn 0.25s ease;
}

/* Wadah utama modal */
.sheet {
    background: var(--card);
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 16px 24px calc(28px + env(safe-area-inset-bottom));
    animation: sheetUp 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: var(--shadow-xl);
}

/* Handle garis di atas modal (opsional, tergantung HTML) */
.sheet-handle {
    width: 48px;
    height: 5px;
    background: var(--border-strong);
    border-radius: 4px;
    margin: 0 auto 16px;
}

/* Judul Modal */
.sheet-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
}

/* Wadah isi modal (target dari #modalBody di core.js) */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================
   TANDA TANGAN PENGELOLA — GANTI isi blok style_ttd.css yang lama dengan file ini
   (atau tempel di paling bawah style.css dan hapus blok lamanya)
   Memakai token: --text, --text-muted, --border, --radius-sm, --warning, --success, --danger
   ========================================================== */

/* --- Pratinjau tanda tangan di form Catat Pembayaran --- */
.signature-box.is-ready {
    border-style: solid;
    border-color: var(--success);
}
.signature-box.is-ready .signature-box-title {
    color: var(--success);
}
.sig-preview-img {
    display: block;
    max-height: 80px;
    max-width: 100%;
    margin: 8px 0;
}
.sig-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Kartu Tanda Tangan Digital di halaman Profil --- */
.sig-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Keadaan: belum ada tanda tangan */
.sig-empty {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(212, 148, 58, 0.12);
    border: 1px solid rgba(212, 148, 58, 0.28);
}
.sig-empty > div {
    min-width: 0;
}
.sig-empty-icon {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--warning);
    background: rgba(212, 148, 58, 0.2);
}
.sig-empty-icon svg {
    width: 18px;
    height: 18px;
}
.sig-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.sig-empty-text {
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

/* Keadaan: sudah ada tanda tangan */
.sig-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sig-head-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.sig-head-sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Kartu "kertas" kecil, mirip blok tanda tangan di invoice */
.sig-paper {
    padding: 14px 16px 12px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.sig-paper-stage {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sig-paper-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 70%;
    max-height: 64px;
    object-fit: contain;
}
.sig-paper-line {
    width: 70%;
    height: 1px;
    margin: 8px auto;
    background: #e3dede;
}
.sig-paper-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}
.sig-paper-role {
    font-size: 11px;
    color: #7a7a7a;
}

/* Editor kanvas dan tombol */
.sig-editor {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sig-editor[hidden] {
    display: none;
}
.sig-actions {
    display: flex;
    gap: 10px;
}
.sig-actions[hidden] {
    display: none;
}
.sig-actions .btn {
    flex: 1;
}

/* Loading state saat memulihkan data dari server */
.app-shell.loading-state {
    position: relative;
}

.app-shell.loading-state::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );
    animation: loading-bar 1.5s ease-in-out infinite;
    z-index: 9999;
    pointer-events: none;
}

@keyframes loading-bar {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Visibilitas #authScreen kini hanya diatur class .hidden (lihat atas).
   Flash login saat refresh sudah ditutup oleh #loadingScreen. */

/* Loading screen sementara */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border, #e0e0e0);
    border-top-color: var(--primary, #c2185b);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === LOGOUT SECTION (Tombol Keluar Terpisah) === */
.logout-section {
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

.logout-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--trans);
    overflow: hidden; /* PENTING: Agar sudut tombol tidak keluar dari radius card */
}

.logout-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.btn-logout-standalone {
    background: transparent;
    color: var(--danger);
    border: none;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    padding: 16px; /* Padding dipindah ke sini agar area klik luas & nyaman */
    width: 100%;
    border-radius: 0; /* Hapus radius tombol, biarkan card yang membulat */
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.2px;
}

.btn-logout-standalone:hover {
    background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.btn-logout-standalone:active {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
}

.btn-logout-standalone svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Dark mode adjustment */
[data-theme="dark"] .logout-card {
    background: var(--bg-elevated);
}

[data-theme="dark"] .btn-logout-standalone {
    color: #ff7b8b;
}

/* === MODAL KONFIRMASI MODERN (CENTERED) === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-overlay.closing {
    animation: modalFadeOut 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.modal-container {
    background: var(--bg-card, #fff);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: modalScaleIn 0.3s ease forwards;
}

.modal-overlay.closing .modal-container {
    animation: modalScaleOut 0.3s ease forwards;
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalScaleOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

.modal-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 50%;
    color: #dc2626;
    font-size: 2rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text, #1a1a1a);
}

.modal-message {
    text-align: center;
    color: var(--text-muted, #666);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.modal-actions-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions-horizontal .btn {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.modal-actions-horizontal .btn:hover {
    transform: translateY(-2px);
}

.modal-actions-horizontal .btn:active {
    transform: translateY(0);
}

/* Tombol Cancel - Abu-abu */
.btn-modal-cancel {
    background: var(--bg-soft, #f3f4f6);
    color: var(--text, #374151);
    border: 1px solid var(--border, #e5e7eb);
}

.btn-modal-cancel:hover {
    background: var(--bg-muted, #e5e7eb);
}

/* Tombol Delete - Merah */
.btn-modal-delete {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-modal-delete:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* ==========================================================
   AUTH SCREEN — NEUMORPHISM / EMBOSS (KosKita Teal Theme)
   Override class auth yang sudah ada. Tempel di PALING BAWAH style.css
   ========================================================== */

/* --- Auth Screen Background (Gradient Teal) --- */
.auth-screen {
    background: linear-gradient(135deg, #0f766e 0%, #2dd4bf 50%, #5eead4 100%);
    position: relative;
    overflow: hidden;
}

/* Dekorasi lingkaran transparan di background */
.auth-screen::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -100px;
    right: -80px;
    pointer-events: none;
}

.auth-screen::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -60px;
    left: -40px;
    pointer-events: none;
}

/* --- Auth Card (Emboss / Raised) --- */
.auth-card {
    background: #f0fdfa;
    border-radius: 28px;
    padding: 36px 28px;
    border: none;
    box-shadow: 0 4px 12px rgba(10, 51, 47, 0.08) !important;
    position: relative;
    z-index: 1;
}

/* --- Logo & Icon Lock --- */
.auth-logo-wrapper {
    margin-bottom: 20px;
}

.auth-logo-svg {
    filter: drop-shadow(0 6px 16px rgba(15, 118, 110, 0.3));
}

/* Icon lock bulat dengan efek emboss */
.auth-icon-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f0fdfa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        8px 8px 16px rgba(136, 29, 79, 0.2),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
}

.auth-icon-circle svg {
    width: 34px;
    height: 34px;
    fill: #0f766e;
}

/* --- Typography --- */
.auth-title {
    font-size: 30px;
    font-weight: 800;
    color: #115e59;
    margin-top: 8px;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: #a0708a;
    font-size: 14px;
    margin-bottom: 28px;
}

/* --- Tab Masuk / Daftar (Neumorphism) --- */
.auth-tabs {
    display: flex;
    background: #f0fdfa;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 28px;
    border: none;
    box-shadow:
        inset 4px 4px 8px rgba(136, 29, 79, 0.15),
        inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: #a0708a;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab.active {
    background: #f0fdfa;
    color: #0f766e;
    box-shadow:
        4px 4px 8px rgba(136, 29, 79, 0.15),
        -4px -4px 8px rgba(255, 255, 255, 0.9);
}

.auth-tab:hover:not(.active) {
    color: #0f766e;
}

/* --- Form Fields (Inset / Tenggelam) --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.35s ease;
}

.auth-form .field {
    margin-bottom: 0;
    gap: 8px;
}

.auth-form .field span {
    font-size: 12px;
    font-weight: 600;
    color: #a0708a;
    padding-left: 4px;
    letter-spacing: 0.2px;
}

/* Input, Select, Textarea — Inset Neumorphism */
.auth-form .field input,
.auth-form .field select,
.auth-form .field textarea {
    border: none;
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 15px;
    font-family: var(--font);
    color: #10302c;
    background: #f0fdfa;
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
    box-shadow:
        inset 4px 4px 8px rgba(136, 29, 79, 0.12),
        inset -4px -4px 8px rgba(255, 255, 255, 0.9);
}

.auth-form .field input::placeholder,
.auth-form .field textarea::placeholder {
    color: #c9a0b5;
    opacity: 1;
}

.auth-form .field input:focus,
.auth-form .field select:focus,
.auth-form .field textarea:focus {
    box-shadow:
        inset 4px 4px 8px rgba(136, 29, 79, 0.12),
        inset -4px -4px 8px rgba(255, 255, 255, 0.9),
        0 0 0 2px #0f766e;
}

.auth-form .field input:hover,
.auth-form .field select:hover,
.auth-form .field textarea:hover {
    border-color: transparent;
}

/* Select custom arrow */
.auth-form .field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f766e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Password wrapper dengan toggle eye */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 50px !important;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #a0708a;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #0f766e;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* --- Forgot Password Link --- */
.login-forgot-wrap {
    text-align: center;
    margin-top: 4px;
    margin-bottom: 8px;
}

.login-forgot-btn {
    background: none;
    border: none;
    color: #0f766e;
    font-size: 13px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px;
}

.login-forgot-btn:hover {
    color: #115e59;
    text-decoration: underline;
}

/* --- Login Button (Raised / Embossed) --- */
.auth-form .btn-primary {
    margin-top: 8px;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: #f0fdfa;
    color: #0f766e;
    border: none;
    border-radius: 14px;
    box-shadow:
        6px 6px 12px rgba(136, 29, 79, 0.2),
        -6px -6px 12px rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    cursor: pointer;
}

.auth-form .btn-primary:hover {
    box-shadow:
        4px 4px 8px rgba(136, 29, 79, 0.2),
        -4px -4px 8px rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.auth-form .btn-primary:active {
    box-shadow:
        inset 4px 4px 8px rgba(136, 29, 79, 0.15),
        inset -4px -4px 8px rgba(255, 255, 255, 0.9);
    transform: scale(0.98);
}

/* --- Legal Checkbox (Neumorphism) --- */
.legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 8px 0 16px;
    cursor: pointer;
}

.legal-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    margin-top: 2px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 6px;
    background: #f0fdfa;
    box-shadow:
        inset 2px 2px 4px rgba(136, 29, 79, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.9);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.legal-checkbox input[type="checkbox"]:checked {
    background: #0f766e;
    box-shadow: none;
}

.legal-checkbox input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.legal-checkbox span {
    font-size: 12px;
    color: #a0708a;
    line-height: 1.5;
}

.legal-checkbox a {
    color: #0f766e;
    text-decoration: underline;
    font-weight: 600;
}

.legal-checkbox a:hover {
    color: #115e59;
}

/* --- Auth Hint --- */
.auth-hint {
    font-size: 12px;
    color: #a0708a;
    line-height: 1.5;
    text-align: center;
    margin-top: 4px;
}

.auth-legal-wrap {
    text-align: center;
    margin-top: 16px;
}

.auth-legal-text {
    font-size: 11px;
    color: #a0708a;
    line-height: 1.6;
}

.auth-legal-text a {
    color: #0f766e;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-legal-text a:hover {
    color: #115e59;
}

/* --- Register Form Specific --- */
.register-form {
    display: flex;
}

.login-form {
    display: flex;
}

.login-form.hidden {
    display: none;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .auth-title {
        font-size: 26px;
    }
}

/* === PERBAIKAN TAB MASUK/DAFTAR === */

/* 1. Tambah padding container agar tab tidak nempel ke tepi */
.auth-tabs {
    padding: 8px !important;
    gap: 6px !important;
}

/* 2. Perkecil ukuran tombol tab agar ada ruang di kiri-kanan */
.auth-tab {
    padding: 10px 12px !important;
    font-size: 13px !important;
}

/* 3. Tambah border halus pada tab aktif (Masuk) */
.auth-tab.active {
    border: 1.5px solid var(--primary) !important;
    box-shadow:
        0 2px 8px rgba(15, 118, 110, 0.12),
        0 1px 3px rgba(15, 118, 110, 0.08) !important;
}

/* 4. Tambah border halus pada tab tidak aktif (Daftar) */
.auth-tab:not(.active) {
    border: 1.5px solid var(--border) !important;
}

/* 5. Hover effect pada tab tidak aktif */
.auth-tab:not(.active):hover {
    border-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

.auth-tab.active {
    border: 1.5px solid var(--primary) !important;
    box-shadow:
        0 0 0 3px rgba(15, 118, 110, 0.08),
        0 2px 8px rgba(15, 118, 110, 0.12) !important;
}

/* === BORDER HALUS UNTUK TOMBOL SUBMIT (Masuk/Daftar) === */
.auth-form .btn-primary {
    border: 1.5px solid var(--primary) !important;
    box-shadow:
        0 4px 12px rgba(15, 118, 110, 0.15),
        0 2px 6px rgba(15, 118, 110, 0.1) !important;
}

.auth-form .btn-primary:hover {
    border-color: var(--primary-dark) !important;
    box-shadow:
        0 6px 16px rgba(15, 118, 110, 0.2),
        0 3px 8px rgba(15, 118, 110, 0.15) !important;
}

.auth-form .btn-primary:active {
    border-color: var(--primary) !important;
    box-shadow: inset 0 2px 4px rgba(15, 118, 110, 0.1) !important;
}

/* === AUTH ICON CIRCLE (Emboss) === */
.auth-icon-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        8px 8px 16px rgba(10, 51, 47, 0.12),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.auth-icon-circle svg {
    width: 34px;
    height: 34px;
    fill: var(--primary);
}

/* === AUTH TABS NEUMORPHISM === */
.auth-tabs {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 8px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    gap: 6px;
}

.auth-tab {
    flex: 1;
    border: 1.5px solid var(--border);
    background: transparent;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--trans);
}

.auth-tab.active {
    background: var(--card);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow:
        0 2px 8px rgba(15, 118, 110, 0.12),
        0 1px 3px rgba(15, 118, 110, 0.08);
}

.auth-tab:hover:not(.active) {
    border-color: var(--primary-light);
    color: var(--primary);
}

/* === AUTH FORM INPUT NEUMORPHISM (Inset) === */
.auth-form .field input {
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--text);
    background: var(--card);
    width: 100%;
    transition: var(--trans);
    outline: none;
    box-sizing: border-box;
    box-shadow:
        inset 3px 3px 6px rgba(10, 51, 47, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.6);
}

.auth-form .field input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.auth-form .field input:focus {
    box-shadow:
        inset 3px 3px 6px rgba(10, 51, 47, 0.08),
        inset -3px -3px 6px rgba(255, 255, 255, 0.6),
        0 0 0 2px var(--primary);
}

/* === AUTH FORM BUTTON (Raised) === */
.auth-form .btn-primary {
    margin-top: 8px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: var(--card);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow:
        0 4px 12px rgba(15, 118, 110, 0.15),
        0 2px 6px rgba(15, 118, 110, 0.1);
    transition: var(--trans);
    cursor: pointer;
}

.auth-form .btn-primary:hover {
    box-shadow:
        0 6px 16px rgba(15, 118, 110, 0.2),
        0 3px 8px rgba(15, 118, 110, 0.15);
    transform: translateY(-1px);
}

.auth-form .btn-primary:active {
    box-shadow: inset 0 2px 4px rgba(15, 118, 110, 0.1);
    transform: scale(0.98);
}

/* === AUTH CARD SHADOW (Subtle) === */
.auth-card {
    box-shadow: 0 8px 24px rgba(10, 51, 47, 0.12) !important;
}

/* === PASSWORD WRAPPER & TOGGLE EYE === */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 50px !important;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* === REGISTER FORM HIDDEN BY DEFAULT === */
.register-form.hidden {
    display: none !important;
}

.login-form.hidden {
    display: none !important;
}

/* === PULL TO REFRESH === */
.pull-refresh-indicator {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 60px);
    left: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg, #fff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    transform: translate(-50%, -100px);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.pull-refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border, #ddd);
    border-top-color: var(--primary, #0f766e);
    border-radius: 50%;
}

.pull-refresh-indicator.refreshing .pull-refresh-spinner {
    animation: pull-refresh-spin 0.7s linear infinite;
}

@keyframes pull-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
   KOSKITA — Langganan, peran login, multi-kos, kredensial
   ========================================================== */

/* Pilihan peran di form masuk */
.role-switch {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: var(--input-bg);
    border: 1px solid var(--border);
}
.role-btn {
    flex: 1;
    padding: 10px 8px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--trans);
}
.role-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .role-btn.active {
    color: #062e2a;
}
.input-id {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

/* Layar terkunci */
.lock-hero {
    text-align: center;
    padding: 28px 16px 12px;
}
.lock-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--input-bg);
    color: var(--danger);
    border: 1px solid var(--border-strong);
}
.lock-icon svg {
    width: 30px;
    height: 30px;
}
.lock-hero h2 {
    margin-bottom: 6px;
}
.lock-hero p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Kartu paket */
.plan-card {
    position: relative;
    margin: 12px 0;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.plan-card.plan-current {
    border: 2px solid var(--primary);
}
.plan-card.plan-pro {
    background: linear-gradient(160deg, var(--card), var(--input-bg));
}
.plan-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.plan-name {
    font-weight: 800;
    font-size: 1.05rem;
}
.plan-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.05rem;
}
.plan-price small {
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 2px;
}
.plan-features {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
}
.plan-features li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.plan-features li svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    color: var(--success);
}
.plan-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 0 2px;
}
.sub-summary {
    margin-bottom: 4px;
}
.text-danger {
    color: var(--danger);
}

/* Daftar kos (multi kos) */
.kos-item {
    cursor: pointer;
}
.kos-item.kos-active {
    border: 2px solid var(--primary);
    cursor: default;
}
.kos-item.kos-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.kos-id-line {
    font-size: 0.8rem;
    color: var(--text-muted);
}
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Kredensial penghuni (ID Kos / ID Penghuni / password awal) */
.cred-box {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    border: 1px dashed var(--border-strong);
}
.cred-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.92rem;
}
.cred-row span {
    color: var(--text-muted);
}
.cred-row b {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.03em;
    word-break: break-all;
    text-align: right;
}

/* === Fitur premium: penanda kunci, kartu terkunci, laporan === */
.lock-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
    opacity: 1;
    flex-shrink: 0;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--warning) 20%, transparent);
    z-index: 2;
}

.lock-chip svg {
    width: 14px;
    height: 14px;
}

/* Pastikan quick-item jadi anchor untuk absolute positioning */
.quick-item {
    position: relative;
}

.lock-feature {
    text-align: center;
    padding: 28px 20px;
}

[data-theme="dark"] .lock-chip {
    background: rgba(234, 179, 8, 0.2);
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.25);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.report-page {
    background: var(--card, #fff);
    border-radius: 14px;
    padding: 4px 2px;
}
.report-title {
    margin: 0;
    font-size: 18px;
}
.report-sub {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

@media print {
    body.print-report .report-wrapper,
    body.print-report .report-wrapper * {
        visibility: visible;
    }
    body.print-report .invoice-wrapper,
    body.print-report .invoice-wrapper * {
        visibility: hidden;
    }
    body.print-report .report-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 15mm;
        background: #fff;
        color: #000;
    }
    body.print-report .report-wrapper * {
        color: #000 !important;
    }
    .no-print {
        display: none !important;
    }
}

/* === MODAL UPSELL PREMIUM === */
.upsell-header {
    text-align: center;
    padding: 8px 0 4px;
}

.upsell-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    color: #ffffff;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 35%, transparent);
    animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.upsell-icon-wrap svg {
    width: 32px !important;
    height: 32px !important;
    stroke-width: 2 !important;
}

.upsell-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.upsell-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.upsell-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upsell-features {
    list-style: none;
    margin: 0;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upsell-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.upsell-features li svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    color: var(--success);
    stroke-width: 2.5 !important;
}

.upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.upsell-actions .btn-primary {
    padding: 16px 20px;
    font-size: 15px;
    gap: 8px;
}

.upsell-actions .btn-primary svg {
    width: 18px;
    height: 18px;
}

.upsell-actions .btn-ghost {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Dark mode adjustment */
[data-theme="dark"] .upsell-icon-wrap {
    box-shadow: 0 8px 24px rgba(94, 234, 212, 0.25);
}

[data-theme="dark"] .upsell-features {
    background: var(--bg-elevated);
}

/* ==========================================================
   LAPORAN BULANAN — PERBAIKAN LAYOUT
   ========================================================== */

/* 1. Report Page — tambah padding yang layak */
.report-page {
    background: var(--card, #fff);
    border-radius: var(--radius);
    padding: 20px 16px; /* dari 4px 2px */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* 2. Section title di dalam report — beri napas */
.report-page .section-title {
    margin: 28px 0 14px;
    padding-left: 4px;
}

.report-page .section-title:first-child {
    margin-top: 8px;
}

/* 3. List-card di dalam report — spacing lebih lega */
.report-page .list-card {
    margin-bottom: 14px;
    padding: 18px;
}

/* 4. Profile info card di dalam report — padding dalam cukup */
.report-page .profile-info-card {
    padding: 8px 4px;
}

.report-page .profile-info-row {
    padding: 14px 12px;
    gap: 12px;
}

.report-page .profile-info-label {
    font-size: 13px;
    flex: 1;
    min-width: 0;
}

.report-page .profile-info-value {
    font-size: 14px;
    text-align: right;
    flex-shrink: 0;
    max-width: 55%;
}

/* 5. Tombol action laporan — STACK VERTIKAL (bukan horizontal) */
.inv-actions-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 20px 0 24px !important;
    margin-top: 8px;
}

.inv-actions-stack .btn {
    width: 100% !important;
    padding: 16px 20px !important;
    font-size: 15px !important;
    justify-content: center;
}

/* 6. List-card untuk penghuni belum bayar — layout lebih rapi */
.report-page .list-card .list-head {
    flex-wrap: wrap;
    gap: 10px;
}

.report-page .list-card .list-head > div {
    flex: 1;
    min-width: 0;
}

.report-page .list-card .list-actions {
    margin-top: 10px;
    width: 100%;
}

.report-page .list-card .list-actions .btn {
    flex: 1;
    min-width: 0;
}

/* 7. Dark mode adjustment */
[data-theme="dark"] .report-page {
    background: var(--bg-elevated);
}

/* 8. Print: pastikan report page full width */
@media print {
    .report-page {
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* ==========================================================
   PERBAIKAN INVOICE FREE — LAYOUT RAPI (HP + PDF)
   Hanya berlaku untuk class .inv-plain (paket Free)
   ========================================================== */

/* === RESET DASAR INVOICE FREE === */
.invoice-page.inv-plain {
    font-family: "Plus Jakarta Sans", Arial, sans-serif !important;
    color: #1a1a1a !important;
    background: #ffffff !important;
    padding: 24px 20px !important;
    box-sizing: border-box !important;
}

.invoice-page.inv-plain * {
    box-sizing: border-box !important;
}

/* === HEADER: Sembunyikan Logo SVG, tampilkan hanya teks === */
.invoice-page.inv-plain .inv-logo-section {
    display: none !important;
}

.invoice-page.inv-plain .inv-header {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    border-bottom: 2px solid #1a1a1a !important;
    padding-bottom: 14px !important;
    margin-bottom: 24px !important;
    gap: 0 !important;
}

.invoice-page.inv-plain .inv-company-info {
    text-align: right !important;
    flex: 1 !important;
}

.invoice-page.inv-plain .inv-company-name {
    font-size: 20px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #1a1a1a !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
}

.invoice-page.inv-plain .inv-company-detail {
    font-size: 12px !important;
    color: #555555 !important;
    line-height: 1.4 !important;
}

/* === INFO GRID: 2 kolom rapi === */
.invoice-page.inv-plain .inv-info-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
}

.invoice-page.inv-plain .inv-info-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.invoice-page.inv-plain .inv-info-right {
    align-items: flex-end !important;
    text-align: right !important;
}

.invoice-page.inv-plain .inv-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #888888 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 2px !important;
}

.invoice-page.inv-plain .inv-value {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.3 !important;
}

.invoice-page.inv-plain .inv-value-large {
    font-size: 16px !important;
    margin-bottom: 4px !important;
}

.invoice-page.inv-plain .inv-detail {
    font-size: 12px !important;
    color: #666666 !important;
    margin-top: 2px !important;
    word-break: break-word !important;
}

/* Status Badge — kotak border hitam */
.invoice-page.inv-plain .inv-status-badge {
    display: inline-block !important;
    background: transparent !important;
    color: #1a1a1a !important;
    border: 1.5px solid #1a1a1a !important;
    padding: 4px 14px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    margin-top: 4px !important;
}

/* === TABEL: Garis abu-abu rapi === */
.invoice-page.inv-plain .inv-table-wrapper {
    border: 1px solid #d0d0d0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}

.invoice-page.inv-plain .inv-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 12px !important;
    min-width: auto !important;
}

.invoice-page.inv-plain .inv-table thead {
    background: #f0f0f0 !important;
    color: #1a1a1a !important;
    border-bottom: 1px solid #d0d0d0 !important;
}

.invoice-page.inv-plain .inv-table th {
    padding: 10px 8px !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    color: #1a1a1a !important;
    text-align: left !important;
    border-bottom: 1px solid #d0d0d0 !important;
}

.invoice-page.inv-plain .inv-table th.text-center {
    text-align: center !important;
}

.invoice-page.inv-plain .inv-table th.text-right {
    text-align: right !important;
}

.invoice-page.inv-plain .inv-table td {
    padding: 12px 8px !important;
    border-bottom: 1px solid #eeeeee !important;
    color: #1a1a1a !important;
    vertical-align: top !important;
}

.invoice-page.inv-plain .inv-table td.text-center {
    text-align: center !important;
}

.invoice-page.inv-plain .inv-table td.text-right {
    text-align: right !important;
}

.invoice-page.inv-plain .inv-table tbody tr:last-child td {
    border-bottom: none !important;
}

.invoice-page.inv-plain .inv-period {
    font-size: 10px !important;
    color: #888888 !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
}

/* Sembunyikan diskon jika 0 */
.invoice-page.inv-plain .text-danger {
    color: #c45165 !important;
}

/* === TOTAL SECTION: Layout flex rapi, tidak bertumpuk === */
.invoice-page.inv-plain .inv-total-section {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    border-top: 1px solid #d0d0d0 !important;
    padding-top: 16px !important;
}

.invoice-page.inv-plain .inv-total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 6px 0 !important;
    font-size: 13px !important;
    color: #555555 !important;
}

.invoice-page.inv-plain .inv-total-row span:first-child {
    flex-shrink: 0 !important;
    font-weight: 600 !important;
}

.invoice-page.inv-plain .inv-total-row span:last-child {
    flex-shrink: 0 !important;
    text-align: right !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    min-width: 130px !important;
}

/* Grand Total — border atas tebal */
.invoice-page.inv-plain .inv-grand-total {
    border-top: 2px solid #1a1a1a !important;
    margin-top: 8px !important;
    padding-top: 12px !important;
}

.invoice-page.inv-plain .inv-grand-total span:first-child {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
}

.invoice-page.inv-plain .inv-grand-total span:last-child {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
}

/* Sembunyikan elemen premium di invoice free */
.invoice-page.inv-plain .inv-payment-info,
.invoice-page.inv-plain .inv-signature-section,
.invoice-page.inv-plain .inv-stamp,
.invoice-page.inv-plain .inv-footer {
    display: none !important;
}

/* === MOBILE: Invoice Free responsive === */
@media (max-width: 480px) {
    .invoice-page.inv-plain {
        padding: 16px 14px !important;
    }

    .invoice-page.inv-plain .inv-company-name {
        font-size: 17px !important;
    }

    .invoice-page.inv-plain .inv-info-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .invoice-page.inv-plain .inv-info-right {
        align-items: flex-start !important;
        text-align: left !important;
    }

    .invoice-page.inv-plain .inv-table {
        font-size: 11px !important;
    }

    .invoice-page.inv-plain .inv-table th,
    .invoice-page.inv-plain .inv-table td {
        padding: 8px 6px !important;
    }

    .invoice-page.inv-plain .inv-table th {
        font-size: 9px !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .invoice-page.inv-plain .inv-total-row span:last-child {
        min-width: 110px !important;
        font-size: 13px !important;
    }

    .invoice-page.inv-plain .inv-grand-total span:last-child {
        font-size: 15px !important;
    }
}

/* === PRINT/PDF: Invoice Free A4 rapi === */
@media print {
    .invoice-page.inv-plain {
        padding: 20mm 15mm !important;
        width: 100% !important;
        min-height: auto !important;
    }

    .invoice-page.inv-plain .inv-info-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    .invoice-page.inv-plain .inv-info-right {
        align-items: flex-end !important;
        text-align: right !important;
    }

    .invoice-page.inv-plain .inv-table {
        font-size: 11px !important;
    }

    .invoice-page.inv-plain .inv-table th {
        padding: 8px 6px !important;
        font-size: 9px !important;
    }

    .invoice-page.inv-plain .inv-table td {
        padding: 10px 6px !important;
    }

    .invoice-page.inv-plain .inv-total-row span:last-child {
        min-width: 140px !important;
    }

    .invoice-page.inv-plain .inv-company-name {
        font-size: 18px !important;
    }
}

/* ==========================================================
   PERBAIKAN DAFTAR PENGHUNI — LAYOUT RAPI
   ========================================================== */

/* Card penghuni — layout lebih lega */
.list-card {
    padding: 18px 16px !important;
}

/* Header card: nama + badge status */
.list-card .list-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

.list-card .list-head > div {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Title nama penghuni */
.list-card .list-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
}

/* ==========================================================
   PERBAIKAN DAFTAR PENGHUNI — ICON SEJAJAR & TOMBOL HAPUS DINAMIS
   ========================================================== */

/* === INFO ROW: Icon sejajar dengan baris pertama teks === */
.info-row {
    display: flex !important;
    align-items: flex-start !important; /* Ubah dari center ke flex-start */
    gap: 6px !important;
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin-bottom: 4px !important;
}

.info-row svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    opacity: 0.7 !important;
    margin-top: 2px !important; /* Sejajar dengan baris pertama teks */
}

.info-row b {
    color: var(--text) !important;
    font-weight: 700 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
    letter-spacing: 0.03em !important;
}

/* === TOMBOL AKSI: Grid 2 kolom dinamis === */
.list-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
}

.list-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 10px !important;
    font-size: 13px !important;
    margin-bottom: 0 !important;
}

/* 
   LOGIKA DINAMIS TOMBOL HAPUS:
   - Jika 4 tombol (Lunas): Hapus = anak ke-4 (even) → posisi normal di kanan
   - Jika 5 tombol (Nunggak + Tagih WA): Hapus = anak ke-5 (odd) → full width
*/
.list-actions .btn-danger:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important; /* Full width */
    max-width: 100% !important;
}

.list-actions .btn-danger:last-child:nth-child(even) {
    grid-column: auto !important; /* Posisi normal (kanan) */
    max-width: none !important;
}

/* === MOBILE === */
@media (max-width: 480px) {
    .list-actions {
        gap: 10px !important;
    }
    .list-actions .btn {
        font-size: 12px !important;
        padding: 11px 8px !important;
    }
}

/* ==========================================================
   PERBAIKAN HALAMAN PENGADUAN — ICON SEJAJAR & TOMBOL HAPUS
   ========================================================== */

/* Icon di dalam list-title (judul pengaduan) — kecil & sejajar */
.list-title svg {
    width: 18px !important;
    height: 18px !important;
    vertical-align: middle !important;
    margin-right: 6px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    position: relative !important;
    top: -1px !important; /* Sejajar sempurna dengan teks */
}

/* Khusus icon mail di judul pengaduan */
.list-title > svg:first-child {
    margin-right: 6px !important;
}

/* Tombol hapus pengaduan di header (sebelah badge) */
.btn-del-pengaduan {
    background: transparent !important;
    border: 1.5px solid var(--danger) !important;
    color: var(--danger) !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-weight: 600 !important;
    transition: var(--trans) !important;
}

.btn-del-pengaduan:hover {
    background: var(--danger) !important;
    color: #ffffff !important;
}

.btn-del-pengaduan svg {
    width: 14px !important;
    height: 14px !important;
}

/* Dark mode adjustment */
[data-theme="dark"] .btn-del-pengaduan {
    border-color: #ff7b8b !important;
    color: #ff7b8b !important;
}

[data-theme="dark"] .btn-del-pengaduan:hover {
    background: #ff7b8b !important;
    color: #0b1b19 !important;
}

/* Header pengaduan — pastikan badge & tombol hapus sejajar */
.list-head .badge {
    align-self: center !important;
    margin-top: 0 !important;
}

/* Tombol/field yang dipakai JS tetapi belum punya gaya */
.btn-warning {
    background: var(--warning);
    color: #ffffff;
}
.btn-warning:hover {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--warning) 40%, transparent);
}
.input-readonly {
    opacity: 0.75;
    cursor: default;
}

/* ==========================================================
   BAGIAN AKHIR — LOGIN / DAFTAR "NEON GLASS" (dulu auth-neon.css)
   Harus tetap di PALING BAWAH agar menimpa gaya auth lama.
   ========================================================== */
/* ==========================================================
   KOSKITA — LOGIN / DAFTAR "NEON GLASS"
   Muat SETELAH style.css. Semua class memakai awalan nx-
   sehingga tidak bentrok dengan CSS lama (auth-card, auth-form, dst.
   boleh dihapus dari style.css kalau sudah tidak dipakai).
   ========================================================== */

/* ---------- WARNA: ubah di sini saja ---------- */
.auth-screen {
    /* Preset TEAL (senada dengan palet KosKita) */
    --nx-a: 45, 212, 191; /* warna utama (RGB) */
    --nx-a-light: #5eead4;
    --nx-a-mid: #2dd4bf;
    --nx-btn-1: #2dd4bf;
    --nx-btn-2: #0f9488;
    --nx-btn-3: #0f766e;
    --nx-bg-glow: #0d3b36;
    --nx-bg-1: #03100e;
    --nx-bg-2: #04201c;
    --nx-bg-3: #020a09;
    --nx-orb-1: #14b8a6;
    --nx-orb-2: #0ea5e9;

    --nx-text: #effcf9;
    --nx-muted: #8fb5af;
    --nx-label: #c6e8e3;
    --nx-sym: #7fb8b0;
    --nx-placeholder: #5d807a;
    --nx-footer: #587a74;
    --nx-autofill: #0a1f1c;
}

/* Preset MERAH NEON (asli dari login.html) — salin nilainya ke atas jika mau kembali:
    --nx-a: 255, 36, 85;  --nx-a-light: #ff7896;  --nx-a-mid: #ff315d;
    --nx-btn-1: #ff315d;  --nx-btn-2: #d50939;    --nx-btn-3: #a90030;
    --nx-bg-glow: #48101f; --nx-bg-1: #100308; --nx-bg-2: #20030d; --nx-bg-3: #090208;
    --nx-orb-1: #ff1744;  --nx-orb-2: #a900ff;
    --nx-text: #fff2f5;   --nx-muted: #bd9da7;  --nx-label: #e7cbd3;
    --nx-sym: #c58a9b;    --nx-placeholder: #8e727c; --nx-footer: #866b75; --nx-autofill: #1a0610;
*/

/* ---------- LAYAR AUTH ---------- */
.auth-screen {
    position: relative;
    display: flex;
    align-items: normal;
    justify-content: normal;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 24px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: var(--nx-text);
    font-family: var(--font, system-ui, sans-serif);
    background:
        radial-gradient(
            ellipse at 50% 0%,
            var(--nx-bg-glow) 0%,
            transparent 55%
        ),
        linear-gradient(
            145deg,
            var(--nx-bg-1),
            var(--nx-bg-2) 55%,
            var(--nx-bg-3)
        );
}

/* matikan lingkaran dekorasi lama */
.auth-screen::before,
.auth-screen::after {
    display: none;
}

/* ---------- LATAR ANIMASI ---------- */
.nx-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.nx-orb {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: var(--nx-orb-1);
    filter: blur(110px);
    opacity: 0.18;
    animation: nx-float 9s ease-in-out infinite alternate;
}
.nx-orb.one {
    top: 5%;
    left: -130px;
}
.nx-orb.two {
    right: -140px;
    bottom: 0;
    background: var(--nx-orb-2);
    animation-delay: -4s;
}

.nx-circuit {
    position: absolute;
    width: 180px;
    height: 220px;
    opacity: 0.22;
    border-top: 1px solid var(--nx-a-mid);
    border-right: 1px solid var(--nx-a-mid);
}
.nx-circuit::before,
.nx-circuit::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border: 1px solid var(--nx-a-mid);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(var(--nx-a), 1);
}
.nx-circuit::before {
    top: -4px;
    left: -4px;
}
.nx-circuit::after {
    right: -4px;
    bottom: 0;
}
.nx-circuit.left {
    top: 20%;
    left: 0;
}
.nx-circuit.right {
    right: 0;
    bottom: 12%;
    transform: rotate(180deg);
}

@keyframes nx-float {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(40px, -35px) scale(1.2);
    }
}

/* ---------- WRAPPER & BRAND ---------- */
.nx-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: auto; /* tengah, tapi aman kalau konten lebih tinggi dari layar */
    animation: nx-appear 0.8s ease both;
}

.nx-brand {
    text-align: center;
    margin-bottom: 24px;
}

.nx-brand-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 15px;
    border: 1px solid rgba(var(--nx-a), 0.45);
    border-radius: 18px;
    background: rgba(var(--nx-a), 0.1);
    box-shadow:
        0 0 30px rgba(var(--nx-a), 0.16),
        inset 0 0 20px rgba(var(--nx-a), 0.08);
    color: var(--nx-a-light);
    font-size: 27px;
    font-weight: 800;
}

.nx-brand h1 {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 2px;
}
.nx-brand h1 span {
    color: rgb(var(--nx-a));
}

.nx-brand p {
    margin-top: 8px;
    color: var(--nx-muted);
    font-size: 13px;
}

/* ---------- KARTU KACA (yang berputar) ---------- */
.nx-card {
    width: 100%;
    will-change: transform;
}

/* Saat kartu berputar: hentikan animasi latar yang berat agar putaran mulus */
.nx-memutar .nx-orb,
.nx-memutar .nx-wrapper {
    animation-play-state: paused;
}

.nx-face {
    position: relative;
    padding: 30px 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 25px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.025) 45%,
        rgba(var(--nx-a), 0.07)
    );
    /* Tanpa backdrop-filter: blur raksasa di elemen yang berputar 3D membuat animasi tersendat
       (blur dihitung ulang tiap frame). Diganti latar semi-solid yang tampilannya mirip. */
    background-color: var(--nx-bg-2);
    background-color: color-mix(in srgb, var(--nx-bg-2) 78%, transparent);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.4),
        0 0 35px rgba(var(--nx-a), 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.nx-face::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    width: 76%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--nx-a-light),
        transparent
    );
    box-shadow: 0 0 16px rgb(var(--nx-a));
}

.nx-face::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    top: -130px;
    right: -100px;
    border-radius: 50%;
    /* radial-gradient menggantikan filter: blur(30px) (lebih ringan, tampilan sama) */
    background: radial-gradient(
        circle,
        rgba(var(--nx-a), 0.16) 0%,
        rgba(var(--nx-a), 0) 70%
    );
    pointer-events: none;
}

.nx-content {
    position: relative;
    z-index: 1;
    text-align: left;
}

.nx-heading {
    margin-bottom: 24px;
}
.nx-heading h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--nx-text);
}
.nx-dot {
    color: var(--nx-a-mid);
}
.nx-heading p {
    margin-top: 8px;
    color: var(--nx-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ---------- PILIHAN PERAN ---------- */
.nx-role {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.2);
}
.nx-role-btn {
    flex: 1;
    padding: 10px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--nx-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.25s,
        color 0.25s,
        box-shadow 0.25s;
}
.nx-role-btn.active {
    color: #fff;
    background: linear-gradient(110deg, var(--nx-btn-1), var(--nx-btn-2));
    box-shadow: 0 4px 16px rgba(var(--nx-a), 0.3);
}

/* ---------- INPUT ---------- */
.nx-field {
    margin-bottom: 16px;
}
.nx-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--nx-label);
    font-size: 12px;
    font-weight: 600;
}

.nx-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    min-height: 49px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    transition:
        border-color 0.25s,
        box-shadow 0.25s,
        background 0.25s;
}
.nx-input:focus-within {
    border-color: rgba(var(--nx-a), 0.8);
    background: rgba(var(--nx-a), 0.045);
    box-shadow:
        0 0 0 3px rgba(var(--nx-a), 0.09),
        0 0 20px rgba(var(--nx-a), 0.07);
}

.nx-sym {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--nx-sym);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nx-input input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}
.nx-input input::placeholder {
    color: var(--nx-placeholder);
    opacity: 1;
}

/* autofill browser jangan merusak tema gelap */
.nx-input input:-webkit-autofill,
.nx-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px var(--nx-autofill) inset;
    transition: background-color 9999s ease-out 0s;
}

.nx-toggle {
    padding: 5px 0 5px 5px;
    border: 0;
    background: transparent;
    color: var(--nx-sym);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.nx-toggle:hover {
    color: #fff;
}

.nx-hint {
    margin: -4px 0 16px;
    color: var(--nx-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* ---------- INGAT SAYA & LUPA PASSWORD ---------- */
.nx-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 20px;
    font-size: 12px;
}
.nx-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nx-muted);
    cursor: pointer;
    user-select: none;
}

/* checkbox kustom (dipakai juga di form daftar) */
.nx-remember input,
.nx-legal input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    position: relative;
    transition:
        background 0.2s,
        border-color 0.2s,
        box-shadow 0.2s;
}
.nx-remember input:checked,
.nx-legal input:checked {
    border-color: transparent;
    background: linear-gradient(110deg, var(--nx-btn-1), var(--nx-btn-2));
    box-shadow: 0 0 10px rgba(var(--nx-a), 0.35);
}
.nx-remember input:checked::after,
.nx-legal input:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.nx-remember input:focus-visible,
.nx-legal input:focus-visible {
    outline: 2px solid var(--nx-a-light);
    outline-offset: 2px;
}

.nx-link {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--nx-a-light);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.nx-link:hover {
    color: #fff;
}

/* ---------- SYARAT (DAFTAR) ---------- */
.nx-legal {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
    cursor: pointer;
}
.nx-legal input {
    margin-top: 1px;
}
.nx-legal span {
    color: var(--nx-muted);
    font-size: 12px;
    line-height: 1.55;
}
.nx-legal a {
    color: var(--nx-a-light);
    font-weight: 600;
    text-decoration: none;
}
.nx-legal a:hover {
    color: #fff;
}

/* ---------- TOMBOL ---------- */
.nx-btn {
    position: relative;
    width: 100%;
    min-height: 49px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(
        110deg,
        var(--nx-btn-1),
        var(--nx-btn-2) 55%,
        var(--nx-btn-3)
    );
    box-shadow:
        0 7px 24px rgba(var(--nx-a), 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        opacity 0.2s;
}
.nx-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -80%;
    width: 45%;
    height: 200%;
    transform: rotate(25deg);
    background: rgba(255, 255, 255, 0.23);
    transition: left 0.6s;
}
.nx-btn:hover::before {
    left: 140%;
}
.nx-btn:hover {
    box-shadow: 0 9px 32px rgba(var(--nx-a), 0.4);
}
.nx-btn:active {
    transform: scale(0.98);
}
.nx-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.nx-switch-text {
    margin-top: 20px;
    text-align: center;
    color: var(--nx-muted);
    font-size: 12px;
    line-height: 1.8;
}
.nx-switch {
    border: 0;
    background: transparent;
    color: var(--nx-a-mid);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.nx-switch:hover {
    color: #fff;
}

.nx-footer {
    margin-top: 20px;
    color: var(--nx-footer);
    text-align: center;
    font-size: 10px;
    letter-spacing: 1px;
}

@keyframes nx-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- RESPONSIF ---------- */
@media (max-width: 380px) {
    .nx-face {
        padding: 25px 19px;
    }
    .nx-brand h1 {
        font-size: 24px;
    }
    .nx-heading h2 {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nx-orb,
    .nx-wrapper {
        animation: none;
    }
    .nx-btn::before {
        transition: none;
    }
}

/* Lencana perubahan yang menunggu sinyal */
.sync-badge {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 9000;
    max-width: calc(100% - 24px);
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: #b45309;
    color: #fff;
    font: 600 12px/1.3 inherit;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.sync-badge.hidden {
    display: none;
}
