/*
 * Orkava theme — sits on top of AdminLTE 4 / Bootstrap 5.3 (loaded first).
 * Calm, light surfaces with one teal accent; every page view keeps using
 * plain Bootstrap classes (card, table, btn, badge, form-*) and picks this
 * look up automatically. Dark mode follows [data-bs-theme="dark"] on <html>.
 * No build step: this file is served as-is (PMS spec §9.1).
 */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root,
[data-bs-theme="light"] {
    --ok-brand: #0f766e;
    --ok-brand-hover: #115e59;
    --ok-brand-rgb: 15, 118, 110;
    --ok-brand-soft: #e3f3f0;
    --ok-brand-tint: #f3faf8;
    --ok-brand-border: #b5ddd6;

    --ok-bg: #f4f6f7;
    --ok-surface: #ffffff;
    --ok-surface-muted: #f8fafb;
    /* Measured on #f4f6f7 page bg: text 16.2:1, muted 7.0:1, faint 5.45:1 (WCAG AA 4.5:1);
       control border 3.1:1 on white (non-text 3:1). */
    --ok-border: #d5dbe1;
    --ok-border-strong: #c4ccd4;
    --ok-control-border: #8794a1;
    --ok-text: #111a24;
    --ok-text-muted: #4a5563;
    --ok-text-faint: #5b6573;
    --ok-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
    --ok-shadow-pop: 0 12px 32px rgba(16, 24, 40, .12);

    --ok-success: #1f7a4d; --ok-success-bg: #e6f4ec;
    --ok-info: #1d6a96;    --ok-info-bg: #e5f1f8;
    --ok-warning: #9a5b00; --ok-warning-bg: #fdf1dc;
    --ok-danger: #b4232c;  --ok-danger-bg: #fbe8e8;
    --ok-primary: var(--ok-brand); --ok-primary-bg: var(--ok-brand-soft);
    --ok-neutral: #4a5563; --ok-neutral-bg: #eef1f4;

    --ok-radius: 12px;
    --ok-radius-sm: 9px;
}

[data-bs-theme="dark"] {
    --ok-brand: #3fb8a8;
    --ok-brand-hover: #5cc9ba;
    --ok-brand-rgb: 63, 184, 168;
    --ok-brand-soft: rgba(63, 184, 168, .14);
    --ok-brand-tint: rgba(63, 184, 168, .06);
    --ok-brand-border: rgba(63, 184, 168, .35);

    --ok-bg: #0f1417;
    --ok-surface: #161d21;
    --ok-surface-muted: #1b2328;
    --ok-border: #262f35;
    --ok-border-strong: #313b42;
    --ok-text: #e4e8eb;
    --ok-text-muted: #9ba6b0;
    --ok-text-faint: #939fa9; /* 6.3:1 on surface */
    --ok-control-border: #6b7882; /* 3.8:1 on surface */
    --ok-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --ok-shadow-pop: 0 12px 32px rgba(0, 0, 0, .45);

    --ok-success: #5fcf94; --ok-success-bg: rgba(95, 207, 148, .13);
    --ok-info: #6cb8e6;    --ok-info-bg: rgba(108, 184, 230, .13);
    --ok-warning: #f0b453; --ok-warning-bg: rgba(240, 180, 83, .13);
    --ok-danger: #f07a80;  --ok-danger-bg: rgba(240, 122, 128, .13);
    --ok-neutral: #a3adb7; --ok-neutral-bg: rgba(163, 173, 183, .12);
}

/* Bootstrap / AdminLTE variables mapped onto the tokens. */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-primary: var(--ok-brand);
    --bs-primary-rgb: var(--ok-brand-rgb);
    --bs-link-color: var(--ok-brand);
    --bs-link-color-rgb: var(--ok-brand-rgb);
    --bs-link-hover-color: var(--ok-brand-hover);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--ok-text);
    --bs-body-bg: var(--ok-bg);
    --bs-secondary-color: var(--ok-text-muted);
    --bs-tertiary-color: var(--ok-text-faint);
    --bs-tertiary-bg: var(--ok-surface-muted);
    --bs-border-color: var(--ok-border);
    --bs-border-radius: var(--ok-radius-sm);
    --bs-focus-ring-color: rgba(var(--ok-brand-rgb), .22);
    --bs-emphasis-color: var(--ok-text);
}

