/* CHDV Manager — shared visual system. All assets are served locally. */
:root {
  color-scheme: light;
  --blue: #295de0;
  --blue-dark: #1e48b1;
  --ink: #1b2c3e;
  --muted: #748396;
  --line: #e5ebf1;
  --bg: #f5f7fa;
  --nav: #102a36;
  --mint: #72dbbd;
  --sidebar-width: 246px;
  --radius: 14px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: inherit; color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 3px solid #80a8ff; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.25; letter-spacing: -.9px; font-weight: 720; margin-bottom: 10px; }
h2 { font-size: 16px; line-height: 1.5; font-weight: 650; margin-bottom: 18px; letter-spacing: -.2px; }
p { line-height: 1.7; }
small, .small { font-size: 12px; }
small { display: block; color: var(--muted); font-weight: 400; margin-top: 6px; line-height: 1.6; }
.muted { color: var(--muted); }
.blue { color: var(--blue); }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; top: -90px; left: 16px; z-index: 100; padding: 12px 20px; background: white; border: 2px solid var(--blue); border-radius: 8px; }
.skip-link:focus { top: 14px; }

/* Workspace shell */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 31px 18px 19px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 20% 100%, #1b4348 0, transparent 55%), var(--nav);
  color: white;
}
.brand { display: flex; align-items: center; gap: 11px; color: white; font-size: 19px; font-weight: 720; letter-spacing: -.6px; padding: 0 7px 41px; white-space: nowrap; }
.brand:hover { color: white; }
.brand-light { font-weight: 400; color: #d6e3e6; }
.brand small { color: #829da6; font-size: 8px; letter-spacing: 1.65px; margin-top: 7px; }
.brand-icon { display: grid; place-items: center; width: 37px; height: 42px; flex-shrink: 0; border-radius: 10px; border: 1px solid #4e8d864d; background: #66dcb513; color: var(--mint); }
.brand-icon .icon { width: 25px; height: 25px; }
.nav-caption { font-size: 9px; letter-spacing: 1.8px; color: #829ba5; padding-left: 15px; margin-bottom: 15px; font-weight: 600; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar .sidebar-bottom { margin: 0 0 14px; }
.reading-history { min-width: 660px; }
.reading-history td, .reading-history th { padding-left: 16px; padding-right: 16px; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 13px; min-height: 48px; color: #a9bdc7; padding: 13px 15px; border-radius: 9px; font-size: 13px; font-weight: 550; transition: background .18s, color .18s; }
.sidebar nav a:hover { color: white; background: #ffffff08; }
.sidebar nav a.selected { background: #ffffff0c; color: #f5fbfa; }
.sidebar nav a.selected::before { content: ""; position: absolute; left: 0; height: 20px; width: 3px; background: var(--mint); border-radius: 0 3px 3px 0; }
.sidebar nav a.selected > .icon { color: var(--mint); }
.nav-chevron { width: 14px; height: 14px; margin-left: auto; opacity: 0; }
.selected .nav-chevron { opacity: .5; }
.sidebar-note { margin: auto 9px 28px; padding: 28px 17px 20px; position: relative; border: 1px solid #a0d5c51c; border-radius: 12px; background: linear-gradient(135deg, #ffffff06, #ffffff01); }
.sidebar-note > .icon { color: #76cdb6; margin-bottom: 16px; width: 25px; height: 25px; }
.sidebar-note p { font-size: 16px; line-height: 1.75; font-weight: 300; color: #acbfc6; margin-bottom: 17px; }
.sidebar-note strong { font-weight: 600; color: #dcece7; }
.sidebar-note > span { font-size: 8px; letter-spacing: 1.7px; color: #6f949d; }
.profile { border-top: 1px solid #ffffff10; padding: 20px 8px 0; }
.profile-identity { display: flex; align-items: center; gap: 11px; }
.profile strong { font-size: 13px; font-weight: 600; }
.profile small { font-size: 10px; color: #8ca5ad; margin-top: 4px; }
.avatar, .mini-avatar { display: inline-grid; place-items: center; border-radius: 50%; background: #c9e7de; color: #275d55; width: 37px; height: 37px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.profile-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; }
.profile-actions a { display: flex; gap: 7px; align-items: center; font-size: 10px; color: #92acb6; }
.profile-actions a:hover { color: white; }
.profile-actions .icon { width: 14px; height: 14px; }
.logout { border: 0; display: grid; place-items: center; background: transparent; color: #92acb6; padding: 6px; border-radius: 5px; cursor: pointer; }
.logout:hover { background: #ffffff0e; color: white; }
.main { margin-left: var(--sidebar-width); padding: 0 36px 24px; min-height: 100vh; min-width: 0; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid var(--line); margin-bottom: 36px; font-size: 11px; }
.workspace-bar > div { display: flex; align-items: center; gap: 15px; }
.workspace-bar .icon { width: 13px; height: 13px; color: #9daab9; }
.workspace-label { color: #91a0b0; }
.workspace-bar strong { font-weight: 500; color: #4f6178; }
.workspace-user { display: flex; align-items: center; gap: 8px; color: #748396; }
.mini-avatar { width: 29px; height: 29px; margin-left: 12px; font-size: 10px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.page-header p { margin-bottom: 0; font-size: 13px; }
.eyebrow { display: block; color: #7e8ea3; font-size: 9px !important; font-weight: 650; letter-spacing: 2px; margin-bottom: 12px !important; }

/* Controls and surfaces */
.button .icon { width: 16px; height: 16px; }
.full { width: 100%; }
.card { display: block; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 3px 7px #18334b02, 0 12px 35px #18334b03; margin-bottom: 24px; min-width: 0; }
.card .page-header { margin-bottom: 23px; padding-bottom: 21px; border-bottom: 1px solid #eef2f6; }
.card .page-header h2 { margin-bottom: 4px; }
.card .page-header p { max-width: 620px; }
.table-card { padding: 0; overflow: hidden; }
.stack { gap: 23px; }
label { display: grid; gap: 9px; font-size: 12px; font-weight: 600; color: #40536b; }
label small { margin-top: -1px; color: #8996a7; font-size: 11px; }
input[type=checkbox] { accent-color: var(--blue); width: 17px; height: 17px; flex-shrink: 0; }
input[type=hidden] { display: none; }
textarea { resize: vertical; line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; align-items: start; }
.form-card { max-width: 1000px; padding: 34px; }
.bill-card { max-width: none; width: 100%; }
.bill-layout { gap: 28px; }
.bill-fields { display: grid; gap: 24px; align-content: start; min-width: 0; }
.bill-summary { min-width: 0; }
.bill-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 22px; }
@media (min-width: 1200px) {
  .bill-layout:not(.has-preview) .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bill-layout.has-preview { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .bill-summary { border-left: 1px solid var(--line); padding-left: 28px; }
}
.form-card > form > .form-grid { padding-bottom: 3px; }
.narrow { max-width: 590px; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 25px 0 0; margin: 0; min-width: 0; display: grid; gap: 21px; }
fieldset > p { margin-bottom: 0; }
fieldset > h2 { padding-top: 24px; border-top: 1px solid var(--line); margin: 4px 0 -12px; font-size: 15px; }
fieldset > h2::before, legend::before { content: ""; display: inline-block; width: 4px; height: 13px; margin-right: 10px; border-radius: 3px; background: #6fbfac; vertical-align: -1px; }
fieldset:disabled { opacity: .67; }
legend { font-size: 14px; font-weight: 650; padding-right: 15px; }
.checkbox { display: flex; align-items: center; gap: 11px; line-height: 1.7; padding: 14px; background: #f6f9fd; border-radius: 8px; border: 1px solid #e9eef6; font-weight: 450; }
.required { color: #d76872; display: contents; }
.form-actions { padding-top: 22px; border-top: 1px solid var(--line); }
.form-card .form-actions { position: sticky; bottom: 0; margin: 0 -3px -3px; padding: 18px 3px 3px; z-index: 6; background: #ffffffed; backdrop-filter: blur(8px); }
.padded { padding: 23px 26px; }
.notice { border: 1px solid #e0e9f6; border-left: 3px solid #89a9df; background: #f5f8fd; color: #697e9b; padding: 14px 17px; border-radius: 7px; font-size: 11px; line-height: 1.85; margin-bottom: 0; }
.notice p { margin-bottom: 0; }
.back-link { display: inline-flex; font-size: 11px; color: #8190a4; margin-bottom: 15px; }
.back-link:hover { color: var(--blue); }

/* Tables: retain every field and keep room/action columns in view. */
.table-scroll { overflow: auto; max-height: 70vh; scrollbar-width: thin; scrollbar-color: #cbd5e2 #f5f7fa; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
th { position: sticky; top: 0; z-index: 3; text-align: left; white-space: nowrap; font-size: 10px; font-weight: 650; color: #77879b; background: #f8fafc; padding: 15px 20px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
th small { font-size: 9px; font-weight: 400; color: #9aa7b8; }
td { padding: 19px 20px; border-bottom: 1px solid #edf1f6; vertical-align: middle; line-height: 1.65; background: white; }
td small { max-width: 185px; font-size: 10px; line-height: 1.6; }
tbody tr:last-child td { border-bottom: 0; }
.room-table { min-width: 2080px; }
.compact-room-table { min-width: 1550px; }
.room-table th { white-space: nowrap; }
.room-table td { vertical-align: middle; }
.room-table .fee-cell { color: #365b68; }
.room-table .fee-cell small { margin-left: auto; color: #8b99a8; white-space: nowrap; }
.vehicle-list { display: grid; justify-items: start; gap: 5px; padding: 3px 0; }
.vehicle-plate { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 11px; letter-spacing: .3px; padding: 3px 7px; border: 1px solid #dfe8ee; background: white; border-radius: 5px; }
.billing-table { min-width: 1150px; }
.billing-table td { padding-top: 14px; padding-bottom: 14px; }
.billing-table td:nth-child(2), .billing-table td:nth-child(3), .billing-table td:nth-child(4), .billing-table td:nth-child(6), .billing-table td:nth-child(7) { white-space: nowrap; }
.bill-payment { display: flex; align-items: center; gap: 8px; width: max-content; }
.bill-payment > small { margin: 0; max-width: 180px; }
.bill-customer { white-space: nowrap; }
.payment-menu { margin: 0; }
.payment-panel { position: fixed; inset: auto; margin: 0; width: min(350px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 32px 20px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); box-shadow: 0 14px 50px #102a3630; }
.payment-panel::backdrop { background: transparent; }
.popover-close { position: absolute; top: 5px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; }
.popover-close:hover { background: #edf2f8; }
.payment-panel .stack { gap: 13px; }
.payment-panel p { margin-bottom: 12px; font-size: 11px; }
.payment-panel details { margin-top: 14px; }
.payment-panel summary, .receipt-history summary { cursor: pointer; font-size: 11px; color: #587697; }
.receipt-history { margin: 0; }
.receipt-history p { font-size: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bill-paid > td { background: #f6fbf8; }
.bill-cancelled > td { color: #8a97a8; }
.room-table td, .room-table th { padding-left: 18px; padding-right: 18px; }
.room-table td { min-width: 100px; }
.room-table td:first-child, .room-table th:first-child { min-width: 45px; width: 45px; text-align: center; font-size: 10px; color: #93a2b5; }
.room-table td:nth-child(2), .room-table th:nth-child(2) { position: sticky; left: 0; z-index: 2; min-width: 90px; box-shadow: 5px 0 10px -7px #23384f30; }
.room-table th:nth-child(2) { z-index: 5; }
.room-table td:last-child, .room-table th:last-child { position: sticky; right: 0; z-index: 2; min-width: 75px; box-shadow: -5px 0 10px -7px #23384f30; text-align: center; }
.room-table th:last-child { z-index: 5; }
.room-table td:last-child a { display: inline-flex; padding: 5px 12px; background: #f0f5ff; border: 1px solid #e2eaff; color: #5070ad; font-size: 10px; border-radius: 6px; }
.room-table td:last-child a:hover { background: #e3edff; color: var(--blue); }
.room-link { display: inline-block; color: #2b4b76; font-weight: 750; font-size: 13px; letter-spacing: -.15px; }
.number { font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-radius: 5px; padding: 4px 8px; font-size: 10px; line-height: 1.5; font-weight: 600; vertical-align: middle; letter-spacing: 0; border: 1px solid transparent; }
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.occupied { background: #edf8f3; color: #3f9171; border-color: #deefe7; }
.vacant { background: #fff7e7; color: #b48a3f; border-color: #f5ead2; }
.inactive { background: #f0f3f7; color: #8190a2; border-color: #e7ecf2; }
.toolbar, .inline-form { display: flex; align-items: flex-end; gap: 13px; flex-wrap: wrap; }
.toolbar { padding: 23px 25px; }
.toolbar label { font-size: 10px; color: #8693a6; }
.toolbar .search { flex: 1; min-width: 230px; max-width: 420px; margin-right: auto; }
.toolbar input, .toolbar select { background: #f8fafc; }
.period-select { min-width: 175px; }
.table-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: 18px 25px; border-top: 1px solid var(--line); background: #fbfcfe; color: #7e8da2; font-size: 10px; }
.table-summary strong { color: #435b77; font-weight: 650; }
.table-summary strong.blue { color: var(--blue); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 23px 25px; }
.section-heading h2 { margin: 0; font-size: 14px; }
.section-heading > .muted { font-size: 11px; }
.scroll-hint { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #96a3b5; padding: 0 25px 15px; }
.scroll-hint .icon { width: 13px; height: 13px; }
.meter-input { max-width: 175px; min-width: 118px !important; font-variant-numeric: tabular-nums; }
.meter-table { min-width: 1400px; }
.end-value { border-color: #c6d6f1 !important; background: #fcfdff !important; font-weight: 600; }
.consumption { color: #2d7196; font-weight: 650; }
.warning-text { color: #ac8640; font-size: 11px; max-width: 300px; }
.empty { text-align: center !important; padding: 65px 25px; color: var(--muted); }
.empty h2 { color: #344a65; margin-bottom: 9px; font-size: 18px; }
.empty p { font-size: 12px; margin-bottom: 24px; }

/* Existing room summary, presented without charts. */
.overview-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 25px; }
.overview-item { display: flex; align-items: center; min-width: 0; gap: 15px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.overview-item > div { min-width: 0; }
.overview-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #f0f4ff; color: #7a95ca; flex-shrink: 0; }
.overview-item:nth-child(2) .overview-icon { color: #69a68b; background: #eef8f3; }
.overview-item:nth-child(3) .overview-icon { color: #c3a76c; background: #fbf6ec; }
.overview-item:nth-child(4) .overview-icon { color: #789caa; background: #eff7fa; }
.overview-item small { font-size: 10px; margin: 0 0 6px; color: #8b98aa; }
.overview-item strong { display: block; font-size: 22px; font-weight: 650; line-height: 1; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.overview-item strong span { font-size: 10px; font-weight: 400; letter-spacing: 0; color: #8b98aa; margin-left: 3px; }

/* Details, feedback and account screens */
.detail-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; min-width: 0; }
.info-list { margin: 0; min-width: 0; }
.info-list > div { display: grid; grid-template-columns: 137px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid #edf1f6; font-size: 12px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: #8492a5; }
.info-list dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.info-list dd small { font-size: 10px; }
.info-list .financial-summary { border: 1px solid #dfebe8 !important; border-radius: 9px; margin-top: 14px; padding: 18px; background: #f3f9f7; }
.financial-summary dd { color: #357561; font-weight: 750; font-size: 17px; }
.financial-summary dd small { font-weight: 400; }
.pre-line { white-space: pre-line; }
.messages:empty { display: none; }
.account-actions summary { cursor: pointer; color: #6685b4; font-size: 11px; }
.reset-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.reset-form input { min-width: 170px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 35px; padding: 18px 2px 0; border-top: 1px solid #e9edf3; color: #9ba7b8; font-size: 10px; }
.footer-brand { color: #8090a5; font-size: 10px; font-weight: 500; }
.edition { display: inline-block; padding: 2px 5px; font-size: 7px; font-weight: 600; letter-spacing: .6px; background: #eaf0f6; color: #91a0b4; border-radius: 3px; margin-left: 4px; }

/* Login */
.guest { background: #fbfcfe; }
.guest .main { margin: 0; padding: 28px; }
.login-shell { min-height: calc(100vh - 120px); display: grid; grid-template-columns: 1.05fr 1fr; max-width: 1360px; margin: 0 auto; }
.login-showcase { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 42px 48px 32px; border-radius: 18px; background: radial-gradient(ellipse at 60% 65%, #244e56, transparent 65%), #102a36; color: white; }
.login-showcase .brand { padding: 0; }
.showcase-copy { margin-top: 60px; z-index: 1; }
.showcase-copy .eyebrow { color: #7db7aa; font-size: 8px !important; letter-spacing: 2.4px; }
.showcase-copy h2 { font-size: clamp(32px, 3vw, 44px); letter-spacing: -1.4px; line-height: 1.4; font-weight: 500; margin-bottom: 16px; }
.showcase-copy h2 em { color: #96dfc6; font-style: normal; }
.showcase-copy > p:last-child { color: #8faab4; font-size: 12px; line-height: 1.9; }
.residence-art { display: block; width: 100%; max-width: 500px; height: auto; margin: -20px auto -5px; flex: 1; object-fit: contain; }
.showcase-tags { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 13px; padding-top: 22px; border-top: 1px solid #ffffff13; }
.showcase-tags span { display: flex; align-items: center; gap: 9px; font-size: 10px; color: #9bb9bf; }
.showcase-tags .icon { width: 16px; height: 16px; color: #76b6a8; }
.login-content { display: flex; justify-content: center; align-items: center; flex-direction: column; padding: 50px; }
.login-card { width: 100%; max-width: 355px; padding: 0; border: none; box-shadow: none; background: transparent; margin-bottom: 23px; }
.login-card h1 { font-size: 32px; margin-bottom: 10px; }
.login-card .muted { font-size: 12px; margin-bottom: 33px; }
.login-symbol { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 13px; border: 1px solid #e0e8f4; background: #f1f5fc; color: #7193c9; margin-bottom: 30px; }
.login-symbol .icon { width: 22px; height: 22px; }
.login-card .eyebrow { font-size: 8px !important; color: #94a0b2; margin-bottom: 10px !important; }
.login-card .stack { gap: 21px; }
.login-card input { background: white; min-height: 48px; }
.login-card .button { min-height: 48px; margin-top: 6px; }
.login-card .button .icon { margin-left: auto; width: 16px; }
.login-card .button { padding-left: 20px; }
.login-security { display: flex; align-items: center; gap: 7px; max-width: 355px; width: 100%; font-size: 9px; color: #9aa8b9; margin-bottom: 0; }
.login-security .icon { width: 13px; height: 13px; flex-shrink: 0; }
.login-mobile-brand { display: none; }
.guest footer { max-width: 1360px; margin: 21px auto 0; padding: 0 2px; border: none; }
.guest .messages:has(.alert) { max-width: 1360px; margin: 0 auto; }

/* Responsive behavior */
@media (min-width: 1650px) {
  .main { padding-left: 48px; padding-right: 48px; }
  .workspace-bar { margin-bottom: 42px; }
  .page-header { margin-bottom: 32px; }
}
@media (max-height: 800px) and (min-width: 901px) {
  .sidebar-note { margin-bottom: 22px; padding: 20px 17px; }
  .sidebar-note > .icon { display: none; }
  .sidebar-note p { font-size: 14px; margin-bottom: 10px; }
  .showcase-copy { margin-top: 38px; }
  .residence-art { max-width: 390px; margin-top: -25px; }
  .login-showcase { padding-top: 30px; }
}
@media (max-width: 1250px) {
  :root { --sidebar-width: 210px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-icon { width: 32px; height: 36px; }
  .brand small { font-size: 6px; letter-spacing: 1.3px; }
  .main { padding-left: 25px; padding-right: 25px; }
  .overview-item { padding: 17px 13px; gap: 11px; }
  .overview-icon { width: 32px; height: 36px; }
  .overview-icon .icon { width: 17px; height: 17px; }
  .overview-item strong { font-size: 20px; }
  .page-header { align-items: flex-start; flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr; gap: 20px; }
  .login-content { padding: 35px; }
  .login-showcase { padding-left: 35px; padding-right: 35px; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 180px; }
  .brand { font-size: 13px; gap: 7px; }
  .brand-icon { width: 29px; height: 32px; }
  .brand-icon .icon { width: 21px; height: 21px; }
  .brand small { font-size: 5px; letter-spacing: 1px; }
  .nav-caption { font-size: 7px; letter-spacing: 1px; }
  .sidebar nav a { font-size: 12px; padding: 12px; gap: 10px; }
  .sidebar-note { padding: 18px 12px; margin-left: 0; margin-right: 0; }
  .sidebar-note > span { font-size: 6px; }
  .profile-actions a { font-size: 9px; }
  .main { padding-left: 20px; padding-right: 20px; }
  .overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .workspace-user > .icon, .workspace-user { font-size: 10px; }
  .workspace-bar { font-size: 10px; margin-bottom: 29px; }
  .workspace-bar > div { gap: 8px; }
  .form-card { padding: 26px; }
  .form-grid { gap: 20px; }
  .guest .main { padding: 20px; }
  .login-shell { grid-template-columns: .9fr 1fr; min-height: calc(100vh - 98px); }
  .login-showcase { padding: 28px 25px; }
  .login-showcase .brand { font-size: 16px; }
  .login-showcase .brand small { font-size: 6px; }
  .showcase-copy { margin-top: 65px; }
  .showcase-copy h2 { font-size: 30px; }
  .showcase-copy > p:last-child { font-size: 11px; }
  .showcase-tags { gap: 12px; }
  .showcase-tags span { font-size: 9px; }
  .login-content { padding: 28px; }
}
@media (max-width: 680px) {
  .sidebar { position: relative; width: 100%; padding: 18px 18px 10px; overflow: visible; }
  .brand { font-size: 17px; padding: 0 0 18px; }
  .brand small { font-size: 6px; letter-spacing: 1.3px; }
  .brand-icon { width: 31px; height: 35px; }
  .nav-caption, .sidebar-note { display: none; }
  .sidebar nav { display: flex; gap: 7px; }
  .sidebar nav a { flex: 1; justify-content: center; min-height: 42px; padding: 9px 6px; font-size: 11px; gap: 7px; }
  .sidebar nav a > .icon { width: 16px; height: 16px; }
  .nav-chevron { display: none; }
  .sidebar nav a.selected::before { left: 25%; right: 25%; width: auto; top: auto; bottom: -10px; height: 2px; }
  .profile { position: absolute; right: 18px; top: 17px; padding: 0; border: none; }
  .profile-identity { display: none; }
  .profile-actions { margin: 0; gap: 8px; }
  .profile-actions a { font-size: 8px; }
  .profile-actions .logout { padding: 8px; }
  .profile-actions .logout .icon { width: 18px; height: 18px; }
  .main { margin: 0; padding: 0 15px 20px; }
  .workspace-bar { min-height: 53px; margin-bottom: 25px; }
  .workspace-label { display: none; }
  .workspace-bar > div > .icon { display: none; }
  .workspace-user { font-size: 9px; }
  .mini-avatar { width: 24px; height: 24px; margin-left: 3px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 19px; margin-bottom: 23px; }
  h1 { font-size: 27px; }
  .page-header p { font-size: 12px; }
  .eyebrow { font-size: 8px !important; }
  .actions .button { flex: 1; padding: 11px 12px; font-size: 11px; }
  .overview-strip { gap: 10px; margin-bottom: 21px; }
  .overview-item { padding: 15px 12px; gap: 11px; }
  .overview-item strong { font-size: 21px; }
  .overview-item small { font-size: 9px; }
  .card { padding: 21px; margin-bottom: 20px; border-radius: 11px; }
  .table-card { padding: 0; }
  .table-scroll { max-height: 65vh; }
  .toolbar { padding: 18px; gap: 12px; }
  .toolbar .search { min-width: 100%; max-width: none; }
  .toolbar > label:not(.search) { flex: 1; }
  .scroll-hint { padding: 0 18px 13px; font-size: 9px; }
  .table-summary { padding: 16px 18px; font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions .button { min-width: 90px; }
  .section-heading { padding: 19px; }
  .section-heading h2 { font-size: 13px; }
  .info-list > div { grid-template-columns: 112px 1fr; gap: 12px; }
  .info-list .financial-summary { padding: 15px 12px; }
  .financial-summary dd { font-size: 15px; }
  footer { font-size: 9px; margin-top: 26px; }
  footer > span:last-child { display: none; }
  .login-shell { display: block; min-height: calc(100vh - 110px); }
  .login-showcase { display: none; }
  .login-content { padding: 30px 17px 40px; min-height: calc(100vh - 110px); }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 355px; font-size: 17px; font-weight: 650; color: #294c5a; margin-bottom: 48px; }
  .login-mobile-brand .icon { color: #5b9e8c; width: 25px; height: 25px; }
  .login-card { padding: 0; }
  .login-symbol { display: none; }
  .login-card h1 { font-size: 30px; }
  .login-card .eyebrow { font-size: 8px !important; }
  .guest footer { padding: 0 17px; }
}
/* Collapsible navigation and compact workspace chrome. */
.sidebar-collapsed .main { margin-left: 0; }
.workspace-bar { min-height: 80px; margin-bottom: 30px; gap: 16px; }
.workspace-bar > div { gap: 14px; min-width: 0; }
.sidebar-toggle { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid #dce5ed; border-radius: 11px; background: white; cursor: pointer; box-shadow: 0 2px 5px #102a3605; }
.sidebar-toggle:hover { background: #edf6f3; border-color: #a9cfc3; }
.workspace-bar .sidebar-toggle .icon { width: 19px; height: 19px; color: #365c62; }
.workspace-heading { display: grid; gap: 5px; }
.workspace-heading .workspace-label { font-size: 8px; letter-spacing: 1.5px; font-weight: 650; }
.workspace-heading strong { font-size: 13px; color: var(--ink); font-weight: 600; }
.workspace-account { display: grid; gap: 4px; text-align: right; }
.workspace-account strong { font-size: 12px; font-weight: 650; }
.workspace-account > span { font-size: 10px; color: var(--muted); }
.workspace-user .mini-avatar { width: 35px; height: 35px; margin-left: 5px; border: 3px solid white; box-shadow: 0 0 0 1px #dce9e4; }
.workspace-footer { padding: 20px 0 0; margin-top: 32px; color: #8b99a8; }
.workspace-footer .footer-brand { display: inline-flex; align-items: center; gap: 8px; color: #60768a; font-size: 11px; font-weight: 600; }
.workspace-footer .footer-brand > .icon { width: 17px; height: 17px; color: #679f92; }
@media (max-width: 680px) {
  .workspace-bar { min-height: 72px; margin-bottom: 23px; }
  .workspace-heading strong { font-size: 12px; }
  .workspace-account > span { display: none; }
  .workspace-user .mini-avatar { width: 30px; height: 30px; }
}
/* Short motion cues; opacity keeps sticky table cells and form actions stable. */
@keyframes surface-enter {
  from { opacity: .35; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .main > .page-header, .main > .card, .main > .detail-grid,
  .main > .overview-strip, .login-shell { animation: surface-enter .24s ease-out; }
  .payment-panel:popover-open { animation: surface-enter .16s ease-out; }
  .sidebar nav a { transition: background .18s, color .18s, padding-left .18s; }
  .sidebar nav a:hover { padding-left: 19px; }
  .sidebar-toggle { transition: background .16s, border-color .16s, transform .16s; }
  .sidebar-toggle:active { transform: scale(.94); }
  .overview-item { transition: box-shadow .18s, border-color .18s; }
  .overview-item:hover { border-color: #c5ddd5; box-shadow: 0 4px 15px #102a3609; }
  tbody td { transition: background-color .14s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Bootstrap supplies controls, button states, table rows and alerts. */
.btn { --bs-btn-font-size: 12px; --bs-btn-padding-y: .65rem; --bs-btn-padding-x: 1rem; --bs-btn-border-radius: 8px; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); }
.btn-outline-secondary { --bs-btn-color: #475b72; --bs-btn-border-color: #dfe6ee; --bs-btn-bg: white; }
.form-control, .form-select { font-size: 12px; min-height: 43px; border-color: #dde5ef; border-radius: 8px; }
.table { --bs-table-color: var(--ink); --bs-table-bg: white; --bs-table-border-color: var(--line); --bs-table-striped-bg: #fafcfe; --bs-table-hover-bg: #eff7f7; }
.table > thead > tr > th { background: #f8fafc; color: #77879b; }
.table > :not(caption) > * > * { padding: 14px 16px; }
.alert { font-size: 12px; }
.sidebar-collapsed .sidebar { display: none; }
