/* =====================================================================
   Roomora — tema panel admin
   Warna diambil dari logo: biru royal → cyan (atap & huruf R),
   oranye (jendela), navy (teks). CSS biasa, tanpa build step.
   ===================================================================== */

:root {
    --rm-navy-950: #050a22;
    --rm-navy-900: #0a1540;
    --rm-navy-800: #102061;
    --rm-blue-700: #1d4ed8;
    --rm-blue-600: #2563eb;
    --rm-cyan-500: #0ea5e9;
    --rm-orange-500: #f97316;
    --rm-amber-400: #fbbf24;

    --rm-grad: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
    --rm-grad-soft: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(14, 165, 233, .08));
    --rm-grad-warm: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    --rm-card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -14px rgba(15, 23, 42, .18);
    --rm-card-border: rgba(15, 23, 42, .07);
    --rm-radius: 1.1rem;
}

/* ---------- Latar halaman ---------- */
.fi-body {
    background-color: #f3f6fc;
    background-image:
        radial-gradient(55rem 28rem at 105% -8%, rgba(14, 165, 233, .11), transparent 60%),
        radial-gradient(40rem 24rem at -8% -4%, rgba(37, 99, 235, .09), transparent 60%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
.dark .fi-body {
    background-color: var(--rm-navy-950);
    background-image:
        radial-gradient(55rem 28rem at 105% -8%, rgba(14, 165, 233, .13), transparent 60%),
        radial-gradient(40rem 24rem at -8% -4%, rgba(37, 99, 235, .16), transparent 60%);
}

/* ---------- Logo ---------- */
.rm-brand { display: inline-flex; align-items: center; }
.rm-brand img { height: 2.1rem; width: auto; display: block; }
.rm-brand .rm-brand-dark { display: none; }
.dark .rm-brand .rm-brand-light,
.fi-sidebar .rm-brand .rm-brand-light { display: none; }
.dark .rm-brand .rm-brand-dark,
.fi-sidebar .rm-brand .rm-brand-dark { display: block; }

/* ---------- Sidebar navy ---------- */
.fi-sidebar {
    background:
        radial-gradient(22rem 18rem at 0% 0%, rgba(37, 99, 235, .35), transparent 70%),
        radial-gradient(18rem 14rem at 100% 100%, rgba(14, 165, 233, .18), transparent 70%),
        linear-gradient(180deg, var(--rm-navy-900) 0%, var(--rm-navy-950) 100%) !important;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 12px 0 40px -24px rgba(5, 10, 34, .7) !important;
}
.fi-sidebar-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.fi-sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }

.fi-sidebar .fi-sidebar-group-label {
    color: rgba(191, 219, 254, .55) !important;
    font-size: .68rem !important;
    font-weight: 700 !important;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.fi-sidebar .fi-sidebar-group-icon,
.fi-sidebar .fi-sidebar-group-collapse-button svg { color: rgba(147, 197, 253, .55) !important; }
.fi-sidebar .fi-sidebar-group-button:hover { background: transparent !important; }

.fi-sidebar .fi-sidebar-item-button {
    border-radius: .8rem !important;
    transition: background .2s ease, transform .15s ease !important;
}
.fi-sidebar .fi-sidebar-item-button:hover,
.fi-sidebar .fi-sidebar-item-button:focus-visible { background: rgba(255, 255, 255, .07) !important; }
.fi-sidebar .fi-sidebar-item-label { color: rgba(226, 232, 240, .82) !important; font-weight: 500 !important; }
.fi-sidebar .fi-sidebar-item-icon { color: rgba(148, 163, 184, .9) !important; }
.fi-sidebar .fi-sidebar-item-grouped-border .w-px { background: rgba(255, 255, 255, .12) !important; }

/* Item aktif: pil gradasi biru + titik oranye (jendela) */
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    position: relative;
    background: var(--rm-grad) !important;
    box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .95), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-button::after {
    content: "";
    position: absolute; right: .7rem; top: 50%;
    width: .45rem; height: .45rem; margin-top: -.225rem;
    border-radius: .12rem;
    background: var(--rm-grad-warm);
    box-shadow: 0 0 10px rgba(249, 115, 22, .8);
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: #fff !important; font-weight: 600 !important; }

/* Pemilih kos di sidebar */
.fi-sidebar .fi-tenant-menu-trigger {
    border-radius: .9rem !important;
    background: rgba(255, 255, 255, .06) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) !important;
}
.fi-sidebar .fi-tenant-menu-trigger:hover { background: rgba(255, 255, 255, .1) !important; }
.fi-sidebar .fi-tenant-menu-trigger span,
.fi-sidebar .fi-tenant-menu-trigger div { color: #fff !important; }
.fi-sidebar .fi-tenant-menu-trigger svg { color: rgba(147, 197, 253, .8) !important; }
.fi-sidebar .fi-tenant-menu-trigger .fi-avatar { border-radius: .55rem !important; background: #fff; }

/* Tombol buka/tutup sidebar di header sidebar */
.fi-sidebar-header .fi-icon-btn { color: rgba(191, 219, 254, .7) !important; }

/* ---------- Topbar kaca ---------- */
.fi-topbar > nav {
    background: rgba(255, 255, 255, .72) !important;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06) !important;
}
.dark .fi-topbar > nav {
    background: rgba(5, 10, 34, .7) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) !important;
}
.fi-user-menu .fi-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, .5); }