/* Root font-size drives every rem-sized Bootstrap/AdminLTE component. */
html { font-size: 87.5%; } /* 14px base; readability comes from the colour tokens, not size */
body {
    background: var(--ok-bg) !important;
    color: var(--ok-text);
}
:root:not([data-bs-theme="dark"]) body { font-weight: 450; }
[data-bs-theme="dark"] body { -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.btn:hover, .nav-link:hover, .dropdown-item:hover, .page-link:hover, .brand-link:hover { text-decoration: none; }
.text-muted, .text-secondary { color: var(--ok-text-muted) !important; }
.tabular, .stat-value { font-variant-numeric: tabular-nums; }

/* ---------- App shell ---------- */
.app-header {
    background: var(--ok-surface) !important;
    border-bottom: 1px solid var(--ok-border);
    min-height: 3.75rem;
}
.app-header .navbar-nav .nav-link { color: var(--ok-text-muted); height: auto; max-height: none; display: flex; align-items: center; }
.app-header .navbar-nav .nav-link:hover { color: var(--ok-text); }
.app-header .header-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: 10px; color: var(--ok-text-muted);
}
.app-header .header-icon-btn:hover { background: var(--ok-surface-muted); color: var(--ok-text); }

.app-sidebar {
    --lte-sidebar-width: 256px;
    --lte-sidebar-color: var(--ok-text-muted);
    --lte-sidebar-hover-bg: var(--ok-surface-muted);
    --lte-sidebar-hover-color: var(--ok-text);
    --lte-sidebar-active-color: var(--ok-brand);
    --lte-sidebar-menu-active-bg: var(--ok-brand-soft);
    --lte-sidebar-menu-active-color: var(--ok-brand);
    --lte-sidebar-submenu-bg: transparent;
    --lte-sidebar-submenu-color: var(--ok-text-muted);
    --lte-sidebar-submenu-hover-bg: var(--ok-surface-muted);
    --lte-sidebar-submenu-hover-color: var(--ok-text);
    --lte-sidebar-submenu-active-bg: var(--ok-brand-soft);
    --lte-sidebar-submenu-active-color: var(--ok-brand);
    --lte-sidebar-header-color: var(--ok-text-faint);
    background: var(--ok-surface) !important;
    border-right: 1px solid var(--ok-border);
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    height: 3.75rem;
    justify-content: flex-start;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--ok-border);
}
.brand-link { display: flex; align-items: center; gap: .65rem; color: var(--ok-text) !important; }
.brand-mark {
    display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 10px;
    background: linear-gradient(140deg, var(--ok-brand), #14a08f); color: #fff; font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(var(--ok-brand-rgb), .25);
}
.brand-text { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-sub { display: block; font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ok-text-faint); margin-top: 1px; }

.sidebar-wrapper { flex: 1 1 auto; min-height: 0; padding: .5rem .75rem 1rem; }
.sidebar-menu .nav-header {
    padding: .95rem .75rem .35rem !important;
    font-size: .76rem !important; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ok-text-faint) !important;
}
.sidebar-menu .nav-item > .nav-link {
    border-radius: 10px !important;
    padding: .45rem .75rem !important;
    margin: 1px 0;
    font-weight: 500;
    display: flex; align-items: center;
}
.sidebar-menu .nav-link .nav-icon { font-size: 1.05rem; width: 1.6rem; margin-right: .35rem; opacity: .9; }
.sidebar-menu .nav-link > p { flex: 1; display: flex; align-items: center; margin: 0; }
.sidebar-menu .nav-link.active { font-weight: 600; box-shadow: none !important; }
.sidebar-menu .nav-link.active .nav-icon { opacity: 1; }
.sidebar-menu .nav-treeview { padding-left: .6rem; }
.sidebar-menu .nav-treeview .nav-link { font-weight: 450; }
.sidebar-menu .nav-arrow { margin-left: auto; font-size: .75rem; }
.nav-count {
    margin-left: auto; min-width: 1.45rem; height: 1.45rem; padding: 0 .4rem; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ok-warning-bg); color: var(--ok-warning); font-size: .76rem; font-weight: 700;
}
.nav-link.active .nav-count { background: var(--ok-brand); color: #fff; }

.sidebar-search { padding: .75rem .75rem 0; }
.sidebar-search .form-control { background: var(--ok-surface-muted); border-color: var(--ok-border); border-radius: 10px; padding: .45rem .75rem; }

.sidebar-account {
    border-top: 1px solid var(--ok-border);
    padding: .85rem 1rem;
    display: flex; align-items: center; gap: .7rem;
}
.sidebar-account .account-name { font-weight: 600; font-size: .92rem; line-height: 1.2; }
.sidebar-account .account-role { font-size: .76rem; color: var(--ok-text-muted); }
.avatar {
    flex-shrink: 0; display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 50%;
    background: var(--ok-brand-soft); color: var(--ok-brand); font-weight: 700; font-size: .85rem; text-transform: uppercase;
}
.avatar-sm { width: 2rem; height: 2rem; font-size: .75rem; }

.app-main { background: var(--ok-bg); }
.app-content-header { padding: 1.5rem 1.75rem .25rem !important; }
.app-content { padding: 1rem 1.75rem 2rem !important; }
.app-content > .container-fluid, .app-content-header > .container-fluid { max-width: 1480px; margin: 0; padding: 0; }
.page-heading { font-size: 1.6rem; font-weight: 700; letter-spacing: -.025em; color: var(--ok-text); margin: .15rem 0 0; }
.page-subtitle { color: var(--ok-text-muted); margin: .35rem 0 0; }
.breadcrumb { font-size: .82rem; margin: 0; --bs-breadcrumb-divider-color: var(--ok-text-faint); }
.breadcrumb-item a { color: var(--ok-text-muted); }
.breadcrumb-item.active { color: var(--ok-text-faint); }
.app-footer {
    background: transparent; border-top: 1px solid var(--ok-border); color: var(--ok-text-faint);
    font-size: .8rem; padding: 1rem 1.75rem;
}

/* Building switcher */
.building-switcher .switcher-btn {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .4rem .75rem .4rem .45rem; border-radius: 11px; border: 1px solid var(--ok-border);
    background: var(--ok-surface); color: var(--ok-text); max-width: 22rem;
}
.building-switcher .switcher-btn:hover { border-color: var(--ok-brand-border); background: var(--ok-brand-tint); }
.building-switcher .switcher-icon {
    display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 8px;
    background: var(--ok-brand-soft); color: var(--ok-brand);
}
.building-switcher .switcher-label { display: block; font-size: .76rem; color: var(--ok-text-faint); text-transform: uppercase; letter-spacing: .07em; line-height: 1; }
.building-switcher .switcher-name { display: block; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.building-switcher .dropdown-item.active, .building-switcher .dropdown-item:active { background: var(--ok-brand-soft); color: var(--ok-brand); }

/* ---------- Components ---------- */
.card {
    --bs-card-border-color: var(--ok-border);
    --bs-card-bg: var(--ok-surface);
    --bs-card-cap-bg: transparent;
    border-radius: var(--ok-radius);
    box-shadow: var(--ok-shadow);
    margin-bottom: 1.25rem;
}
/* AdminLTE's coloured top stripe (card-outline) — replaced by the calm, uniform card. */
.card.card-outline { border-top: 1px solid var(--ok-border) !important; }
.card > .card-header {
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--ok-border);
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
}
.card > .card-header::after { display: none; }
/* AdminLTE's solid coloured headers (card-primary, card-success, ...) → same calm header as every card. */
.card[class*="card-"]:not(.card-outline) > .card-header {
    background: transparent !important;
    color: var(--ok-text) !important;
    border-bottom: 1px solid var(--ok-border);
}
.card[class*="card-"]:not(.card-outline) > .card-header .card-title,
.card[class*="card-"]:not(.card-outline) > .card-header a:not(.btn) { color: inherit; }
.card-header > .card-title { margin: 0; font-size: 1rem; font-weight: 650; flex: 1 1 auto; }
.card-title small { font-weight: 450; color: var(--ok-text-muted); }
.card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 0 auto !important; float: none !important; }
.card-tools > * { margin: 0 !important; }
.card-body { padding: 1.1rem; }
.card-footer { background: transparent; border-top: 1px solid var(--ok-border); padding: .75rem 1.1rem; }

