
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:    #F6F6F2;
  --card:  #FFFFFF;
  --ink:   #0F0F0F;
  --mid:   #6B6B6B;
  --faint: #B8B8B8;
  --line:  #E5E5DF;
  --g:     #166534;  --g-bg: #DCFCE7;  --g-bd: #BBF7D0;
  --r:     #991B1B;  --r-bg: #FEE2E2;  --r-bd: #FECACA;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

html, body { background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; min-height: 100vh; }

/* ─── HEADER ─────────────────────────────────────────────────── */
.hdr {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand { font-weight: 700; font-size: 14px; letter-spacing: -.02em; }
.brand em { font-style: normal; color: var(--mid); font-weight: 400; }
.hdr-sp { flex: 1; }
.fac-name { font-size: 12px; font-weight: 600; color: var(--mid); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbtn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mid);
  transition: border-color .1s, color .1s;
}
.hbtn:hover { border-color: #999; color: var(--ink); }
.hbtn-dark { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.hbtn-dark:hover { background: #1e40af; color: #fff; border-color: #1e40af; }
.help-button { display: inline-flex; align-items: center; gap: 7px; background: #fbbf24; border-color: #f59e0b; color: #422006; font-weight: 700; flex-shrink: 0; }
.help-button:hover { background: #fcd34d; border-color: #b45309; color: #422006; }
.help-icon { border: 1.5px solid currentColor; border-radius: 50%; width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.help-button:focus-visible, .help-dialog button:focus-visible, .help-dialog select:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }

/* ─── TABS ──────────────────────────────────────────────────── */
.tabs {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  padding: 0 20px;
  gap: 0;
}
.tab {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .1s, border-color .1s;
  white-space: nowrap;
  user-select: none;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.page { display: none; padding: 24px 20px; max-width: 960px; }
.page.on { display: block; }

/* ─── CARDS / GRID ───────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat-v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-bottom: 4px; }
.stat-l { font-size: 11px; color: var(--mid); }
.stat-button { color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.stat-button:hover { border-color: var(--ink); }
.stat-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.stat-button > span { display: block; }
.stat-link { font-size: 11px; color: var(--mid); margin-top: 10px; }
.billing-preview { border-left: 3px solid #274c7c; padding: 10px 12px; background: var(--card); font-size: 13px; line-height: 1.6; margin: 12px 0; }
.billing-preview .rb { margin-top: 8px; }
.override-inline { padding: 16px; margin: 12px 0; }
.price-override { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.g { color: var(--g); }
.r { color: var(--r); }

/* ─── REVENUE BLOCK ──────────────────────────────────────────── */
.rev {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rev-cell {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}
.rev-cell:last-child { border-right: none; }
.rev-period { font-size: 11px; font-weight: 600; color: var(--mid); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.rev-amt { font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: var(--g); }
.rev-note { font-size: 11px; color: var(--faint); margin-top: 3px; }

/* ─── TWO-COL DASH ───────────────────────────────────────────── */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

/* ─── TABLE ──────────────────────────────────────────────────── */
.tbl-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  white-space: nowrap;
}
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAF8; }
.vr td { color: var(--faint); }
.fw { font-weight: 600; }
.mono { font-family: 'Inter', monospace; font-weight: 600; }
.sm { font-size: 12px; color: var(--mid); }
.nowrap { white-space: nowrap; }

/* ─── PILLS ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-g { background: var(--g-bg); color: var(--g); }
.pill-r { background: var(--r-bg); color: var(--r); }
.pill-b { background: #e7eff9; color: #274c7c; }
.future-start { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; color: #274c7c; font-size: 12px; font-weight: 600; }
.future-start > span:last-child { white-space: nowrap; }
.pill-e { background: var(--bg); color: var(--faint); border: 1px solid var(--line); }
.dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.dg { background: var(--g); }
.dr { background: var(--r); }
.de { background: var(--faint); }

/* ─── ROW ACTIONS ────────────────────────────────────────────── */
.ra { display: flex; gap: 4px; flex-wrap: nowrap; }
.rb {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  background: var(--card);
  color: var(--mid);
  font-family: inherit;
  white-space: nowrap;
  transition: all .1s;
}
.rb:hover { background: var(--bg); color: var(--ink); border-color: #999; }
.rb-g { border-color: var(--g-bd); background: var(--g-bg); color: var(--g); }
.rb-g:hover { background: #BBFFD4; }
.rb-r { border-color: var(--r-bd); color: var(--r); }
.rb-r:hover { background: var(--r-bg); }

/* ─── TOOLBAR ────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.srch {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
  outline: none;
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}
.srch:focus { border-color: #999; }
.fbtn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--card);
  color: var(--mid);
  font-family: inherit;
  transition: all .1s;
  white-space: nowrap;
}
.fbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fbtn:hover:not(.on) { background: var(--bg); }
.ml { margin-left: auto; }

/* ─── RATE CARD ──────────────────────────────────────────────── */
.rc-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.rc-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.rc-size { font-size: 14px; font-weight: 700; }
.rc-price { font-size: 15px; font-weight: 700; color: var(--g); font-family: monospace; }
.rc-avail { font-size: 11px; font-weight: 600; color: var(--g); margin-left: 8px; }
.rc-avail.full { color: var(--faint); }
.rc-row {
  display: flex;
  align-items: center;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  gap: 12px;
}
.rc-row:last-child { border-bottom: none; }
.rc-unit { font-weight: 600; width: 44px; flex-shrink: 0; }
.rc-name { flex: 1; color: var(--mid); }

/* ─── MODALS ─────────────────────────────────────────────────── */
.mbg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mbg.on { display: flex; }
.modal {
  background: var(--card);
  border-radius: 10px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.14);
  max-height: 90vh;
  overflow-y: auto;
}
.m-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.m-sub { font-size: 13px; color: var(--mid); margin-bottom: 14px; }
.frow { margin-bottom: 12px; }
.flbl {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.finp {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
  outline: none;
}
.finp:focus { border-color: #888; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-divider {
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 12px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.m-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.m-preview {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

/* ─── CONFIRM ────────────────────────────────────────────────── */
.cbox {
  background: var(--card);
  border-radius: 10px;
  padding: 22px 24px;
  max-width: 300px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.14);
}
.c-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.c-msg { font-size: 13px; color: var(--mid); margin-bottom: 16px; line-height: 1.6; }

/* ─── INVOICE ────────────────────────────────────────────────── */
.inv-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  margin: 12px 0;
  font-size: 12px;
  background: #FAFAF7;
}
.inv-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.inv-logo { font-weight: 700; font-size: 14px; }
.inv-tbl { width: 100%; border-collapse: collapse; margin: 8px 0; }
.inv-tbl th, .inv-tbl td { padding: 5px 7px; border-bottom: 1px solid var(--line); font-size: 11px; text-align: left; }
.inv-tbl th { font-weight: 600; color: var(--mid); }
.inv-total { text-align: right; font-weight: 700; font-size: 13px; margin-top: 6px; }

/* ─── SETTINGS CARD ──────────────────────────────────────────── */
.sc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.sc-title { font-size: 13px; font-weight: 700; margin-bottom: 14px; }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.7;
}
.empty strong { display: block; font-size: 15px; font-weight: 600; color: var(--mid); margin-bottom: 6px; }

/* ─── TOAST ──────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: all .18s;
  z-index: 999;
  pointer-events: none;
  max-width: 300px;
}
#toast.on { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .rev { grid-template-columns: 1fr; }
  .rev-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .rev-cell:last-child { border-bottom: none; }
  .dash-cols { grid-template-columns: 1fr; }
  .f2 { grid-template-columns: 1fr; }
}

/* Manager app additions to the original Phase 1 blueprint. */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #166534; outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
a.hbtn { text-decoration: none; display: inline-block; }
.tab { background: transparent; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
.tabs { overflow-x: auto; }
.page { max-width: 1200px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
h1 { font-size: 25px; letter-spacing: -.04em; line-height: 1.3; font-weight: 700; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mid); margin-bottom: 7px; font-weight: 600; }
.intro { margin-bottom: 16px; line-height: 1.7; }
.stat-v { font-size: clamp(20px, 2.8vw, 28px); overflow-wrap: anywhere; }
.tbl-wrap { overflow-x: auto; position: relative; }
.dash-cols > div { min-width: 0; }
td { line-height: 1.5; }
.modal { border: 1px solid var(--line); margin: auto; max-height: 90dvh; }
.modal::backdrop { background: rgba(0,0,0,.3); }
.modal-wide { max-width: 800px; }
.help-dialog { max-width: 720px; padding: 0; }
.help-dialog[open] { display: flex; flex-direction: column; }
.help-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); background: #fffbeb; flex-shrink: 0; }
.help-header h2 { font-size: 21px; margin-bottom: 5px; }
.help-header p { line-height: 1.5; }
.help-picker { padding: 16px 24px; flex-shrink: 0; }
.help-picker .flbl { margin-bottom: 12px; }
.help-picker .finp { font-size: 14px; min-height: 44px; }
.help-scroll { overflow-y: auto; min-height: 0; padding: 0 24px 20px; overscroll-behavior: contain; }
#help-article { line-height: 1.65; overflow-wrap: anywhere; }
#help-article h3 { font-size: 19px; line-height: 1.35; margin-bottom: 10px; }
.help-intro { color: #4b5563; margin-bottom: 16px; }
#help-article ol { padding-left: 25px; }
#help-article li { padding-left: 5px; margin-bottom: 12px; }
#help-article li::marker { font-weight: 700; color: #92400e; }
.help-note { margin-top: 20px; padding: 14px 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; }
.help-note strong { display: block; color: #1e40af; margin-bottom: 4px; }
.help-note p { color: #374151; }
#help-article h4 { font-size: 13px; margin: 20px 0 8px; color: #4b5563; }
.help-related { display: flex; flex-wrap: wrap; gap: 8px; }
.help-related .hbtn { color: #1e40af; border-color: #bfdbfe; white-space: normal; text-align: left; line-height: 1.4; }
.help-footer { padding: 14px 24px; border-top: 1px solid var(--line); flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.help-terms > div { border-bottom: 1px solid var(--line); padding: 10px 0; }
.help-terms dt { font-weight: 700; }
.help-terms dd { color: #4b5563; margin-top: 3px; }
.help-dialog [hidden] { display: none !important; }
.form-error { color: var(--r); line-height: 1.6; margin: 10px 0; }
.form-error:empty { display: none; }
.phone-help, .phone-error { margin-top: 6px; line-height: 1.5; }
.phone-error { font-size: 12px; color: var(--r); }
.facility-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.facility-bar label { font-size: 12px; font-weight: 600; }
.facility-bar .finp { width: auto; min-width: 160px; max-width: min(360px,100%); flex: 1; }
.facility-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.facility-row > span { overflow-wrap: anywhere; }
.finp[aria-invalid="true"] { border-color: var(--r); }
.danger { background: var(--r); border-color: var(--r); color: white; }
.danger:hover { background: #7f1d1d; color: white; }
.filters, .account-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.account-actions { margin-bottom: 16px; }
.wide { width: 100%; }
.login-wrap { padding: 56px 20px; max-width: 440px; margin: auto; }
.login-wrap > .brand { text-align: center; margin-bottom: 30px; }
.login-card { padding: 28px; }
.login-card h1 { font-size: 29px; margin-bottom: 8px; }
.login-note { margin-top: 20px; line-height: 1.7; }
#load-status { padding: 24px 20px; max-width: 1200px; margin: auto; color: var(--mid); }
.builder-credit { margin: 12px 20px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--mid); font-size: 12px; line-height: 1.6; text-align: center; }
.builder-credit a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.builder-credit a:hover { color: #274c7c; }
.support-contact { color: var(--mid); font-size: 12px; line-height: 1.5; }
.support-result { margin: 20px 0; font-size: 16px; overflow-wrap: anywhere; }
.support-result a { color: var(--ink); text-decoration: underline; }
.support-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.history-heading { margin-top: 30px; }
.voided { color: var(--mid); }
.voided .entry-amount { text-decoration: line-through; }
.credit { color: var(--g); }
.statement-meta { margin: 14px 0; line-height: 1.8; }
.statement-total { font-size: 22px; font-weight: 700; margin: 14px 0; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mb-8 { margin-bottom: 8px; }
.finp:read-only { background: var(--bg); }
textarea.finp { resize: vertical; }
@media (max-width: 640px) {
  .hdr { padding: 0 12px; gap: 8px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .fac-name { display: none; }
  .hdr .support-contact { order: 5; width: 100%; padding-bottom: 4px; }
  .tabs { padding: 0 8px; }
  .tab { padding: 13px 12px; }
  .page { padding: 22px 12px; }
  .page-heading { align-items: flex-start; }
  h1 { font-size: 22px; }
  .stat { padding: 14px 12px; }
  .srch { max-width: none; }
  .toolbar { align-items: stretch; }
  .toolbar > .srch { width: 100%; flex-basis: 100%; }
  .modal { padding: 20px 16px; max-width: calc(100vw - 24px); }
  .help-dialog { padding: 0; }
  .help-header, .help-picker, .help-footer { padding-left: 16px; padding-right: 16px; }
  .help-scroll { padding-left: 16px; padding-right: 16px; }
  .rc-hdr { gap: 12px; flex-wrap: wrap; }
  .ra { flex-wrap: wrap; }
}
@media print {
  body { background: white; }
  body > :not(#invoice-dialog) { display: none !important; }
  #invoice-dialog { position: static; display: block; max-width: none; max-height: none; width: 100%; padding: 0; border: 0; box-shadow: none; overflow: visible; }
  #invoice-dialog::backdrop { display: none; }
  #invoice-dialog > .m-title, #invoice-dialog > .m-footer { display: none; }
  .inv-wrap { border: 0; background: white; }
  .inv-wrap th, .inv-wrap td { color: black; }
}

/* Clear facility context and account navigation. */
.selected-facility { max-width: 1200px; margin: 0 auto; padding: 24px 28px 0; }
.selected-facility > span { display: block; color: var(--mid); font-size: 12px; margin-bottom: 5px; }
.selected-facility > strong { display: block; font-size: clamp(24px,4vw,34px); line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.fac-name { font-weight: 800; }
.dashboard-tools { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.category-button { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; text-align: left; color: var(--ink); cursor: pointer; min-width: 0; }
.category-button > span { flex: 1; font-size: 13px; font-weight: 600; }
.category-button > strong { font-size: 20px; }
.category-button > small { width: 100%; line-height: 1.5; color: var(--mid); }
.category-button:hover { border-color: #888; }
#category-directory { display: grid; gap: 8px; margin-top: 16px; }
.cash-breakdown { font-size: 12px; margin-top: 12px; }
.cash-breakdown > div { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; }
.cash-breakdown dd { margin: 0; font-weight: 600; white-space: nowrap; }
.account-balance { background: var(--bg); border: 1px solid var(--line); padding: 14px 16px; border-radius: 8px; margin-bottom: 16px; }
.account-balance > span { display: block; color: var(--mid); font-size: 12px; }
.account-balance > strong { font-size: 27px; display: block; }
.account-balance > p { color: var(--r); margin-top: 5px; }
.account-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-details h3, .account-section-title { font-size: 15px; margin: 12px 0; }
.account-details dl > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.account-details dt { font-size: 12px; color: var(--mid); }
.account-details dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.account-section { border-top: 1px solid var(--line); margin-top: 20px; }
.account-section h4 { font-size: 13px; margin: 16px 0 10px; }
#account-collection { font-weight: 700; margin-bottom: 8px; }
.account-event { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.account-event p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.price-help { line-height: 1.5; margin-top: 7px; }
#prorate-calculator h3 { font-size: 15px; margin-bottom: 10px; }
#prorate-calculator > .sm { line-height: 1.6; margin: 10px 0; }
@media (max-width: 640px) {
  .selected-facility { padding: 22px 12px 0; }
  .account-details { grid-template-columns: 1fr; }
}
.rc-row { flex-wrap: wrap; }
.rc-name { min-width: 110px; overflow-wrap: anywhere; }

.waiting-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 16px; margin-bottom: 24px; }
.waiting-box > div { flex: 1; min-width: 160px; }
.waiting-box h2 { font-size: 17px; margin-bottom: 5px; }
.waiting-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.check-option { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.rb:not(.rb-r):not(.rb-g) { color: #1e40af; border-color: #bfdbfe; background: #eff6ff; }
.rb:not(.rb-r):not(.rb-g):hover { background: #dbeafe; border-color: #60a5fa; }
@media screen and (max-width: 700px) {
  .tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0 8px; overflow: visible; }
  .tab { padding: 12px 6px; white-space: normal; }
  .page-heading { flex-wrap: wrap; gap: 12px; }
  .f2 { grid-template-columns: minmax(0,1fr); }
  .hbtn, .rb, .fbtn { min-height: 40px; }
  .rb { white-space: normal; line-height: 1.4; }
  .modal, .sc { min-width: 0; }
  .m-footer, .facility-row { flex-wrap: wrap; }
  .facility-bar .finp { min-width: 0; }
  .waiting-box { align-items: stretch; }
  .waiting-box > div { flex-basis: 100%; }
  .tbl-wrap { overflow: visible; border: 0; background: transparent; }
  .tbl-wrap table, .tbl-wrap tbody, .inv-tbl, .inv-tbl tbody { display: block; min-width: 0; width: 100%; }
  .tbl-wrap thead, .inv-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl-wrap tbody tr, .inv-tbl tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; padding: 10px 12px; }
  .tbl-wrap td, .inv-tbl td { display: block; width: auto; min-width: 0; padding: 8px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .tbl-wrap td::before, .inv-tbl td::before { content: attr(data-label); display: block; font-size: 11px; line-height: 1.4; color: var(--mid); font-weight: 600; margin-bottom: 5px; }
  .tbl-wrap td[data-label="Actions"], .tbl-wrap td[data-label="Note"], .tbl-wrap td[data-label="Notes"], .tbl-wrap .table-empty, .inv-tbl .table-empty { grid-column: 1/-1; }
  .table-empty::before { display: none !important; }
  .price-override, .ra { flex-wrap: wrap; }
  .cash-breakdown > div { flex-wrap: wrap; }
}

.demo-banner {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;margin-bottom:18px;background:#eff6ff;border:1px solid #93c5fd;border-radius:10px;color:#1e3a8a;}
.demo-banner[hidden] {display:none;}
.demo-banner p {margin:5px 0 0;max-width:740px;}
