:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --sidebar: #0f172a;
}
* { box-sizing: border-box; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 20px;
    z-index: 1040;
}
.brand-box {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.08);
    margin-bottom: 24px;
}
.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #2563eb;
    font-size: 24px;
}
.sidebar-nav .nav-link {
    color: rgba(255,255,255,.74);
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 7px;
    border-radius: 14px;
    transition: .2s ease;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(37,99,235,.95);
    box-shadow: 0 10px 25px rgba(37,99,235,.25);
}
.sidebar-user {
    border-radius: 18px;
    padding: 16px;
    background: rgba(255,255,255,.08);
}
.main-content {
    margin-left: 280px;
    padding: 28px;
    min-height: 100vh;
}
.page-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}
.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
}
.page-header p {
    margin: 6px 0 0;
    color: var(--muted);
}
.card-modern {
    border: 0;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.stat-card {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.stat-card::after {
    content: '';
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    position: absolute;
    right: -28px;
    bottom: -28px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(37,99,235,.1);
    color: #2563eb;
    font-size: 24px;
}
.stat-title { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.btn-rounded { border-radius: 12px; }
.table > :not(caption) > * > * { vertical-align: middle; }
.dataTables_wrapper .dt-buttons .btn { border-radius: 10px; margin-right: 6px; }
.form-control, .form-select { border-radius: 12px; }
.modal-content { border: 0; border-radius: 22px; }
.modal-header { border-bottom: 1px solid #eef2f7; }
.badge { border-radius: 999px; padding: .45rem .65rem; }
.receipt-box {
    max-width: 820px;
    margin: 20px auto;
    background: #fff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 12px 35px rgba(15,23,42,.08);
}
.receipt-title {
    border-bottom: 2px solid #111827;
    padding-bottom: 18px;
    margin-bottom: 22px;
}
@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding: 18px;
    }
    .page-header {
        align-items: flex-start;
    }
    .page-header h1 { font-size: 22px; }
    .stat-value { font-size: 20px; }
    .card-modern, .stat-card { border-radius: 18px; }
}

.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 46px;
    box-shadow: 0 14px 30px rgba(37,99,235,.28);
}

@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
    .receipt-box { box-shadow: none; margin: 0; max-width: 100%; border-radius: 0; }
}

/* Occupancy dashboard */
.occupancy-progress {
    height: 28px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
}
.legend-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: -1px;
}
.floor-section {
    border: 1px solid #eef2f7;
    border-radius: 20px;
    padding: 18px;
    background: #fbfdff;
}
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 14px;
}
.room-seat {
    border: 0;
    border-radius: 20px;
    min-height: 108px;
    padding: 14px;
    color: #fff;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(15,23,42,.12);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.room-seat:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15,23,42,.18);
    filter: brightness(1.03);
}
.room-seat::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    right: -18px;
    bottom: -24px;
}
.room-seat-kosong { background: linear-gradient(135deg, #16a34a, #22c55e); }
.room-seat-terisi { background: linear-gradient(135deg, #dc2626, #ef4444); }
.room-seat-maintenance { background: linear-gradient(135deg, #d97706, #f59e0b); color: #111827; }
.room-code {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}
.room-type {
    display: block;
    font-size: 12px;
    opacity: .9;
    margin-top: 6px;
    min-height: 18px;
}
.room-status {
    display: inline-block;
    margin-top: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255,255,255,.22);
}
.occupancy-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    background: rgba(37,99,235,.1);
    color: #2563eb;
    font-size: 30px;
}
.detail-table th {
    color: #6b7280;
    font-weight: 600;
    width: 38%;
}
.detail-table td {
    text-align: right;
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .room-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .room-seat {
        min-height: 96px;
        border-radius: 16px;
        padding: 12px;
    }
    .room-code { font-size: 18px; }
    .room-type { font-size: 11px; }
    .floor-section { padding: 12px; border-radius: 16px; }
    .detail-table td { text-align: left; }
}

/* Ultimate financial report */
.report-kpi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 14px 16px;
    background: #fbfdff;
}
.report-kpi span { color: var(--muted); font-size: 13px; }
.report-kpi strong { font-size: 18px; text-align: right; }

.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 46px;
    box-shadow: 0 14px 30px rgba(37,99,235,.28);
}

@media print {
    .datatable, .table-responsive { font-size: 12px; }
    .card-modern, .stat-card { box-shadow: none; border: 1px solid #e5e7eb; }
}

/* Print hardening: jika user tidak sengaja print dari halaman aplikasi,
   elemen UI, sidebar, tombol DataTables, filter, pagination, modal, dan toast tidak ikut tercetak. */

.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 46px;
    box-shadow: 0 14px 30px rgba(37,99,235,.28);
}

@media print {
    .sidebar,
    .navbar,
    .offcanvas,
    .page-header,
    .no-print,
    .dt-buttons,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_info,
    .dataTables_paginate,
    .toast-container,
    .modal,
    .btn,
    .alert {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card-modern,
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
        break-inside: avoid;
    }
    .table-responsive {
        overflow: visible !important;
    }
    table {
        width: 100% !important;
    }
}