/* Tables: no vertical rules, airy rows, quiet header. */
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: var(--ok-brand-tint);
    --bs-table-border-color: var(--ok-border);
    margin-bottom: 0;
}
.table > thead > tr > th {
    background: var(--ok-surface-muted);
    color: var(--ok-text-muted);
    font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
    padding: .7rem .9rem; border-bottom: 1px solid var(--ok-border); white-space: nowrap;
}
.table > tbody > tr > td { padding: .7rem .9rem; vertical-align: middle; font-size: .93rem; }
.table-sm > :not(caption) > * > * { padding: .6rem .9rem; }
.table-bordered > :not(caption) > * { border-width: 0 0 1px 0; }
.table-bordered > :not(caption) > * > * { border-width: 0; }
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table td.text-center:only-child { color: var(--ok-text-muted); padding: 2.5rem 1rem; }
.table .btn-sm { padding: .28rem .55rem; }

/* Buttons */
.btn { border-radius: var(--ok-radius-sm); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { border-radius: 8px; font-size: .82rem; }
.btn-primary {
    --bs-btn-bg: var(--ok-brand); --bs-btn-border-color: var(--ok-brand);
    --bs-btn-hover-bg: var(--ok-brand-hover); --bs-btn-hover-border-color: var(--ok-brand-hover);
    --bs-btn-active-bg: var(--ok-brand-hover); --bs-btn-active-border-color: var(--ok-brand-hover);
    --bs-btn-disabled-bg: var(--ok-brand); --bs-btn-disabled-border-color: var(--ok-brand);
    --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
    box-shadow: 0 2px 6px rgba(var(--ok-brand-rgb), .2);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0b1a18; --bs-btn-hover-color: #0b1a18; --bs-btn-active-color: #0b1a18; }
.btn-outline-primary {
    --bs-btn-color: var(--ok-brand); --bs-btn-border-color: var(--ok-brand-border);
    --bs-btn-hover-bg: var(--ok-brand-soft); --bs-btn-hover-color: var(--ok-brand); --bs-btn-hover-border-color: var(--ok-brand-border);
    --bs-btn-active-bg: var(--ok-brand-soft); --bs-btn-active-color: var(--ok-brand); --bs-btn-active-border-color: var(--ok-brand);
    background: var(--ok-surface);
}
.btn-secondary, .btn-outline-secondary {
    --bs-btn-color: var(--ok-text-muted); --bs-btn-bg: var(--ok-surface); --bs-btn-border-color: var(--ok-border-strong);
    --bs-btn-hover-color: var(--ok-text); --bs-btn-hover-bg: var(--ok-surface-muted); --bs-btn-hover-border-color: var(--ok-border-strong);
    --bs-btn-active-color: var(--ok-text); --bs-btn-active-bg: var(--ok-surface-muted); --bs-btn-active-border-color: var(--ok-border-strong);
}
.btn-outline-danger {
    --bs-btn-color: var(--ok-danger); --bs-btn-border-color: var(--ok-border-strong); --bs-btn-bg: var(--ok-surface);
    --bs-btn-hover-bg: var(--ok-danger-bg); --bs-btn-hover-color: var(--ok-danger); --bs-btn-hover-border-color: var(--ok-danger);
}
.btn-outline-success {
    --bs-btn-color: var(--ok-success); --bs-btn-border-color: var(--ok-border-strong); --bs-btn-bg: var(--ok-surface);
    --bs-btn-hover-bg: var(--ok-success-bg); --bs-btn-hover-color: var(--ok-success); --bs-btn-hover-border-color: var(--ok-success);
}
.btn-success { --bs-btn-bg: var(--ok-success); --bs-btn-border-color: var(--ok-success); }
.btn-dark { --bs-btn-bg: var(--ok-text); --bs-btn-border-color: var(--ok-text); }

/* Forms */
.form-control, .form-select {
    border-color: var(--ok-control-border); border-radius: var(--ok-radius-sm);
    background-color: var(--ok-surface); color: var(--ok-text); padding: .5rem .75rem;
}
.form-control-sm, .form-select-sm, .input-group-sm > .form-control, .input-group-sm > .form-select { padding: .35rem .65rem; border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--ok-brand); box-shadow: 0 0 0 .2rem rgba(var(--ok-brand-rgb), .15); }
.form-label { font-weight: 600; font-size: .86rem; color: var(--ok-text); margin-bottom: .35rem; }
.form-text { color: var(--ok-text-faint); }
.input-group-text { background: var(--ok-surface-muted); border-color: var(--ok-control-border); color: var(--ok-text-muted); }
.form-check-input:checked { background-color: var(--ok-brand); border-color: var(--ok-brand); }
.search-box .form-control { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.search-box .btn { border-color: var(--ok-control-border); color: var(--ok-text-muted); align-self: stretch; }

/* Badges — soft, readable pills instead of saturated blocks. */
.badge { font-weight: 600; font-size: .78rem; padding: .32em .65em; border-radius: 999px; letter-spacing: .01em; }
.badge.bg-success, .badge-soft-success { background: var(--ok-success-bg) !important; color: var(--ok-success) !important; }
.badge.bg-info, .badge-soft-info { background: var(--ok-info-bg) !important; color: var(--ok-info) !important; }
.badge.bg-warning, .badge-soft-warning { background: var(--ok-warning-bg) !important; color: var(--ok-warning) !important; }
.badge.bg-danger, .badge-soft-danger { background: var(--ok-danger-bg) !important; color: var(--ok-danger) !important; }
.badge.bg-primary, .badge-soft-primary { background: var(--ok-primary-bg) !important; color: var(--ok-primary) !important; }
.badge.bg-secondary, .badge.bg-dark, .badge.bg-light, .badge-soft-neutral { background: var(--ok-neutral-bg) !important; color: var(--ok-neutral) !important; }
.badge-soft::before { content: ""; width: .42em; height: .42em; border-radius: 50%; background: currentColor; display: inline-block; margin-right: .4em; vertical-align: .12em; }

/* Alerts */
.alert { border-radius: var(--ok-radius-sm); border: 1px solid transparent; }
.alert-success { background: var(--ok-success-bg); color: var(--ok-success); border-color: transparent; }
.alert-danger { background: var(--ok-danger-bg); color: var(--ok-danger); border-color: transparent; }
.alert-warning { background: var(--ok-warning-bg); color: var(--ok-warning); border-color: transparent; }
.alert-info { background: var(--ok-info-bg); color: var(--ok-info); border-color: transparent; }

/* Pagination */
.pagination { --bs-pagination-border-radius: 8px; gap: .25rem; }
.page-link { border-radius: 8px !important; border-color: var(--ok-border); color: var(--ok-text-muted); padding: .3rem .65rem; background: var(--ok-surface); }
.page-item.active .page-link { background: var(--ok-brand); border-color: var(--ok-brand); color: #fff; }

/* Dropdowns, modals, toasts, list groups */
.dropdown-menu {
    border: 1px solid var(--ok-border); border-radius: var(--ok-radius); box-shadow: var(--ok-shadow-pop);
    padding: .4rem; background: var(--ok-surface);
}
.dropdown-item { border-radius: 8px; padding: .5rem .7rem; color: var(--ok-text); display: flex; align-items: center; gap: .55rem; }
.dropdown-item:hover { background: var(--ok-surface-muted); }
.dropdown-header { color: var(--ok-text-faint); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--ok-shadow-pop); background: var(--ok-surface); }
.modal-header, .modal-footer { border-color: var(--ok-border); }
.toast { border-radius: var(--ok-radius-sm); box-shadow: var(--ok-shadow-pop); }
.toast.text-bg-success { background: var(--ok-text) !important; color: var(--ok-surface) !important; }
[data-bs-theme="dark"] .toast.text-bg-success { background: #e4e8eb !important; color: #0f1417 !important; }
.toast.text-bg-success .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
[data-bs-theme="dark"] .toast.text-bg-success .btn-close { filter: none; }
.list-group { --bs-list-group-border-color: var(--ok-border); --bs-list-group-bg: var(--ok-surface); border-radius: var(--ok-radius-sm); }

/* AdminLTE small-box (any page still using it) → stat card look. */
.small-box { background: var(--ok-surface) !important; color: var(--ok-text) !important; border: 1px solid var(--ok-border); border-radius: var(--ok-radius); box-shadow: var(--ok-shadow); }
.small-box .icon { color: var(--ok-brand); opacity: .18; }
.small-box-footer { background: var(--ok-surface-muted) !important; color: var(--ok-text-muted) !important; border-radius: 0 0 var(--ok-radius) var(--ok-radius); }

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple { border-color: var(--ok-border-strong) !important; border-radius: var(--ok-radius-sm) !important; min-height: calc(1.5em + 1rem + 2px); background-color: var(--ok-surface) !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ok-text); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--ok-brand) !important; }
.select2-dropdown { border-color: var(--ok-border) !important; border-radius: var(--ok-radius-sm) !important; box-shadow: var(--ok-shadow-pop); background: var(--ok-surface); }

/* Onboarding wizard (Platform Admin → new property) */
.wizard-steps { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1rem; overflow-x: auto; }
.wizard-steps li {
    display: flex; align-items: center; gap: .5rem; flex: 1 0 auto; padding: .55rem .8rem; border-radius: 10px;
    background: var(--ok-surface); border: 1px solid var(--ok-border); color: var(--ok-text-faint); font-size: .85rem; font-weight: 550;
}
.wizard-steps li.is-reachable { cursor: pointer; color: var(--ok-text-muted); }
.wizard-steps li.is-current { border-color: var(--ok-brand); color: var(--ok-brand); background: var(--ok-brand-tint); }
.wizard-num {
    display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; flex-shrink: 0;
    background: var(--ok-neutral-bg); font-size: .75rem; font-weight: 700;
}
.wizard-steps li.is-current .wizard-num, .wizard-steps li.is-done .wizard-num { background: var(--ok-brand); color: #fff; }
.wizard-steps li.is-done .wizard-num { font-size: 0; }
.wizard-steps li.is-done .wizard-num::before { content: "\2713"; font-size: .75rem; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.choice-card { position: relative; margin: 0; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card .choice-body {
    display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .9rem 1rem; border-radius: var(--ok-radius);
    border: 1px solid var(--ok-border-strong); background: var(--ok-surface); transition: border-color .15s, background .15s;
}
.choice-card .choice-body i { font-size: 1.3rem; color: var(--ok-brand); margin-bottom: .2rem; }
.choice-card small, .choice-row small { color: var(--ok-text-muted); font-size: .8rem; display: block; font-weight: 400; }
.choice-card input:checked + .choice-body { border-color: var(--ok-brand); background: var(--ok-brand-tint); box-shadow: 0 0 0 1px var(--ok-brand); }
.choice-card input:focus-visible + .choice-body { box-shadow: 0 0 0 .2rem rgba(var(--ok-brand-rgb), .25); }
.choice-check .choice-body { padding-left: 2.4rem; }
.choice-check .choice-body::before {
    content: ""; position: absolute; left: .9rem; top: 1rem; width: 1.05rem; height: 1.05rem; border-radius: 5px;
    border: 1.5px solid var(--ok-border-strong); background: var(--ok-surface);
}
.choice-check input:checked + .choice-body::before { background: var(--ok-brand); border-color: var(--ok-brand); box-shadow: inset 0 0 0 2px var(--ok-surface); }

.choice-list { display: grid; gap: .5rem; }
.choice-row {
    display: flex; gap: .75rem; align-items: flex-start; margin: 0; padding: .75rem .9rem; cursor: pointer;
    border: 1px solid var(--ok-border-strong); border-radius: var(--ok-radius-sm); background: var(--ok-surface);
}
.choice-row input { margin-top: .25rem; accent-color: var(--ok-brand); }
.choice-row:has(input:checked) { border-color: var(--ok-brand); background: var(--ok-brand-tint); }

.review-list { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .6rem 1.25rem; margin: 0; }
.review-list dt { color: var(--ok-text-muted); font-weight: 550; }
.review-list dd { margin: 0; }
@media (max-width: 575.98px) {
    .review-list { grid-template-columns: 1fr; }
    .review-list dd { margin-bottom: .5rem; }
    .wizard-label { display: none; }
}

/* Photo evidence thumbnails (<x-photo>) */
.photo-thumb { display: inline-block; vertical-align: middle; line-height: 0; }
.photo-thumb img {
    width: 2.6rem; height: 2.6rem; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--ok-border); background: var(--ok-surface-muted);
}
.photo-thumb:hover img { border-color: var(--ok-brand); }

/* ---------- Dashboard pieces ---------- */
.welcome {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.25rem;
}
.welcome h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.welcome p { margin: .3rem 0 0; color: var(--ok-text-muted); }
.quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.stat-card {
    background: var(--ok-surface); border: 1px solid var(--ok-border); border-radius: var(--ok-radius);
    box-shadow: var(--ok-shadow); padding: 1.1rem 1.15rem; height: 100%;
    display: flex; flex-direction: column; gap: .2rem; color: inherit;
    transition: border-color .15s, transform .15s;
}
a.stat-card:hover { border-color: var(--ok-brand-border); text-decoration: none; color: inherit; }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: var(--ok-text-muted); font-size: .85rem; font-weight: 550; }
.stat-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--ok-brand-soft); color: var(--ok-brand); font-size: 1.05rem; }
.stat-icon.tone-warning { background: var(--ok-warning-bg); color: var(--ok-warning); }
.stat-icon.tone-danger { background: var(--ok-danger-bg); color: var(--ok-danger); }
.stat-icon.tone-info { background: var(--ok-info-bg); color: var(--ok-info); }
.stat-value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin-top: .45rem; }
.stat-value small { font-size: .95rem; font-weight: 600; color: var(--ok-text-muted); letter-spacing: 0; }
.stat-meta { font-size: .8rem; color: var(--ok-text-muted); }
.meter { height: .45rem; border-radius: 999px; background: var(--ok-neutral-bg); overflow: hidden; display: flex; margin-top: .55rem; }
.meter > span { display: block; height: 100%; }
.meter .seg-brand { background: var(--ok-brand); }
.meter .seg-info { background: #5aa9d6; }
.meter .seg-success { background: var(--ok-success); }

.action-list { list-style: none; margin: 0; padding: 0; }
.action-item {
    display: flex; align-items: center; gap: .85rem; padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--ok-border); color: inherit;
}
.action-list li:last-child .action-item { border-bottom: 0; }
a.action-item:hover { background: var(--ok-brand-tint); text-decoration: none; color: inherit; }
.action-icon { flex-shrink: 0; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; font-size: 1.05rem; }
.action-icon.tone-danger { background: var(--ok-danger-bg); color: var(--ok-danger); }
.action-icon.tone-warning { background: var(--ok-warning-bg); color: var(--ok-warning); }
.action-icon.tone-primary { background: var(--ok-brand-soft); color: var(--ok-brand); }
.action-icon.tone-info { background: var(--ok-info-bg); color: var(--ok-info); }
.action-body { flex: 1; min-width: 0; }
.action-title { font-weight: 600; }
.action-hint { font-size: .82rem; color: var(--ok-text-muted); }
.action-count { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.action-go { color: var(--ok-text-faint); }

.empty-state { text-align: center; padding: 2.75rem 1.5rem; }
.empty-state .empty-icon {
    display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 14px;
    background: var(--ok-brand-soft); color: var(--ok-brand); font-size: 1.4rem; margin-bottom: .9rem;
}
.empty-state h3 { font-size: 1.05rem; font-weight: 650; margin: 0; }
.empty-state p { color: var(--ok-text-muted); margin: .35rem auto 0; max-width: 28rem; }

.legend-list { list-style: none; padding: 0; margin: 0; }
.legend-list li { display: flex; align-items: center; justify-content: space-between; padding: .4rem 0; border-bottom: 1px dashed var(--ok-border); font-size: .9rem; }
.legend-list li:last-child { border-bottom: 0; }
.legend-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 3px; margin-right: .5rem; }
.legend-dot.seg-brand { background: var(--ok-brand); }
.legend-dot.seg-info { background: #5aa9d6; }

/* ---------- Auth pages (one centred card, like the CMS login) ---------- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2.5rem 1rem; position: relative; background: var(--ok-bg);
}
.auth-card {
    width: 100%; max-width: 25rem; background: var(--ok-surface);
    border: 1px solid var(--ok-border); border-radius: 18px; box-shadow: var(--ok-shadow-pop);
    padding: 2.25rem 2rem 2rem;
}
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.4rem; color: var(--ok-text); }
.auth-card h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; text-align: center; margin: 0; }
.auth-card .auth-sub { color: var(--ok-text-muted); text-align: center; margin: .4rem 0 1.5rem; }
.auth-card .form-control { padding: .65rem .85rem; }
.auth-card .btn-primary { padding: .65rem 1rem; }
.auth-theme { position: absolute; top: 1rem; right: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .app-content-header { padding: 1.1rem 1rem .1rem !important; }
    .app-content { padding: .85rem 1rem 1.5rem !important; }
    .page-heading, .welcome h2 { font-size: 1.35rem; }
    .building-switcher .switcher-btn { max-width: 11rem; }
    .building-switcher .switcher-label { display: none; }
    .app-footer { padding: .85rem 1rem; }
    .auth-card { padding: 1.75rem 1.25rem 1.5rem; }
}

/* Month tabs: billing summary + payments. One tab per billing month, scrolls sideways on phones. */
.month-tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--bs-border-color); margin-bottom: 1.25rem; }
.month-tabs a { flex: 0 0 auto; display: block; padding: .55rem .9rem .5rem; border-bottom: 2px solid transparent; color: var(--bs-secondary-color); text-decoration: none; line-height: 1.2; min-height: 44px; }
.month-tabs a:hover { color: var(--bs-body-color); background: var(--bs-tertiary-bg); }
.month-tabs a:focus-visible { outline: 2px solid var(--ok-brand); outline-offset: -2px; }
.month-tabs a[aria-current="page"] { border-bottom-color: var(--ok-brand); color: var(--bs-body-color); font-weight: 600; }
.month-tabs small { display: block; font-size: .76rem; font-weight: 400; }