/* ---------- Judul halaman ---------- */
.fi-header-heading {
    font-weight: 800 !important;
    letter-spacing: -.03em !important;
    background: linear-gradient(90deg, var(--rm-navy-900) 0%, var(--rm-blue-600) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent !important;
}
.dark .fi-header-heading { background-image: linear-gradient(90deg, #fff 0%, #93c5fd 100%); }

/* ---------- Kartu: section, tabel, widget ---------- */
.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-fo-tabs,
.fi-in-section {
    border-radius: var(--rm-radius) !important;
    box-shadow: var(--rm-card-shadow), 0 0 0 1px var(--rm-card-border) !important;
}
.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-wi-stats-overview-stat {
    background: rgba(13, 22, 58, .72) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -24px rgba(0, 0, 0, .8) !important;
}
.fi-section-header-heading { font-weight: 700 !important; letter-spacing: -.01em; }

/* Statistik dashboard — tiap kartu punya warna sendiri lewat --rm-c (rm-stat-*) */
.fi-wi-stats-overview-stat {
    --rm-c: 37, 99, 235;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.fi-wi-stats-overview-stat.rm-stat-blue { --rm-c: 37, 99, 235; }
.fi-wi-stats-overview-stat.rm-stat-green { --rm-c: 16, 185, 129; }
.fi-wi-stats-overview-stat.rm-stat-rose { --rm-c: 244, 63, 94; }
.fi-wi-stats-overview-stat.rm-stat-amber { --rm-c: 245, 158, 11; }
.fi-wi-stats-overview-stat::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, rgb(var(--rm-c)), rgba(var(--rm-c), .35));
}
.fi-wi-stats-overview-stat::after {
    /* cahaya lembut di pojok kanan atas */
    content: "";
    position: absolute; right: -3rem; top: -3rem; width: 8rem; height: 8rem;
    border-radius: 9999px;
    background: radial-gradient(closest-side, rgba(var(--rm-c), .12), transparent);
    pointer-events: none;
}
.fi-wi-stats-overview-stat:hover { transform: translateY(-3px); }
a.fi-wi-stats-overview-stat:hover { box-shadow: 0 18px 34px -18px rgba(var(--rm-c), .55), 0 0 0 1px rgba(var(--rm-c), .3) !important; }
.fi-wi-stats-overview-stat-icon {
    box-sizing: content-box;
    width: 1.15rem !important; height: 1.15rem !important;
    padding: .45rem;
    border-radius: .7rem;
    color: rgb(var(--rm-c)) !important;
    background: rgba(var(--rm-c), .1);
    box-shadow: inset 0 0 0 1px rgba(var(--rm-c), .15);
}
.fi-wi-stats-overview-stat-value { font-weight: 800 !important; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fi-wi-stats-overview-stat-label { font-weight: 600 !important; }
.fi-wi-stats-overview-stat-description { font-weight: 500; }

/* Tabel */
.fi-ta-header-cell { background: rgba(241, 245, 249, .7); }
.dark .fi-ta-header-cell { background: rgba(255, 255, 255, .025); }
.fi-ta-header-cell-label {
    font-size: .7rem !important;
    font-weight: 700 !important;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #64748b !important;
}
.fi-ta-row { transition: background .15s ease; }
.fi-ta-row:hover { background: rgba(37, 99, 235, .04) !important; }
.dark .fi-ta-row:hover { background: rgba(96, 165, 250, .06) !important; }

/* ---------- Tombol ---------- */
.fi-btn { border-radius: .8rem !important; font-weight: 600 !important; }
.fi-btn.fi-btn-color-primary:not(.fi-btn-outlined) {
    background-image: var(--rm-grad) !important;
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, .9) !important;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease !important;
}
.fi-btn.fi-btn-color-primary:not(.fi-btn-outlined):hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Badge berbentuk pil */
.fi-badge { border-radius: 9999px !important; font-weight: 600 !important; }

/* Input */
.fi-input-wrp { border-radius: .8rem !important; }

/* Tab */
.fi-tabs { border-radius: .95rem !important; box-shadow: var(--rm-card-shadow), 0 0 0 1px var(--rm-card-border) !important; }
.fi-tabs-item { border-radius: .7rem !important; }
.fi-tabs-item-active { background: var(--rm-grad) !important; box-shadow: 0 8px 16px -10px rgba(37, 99, 235, .9); }
.fi-tabs-item-active .fi-tabs-item-label,
.fi-tabs-item-active .fi-tabs-item-icon,
.fi-tabs-item-active .fi-badge { color: #fff !important; }

/* Modal & dropdown */
.fi-modal-window { border-radius: 1.35rem !important; }
.fi-dropdown-panel { border-radius: 1rem !important; overflow: hidden; }

/* =====================================================================
   Komponen kustom Roomora
   ===================================================================== */

/* Motif jendela 4 kotak dari logo */
.rm-window { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 1.1rem; height: 1.1rem; }
.rm-window i { border-radius: 2px; background: var(--rm-grad-warm); }

/* ---------- Banner sambutan dashboard ---------- */
.rm-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: 1.75rem;
    color: #fff;
    background:
        radial-gradient(30rem 16rem at 100% 0%, rgba(14, 165, 233, .55), transparent 60%),
        radial-gradient(20rem 14rem at 0% 120%, rgba(37, 99, 235, .6), transparent 60%),
        linear-gradient(135deg, var(--rm-navy-900) 0%, var(--rm-navy-800) 60%, #1d3fae 100%);
    box-shadow: 0 24px 50px -24px rgba(10, 21, 64, .8);
    isolation: isolate;
}
.rm-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: linear-gradient(90deg, transparent, #000 70%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.rm-hero-deco {
    position: absolute; z-index: -1;
    right: -1.5rem; bottom: -2.5rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: .9rem;
    width: 11rem; height: 11rem;
    transform: rotate(-8deg);
    opacity: .9;
}
.rm-hero-deco i { border-radius: 1rem; background: var(--rm-grad-warm); box-shadow: 0 10px 30px -8px rgba(249, 115, 22, .7); }
.rm-hero-deco i:nth-child(2), .rm-hero-deco i:nth-child(3) { opacity: .8; }
.rm-hero-top { display: flex; align-items: center; gap: .9rem; }
.rm-hero-logo {
    flex: none; width: 3.1rem; height: 3.1rem; border-radius: .95rem;
    background: #fff; padding: .3rem; object-fit: contain;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.rm-hero-eyebrow { font-size: .78rem; font-weight: 600; color: rgba(191, 219, 254, .9); letter-spacing: .02em; }
.rm-hero h2 { margin: .1rem 0 0; font-size: 1.55rem; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; }
.rm-hero h2 span {
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rm-hero p { margin: .5rem 0 0; max-width: 36rem; font-size: .9rem; color: rgba(226, 232, 240, .8); }

.rm-hero-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.rm-chip {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .5rem .85rem; border-radius: 9999px;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
    font-size: .8rem; color: rgba(255, 255, 255, .85);
}
.rm-chip b { color: #fff; font-size: .95rem; }
.rm-chip.is-link { transition: background .2s ease, transform .15s ease; }
.rm-chip.is-link:hover { background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.rm-chip-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.rm-chip-dot.warn { background: var(--rm-amber-400); box-shadow: 0 0 0 3px rgba(251, 191, 36, .25); }
.rm-chip-dot.danger { background: #fb7185; box-shadow: 0 0 0 3px rgba(251, 113, 133, .25); }
.rm-chip-dot.info { background: #7dd3fc; box-shadow: 0 0 0 3px rgba(125, 211, 252, .25); }

.rm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.4rem; max-width: 44rem; }
@media (min-width: 768px) { .rm-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rm-action {
    display: flex; align-items: center; gap: .6rem;
    padding: .75rem .85rem; border-radius: .95rem;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    color: #fff; font-size: .85rem; font-weight: 600;
    transition: background .2s ease, transform .15s ease;
}
.rm-action:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.rm-action.primary { background: var(--rm-grad-warm); box-shadow: 0 12px 24px -12px rgba(249, 115, 22, .9); color: #1c1205; }
.rm-action.primary:hover { filter: brightness(1.05); }
.rm-action svg { width: 1.15rem; height: 1.15rem; flex: none; }

@media (min-width: 1024px) {
    .rm-hero { padding: 2.1rem 2.4rem; }
    .rm-hero h2 { font-size: 1.9rem; }
    .rm-hero-deco { width: 14rem; height: 14rem; right: 2rem; bottom: -3rem; }
}

/* ---------- Filter periode dasbor ---------- */
/* z-index: dropdown periode harus tampil di atas kartu statistik di bawahnya */
.rm-filter-bar.fi-section { position: relative; z-index: 20; background: rgba(255, 255, 255, .78) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dark .rm-filter-bar.fi-section { background: rgba(13, 22, 58, .6) !important; }
.rm-filter-bar .fi-section-content { padding: .9rem 1.1rem !important; }

/* ---------- Kartu widget dasbor (rm-card) ---------- */
.rm-card {
    height: 100%;
    display: flex; flex-direction: column; gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--rm-radius);
    background: #fff;
    box-shadow: var(--rm-card-shadow), 0 0 0 1px var(--rm-card-border);
}
.dark .rm-card { background: rgba(13, 22, 58, .72); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -24px rgba(0, 0, 0, .8); }
/* kartu dalam satu baris grid sama tinggi */
.fi-wi-widget:has(.rm-card) { height: 100%; }

.rm-card-head { display: flex; align-items: center; gap: .75rem; }
.rm-card-icon {
    --rm-c: 37, 99, 235;
    flex: none; display: grid; place-items: center;
    width: 2.4rem; height: 2.4rem; border-radius: .8rem;
    color: rgb(var(--rm-c)); background: rgba(var(--rm-c), .1);
    box-shadow: inset 0 0 0 1px rgba(var(--rm-c), .15);
}
.rm-card-icon svg { width: 1.25rem; height: 1.25rem; }
.rm-card-icon.is-green { --rm-c: 16, 185, 129; }
.rm-card-icon.is-amber { --rm-c: 245, 158, 11; }
.rm-card-icon.is-sky { --rm-c: 14, 165, 233; }
.rm-card-title { min-width: 0; flex: 1; }
.rm-card-title h3 { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; color: #0f172a; }
.dark .rm-card-title h3 { color: #fff; }
.rm-card-title p { font-size: .76rem; color: #64748b; }
.dark .rm-card-title p { color: #94a3b8; }
.rm-card-link {
    flex: none; display: inline-flex; align-items: center; gap: .25rem;
    padding: .3rem .6rem; border-radius: 9999px;
    font-size: .75rem; font-weight: 600; color: var(--rm-blue-600);
    background: rgba(37, 99, 235, .07);
    transition: background .15s ease;
}
.rm-card-link:hover { background: rgba(37, 99, 235, .14); }
.dark .rm-card-link { color: #93c5fd; background: rgba(147, 197, 253, .1); }
.rm-card-link svg { width: .9rem; height: .9rem; }
.rm-text-warn { color: #d97706; font-weight: 600; }
.dark .rm-text-warn { color: #fbbf24; }

.rm-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    padding: 1.5rem 1rem; border-radius: .9rem;
    font-size: .82rem; color: #64748b; text-align: center;
    background: repeating-linear-gradient(135deg, rgba(148, 163, 184, .06) 0 10px, transparent 10px 20px);
    border: 1px dashed rgba(148, 163, 184, .35);
}
.dark .rm-empty { color: #94a3b8; }
.rm-empty svg { width: 1.6rem; height: 1.6rem; color: #94a3b8; }

.rm-pill {
    --rm-c: 14, 165, 233;
    display: inline-flex; align-items: center; white-space: nowrap;
    padding: .2rem .55rem; border-radius: 9999px;
    font-size: .7rem; font-weight: 700;
    color: rgb(var(--rm-c)); background: rgba(var(--rm-c), .12);
}
.rm-pill.is-warning { --rm-c: 217, 119, 6; }
.rm-pill.is-danger { --rm-c: 225, 29, 72; }

/* Ringkasan keuangan */
.rm-net {
    position: relative; overflow: hidden;
    padding: 1rem 1.1rem; border-radius: 1rem; color: #fff;
    background: radial-gradient(14rem 8rem at 100% 0%, rgba(52, 211, 153, .45), transparent 70%), linear-gradient(135deg, #065f46, #059669);
    box-shadow: 0 14px 28px -16px rgba(5, 150, 105, .9);
}
.rm-net.is-loss {
    background: radial-gradient(14rem 8rem at 100% 0%, rgba(251, 113, 133, .45), transparent 70%), linear-gradient(135deg, #881337, #e11d48);
    box-shadow: 0 14px 28px -16px rgba(225, 29, 72, .9);
}
.rm-net span { display: block; font-size: .75rem; font-weight: 600; opacity: .85; }
.rm-net strong { display: block; margin-top: .15rem; font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rm-net small { display: block; margin-top: .1rem; font-size: .72rem; opacity: .8; }

.rm-split { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.rm-split > div { padding: .7rem .8rem; border-radius: .85rem; background: rgba(241, 245, 249, .8); }
.dark .rm-split > div { background: rgba(255, 255, 255, .04); }
.rm-split dt { display: flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; color: #64748b; }
.rm-split dd { margin-top: .2rem; font-size: .95rem; font-weight: 750; color: #0f172a; font-variant-numeric: tabular-nums; }
.dark .rm-split dd { color: #f1f5f9; }
.rm-dot { width: .5rem; height: .5rem; border-radius: .15rem; display: inline-block; }
.rm-dot.is-blue { background: #2563eb; }
.rm-dot.is-orange { background: #f97316; }

.rm-progress-label { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; color: #475569; }
.dark .rm-progress-label { color: #cbd5e1; }
.rm-progress-label b { color: #0f172a; }
.dark .rm-progress-label b { color: #fff; }
.rm-progress { margin: .4rem 0 .35rem; height: .5rem; border-radius: 9999px; background: rgba(148, 163, 184, .2); overflow: hidden; }
.rm-progress span { display: block; height: 100%; border-radius: inherit; background: var(--rm-grad); transition: width .6s ease; }
.rm-progress-block small { font-size: .72rem; color: #64748b; }

.rm-mini-row {
    margin-top: auto;
    display: flex; align-items: center; gap: .5rem;
    padding-top: .85rem; border-top: 1px dashed rgba(148, 163, 184, .35);
    font-size: .8rem; color: #64748b;
}
.rm-mini-row svg { width: 1.05rem; height: 1.05rem; color: #94a3b8; }
.rm-mini-row b { margin-left: auto; color: #0f172a; font-variant-numeric: tabular-nums; }
.dark .rm-mini-row b { color: #fff; }

/* Status kamar */
.rm-stack { display: flex; gap: 3px; height: .7rem; border-radius: 9999px; overflow: hidden; }
.rm-stack span { min-width: 4px; }
.rm-stack .is-occupied, .rm-status-grid .is-occupied i { background: #2563eb; }
.rm-stack .is-booked, .rm-status-grid .is-booked i { background: #0ea5e9; }
.rm-stack .is-available, .rm-status-grid .is-available i { background: #10b981; }
.rm-stack .is-maintenance, .rm-status-grid .is-maintenance i { background: #94a3b8; }
.rm-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.rm-status-grid li {
    display: flex; align-items: center; gap: .5rem;
    padding: .55rem .7rem; border-radius: .8rem;
    background: rgba(241, 245, 249, .8);
    font-size: .8rem; color: #475569;
}
.dark .rm-status-grid li { background: rgba(255, 255, 255, .04); color: #cbd5e1; }
.rm-status-grid i { width: .55rem; height: .55rem; border-radius: .15rem; flex: none; }
.rm-status-grid b { margin-left: auto; font-size: .95rem; color: #0f172a; }
.dark .rm-status-grid b { color: #fff; }
.rm-subhead { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin-bottom: -.4rem; }
.rm-room-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.rm-room-pill {
    display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
    padding: .4rem .7rem; border-radius: .75rem;
    background: rgba(16, 185, 129, .08);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .25);
    line-height: 1.15;
    transition: background .15s ease, transform .15s ease;
}
a.rm-room-pill:hover { background: rgba(16, 185, 129, .16); transform: translateY(-1px); }
.rm-room-pill b { font-size: .82rem; font-weight: 800; color: #047857; }
.dark .rm-room-pill b { color: #6ee7b7; }
.rm-room-pill small { font-size: .66rem; color: #64748b; }
.rm-room-pill.is-more { background: rgba(148, 163, 184, .12); box-shadow: none; font-size: .8rem; font-weight: 700; color: #64748b; }

/* Daftar (kontrak, pembayaran) */
.rm-list { display: flex; flex-direction: column; margin: -.25rem -.5rem; }
.rm-list-row {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .5rem; border-radius: .8rem;
    transition: background .15s ease;
}
a.rm-list-row:hover { background: rgba(37, 99, 235, .05); }
.dark a.rm-list-row:hover { background: rgba(96, 165, 250, .08); }
.rm-list li + li { border-top: 1px solid rgba(15, 23, 42, .05); }
.dark .rm-list li + li { border-top-color: rgba(255, 255, 255, .05); }
.rm-list-main { min-width: 0; flex: 1; }
.rm-list-main b { display: block; font-size: .85rem; font-weight: 650; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dark .rm-list-main b { color: #e2e8f0; }
.rm-list-main small { display: block; font-size: .72rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-list-end { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.rm-room-tag {
    flex: none; min-width: 2.9rem; text-align: center;
    padding: .3rem .45rem; border-radius: .6rem;
    font-size: .74rem; font-weight: 800; color: var(--rm-blue-600);
    background: rgba(37, 99, 235, .08);
}
.dark .rm-room-tag { color: #93c5fd; background: rgba(147, 197, 253, .1); }
.rm-avatar-sm {
    flex: none; display: grid; place-items: center;
    width: 2.1rem; height: 2.1rem; border-radius: .7rem;
    font-size: .8rem; font-weight: 800; color: #fff;
    background: var(--rm-grad);
}
.rm-amount { font-size: .85rem; font-weight: 750; color: #059669; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dark .rm-amount { color: #34d399; }
.rm-amount.is-muted { color: #94a3b8; }

/* ---------- Denah kamar ---------- */
.rm-legend { display: flex; flex-wrap: wrap; gap: .6rem; }
.rm-legend-item {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .45rem .85rem; border-radius: 9999px;
    background: #fff; box-shadow: var(--rm-card-shadow), 0 0 0 1px var(--rm-card-border);
    font-size: .8rem; font-weight: 600; color: #334155;
}
.dark .rm-legend-item { background: rgba(13, 22, 58, .8); color: #e2e8f0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.rm-legend-item b { font-size: .95rem; color: inherit; }
.rm-swatch { width: .7rem; height: .7rem; border-radius: .2rem; }

.rm-floor-title { display: flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.01em; }

.rm-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.rm-room {
    --rm-c: 100, 116, 139;
    position: relative;
    display: flex; flex-direction: column;
    min-height: 8.5rem;
    padding: .95rem 1rem .85rem;
    border-radius: 1.05rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 0 0 1px rgba(var(--rm-c), .22);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .2s ease;
}
.rm-room::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 4px;
    background: rgb(var(--rm-c));
}
.rm-room::after {
    /* atap kecil di pojok, mengikuti bentuk logo */
    content: "";
    position: absolute; right: -1.6rem; top: -1.6rem;
    width: 4.5rem; height: 4.5rem; border-radius: 1.1rem;
    transform: rotate(45deg);
    background: rgba(var(--rm-c), .09);
}
.rm-room:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(var(--rm-c), .7), 0 0 0 1px rgba(var(--rm-c), .45); }
.dark .rm-room { background: rgba(13, 22, 58, .78); box-shadow: 0 0 0 1px rgba(var(--rm-c), .3); }

.rm-room.is-available { --rm-c: 16, 185, 129; }
.rm-room.is-booked { --rm-c: 14, 165, 233; }
.rm-room.is-occupied { --rm-c: 37, 99, 235; }
.rm-room.is-maintenance { --rm-c: 148, 163, 184; }
.rm-room.is-overdue { --rm-c: 244, 63, 94; }

.rm-room-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; position: relative; z-index: 1; }
.rm-room-code { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; color: #0f172a; }
.dark .rm-room-code { color: #fff; }
.rm-room-type { font-size: .72rem; font-weight: 600; color: #64748b; }
.dark .rm-room-type { color: #94a3b8; }
.rm-room-status {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .55rem; border-radius: 9999px;
    font-size: .68rem; font-weight: 700;
    color: rgb(var(--rm-c));
    background: rgba(var(--rm-c), .12);
    white-space: nowrap;
}
.rm-room-status::before { content: ""; width: .4rem; height: .4rem; border-radius: 9999px; background: currentColor; }
.rm-room-body { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; gap: .55rem; position: relative; z-index: 1; }
.rm-avatar {
    flex: none; display: grid; place-items: center;
    width: 2rem; height: 2rem; border-radius: .65rem;
    font-size: .75rem; font-weight: 800; color: #fff;
    background: rgb(var(--rm-c));
}
.rm-room-tenant { min-width: 0; }
.rm-room-tenant b { display: block; font-size: .85rem; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dark .rm-room-tenant b { color: #e2e8f0; }
.rm-room-tenant small { display: block; font-size: .72rem; color: #64748b; }
.rm-room-empty { font-size: .8rem; font-weight: 600; color: rgb(var(--rm-c)); }

/* ---------- KPI laporan ---------- */
.rm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.rm-kpi {
    position: relative; overflow: hidden;
    padding: 1.15rem 1.25rem; border-radius: var(--rm-radius);
    background: #fff; box-shadow: var(--rm-card-shadow), 0 0 0 1px var(--rm-card-border);
}
.dark .rm-kpi { background: rgba(13, 22, 58, .72); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.rm-kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--rm-grad); }
.rm-kpi.is-in::before { background: linear-gradient(90deg, #10b981, #34d399); }
.rm-kpi.is-out::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.rm-kpi-label { font-size: .78rem; font-weight: 600; color: #64748b; }
.rm-kpi-value { margin-top: .3rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: #0f172a; }
.dark .rm-kpi-value { color: #fff; }
.rm-kpi.is-in .rm-kpi-value { color: #059669; }
.rm-kpi.is-out .rm-kpi-value { color: #e11d48; }

.rm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.rm-table th {
    padding: .65rem .75rem; text-align: left;
    font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: #64748b; background: rgba(241, 245, 249, .7);
}
.dark .rm-table th { background: rgba(255, 255, 255, .03); }
.rm-table th:first-child { border-top-left-radius: .6rem; }
.rm-table th:last-child { border-top-right-radius: .6rem; }
.rm-table td { padding: .7rem .75rem; border-top: 1px solid rgba(15, 23, 42, .06); }
.dark .rm-table td { border-top-color: rgba(255, 255, 255, .06); }
.rm-table tr:hover td { background: rgba(37, 99, 235, .035); }
.rm-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* =====================================================================
   Tabel Filament: tampilan tabel (desktop) ↔ kartu (mobile)
   Atribut <html data-rm-view="table|cards"> & data-label di sel dipasang
   oleh resources/views/filament/table-view/script.blade.php
   ===================================================================== */

/* ---------- Tombol Tabel / Kartu ---------- */
.rm-view-toggle {
    display: inline-flex; flex: none; gap: .2rem; padding: .2rem;
    border-radius: .85rem;
    background: rgba(241, 245, 249, .9);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .07);
}
.dark .rm-view-toggle { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.rm-view-toggle button {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .38rem .65rem; border-radius: .65rem;
    font-size: .78rem; font-weight: 600; color: #64748b;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rm-view-toggle button:hover { color: #1e293b; }
.dark .rm-view-toggle button { color: #94a3b8; }
.dark .rm-view-toggle button:hover { color: #e2e8f0; }
.rm-view-toggle button.is-active {
    color: #fff;
    background: var(--rm-grad);
    box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .9);
}
.rm-view-toggle-icon { width: 1rem; height: 1rem; }
@media (max-width: 639px) {
    .rm-view-toggle span { display: none; }
    .fi-ta-header-toolbar { flex-wrap: wrap; row-gap: .75rem; }
}

/* ---------- Mode tabel: sedikit pemanis ---------- */
html[data-rm-view="table"] .fi-ta-row[data-rm-card] > td[data-rm-title] .fi-ta-text-item-label { font-weight: 650; }
html[data-rm-view="table"] .fi-ta-row[data-rm-card] > td:first-child { transition: box-shadow .15s ease; }
html[data-rm-view="table"] .fi-ta-row[data-rm-card]:hover > td:first-child { box-shadow: inset 3px 0 0 var(--rm-blue-600); }
html[data-rm-view="table"] .fi-ta-table td { font-variant-numeric: tabular-nums; }

/* ---------- Mode kartu ---------- */
html[data-rm-view="cards"] .fi-ta-content { overflow: visible; }
html[data-rm-view="cards"] .fi-ta-table { display: block; }
html[data-rm-view="cards"] .fi-ta-table > thead { display: none; }
html[data-rm-view="cards"] .fi-ta-table > tbody,
html[data-rm-view="cards"] .fi-ta-table > tfoot {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: .9rem;
    padding: .9rem;
    white-space: normal;
    border: 0 !important;
    background: rgba(241, 245, 249, .55);
}
html[data-rm-view="cards"] .fi-ta-table > tfoot { padding-top: 0; }
.dark[data-rm-view="cards"] .fi-ta-table > tbody,
.dark[data-rm-view="cards"] .fi-ta-table > tfoot { background: rgba(255, 255, 255, .015); }
html[data-rm-view="cards"] .fi-ta-table > tbody > tr,
html[data-rm-view="cards"] .fi-ta-table > tfoot > tr { border: 0 !important; }

/* Baris non-data (judul grup, ringkasan total, data kosong) membentang penuh */
html[data-rm-view="cards"] .fi-ta-table > tbody > tr:not([data-rm-card]),
html[data-rm-view="cards"] .fi-ta-table > tfoot > tr {
    grid-column: 1 / -1;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem;
    border-radius: .9rem;
}
html[data-rm-view="cards"] .fi-ta-table > tbody > tr:not([data-rm-card]) > td:empty,
html[data-rm-view="cards"] .fi-ta-table > tfoot > tr > td:empty { display: none; }
html[data-rm-view="cards"] .fi-ta-table > tbody > tr:not([data-rm-card]) > td[colspan] { flex: 1 1 100%; }
html[data-rm-view="cards"] .fi-ta-summary-row,
html[data-rm-view="cards"] .fi-ta-summary-header-row {
    background: #fff !important;
    box-shadow: 0 0 0 1px var(--rm-card-border);
}
.dark[data-rm-view="cards"] .fi-ta-summary-row,
.dark[data-rm-view="cards"] .fi-ta-summary-header-row { background: rgba(13, 22, 58, .78) !important; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07); }

/* Kartu data */
html[data-rm-view="cards"] tr.fi-ta-row[data-rm-card] {
    position: relative;
    display: flex; flex-direction: column;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 0 0 1px rgba(15, 23, 42, .08);
    transition: transform .18s ease, box-shadow .2s ease;
}
html[data-rm-view="cards"] tr.fi-ta-row[data-rm-card]::before {
    content: ""; order: -2; flex: none; height: 3px;
    background: var(--rm-grad);
}
html[data-rm-view="cards"] tr.fi-ta-row[data-rm-card]:hover {
    background: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -18px rgba(37, 99, 235, .55), 0 0 0 1px rgba(37, 99, 235, .28);
}
.dark[data-rm-view="cards"] tr.fi-ta-row[data-rm-card],
.dark[data-rm-view="cards"] tr.fi-ta-row[data-rm-card]:hover {
    background: rgba(13, 22, 58, .85) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.dark[data-rm-view="cards"] tr.fi-ta-row[data-rm-card]:hover { box-shadow: 0 0 0 1px rgba(96, 165, 250, .35), 0 18px 30px -20px rgba(0, 0, 0, .9); }

/* Sel → baris "Label ........ Nilai" */
html[data-rm-view="cards"] tr[data-rm-card] > td {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: auto !important;
    min-height: 2.5rem;
    padding: 0 1rem !important;
    border-top: 1px dashed rgba(15, 23, 42, .08);
}
.dark[data-rm-view="cards"] tr[data-rm-card] > td { border-top-color: rgba(255, 255, 255, .07); }
html[data-rm-view="cards"] tr[data-rm-card] > td[data-label]::before {
    content: attr(data-label);
    flex: none; max-width: 45%;
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #94a3b8;
}
html[data-rm-view="cards"] tr[data-rm-card] > td > .fi-ta-col-wrp { flex: 1 1 auto; min-width: 0; }
html[data-rm-view="cards"] tr[data-rm-card] > td .fi-ta-col-wrp > * > * {
    padding-block: .55rem !important;
    padding-inline: 0 !important;
}
html[data-rm-view="cards"] tr[data-rm-card] > td[data-label] .fi-ta-col-wrp > * { justify-content: flex-end; text-align: end; }
html[data-rm-view="cards"] tr[data-rm-card] > td[data-label] .fi-ta-col-wrp > * > * { width: auto; justify-items: end; }

/* Kolom pertama jadi judul kartu */
html[data-rm-view="cards"] tr[data-rm-card] > td[data-rm-title] {
    order: -1;
    border-top: 0;
    padding-top: .3rem !important;
}
html[data-rm-view="cards"] tr[data-rm-card] > td[data-rm-title] .fi-ta-col-wrp > * > * { padding-block: .6rem .35rem !important; }
html[data-rm-view="cards"] tr[data-rm-card] > td[data-rm-title] .fi-ta-text-item-label {
    font-size: 1rem; font-weight: 750; letter-spacing: -.01em;
}
html[data-rm-view="cards"] tr[data-rm-card]:has(> .fi-ta-selection-cell) > td[data-rm-title] { padding-right: 3rem !important; }

/* Checkbox pilih → pojok kanan atas */
html[data-rm-view="cards"] tr[data-rm-card] > td.fi-ta-selection-cell {
    position: absolute; top: .55rem; right: .35rem; z-index: 1;
    min-height: 0; padding: 0 !important; border: 0;
}

/* Tombol aksi → kaki kartu */
html[data-rm-view="cards"] tr[data-rm-card] > td.fi-ta-actions-cell {
    order: 99;
    margin-top: auto;
    justify-content: flex-end;
    border-top: 1px solid rgba(15, 23, 42, .07);
    background: rgba(248, 250, 252, .85);
}
.dark[data-rm-view="cards"] tr[data-rm-card] > td.fi-ta-actions-cell { background: rgba(255, 255, 255, .025); border-top-color: rgba(255, 255, 255, .07); }
html[data-rm-view="cards"] tr[data-rm-card] > td.fi-ta-actions-cell > div { padding: .45rem 0 !important; }

/* Handle urutkan (mode reorder) */
html[data-rm-view="cards"] tr[data-rm-card] > td.fi-ta-reorder-cell,
html[data-rm-view="cards"] tr[data-rm-card] > td:not([data-label]):not([data-rm-title]):not(.fi-ta-actions-cell):not(.fi-ta-selection-cell) { justify-content: flex-start; }

@media (prefers-reduced-motion: reduce) {
    .rm-room, .rm-action, .fi-wi-stats-overview-stat, .rm-room-pill, .rm-chip, .rm-progress span,
    html[data-rm-view="cards"] tr.fi-ta-row[data-rm-card] { transition: none !important; }
}
