/* Shared visual language for the Orchid workspace and embedded editors. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter/InterVariable.woff2") format("woff2");
}
:root {
    --room-font: "Inter", sans-serif;
    --room-table-font-size: 13px;
    --bs-font-sans-serif: var(--room-font);
    --bs-body-font-family: var(--room-font);
    --room-bg: #f6f6f6;
    --room-surface: #fff;
    --room-text: #2b2b2b;
    --room-muted: #777777;
    --room-line: #e9e9e9;
    --room-accent: #353535;
    --room-accent-hover: #494949;
    --room-accent-soft: #f0f0f0;
    --room-radius: 14px;
    --bs-primary: #353535;
    --bs-primary-rgb: 53, 53, 53;
    --bs-body-color: #2b2b2b;
    --bs-body-bg: #f6f6f6;
}
body {
    background: var(--room-bg);
    color: var(--room-text);
    font-family: var(--room-font);
    font-optical-sizing: auto;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--room-accent); text-underline-offset: 3px; }
a:hover { color: var(--room-accent-hover); }
button, input, select, textarea, .btn, .tooltip, .popover,
.font-monospace, code, kbd, pre, samp, .codeflask, .codeflask textarea, .codeflask code {
    font-family: var(--room-font) !important;
}
svg text { font-family: var(--room-font); }
.text-black, .text-dark { color: var(--room-text) !important; }
.text-muted, .bg-white .text-muted, .layout .text-muted { color: var(--room-muted) !important; }
.bg-white, .bg-light, .layout { color: var(--room-text); }
.bg-light { background-color: #f5f5f5 !important; }
.bg-white a:not(.btn), .layout a:not(.btn) { color: var(--room-accent); }
.bg-white a:not(.btn):hover, .layout a:not(.btn):hover { color: var(--room-accent-hover) !important; }
.bg-white .btn-link:hover, .layout .btn-link:hover { color: var(--room-accent-hover) !important; }
h1, h2, h3, h4, legend { letter-spacing: -.025em; }
h1.h3 { font-size: 28px; font-weight: 650 !important; line-height: 1.25; }
legend { font-size: 16px; font-weight: 600; }
.rounded, .rounded-top, .rounded-bottom { border-radius: var(--room-radius) !important; }
.shadow-sm { box-shadow: 0 2px 5px rgba(30, 30, 30, .025) !important; }
.border, .border-top, .border-bottom { border-color: var(--room-line) !important; }
.bg-white.rounded { border: 1px solid var(--room-line); }
.container-md { max-width: 1760px; }
body > .container-fluid > .row > .col { min-width: 0; }
nav[aria-label="breadcrumb"], .breadcrumb { display: none !important; }
.layout.v-md-center {
    background: transparent !important; border: 0; box-shadow: none !important;
    padding: 0 0 25px !important; margin-bottom: 0 !important; gap: 18px; min-height: 80px;
}
.layout header small { display: block; margin-top: 7px; font-size: 13px; max-width: 850px; line-height: 1.6; }
.command-bar { gap: 8px; }
.command-bar > li { margin-left: 0 !important; }
.command-bar .form-group { margin: 0; }
.command-bar .btn { min-height: 39px; }
/* Orchid renders primary actions as .btn-link; keep their text and icons white in every state. */
.command-bar :is(a[href$="/create"], button[formaction*="/createOrUpdate"], button[formaction$="/save"], button[formaction*="/save?"]) {
    background: var(--room-accent); color: #fff !important; border-color: var(--room-accent);
    box-shadow: 0 3px 6px rgba(53, 53, 53, .12);
}
.command-bar :is(a[href$="/create"], button[formaction*="/createOrUpdate"], button[formaction$="/save"], button[formaction*="/save?"]):is(:hover, :focus, :active, .active) {
    background: var(--room-accent-hover); color: #fff !important; border-color: var(--room-accent-hover);
}
.command-bar button[formaction*="/remove"] { color: var(--room-muted); background: transparent; border-color: transparent; }
.command-bar button[formaction*="/remove"]:is(:hover, :focus, :active) { color: #b64e5b !important; background: #fff0f2; }

/* Navigation stays quiet; the active workspace provides orientation. */
.aside.bg-dark {
    background: #212529 !important; color: #b9b9b9; border-right: 1px solid #303438;
    width: 244px; min-width: 244px; max-width: 244px; flex: 0 0 244px; padding: 0 12px; z-index: 20;
}
.aside > div { min-height: 100vh; }
.aside header { margin-top: 14px !important; padding: 21px 16px 25px !important; }
.room-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.room-brand img { display: block; width: 126px; height: auto; }
.room-brand span { color: #999999; font-size: 11px; letter-spacing: .09em; font-weight: 500; }
.aside .nav-link, .aside .nav-item > a, .aside .header-toggler { color: #c5c5c5; }
.aside .text-white { color: #f5f5f5 !important; }
.aside .text-muted { color: #999 !important; }
.aside .nav-item > a {
    display: flex; align-items: center; min-height: 41px;
    padding: 10px 12px; margin: 2px 0; border-radius: 9px;
    font-size: 13px; font-weight: 500; transition: background .16s, color .16s;
}
.aside.bg-dark .nav .nav-item > a { color: #c5c5c5; box-shadow: none !important; }
.aside .nav-item > a svg { width: 17px; height: 17px; margin-right: 11px !important; opacity: .85; flex-shrink: 0; }
.aside.bg-dark .nav .nav-item > a:hover,
.aside.bg-dark .nav .nav-item > a:focus-visible { color: #fff; background: #363636 !important; }
.aside.bg-dark .nav .nav-item.active > a, .aside.bg-dark .nav .nav-item > a.active {
    color: #fff !important; background: #3b3b3b !important; font-weight: 600;
}
.aside .dropdown-menu .nav-item > a { color: var(--room-text) !important; }
.aside .dropdown-menu .nav-item > a:hover { background: var(--room-accent-soft) !important; }
.aside .sub-menu { border-left: 1px solid #424242; margin: 4px 0 9px 19px; padding-left: 9px !important; }
.aside .nav-item > small { font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; margin-left: 12px !important; }
.room-sidebar-profile { border-top: 1px solid #363a3e; padding: 17px 8px 0; margin-top: 16px; }
.room-sidebar-profile > .d-flex { padding: 0 !important; }
.aside .avatar { width: 33px; height: 33px; border-radius: 11px; overflow: hidden; }
.aside .avatar img { border: 0; }
.to-top { display: none !important; }
.aside .divider { border-color: #363a3e; }
.room-sidebar-footer { display: flex; justify-content: space-between; color: #999999; font-size: 10px; }
.aside footer { padding: 16px 8px !important; margin-top: auto !important; }

/* All rows share one surface; only the hovered row changes colour. */
.table {
    --bs-table-bg: transparent; --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: transparent; --bs-table-striped-color: var(--room-text);
    --bs-table-hover-bg: #f3f3f3; --bs-table-hover-color: var(--room-text);
    color: var(--room-text); margin-bottom: 0; font-size: var(--room-table-font-size); font-variant-numeric: tabular-nums;
}
.table > tbody > tr > *, .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: transparent; box-shadow: none;
}
.table > :not(:first-child) { border-top: 0; }
.table > thead > tr > th {
    color: #858585; font-size: inherit; font-weight: 600;
    background: #fcfcfc; border-bottom: 1px solid var(--room-line);
    padding: 15px 17px; letter-spacing: .015em; vertical-align: middle;
}
.table th a, .table th button { color: #777777; font-size: inherit; }
.room-table-sort {
    display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0;
    background: transparent; font: inherit; color: inherit; cursor: pointer; text-align: inherit;
}
.room-table-sort [data-room-sort-indicator] { display: inline-block; width: 1em; }
table[data-room-local-sort] tbody { overflow-anchor: none; }
.table > tbody > tr > td { padding: 14px 17px; border-color: #efefef; vertical-align: middle; }
.table > tbody > tr { transition: background-color .14s; }
.table > tbody > tr:hover { background-color: #f3f3f3; }
.table td .btn-link { color: #808080; border-radius: 8px; }
.table td .btn-link:hover { color: var(--room-accent); background: var(--room-accent-soft); }
.room-table-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.table td .room-table-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 8px; }
.room-table-action svg { flex-shrink: 0; }
.table td .room-system-edit {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border-radius: 8px;
    background: transparent; text-decoration: none;
}
.table td .room-system-edit:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 2px; }
.room-system-edit svg { width: 20px; height: 20px; }
.table tbody td,
.table tbody td :is(.text-muted, .text-secondary, .text-success, .text-danger, .text-warning, .text-info, .text-primary, .text-dark, .text-body, .btn-link) {
    color: var(--room-text) !important;
}
.room-money { color: var(--room-text) !important; font-variant-numeric: tabular-nums; }
.room-money[data-sign="positive"] { color: #269e4a !important; }
.room-money[data-sign="negative"] { color: #e3485a !important; }
.room-account-status[data-attention="true"] { color: #e3485a !important; }
.room-account-fetch { white-space: nowrap; color: #000 !important; }
.room-account-fetch[data-stale="true"] { color: #e3485a !important; }
.table td button[formaction*="/remove"] { color: var(--room-muted) !important; }
.table td button[formaction*="/remove"]:hover { color: #b64e5b !important; background: #fff0f2; }
.table-responsive { border-radius: var(--room-radius) var(--room-radius) 0 0; }
[data-controller~="table"] > footer, .bg-white > footer { border-top: 1px solid var(--room-line); padding: 14px 18px !important; }
footer .form-select { min-height: 33px; padding-top: 4px; padding-bottom: 4px; }
.page-link { border: 0; border-radius: 8px !important; margin: 0 2px; color: #808080; background: transparent; min-width: 32px; text-align: center; }
.page-item.active .page-link { background: var(--room-accent-soft); color: var(--room-accent); font-weight: 600; }
.page-item.disabled .page-link { background: transparent; color: #bdbdbd; }
.page-link:hover { background: #eeeeee; color: var(--room-accent); }
.pagination { gap: 2px; margin: 0; }
.badge { border-radius: 6px; padding: 5px 8px; font-weight: 500; }
.bg-success { background-color: #398972 !important; }
.bg-danger { background-color: #bc5965 !important; }
.bg-warning { background-color: #d0a757 !important; }
details > summary { cursor: pointer; color: var(--room-accent); }

.room-summary-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.room-summary-caption, .room-summary-period { white-space: nowrap; }
.room-summary-period { font-size: 12px; font-variant-numeric: tabular-nums; }

/* Place detail headings above the shared surface for period tabs and tables. */
.room-detail-section {
    --room-detail-gutter: 24px;
    min-width: 0; margin-top: 36px;
}
.room-detail-section-body {
    min-width: 0; background: var(--room-surface);
    border: 1px solid var(--room-line); border-radius: var(--room-radius);
}
.room-detail-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; text-align: left; }
.room-detail-section-icon {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px;
    width: 38px; height: 38px; border-radius: 10px;
    color: var(--room-muted); background: var(--room-surface);
}
.room-detail-section-icon svg { width: 19px; height: 19px; }
.room-detail-section-header h2 {
    margin: 0; color: var(--room-text); font-size: 18px; font-weight: 600;
    line-height: 1.45; letter-spacing: -.02em; text-align: left;
}
.room-detail-section .nav-tabs {
    display: flex !important; padding: 0 var(--room-detail-gutter); gap: 24px; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
}
.room-detail-section .nav-tabs .nav-item { flex-shrink: 0; }
.room-detail-section .nav-tabs-alt .nav-tabs .nav-item .nav-link { margin-bottom: 0; padding: 12px 0; white-space: nowrap; }
.room-detail-section-body > [data-controller~="tabs"] > section { margin-bottom: 0 !important; }
.room-detail-section [data-controller~="table"] {
    margin-bottom: 0 !important; border: 0; border-radius: 0 !important; box-shadow: none !important;
    background: transparent !important;
}
.room-detail-section .table-responsive { border-radius: 0 0 var(--room-radius) var(--room-radius); }
.room-detail-section .table > thead > tr > th,
.room-detail-section .table > tbody > tr > td { padding-inline: var(--room-detail-gutter); }
.room-detail-section .table > thead > tr > th:first-child,
.room-detail-section .table > tbody > tr > td:first-child { padding-left: var(--room-detail-gutter) !important; }
.room-detail-section .table > tbody > tr > td:first-child .btn-link { padding-inline: 0; }

/* Fields, filters and common controls. */
[data-room-async-table] { position: relative; }
.room-table-updating::before {
    content: ''; position: absolute; z-index: 1; top: 0; left: 16px; right: 16px;
    height: 2px; background: #aaa; border-radius: 2px; pointer-events: none;
}
.room-table-error:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 17px; color: #a44350; font-size: 12px;
}
.table > thead > .room-table-filters > td {
    position: relative;
    padding: 10px 17px 14px; background: #fcfcfc; border-bottom: 1px solid var(--room-line);
    vertical-align: top;
}
.room-table-filters .form-control, .room-table-filters .form-select,
.room-table-filters .ts-control {
    min-height: 36px; padding: 7px 10px; border-radius: 8px; background-color: #fff;
    font-size: var(--room-table-font-size); font-weight: 400; line-height: 20px;
}
.room-table-filters > td:not(:empty):not(:last-child) { min-width: 210px; }
.room-account-filters > td:not(:empty):not(:last-child) { min-width: 160px; }
/* Keep native multi-select lists out of the first paint and Turbo previews. */
.room-table-filters select:not(.tomselected) { display: none; }
.room-table-filters .room-table-select-loading {
    display: block; height: 36px; color: var(--room-muted); pointer-events: none;
}
.room-table-filters select.tomselected ~ .room-table-select-loading { display: none; }
.room-table-filters .ts-wrapper { min-width: 0; padding: 0; border: 0; }
.room-table-filters .ts-wrapper .ts-control { border: 1px solid #dedede; }
.room-table-filters .ts-control input { font-size: inherit; }
.room-table-filters .ts-wrapper.multi .ts-control { padding-right: 28px; }
.room-table-search { position: relative; }
.room-table-search > svg {
    position: absolute; left: 11px; top: 10px; width: 15px; height: 15px;
    color: #999; pointer-events: none;
}
.room-table-search .form-control { padding-left: 33px; }
.room-table-filter-actions { display: flex; justify-content: flex-end; gap: 4px; }
.room-table-filter-actions .btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 36px; padding: 7px; border-radius: 8px;
}
.room-table-filter-dropdown { position: fixed !important; z-index: 1050; margin: 0; }
.room-table-filter-dropdown .ts-dropdown-content { overscroll-behavior: contain; }

.btn { border-radius: 9px; font-size: 13px; font-weight: 500; padding: 9px 14px; line-height: 1.4; transition: background .16s, box-shadow .16s, color .16s; }
.btn svg { width: 16px; height: 16px; }
.btn-primary, .btn-dark, .btn-info { color: #fff !important; background-color: var(--room-accent) !important; border-color: var(--room-accent) !important; }
:is(.btn-primary, .btn-dark, .btn-info):is(:hover, :focus, :active, .active) { color: #fff !important; background-color: var(--room-accent-hover) !important; border-color: var(--room-accent-hover) !important; }
.btn-outline-primary { color: var(--room-accent); border-color: var(--room-accent); }
.btn-outline-primary:hover, .btn-outline-primary:active { color: #fff; background-color: var(--room-accent); border-color: var(--room-accent); }
.btn-link, .btn-link:hover, .btn-link:focus { color: var(--room-accent); }
.text-primary, .text-info { color: var(--room-accent) !important; }
.bg-primary, .bg-info { background-color: var(--room-accent) !important; }
.btn-default, .btn-light { background: #f3f3f3 !important; border-color: #e9e9e9 !important; color: #5e5e5e !important; }
:is(.btn-default, .btn-light):is(:hover, :focus, :active) { background: #e9e9e9 !important; border-color: #d9d9d9 !important; color: #353535 !important; }
.btn-link { text-decoration: none; }
.btn-sm { padding: 6px 9px; font-size: 12px; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #bbb !important; outline-offset: 3px; }
.btn:focus, .page-link:focus { box-shadow: 0 0 0 3px #e5e5e5; }
.form-check-input:focus { border-color: #999; box-shadow: 0 0 0 3px #eee; }
.form-control, .form-select, .ts-control {
    border: 1px solid #dedede; border-radius: 9px; color: var(--room-text);
    background-color: #fdfdfd; font-size: 13px; min-height: 42px;
    padding: 10px 12px; box-shadow: none;
    transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.form-control:focus, .form-select:focus, .ts-wrapper.focus .ts-control {
    color: var(--room-text); background-color: #fff; border-color: #a0a0a0; box-shadow: 0 0 0 3px #eeeeee;
}
.form-control:disabled, .form-control[readonly] { background-color: #f5f5f5; color: var(--room-muted); }
.form-control::placeholder { color: #a0a0a0; }
.form-label, label, .col-form-label { color: #666666; font-size: 12px; font-weight: 500; }
.form-group { margin-bottom: 22px; }
.form-text, .help-block { font-size: 11px; color: var(--room-muted); line-height: 1.6; }
.input-group-text { border-color: #dedede; background: #f3f3f3; color: #808080; border-radius: 9px; }
.form-check-input:checked { background-color: var(--room-accent); border-color: var(--room-accent); }
input { accent-color: var(--room-accent); }
.ts-wrapper.multi .ts-control > div { background: var(--room-accent-soft); color: var(--room-accent); border-radius: 5px; }
.ts-dropdown, .dropdown-menu { border: 1px solid var(--room-line); border-radius: 11px; padding: 6px; box-shadow: 0 12px 35px rgba(30, 30, 30, .1); font-size: 13px; }
.dropdown-item, .ts-dropdown .option { border-radius: 6px; padding: 8px 11px; }
.dropdown-item:hover, .ts-dropdown .active { background: var(--room-accent-soft); color: var(--room-accent); }
.dropdown-item:active, .dropdown-item.active { background: var(--room-accent-soft); color: var(--room-accent); }
.ts-dropdown .selected, .ts-wrapper.multi .ts-control > div.active { background: #e5e5e5; color: var(--room-text); }
.ts-dropdown.room-select-dropdown { position: fixed; z-index: 1200; margin: 0; }
.ts-dropdown.room-select-portal { inset: auto; overflow: visible; }
.room-select-dropdown .ts-dropdown-content { overflow-y: auto; overscroll-behavior: contain; }
/* Inline, popover and standalone filters use the same text size as table values. */
[form="filters"],
:is(.table th, .row[data-controller~="filter"], .col-md-12[data-controller~="filter"])
    :is(label, .form-label, .col-form-label, .badge, .btn, .form-control, .form-select, .ts-control, .ts-control input, .ts-dropdown),
.room-table-filter-dropdown {
    font-size: var(--room-table-font-size);
}
.nav-tabs { border-bottom: 1px solid var(--room-line); gap: 6px; padding: 0 4px; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: #909090; padding: 13px 14px; font-size: 13px; transition: color .15s, border-color .15s; }
.nav-tabs .nav-link.active { color: var(--room-accent); border-color: var(--room-accent); background: transparent; font-weight: 600; }
.nav-tabs .nav-link:hover { color: var(--room-accent); background: transparent; }
.nav-tabs-alt .nav-tabs .nav-item .nav-link.active,
.nav-tabs-alt .nav-tabs .nav-item.active .nav-link,
.nav-tabs .nav-item:hover .nav-link { border-bottom-color: var(--room-accent) !important; }
.alert { border: 0; border-radius: 10px !important; font-size: 13px; }
.alert-danger { color: #9c4655; background: #fff0f2; }
.alert-success { color: #2e7663; background: #eaf7f0; }
.alert-primary, .alert-info { color: #555; background: #f0f0f0; }
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 80px #20202026; }
.modal-header, .modal-footer { border-color: var(--room-line); padding: 18px 22px; }
.modal-title { font-size: 19px; font-weight: 600 !important; }
.modal-backdrop { background-color: #202020; }

/* A single accessible dialog hosts the original Orchid form runtime. */
.room-dialog {
    width: min(840px, calc(100vw - 48px)); max-width: 1120px; max-height: calc(100dvh - 48px);
    margin: auto; padding: 0; border: 1px solid #ffffffb3; border-radius: 18px;
    background: #fff; color: var(--room-text); overflow: hidden;
    box-shadow: 0 32px 100px #2020202b;
}
.room-dialog[open] { display: flex; flex-direction: column; animation: room-dialog-in .2s ease-out; }
.room-dialog.room-dialog-wide { width: min(1080px, calc(100vw - 48px)); }
.room-dialog::backdrop { background: #20202052; backdrop-filter: blur(3px); }
.room-dialog-bar { display: flex; align-items: center; gap: 16px; padding: 22px 26px 19px; border-bottom: 1px solid var(--room-line); flex-shrink: 0; }
.room-dialog-heading { flex: 1; min-width: 0; }
.room-dialog-title { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
.room-dialog-close { display: grid; place-items: center; border: 0; border-radius: 9px; width: 34px; height: 34px; background: #f3f3f3; color: #888888; flex-shrink: 0; }
.room-dialog-close:hover { background: #e9e9e9; color: var(--room-text); }
.room-dialog-frame { display: block; width: 100%; border: 0; flex: 1 1 auto; min-height: 0; height: 430px; background: #fff; }
.room-dialog-loading { padding: 50px 26px; color: var(--room-muted); text-align: center; font-size: 13px; }
.room-dialog-loading::before { content: ""; display: block; width: 22px; height: 22px; border: 2px solid #e8e8e8; border-top-color: var(--room-accent); border-radius: 50%; margin: 0 auto 14px; animation: room-spin .7s linear infinite; }
.room-dialog-error { padding: 26px; color: var(--room-muted); font-size: 13px; }
.room-dialog-error .btn { margin-top: 10px; }
.room-dialog [hidden] { display: none !important; }
html.room-dialog-open { overflow: hidden; scrollbar-gutter: stable; }
html.room-embedded, html.room-embedded body { background: #fff; }
html.room-embedded body > .container-fluid { padding: 0; }
html.room-embedded body > .container-fluid > .row { margin: 0; }
html.room-embedded body > .container-fluid > .row > .col { padding: 0 !important; overflow: visible !important; }
html.room-embedded .min-vh-100 { min-height: 0 !important; padding: 0; }
html.room-embedded .container-md { padding: 0 !important; max-width: none; }
html.room-embedded .h-full { height: auto; }
.room-editor { display: flex; flex-direction: column; background: #fff; }
.room-editor-heading { padding: 20px 26px 0; }
.room-editor-heading h1 { font-size: 21px; font-weight: 650; }
.room-embedded .room-editor-heading h1 { display: none; }
.room-editor-heading p { color: #909090; font-size: 12px; margin: 0 0 18px; }
.room-editor-body { padding: 0 26px; }
.room-editor #post-form { margin: 0 !important; }
.room-editor .bg-white.rounded { border: 0; }
.room-editor .shadow-sm { box-shadow: none !important; }
.room-editor fieldset .p-4 { padding: 16px 0 !important; }
.room-editor fieldset > .col.p-0 { padding-left: 0 !important; }
.room-editor legend { float: none; width: auto; margin-left: 0 !important; padding-left: 0 !important; font-size: 14px; }
.room-editor fieldset.row > .col { flex: 0 0 100%; }
.room-editor fieldset.row > .col-12 { width: 100%; }
.room-editor fieldset.row > .col legend .small { font-size: 12px; letter-spacing: 0; font-weight: 400; }
.room-editor fieldset.row > .col-12 > .bg-light { display: none !important; }
.room-editor .nav-tabs-alt { position: sticky; top: 0; background: #fff; z-index: 5; margin-bottom: 16px; }
.room-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 26px; border-top: 1px solid var(--room-line); background: #fff; position: sticky; bottom: 0; z-index: 6; }
.room-editor-footer .command-bar { flex-wrap: wrap; justify-content: flex-end; width: auto !important; margin-left: auto; }
.room-editor-footer .command-bar a { display: none; }
.room-editor-footer .btn { min-height: 39px; padding: 9px 14px !important; width: auto !important; }
.room-editor .was-validated .form-control:invalid, .room-editor .is-invalid { border-color: #ce7d89; }
.room-editor .alert { margin-top: 12px; }
.room-editor .alert strong { display: block; }
.room-editor .alert ul { margin-bottom: 0; padding-left: 18px; }
@keyframes room-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.room-income-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.room-income-metric { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-width: 0; padding: 22px; border: 1px solid var(--room-line); border-radius: var(--room-radius); background: var(--room-surface); box-shadow: 0 2px 5px rgba(30, 30, 30, .025); }
.room-income-metric dt { color: var(--room-muted); font-size: 13px; font-weight: 500; line-height: 1.5; }
.room-income-metric dd { margin: 0; color: var(--room-text); font-size: clamp(28px, 2.4vw, 40px); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.room-income-metric-currency { white-space: nowrap; }
.room-income-metric-total { background: var(--room-accent-soft); border-color: #d6d6d6; }
.room-income-metric-total dt { color: var(--room-text); font-weight: 600; }
@media (max-width: 1199px) {
    .room-income-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .room-income-metric-total { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .room-income-summary { gap: 12px; }
    .room-income-metric { padding: 16px; }
}
.room-income-period { display: flex; justify-content: flex-end; flex-wrap: wrap; margin: -8px 0 24px; }
.room-income-trigger { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 10px 0 10px 12px; border: 0; background: transparent; color: #59616b; text-align: right; border-radius: 5px; }
.room-income-trigger:hover { background: #eee; }
.room-income-trigger-label { padding: 2px 6px; color: #343a40; background: #f0f1f2; font-size: 12px; font-weight: 600; }
.room-income-range { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.room-income-trigger svg { transition: transform 140ms ease; }
.room-income-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.room-income-dialog { --income-blue: #1a73e8; --income-range: #e8f0fe; position: fixed; inset: auto; margin: 0; padding: 0; width: 680px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border: 1px solid #dadce0; border-radius: 8px; background: #fff; color: #3c4043; box-shadow: 0 5px 18px #0003, 0 1px 4px #0002; overflow: hidden; }
.room-income-dialog[open] { display: flex; flex-direction: column; animation: room-income-enter 120ms ease-out; }
.room-income-dialog::backdrop { background: transparent; }
.room-income-picker-body { display: grid; grid-template-columns: 255px minmax(0, 1fr); min-height: 0; overflow: hidden; }
.room-income-presets { padding: 8px 0; border-right: 1px solid #dadce0; overflow-y: auto; }
.room-income-preset { display: block; width: 100%; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 0; background: transparent; color: #3c4043; text-align: left; font-size: 14px; line-height: 1.4; }
.room-income-preset:hover { background: #f5f7f8; }
.room-income-preset.is-active { background: var(--income-range); color: #1967d2; font-weight: 500; }
.room-income-preset.room-income-custom { margin-bottom: 8px; border-bottom: 1px solid #dadce0; padding-bottom: 18px; }
.room-income-calendar-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.room-income-date-fields { display: flex; align-items: center; gap: 10px; padding: 25px 22px 10px; }
.room-income-date-field { position: relative; display: block; flex: 1; min-width: 0; margin: 0; }
.room-income-date-field > span { position: absolute; top: -9px; left: 10px; padding: 0 5px; background: #fff; color: #687078; font-size: 12px; line-height: 18px; }
.room-income-date-field input { width: 100%; padding: 13px 12px; border: 1px solid #dadce0; border-radius: 5px; background: #fff; color: #3c4043; font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; outline: 0; }
.room-income-date-field:focus-within input { border-color: var(--income-blue); box-shadow: inset 0 0 0 1px var(--income-blue); }
.room-income-date-field:focus-within > span { color: var(--income-blue); }
.room-income-date-dash { color: #687078; }
.room-income-date-error { padding: 3px 22px; color: #c5221f; font-size: 12px; }
.room-income-calendar-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 22px; }
.room-income-calendar-nav > span { font-size: 13px; text-transform: capitalize; }
.room-income-calendar-nav button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #5f6368; font-size: 27px; line-height: 1; }
.room-income-calendar-nav button:hover { background: #f1f3f4; }
.room-income-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 5px 22px 9px; border-bottom: 1px solid #eee; color: #687078; text-align: center; font-size: 12px; }
.room-income-calendar-scroll { position: relative; height: 302px; min-height: 130px; overflow-y: auto; padding: 0 22px 12px; overscroll-behavior: contain; scrollbar-width: thin; }
.room-income-calendar-month h3 { margin: 23px 0 12px; color: #5f6368; font-size: 13px; font-weight: 500; text-transform: uppercase; }
.room-income-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.room-income-calendar-grid > button { display: grid; place-items: center; height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #303134; font-size: 13px; }
.room-income-calendar-grid > button > span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: 50%; }
.room-income-calendar-grid > button:hover > span { background: #f1f3f4; }
.room-income-calendar-grid > button.is-in-range { background: var(--income-range); }
.room-income-calendar-grid > button.is-start { border-radius: 50% 0 0 50%; }
.room-income-calendar-grid > button.is-end { border-radius: 0 50% 50% 0; }
.room-income-calendar-grid > button.is-start.is-end { border-radius: 50%; }
.room-income-calendar-grid > button[aria-current="date"] > span { border-color: var(--income-blue); color: var(--income-blue); }
.room-income-calendar-grid > button.is-start > span, .room-income-calendar-grid > button.is-end > span { background: var(--income-blue); color: #fff; }
.room-income-picker-footer { display: flex; align-items: center; flex: 0 0 auto; gap: 6px; padding: 12px 18px; border-top: 1px solid #dadce0; }
.room-income-picker-footer > span { margin-right: auto; color: #687078; font-size: 11px; }
.room-income-picker-footer > button { padding: 9px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--income-blue); font-size: 14px; font-weight: 600; }
.room-income-picker-footer > button:hover { background: var(--income-range); }
.room-income-dialog button:focus-visible, .room-income-trigger:focus-visible { outline: 2px solid #1a73e8; outline-offset: -2px; }
@keyframes room-income-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
    .room-income-period { margin-top: 0; }
    .room-income-trigger { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding-left: 0; }
    .room-income-trigger-label { grid-column: 1 / -1; justify-self: end; }
    .room-income-range { font-size: 14px; }
    .room-income-picker-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
    .room-income-presets { display: grid; grid-template-columns: 1fr 1fr; padding: 4px 0; border-right: 0; border-bottom: 1px solid #dadce0; flex-shrink: 0; overflow: visible; }
    .room-income-preset { min-height: 38px; padding: 8px 12px; font-size: 12px; }
    .room-income-preset.room-income-custom { grid-column: 1 / -1; min-height: 34px; padding: 8px 12px; margin-bottom: 0; border: 0; }
    .room-income-calendar-panel { overflow: visible; }
    .room-income-date-fields { padding: 21px 14px 6px; gap: 6px; }
    .room-income-date-field input { padding: 11px 8px; font-size: 14px; }
    .room-income-date-field > span { left: 5px; font-size: 11px; }
    .room-income-calendar-scroll { height: 235px; padding-inline: 14px; }
    .room-income-weekdays { padding-inline: 14px; }
    .room-income-picker-footer { flex-wrap: wrap; justify-content: flex-end; padding: 8px 12px; }
    .room-income-picker-footer > span { flex-basis: 100%; text-align: right; }
}
@keyframes room-spin { to { transform: rotate(360deg); } }
@media (min-width: 768px) {
    body:not(:has(.room-editor)) .aside { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
    body > .container-fluid > .row > .col > .d-flex > .container-md { padding: 28px 36px !important; }
    html.room-embedded body > .container-fluid > .row > .col > .d-flex > .container-md { padding: 0 !important; }
    .container-md > .mt-md-4 { margin-top: 0 !important; }
}
@media (max-width: 1100px) and (min-width: 768px) {
    .aside.bg-dark { width: 218px; min-width: 218px; max-width: 218px; flex-basis: 218px; padding-inline: 9px; }
    body > .container-fluid > .row > .col > .d-flex > .container-md { padding: 24px !important; }
}
@media (max-width: 991px) {
    .room-sidebar-profile { padding-bottom: 17px; }
}
@media (max-width: 767px) {
    .room-detail-section { --room-detail-gutter: 16px; margin-top: 28px; }
    .room-detail-section-header { gap: 10px; }
    .room-detail-section-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 9px; }
    .room-detail-section-header h2 { font-size: 16px; }
    .room-detail-section .nav-tabs { gap: 20px; }
    .aside.bg-dark { width: 100%; min-width: 0; max-width: 100%; flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--room-line); padding: 0 14px; }
    .aside > div { min-height: 0; }
    .aside header { padding: 17px 4px !important; margin: 0 !important; }
    .room-brand { gap: 4px; }
    .room-brand img { width: 108px; }
    .room-brand span { font-size: 9px; }
    body > .container-fluid > .row > .col { padding: 0 16px; }
    .layout.v-md-center { display: block; padding-bottom: 20px; }
    .layout > header.d-none { display: block !important; }
    .layout > nav { margin-top: 16px; }
    h1.h3 { font-size: 24px; }
    .table > tbody > tr > td, .table > thead > tr > th { padding: 13px 12px; }
    footer label { margin-left: auto; }
    .room-dialog, .room-dialog.room-dialog-wide { width: calc(100vw - 16px); max-height: calc(100dvh - 20px); border-radius: 14px; }
    .room-dialog-bar { padding: 17px 18px; }
    .room-dialog-title { font-size: 19px; }
    .room-editor-heading { padding: 16px 18px 0; }
    .room-editor-body { padding: 0 18px; }
    .room-editor-footer { padding: 14px 18px; flex-wrap: nowrap; }
    .room-editor-footer .command-bar { gap: 5px; }
    .room-editor-footer .btn { padding: 8px 10px; font-size: 12px; }
    .room-editor .col-form-label { padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