/* Billing summary: one card per billing month with its target and a stacked bar
   (paid / still owed / draft), so the months can be compared at a glance. */
.period-strip { display: flex; gap: .6rem; overflow-x: auto; padding: 2px 2px .5rem; margin-bottom: 1.1rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.period-tab { flex: 0 0 auto; width: 11.5rem; min-height: 44px; padding: .7rem .85rem .75rem; border: 1px solid var(--ok-border); border-radius: var(--ok-radius); background: var(--ok-surface); color: var(--ok-text); text-decoration: none; scroll-snap-align: start; transition: border-color .15s ease; }
.period-tab:hover { border-color: var(--ok-brand-border); color: var(--ok-text); }
.period-tab:focus-visible { outline: 2px solid var(--ok-brand); outline-offset: 2px; }
.period-tab[aria-current="page"] { border-color: var(--ok-brand); box-shadow: inset 0 0 0 1px var(--ok-brand); background: var(--ok-brand-soft); }
.period-tab .pt-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-weight: 600; font-size: .9rem; }
.period-tab .pt-rate { font-size: .78rem; font-weight: 600; color: var(--ok-success); font-variant-numeric: tabular-nums; }
.period-tab .pt-rate.is-low { color: var(--ok-danger); }
.period-tab .pt-amount { display: block; margin-top: .15rem; font-size: .82rem; color: var(--ok-text-muted); font-variant-numeric: tabular-nums; }
.period-tab .pt-note { display: block; margin-top: .3rem; font-size: .76rem; color: var(--ok-text-muted); }
.period-tab .stack-bar { margin-top: .5rem; }
.period-strip-older { flex: 0 0 auto; display: flex; align-items: center; }

