/* ============================================
   SISTEM MANAJEMEN KOS-KOSAN
   Main Stylesheet
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
    --primary: #F5A623;
    --primary-dark: #E8961A;
    --primary-light: #FFD78A;
    --primary-gradient: linear-gradient(135deg, #F5A623 0%, #F7C948 100%);
    --secondary: #2C3E50;
    --success: #27AE60;
    --success-gradient: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%);
    --info: #2980B9;
    --info-gradient: linear-gradient(135deg, #2980B9 0%, #3498DB 100%);
    --warning: #F39C12;
    --warning-gradient: linear-gradient(135deg, #F39C12 0%, #F1C40F 100%);
    --danger: #E74C3C;
    --danger-gradient: linear-gradient(135deg, #E74C3C 0%, #FF6B6B 100%);
    --bg-light: #F5F0E8;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-muted: #7F8C8D;
    --border-color: #E0D5C7;
    --sidebar-width: 260px;
    --header-height: 60px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2C3E50 0%, #1a252f 50%, #0d1117 100%);
    z-index: 0;
}

.landing-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.landing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.landing-subtitle {
    font-size: 0.9rem;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.8;
    font-weight: 300;
}

.landing-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.3);
}

.landing-address {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0.85;
    line-height: 1.8;
    font-weight: 300;
}

.landing-btn {
    display: inline-block;
    padding: 16px 60px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid white;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.landing-btn:hover {
    background: white;
    color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Decorative elements */
.landing-decor {
    position: absolute;
    z-index: 1;
}

.landing-decor-1 {
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.15) 0%, transparent 70%);
}

.landing-decor-2 {
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, transparent 70%);
}

.landing-line {
    width: 80px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto 1.5rem;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
}

.login-image {
    flex: 1;
    background: linear-gradient(135deg, #2C3E50 0%, #1a252f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.login-image-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
}

.login-image-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.login-image-content p {
    opacity: 0.8;
    font-size: 1rem;
}

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out;
}