.stack-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--ok-neutral-bg); }
.stack-bar.is-lg { height: 12px; }
.stack-bar span { display: block; height: 100%; }
.stack-bar .sb-paid, .legend-dot.sb-paid { background: var(--ok-success); }
.stack-bar .sb-owed, .legend-dot.sb-owed { background: var(--ok-danger); opacity: .7; }
.stack-bar .sb-draft, .legend-dot.sb-draft { background: var(--ok-warning); opacity: .55; }
.stack-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-top: .6rem; font-size: .82rem; color: var(--ok-text-muted); }
.stack-legend strong { color: var(--ok-text); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Segmented filter (Belum lunas / Lunas / Semua). */
.seg-filter { display: inline-flex; border: 1px solid var(--ok-border); border-radius: var(--ok-radius-sm); overflow: hidden; }
.seg-filter a { padding: .35rem .75rem; min-height: 34px; display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--ok-text-muted); text-decoration: none; border-right: 1px solid var(--ok-border); }
.seg-filter a:last-child { border-right: 0; }
.seg-filter a:hover { background: var(--ok-surface-muted); color: var(--ok-text); }
.seg-filter a:focus-visible { outline: 2px solid var(--ok-brand); outline-offset: -2px; }
.seg-filter a[aria-current="page"] { background: var(--ok-brand-soft); color: var(--ok-text); font-weight: 600; }
.seg-filter .seg-count { font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--ok-text-muted); }

/* Residents: one compact row per unit. Unit, status and owner shrink to their
   content; the occupant column takes the rest, so there are no wide gaps mid-row. */
.resident-table > thead > tr > th { padding: .55rem .75rem; }
.resident-table > tbody > tr > * { padding: .4rem .75rem; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid var(--ok-border); }
.resident-table .col-fit { width: 1%; white-space: nowrap; }
.resident-table th.col-fit:nth-child(3), .resident-table > tbody > tr > td:nth-child(3) { padding-right: 2rem; }
.resident-table > tbody > tr:nth-child(even) > * { background: var(--ok-surface-muted); }
.resident-table > tbody > tr:hover > * { background: var(--ok-brand-tint); }
.resident-table .unit-code { font-weight: 700; }
.resident-table .unit-zone { margin-left: .35rem; font-size: .8rem; font-weight: 400; color: var(--ok-text-muted); }
.resident-table .person-line + .person-line { margin-top: .15rem; }
.resident-table .person-name { font-weight: 600; }
.resident-table .person-meta { font-size: .82rem; color: var(--ok-text-muted); font-variant-numeric: tabular-nums; }
.resident-table .person-ktp { margin-left: .25rem; color: var(--ok-brand); }
.resident-table .btn-sm { padding: .1rem .55rem; }