.login-form-container h1 {
    font-family: 'Playfair Display', serif;
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    line-height: 1.3;
    font-style: italic;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-group label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-form .form-control {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
    background: white;
}

.login-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.login-form .btn-login {
    width: 100%;
    padding: 14px;
    background: rgba(255, 200, 130, 0.7);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.login-form .btn-login:hover {
    background: rgba(255, 200, 130, 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links a {
    display: block;
    color: white;
    opacity: 0.85;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.login-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ============================================
   MAIN LAYOUT (Dashboard)
   ============================================ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.top-header .brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}

.top-header .system-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.top-header .mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    box-shadow: var(--shadow-sm);
    z-index: 999;
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-profile {
    background: var(--primary-gradient);
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
}

.sidebar-profile .profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sidebar-profile .profile-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-profile .badge-admin {
    background: var(--success);
    color: white;
}

.sidebar-profile .badge-penghuni {
    background: var(--primary-dark);
    color: white;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 14px 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    transition: var(--transition);
    gap: 12px;
}

.sidebar-nav .nav-item:hover {
    background: rgba(245, 166, 35, 0.08);
    color: var(--primary-dark);
    border-left-color: var(--primary);
}

.sidebar-nav .nav-item.active {
    background: rgba(245, 166, 35, 0.12);
    color: var(--primary-dark);
    border-left-color: var(--primary);
    font-weight: 700;
}

.sidebar-nav .nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-nav .nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 1.5rem;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.page-title span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1rem;
    margin-left: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.stat-card.green {
    background: var(--success-gradient);
}

.stat-card.blue {
    background: var(--info-gradient);
}

.stat-card.yellow {
    background: var(--warning-gradient);
}

.stat-card.red {
    background: var(--danger-gradient);
}

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.stat-card .stat-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 500;
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.8rem;
    width: 100%;
}

.stat-card .stat-link:hover {
    opacity: 1;
}

/* ============================================
   CONTENT CARD
   ============================================ */
.content-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 3px solid var(--primary);
}

.content-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.content-card-header .header-actions {
    display: flex;
    gap: 0.5rem;
}

.content-card-body {
    padding: 1.5rem;
}

/* ============================================
   TABLE STYLING
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: #FAFAFA;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0ebe3;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(245, 166, 35, 0.04);
}

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

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
}

.badge-info {
    background: rgba(41, 128, 185, 0.15);
    color: var(--info);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
}

.btn-info {
    background: var(--info-gradient);
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: white;
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

select.form-control {
    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='%237F8C8D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease-out;
    margin: 1rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    background: rgba(245, 166, 35, 0.08);
    color: var(--primary-dark);
}

.pagination .active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary);
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.3s ease-out;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(41, 128, 185, 0.1);
    border: 1px solid rgba(41, 128, 185, 0.3);
    color: var(--info);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   PENGHUNI DASHBOARD
   ============================================ */
.info-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0ebe3;
    font-size: 0.9rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list .label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-list .value {
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .top-header .mobile-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .landing-title {
        font-size: 2.5rem;
    }

    .landing-subtitle {
        letter-spacing: 4px;
        font-size: 0.8rem;
    }

    .landing-btn {
        padding: 12px 40px;
        font-size: 0.9rem;
    }

    .login-page {
        flex-direction: column;
    }

    .login-image {
        min-height: 250px;
    }

    .login-form-section {
        padding: 2rem 1.5rem;
    }

    .login-form-container h1 {
        font-size: 1.6rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .content-card-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .landing-title {
        font-size: 2rem;
    }

    .stat-card .stat-value {
        font-size: 1.8rem;
    }

    .top-header .system-title {
        display: none;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* DataTables override */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 8px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: 6px !important;
    border: 2px solid var(--border-color) !important;
    margin: 0 2px;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-gradient) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(245, 166, 35, 0.1) !important;
    border-color: var(--primary) !important;
    color: var(--primary-dark) !important;
}

/* Pengaturan page */
.settings-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

.settings-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section h4 i {
    font-size: 1.1rem;
}

/* ============================================
   PENGHUNI CARD GRID
   ============================================ */
.penghuni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.penghuni-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.penghuni-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.penghuni-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.penghuni-card-header .penghuni-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.penghuni-card-actions {
    display: flex;
    gap: 4px;
}

.penghuni-card-actions .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.penghuni-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.penghuni-card-body .card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.penghuni-card-body .card-info i {
    width: 16px;
    text-align: center;
    color: var(--primary);
    font-size: 0.8rem;
}

.penghuni-card-body .card-info span {
    color: var(--text-dark);
}

.penghuni-card-footer {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #f0ebe3;
    text-align: center;
}

.penghuni-card-footer a {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
}

.penghuni-card-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   FILTER FORM (Tagihan)
   ============================================ */
.filter-form {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-form h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-form h3 i {
    color: var(--primary);
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-row .form-group {
    flex: 1;
    min-width: 160px;
    margin-bottom: 0;
}

.filter-row .btn {
    height: 48px;
}

/* ============================================
   WA / STRUK BUTTONS
   ============================================ */
.btn-wa {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.btn-struk {
    background: linear-gradient(135deg, #2980B9 0%, #3498DB 100%);
    color: white;
}

.btn-struk i,
.btn-wa i {
    margin-right: 2px;
}

/* Status select in table */
.status-select {
    padding: 4px 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    background: white;
}

.status-select.lunas {
    border-color: var(--success);
    color: var(--success);
}

.status-select.belum-bayar {
    border-color: var(--danger);
    color: var(--danger);
}

@media (max-width: 768px) {
    .penghuni-grid {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-row .btn {
        width: 100%;
    }
}

/* --- Select2 Custom Styling --- */
.select2-container--default .select2-selection--single {
    height: 44px;
    border: 2px solid #e8e0d4;
    border-radius: 8px;
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 2px 8px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    padding-left: 4px;
    color: #333;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 4px;
    font-size: 1.2rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #e8e0d4;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--primary, #D4A843);
    color: white;
}

.select2-dropdown {
    border: 2px solid #e8e0d4;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.select2-container {
    min-width: 100% !important;
}

/* SweetAlert2 above modal overlays */
.swal2-container {
    z-index: 3000 !important;
}