/* Readability floor (2026-11-17): form controls and outline buttons keep a 3:1 edge,
   placeholders stay lighter than typed values. */
.form-control::placeholder { color: var(--ok-text-faint); opacity: 1; }
.form-check-input { border-color: var(--ok-control-border); }
.btn-outline-secondary, .btn-outline-danger, .btn-outline-success { --bs-btn-border-color: var(--ok-control-border); }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { border-color: var(--ok-control-border) !important; }
.legend-dot.seg-success { background: var(--ok-success); }
.seg-filter button { padding: .4rem .85rem; min-height: 38px; display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .88rem; color: var(--ok-text-muted); background: transparent; border: 0; border-right: 1px solid var(--ok-border); cursor: pointer; }
.seg-filter button:last-child { border-right: 0; }
.seg-filter button:hover { background: var(--ok-surface-muted); color: var(--ok-text); }
.seg-filter button:focus-visible { outline: 2px solid var(--ok-brand); outline-offset: -2px; }
.seg-filter button[aria-pressed="true"] { background: var(--ok-brand-soft); color: var(--ok-text); font-weight: 600; }

/* Vehicles: one row per unit, one compact line per vehicle (reuses .resident-table). */
.vehicle-table .vehicle-line { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; min-height: 30px; }
.vehicle-table .vehicle-line + .vehicle-line { border-top: 1px dashed var(--ok-border); padding-top: .2rem; margin-top: .2rem; }
.vehicle-table .vehicle-actions { margin-left: auto; display: inline-flex; gap: .25rem; }
