:root {
  /* DMBT theme: the bag's orange with matte gold. */
  --brand: #E8612C; --brand-deep: #C94F1D; --gold: #C9A961; --gold-light: #EBD9A3; --gold-soft: #F6EDD6; --gold-ink: #6E5320;
  --bg: #FAF7F2; --surface: #fff; --text: #2A211B; --muted: #7A6D61; --border: #ECE3D6;
  --primary: #C94F1D; --primary-ink: #fff; --danger: #B42318; --ok: #1E7A45; --warn: #A8781C;
  --radius: 10px; --shadow: 0 1px 2px rgba(60, 35, 15, .06), 0 1px 8px rgba(60, 35, 15, .05);
}
@media (prefers-color-scheme: dark) {
  :root { --brand: #D9581F; --brand-deep: #B8461A; --gold: #D4B676; --gold-light: #EBD9A3; --gold-soft: #3A2F1E; --gold-ink: #EBD9A3;
          --bg: #16120E; --surface: #211B16; --text: #F3ECE2; --muted: #B3A595; --border: #362C23;
          --primary: #F2834F; --primary-ink: #1E120A; --danger: #FF7A6B; --ok: #4CC785; --warn: #E6B04A; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2em 0 .6em; }
h2 { font-size: 1.1rem; margin: 0 0 .7em; display: flex; align-items: center; gap: .6em; justify-content: space-between; flex-wrap: wrap; }
.muted { color: var(--muted); }
.owed { color: var(--danger); font-weight: 600; }
.credit { color: var(--ok); font-weight: 600; }

.topbar { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); }
.topbar nav { display: flex; gap: .3rem; flex: 1; flex-wrap: wrap; }
.topbar nav a { padding: .35rem .7rem; border-radius: 6px; color: var(--muted); }
.topbar nav a.active, .topbar nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.topbar .user { display: flex; align-items: center; gap: .6rem; }

.container { max-width: 1150px; margin: 0 auto; padding: 1.5rem; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; overflow-x: auto; }
.card.narrow { max-width: 620px; }
.center { text-align: center; margin: 3rem auto; }
.login { margin: 8vh auto; }
.grid { display: grid; gap: 1.2rem; }
.grid > .card, .grid > section > .card:last-child { margin-bottom: 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.two.wide-left { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 1.2rem; }
@media (max-width: 760px) { .grid.two.wide-left { grid-template-columns: 1fr; } }
.grid { margin-bottom: 1.2rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--muted); box-shadow: var(--shadow); }
a.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat span { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.inactive td { opacity: .6; }

.list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.list li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.excerpt { color: var(--muted); font-size: .9rem; }
.prose { white-space: pre-wrap; }
dl.props { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0 0 1rem; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; }

label { display: block; margin-bottom: .9rem; font-weight: 500; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .5rem .65rem; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
label.check input { width: auto; margin: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; margin: 0 0 1rem; padding: .8rem 1rem .2rem; }
fieldset > select { margin: -.4rem 0 .9rem; }
legend { color: var(--muted); padding: 0 .3rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: 0 1rem; }
.row > * { min-width: 0; }
.inline { display: inline; }
.inline-form { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.inline-form input { width: auto; margin: 0; }
.search { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 480px; }
.search input { margin: 0; }

.btn { display: inline-block; padding: .45rem .95rem; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.btn:hover { text-decoration: none; border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.small { padding: .2rem .6rem; font-size: .85rem; }
.btn.full { width: 100%; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
form .btn.primary + a { margin-left: .8rem; }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--border); background: var(--surface); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.flash-success { border-color: var(--ok); color: var(--ok); }

.tag { font-size: .75rem; padding: .1rem .45rem; border-radius: 4px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge { font-size: .75rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.status-open { color: var(--primary); }
.status-in_progress { color: var(--warn); }
.status-resolved { color: var(--ok); }
.status-closed { color: var(--muted); }
.prio-low { color: var(--muted); }
.prio-normal { color: var(--primary); }
.prio-high { color: var(--warn); }
.prio-urgent { color: var(--danger); }
.pin { color: var(--warn); }

.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .3rem .8rem; border-radius: 999px; color: var(--muted); border: 1px solid var(--border); }
.tabs a.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.tile { color: var(--text); display: block; margin: 0; }
.tile:hover { text-decoration: none; border-color: var(--primary); }
.tile.inactive { opacity: .6; }
.notice.pinned { border-left: 4px solid var(--warn); }
.comment { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.grid > aside.card { align-self: start; }
.banner { background: var(--gold-soft); color: var(--gold-ink); border-bottom: 1px solid var(--gold); text-align: center; padding: .45rem 1rem; font-size: .9rem; }
.tabs a .count { font-size: .75rem; opacity: .7; margin-left: .25rem; }
.ins-valid { color: var(--ok); }
.ins-expiring { color: var(--warn); }
.ins-expired, .ins-missing { color: var(--danger); }
.prio-awaiting, .status-awaiting_owner { color: var(--warn); }
.building-insurance { border-left: 4px solid var(--primary); }
.card-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.card-head h2 { margin: 0; flex: 1; justify-content: flex-start; gap: .45rem; }
.card-head .count { font-weight: 400; font-size: .9rem; }
.person { display: flex; gap: .8rem; padding: .85rem 0; border-top: 1px solid var(--border); }
.card-head + .person { border-top: 0; }
.avatar { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 600; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.avatar.tenant { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.person-body { flex: 1; min-width: 0; display: grid; gap: .25rem; }
.person-head { display: flex; align-items: flex-start; gap: .5rem; }
.person-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.person-actions { flex: none; display: flex; gap: .7rem; white-space: nowrap; }
.person-line { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; font-size: .9rem; overflow-wrap: anywhere; }
.meta { display: inline-flex; align-items: flex-start; gap: .4rem; min-width: 0; }
.meta > .icon { margin-top: .2rem; }
.meta-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.icon { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--primary); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--muted); }
.link-btn.danger:hover { color: var(--danger); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.grid > aside { align-self: start; }
.grid > aside > .card:last-child { margin-bottom: 0; }
.unit-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.2rem; }
.unit-grid > .card { margin-bottom: 0; }
@media (max-width: 760px) { .unit-grid { grid-template-columns: 1fr; } }
.checks { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.checks .check { margin-bottom: .5rem; }
.badge.board { color: #7c4dcc; }
@media (prefers-color-scheme: dark) { .badge.board { color: #b79bf2; } }
.household-insurance { margin-top: .6rem; padding: .7rem .85rem; border-radius: 8px; display: grid; gap: .3rem;
  background: color-mix(in srgb, var(--text) 4%, transparent); border-left: 3px solid var(--border); }
.ins-box-valid { border-left-color: var(--ok); }
.ins-box-expiring { border-left-color: var(--warn); }
.ins-box-expired, .ins-box-missing { border-left-color: var(--danger); }
.board-table td { vertical-align: top; }
.holder { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; padding: .15rem 0; }
.holder .excerpt { display: block; }
.assign-form { display: flex; gap: .5rem; align-items: center; }
.assign-form select { margin: 0; min-width: 12rem; }
@media (max-width: 760px) { .assign-form { flex-wrap: wrap; } }
.period-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem; }
.period-bar .tabs { margin: 0; }
.period-nav { display: flex; align-items: center; gap: .6rem; flex: 1; justify-content: center; }
.period-nav strong { font-size: 1.1rem; min-width: 9rem; text-align: center; }
.period-pick { display: flex; gap: .4rem; align-items: center; }
.period-pick select { width: auto; margin: 0; }
.money-panels .card-head .credit, .money-panels .card-head .owed { font-weight: 700; }
.panel-in { border-top: 3px solid var(--ok); }
.panel-out { border-top: 3px solid var(--danger); }
.cat-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
tr.muted td { color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: .3rem; margin: -.4rem 0 .5rem; font-size: .92rem;
  color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--primary); text-decoration: none; }
.bell { position: relative; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--muted); }
.bell:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell.has-unread { color: var(--text); }
.bell-count { position: absolute; top: -2px; right: -4px; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.notes { padding: .3rem 0; }
.note { display: flex; gap: .8rem; align-items: baseline; padding: .75rem 1.25rem; color: var(--text); border-bottom: 1px solid var(--border); }
.note:last-child { border-bottom: 0; }
.note:hover { background: var(--bg); text-decoration: none; }
.note .dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: transparent; transform: translateY(-1px); }
.note.unread .dot { background: var(--primary); }
.note:not(.unread) strong { font-weight: 500; }
.note-body { flex: 1; display: grid; gap: .15rem; min-width: 0; }
.reimb-submitted, .reimb-approved { color: var(--warn); }
.reimb-declined { color: var(--muted); }
.reimb-settled { color: var(--ok); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; counter-reset: s; }
.steps li { position: relative; padding-left: 1.8rem; color: var(--muted); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 1.3rem; height: 1.3rem;
  border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; font-size: .75rem; }
.steps li.done { color: var(--text); }
.steps li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.current::before { border-color: var(--warn); color: var(--warn); }
.bell-count.inline { position: static; display: inline-grid; margin-left: .25rem; }
.topbar { gap: 1rem; }
.topbar nav { gap: .1rem; }
.topbar nav a { padding: .35rem .55rem; font-size: .93rem; white-space: nowrap; }
.topbar .user { gap: .5rem; white-space: nowrap; }
.topbar nav a { font-size: .9rem; padding: .35rem .5rem; }
.brand { font-size: .95rem; }
.topbar { flex-wrap: nowrap; padding: .6rem 1rem; gap: .8rem; }
.topbar .brand { white-space: nowrap; }
.topbar nav { flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar .user { flex: none; }
@media (max-width: 760px) { .topbar { flex-wrap: wrap; } .topbar nav { order: 3; flex-basis: 100%; } }

/* ---- Form fields: one height and look in every browser (Safari draws date fields and
   dropdowns its own way unless told not to). ---- */
input, select, textarea { box-sizing: border-box; min-width: 0; max-width: 100%; line-height: 1.35;
  -webkit-appearance: none; appearance: none; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select { height: 2.6rem; }
textarea { min-height: 4.5rem; resize: vertical; }
input[type=checkbox], input[type=radio] { -webkit-appearance: auto; appearance: auto; width: 1rem; height: 1rem; padding: 0;
  accent-color: var(--primary); }
input[type=file] { padding: .45rem .6rem; font-size: .9rem; }
input[type=file]::file-selector-button { font: inherit; margin-right: .7rem; padding: .3rem .7rem; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
select { padding-right: 2.2rem; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238a93a6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 1rem; }
input[type=date], input[type=month], input[type=time] { display: block; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; margin: 0; }
input::-webkit-datetime-edit { padding: 0; }
input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
@media (prefers-color-scheme: dark) { input::-webkit-calendar-picker-indicator { filter: invert(1); } }
.money-input { position: relative; margin-top: .3rem; }
.money-input input { margin-top: 0; padding-left: 1.7rem; font-variant-numeric: tabular-nums; }
.money-input::before { content: "$"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-hint { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; font-size: .85rem; font-weight: 400; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: .9rem; margin-top: .4rem; }
form .btn.primary + a { margin-left: 0; }
.money-input { display: block; }
.money-input input { margin-top: 0; }
@media (max-width: 760px) {
  .topbar { row-gap: .35rem; padding: .5rem .8rem; }
  .topbar .brand { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar .user { gap: .55rem; }
  .topbar .user .tag { display: none; }
  .topbar .user > a:not(.bell) { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; }
  .topbar nav { margin: 0 -.3rem; }
}
.pw-field { display: flex; gap: .5rem; align-items: center; margin-top: .3rem; }
.pw-field input { margin-top: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1.2rem; margin: .4rem 0 1rem; }
.choice > div { border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1rem; }
.choice h2 { font-size: 1rem; }
.secret { display: flex; align-items: center; gap: .8rem; margin: .8rem 0; padding: .8rem 1rem; border-radius: 8px;
  background: var(--bg); border: 1px dashed var(--border); }
.secret code { font-size: 1.25rem; letter-spacing: .04em; flex: 1; user-select: all; }
.fee-total { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: flex-end; margin-bottom: 1rem; }
.fee-total label { margin: 0; min-width: 14rem; }
.stat-inline { padding-bottom: .55rem; }
.stat-inline span { font-weight: 700; }
.fee-table .fixed-input { width: 8.5rem; margin: 0 0 0 auto; }
.fee-table .fixed-input input { height: 2.1rem; text-align: right; }
.apply-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.progress { width: 5rem; height: .4rem; border-radius: 999px; background: var(--border); display: inline-block; margin-right: .5rem; vertical-align: middle; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); }
.sc-paid { color: var(--ok); }
.sc-partial, .sc-unpaid { color: var(--warn); }
.sc-overdue { color: var(--danger); }
.sc-preview .custom-amount { width: 8.5rem; margin: 0 0 0 auto; }
.sc-preview .custom-amount input { height: 2.1rem; text-align: right; }

/* Top bar: name and account on the first line, the menu on its own line below. */
.topbar { flex-wrap: wrap; row-gap: .25rem; padding: .55rem 1.5rem 0; }
.topbar .brand { flex: 1; min-width: 0; }
.topbar nav { order: 3; flex: 1 0 100%; margin: 0 -.5rem; padding-bottom: .35rem; }
.topbar nav a { font-size: .93rem; padding: .4rem .65rem; }
@media (max-width: 640px) { .topbar { padding: .5rem .8rem 0; } .topbar nav { margin: 0 -.3rem; } }

/* Primary tabs inside a section (Projects | Maintenance). */
.section-tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.section-tabs a { padding: .55rem .1rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.section-tabs a:hover { color: var(--text); text-decoration: none; }
.section-tabs a.active { color: var(--text); border-bottom-color: var(--primary); }
.section-tabs .count { font-size: .75rem; font-weight: 500; background: var(--bg); border-radius: 999px; padding: .05rem .45rem; margin-left: .2rem; }
.project-facts { display: flex; gap: 2rem; margin-bottom: .8rem; }
.project-facts div { display: flex; flex-direction: column; color: var(--muted); font-size: .85rem; }
.project-facts span { font-size: 1.25rem; font-weight: 700; color: var(--text); }

/* Condo fee period set-up */
.fee-setup { border: 0; padding: 0; margin: 0 0 .8rem; display: grid; gap: .7rem; max-width: 34rem; }
.fee-setup .row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; padding: 3px; background: var(--bg); width: fit-content; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: .4rem .9rem; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); }
.renewal-note { font-size: .88rem; margin: .2rem 0 .6rem; }
@media (max-width: 520px) { .fee-setup .row { grid-template-columns: 1fr; } }


/* ---- DMBT theme: orange header, matte-gold accents ---- */
.topbar { background: linear-gradient(100deg, var(--brand) 0%, var(--brand-deep) 100%); border-bottom: 3px solid var(--gold); }
.topbar .brand { color: var(--gold-light); font-weight: 800; letter-spacing: .01em; font-size: 1.05rem; }
.topbar .brand:hover { text-decoration: none; color: #fff; }
.topbar nav a { color: #FFF4E8; font-weight: 600; }
.topbar nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.topbar nav a.active { background: var(--gold-light); color: #4A3510; }
.topbar .user, .topbar .user a, .topbar .user button.link { color: #FFF4E8; }
.topbar .user a:hover, .topbar .user button.link:hover { color: var(--gold-light); }
.topbar .user .tag { background: rgba(0, 0, 0, .14); border-color: var(--gold); color: var(--gold-light); }
.topbar .bell svg { stroke: #FFF4E8; }
.topbar .bell-count { box-shadow: 0 0 0 2px var(--brand); }
.btn.primary:hover { background: var(--brand-deep); filter: brightness(.95); }
h1 { color: var(--text); }
.card h2 { color: var(--text); }
.tabs a.active { background: var(--primary); }
.section-tabs a.active { border-bottom-color: var(--gold); }
.section-tabs .count, .tabs a .count { background: var(--gold-soft); color: var(--gold-ink); }
.stat { border-top: 3px solid var(--gold); }
.building-insurance { border-left-color: var(--gold); }
.tag { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); }
.back-link { color: var(--muted); }
.segmented input:checked + span { color: var(--primary); }
.progress span { background: var(--gold); }
.flash-info { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
.login { overflow: hidden; padding-top: 0 !important; }
.login h1 { margin: 0 -1.25rem 1rem; padding: 1.1rem 1.25rem; color: var(--gold-light);
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-deep) 100%); border-bottom: 3px solid var(--gold); }

/* ---- Floating side menu (semi-transparent DMBT orange pill) ---- */
body.with-rail { padding-left: 128px; }
.rail { position: fixed; z-index: 50; left: 16px; top: 16px; bottom: 16px; width: 96px; border-radius: 48px; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; overflow-y: auto; scrollbar-width: none;
  box-shadow: 0 10px 30px rgba(120, 50, 15, .25), inset 0 0 0 1px rgba(235, 217, 163, .4); }
/* The see-through orange sits on a layer behind the items, so the account pop-up isn't trapped inside the pill. */
.rail::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(232, 97, 44, .78), rgba(201, 79, 29, .78));
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.rail::-webkit-scrollbar { display: none; }
.rail-mark { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--gold-light); color: #4A3510; font-weight: 800;
  display: grid; place-items: center; font-size: 1.05rem; margin-bottom: 10px; box-shadow: inset 0 0 0 2px var(--gold); }
.rail-mark:hover { text-decoration: none; filter: brightness(1.04); }
.rail-item { position: relative; flex: none; width: 76px; padding: 7px 4px 6px; border-radius: 22px; color: #FFF6EA; display: flex;
  flex-direction: column; align-items: center; gap: 3px; font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.15;
  cursor: pointer; text-shadow: 0 1px 1px rgba(90, 30, 5, .25); }
.rail-item:hover { background: rgba(255, 255, 255, .16); text-decoration: none; color: #fff; }
.rail-item.active { background: var(--gold-light); color: #4A3510; text-shadow: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.rail svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail .short { display: none; }
.rail .rail-item.bell { display: flex; width: 76px; height: auto; border-radius: 22px; color: #FFF6EA; }
.rail .rail-item.bell.active { color: #4A3510; }
.rail .rail-item.bell:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.rail-spacer { flex: 1; min-height: 12px; border-bottom: 1px solid rgba(235, 217, 163, .45); width: 44px; margin-bottom: 8px; }
.rail .bell-count { position: absolute; top: 2px; right: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #B42318;
  color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(232, 97, 44, .9); text-shadow: none; }
.rail-menu { position: static; flex: none; }
.rail-menu summary { list-style: none; }
.rail-menu summary::-webkit-details-marker { display: none; }
.rail-menu summary svg { display: none; }
.rail-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .18); border: 2px solid var(--gold-light);
  color: var(--gold-light); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.rail-pop { position: fixed; z-index: 60; left: 122px; bottom: 16px; min-width: 220px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; padding: 8px; box-shadow: 0 12px 32px rgba(60, 30, 10, .22); }
.rail-pop-who { padding: 6px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rail-pop a, .rail-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px;
  color: var(--text); font: inherit; font-size: .92rem; background: none; border: 0; cursor: pointer; text-align: left; text-shadow: none; }
.rail-pop a:hover, .rail-pop button:hover { background: var(--gold-soft); text-decoration: none; }
.rail-pop a.active { color: var(--primary); font-weight: 600; }
.rail-pop svg { width: 18px; height: 18px; color: var(--muted); }
.rail-pop .pop-only { display: none; }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 14px 24px 0; max-width: 1140px; margin: 0 auto; }
.page-top-name { color: var(--gold-ink); font-weight: 700; font-size: .9rem; letter-spacing: .02em; }
.page-top-user { color: var(--muted); font-size: .9rem; }
.page-top-user strong { color: var(--text); font-weight: 600; }
.page-top a:hover { text-decoration: none; }
body.with-rail .banner { margin: 10px 24px 0; border-radius: 10px; border: 1px solid var(--gold); }
@media (prefers-color-scheme: dark) {
  .rail::before { background: linear-gradient(180deg, rgba(217, 88, 31, .72), rgba(184, 70, 26, .72)); }
}

/* Phone: the same pill floats along the bottom with the five most-used items and More. */
@media (max-width: 760px) {
  body.with-rail { padding-left: 0; padding-bottom: 96px; }
  .rail { top: auto; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: auto; flex-direction: row;
    border-radius: 34px; padding: 6px; gap: 0; overflow: visible; justify-content: space-between; }
  .rail-mark, .rail-spacer, .rail-item:not(.pin), .rail .label { display: none; }
  .rail .short { display: block; }
  .rail-item, .rail .rail-item.bell { width: auto; flex: 1 1 0; min-width: 0; padding: 7px 2px 6px; border-radius: 26px; font-size: .64rem; }
  .rail .bell-count { right: calc(50% - 22px); }
  .rail-menu { flex: 1 1 0; display: flex; }
  .rail-menu summary { flex: 1; }
  .rail-menu summary svg { display: block; }
  .rail-avatar { display: none; }
  .rail-pop { left: auto; right: 10px; bottom: 84px; }
  .rail-pop .pop-only { display: flex; }
  .page-top { padding: 12px 16px 0; }
  .page-top-user .tag { display: none; }
  body.with-rail .banner { margin: 8px 12px 0; }
}
@media (min-width: 761px) and (max-height: 820px) {
  .rail { padding: 12px 8px; }
  .rail-mark { width: 44px; height: 44px; margin-bottom: 6px; font-size: .95rem; }
  .rail-item { padding: 5px 4px 4px; gap: 2px; }
  .rail svg { width: 22px; height: 22px; }
  .rail-avatar { width: 36px; height: 36px; }
}

/* Icons only, bigger; names stay as tooltips and for screen readers. */
body.with-rail { padding-left: 108px; }
.rail { width: 76px; border-radius: 38px; padding: 14px 8px; gap: 6px; }
.rail .label, .rail .short { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rail-item, .rail .rail-item.bell { width: 56px; height: 56px; padding: 0; border-radius: 50%; justify-content: center; gap: 0; }
.rail svg { width: 30px; height: 30px; stroke-width: 1.7; }
.rail-mark { width: 52px; height: 52px; margin-bottom: 8px; }
.rail-spacer { width: 36px; }
.rail .bell-count { top: 4px; right: 4px; }
.rail-pop { left: 102px; }
@media (min-width: 761px) and (max-height: 820px) {
  .rail { padding: 10px 8px; gap: 3px; }
  .rail-item, .rail .rail-item.bell { width: 50px; height: 50px; }
  .rail svg { width: 27px; height: 27px; }
  .rail-mark { width: 46px; height: 46px; margin-bottom: 4px; }
}
@media (max-width: 760px) {
  body.with-rail { padding-left: 0; padding-bottom: 92px; }
  .rail { width: auto; border-radius: 36px; padding: 8px 10px; gap: 4px; }
  .rail-item, .rail .rail-item.bell { width: auto; height: 54px; flex: 1 1 0; border-radius: 27px; }
  .rail svg { width: 30px; height: 30px; }
  .rail .bell-count { top: 3px; right: calc(50% - 26px); }
  .rail-pop { left: auto; right: 10px; bottom: 84px; }
}

/* English / Français switch */
.page-top-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang-switch a { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a.active { background: var(--primary); color: var(--primary-ink); }
.public-top { display: flex; justify-content: flex-end; padding: 14px 20px 0; }
@media (max-width: 760px) { .page-top-right { gap: 8px; } }

/* Payment / cost detail */
.source-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.sheet-row { margin-top: .4rem; }
.sheet-row th { width: 38%; text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--muted); font-weight: 600; vertical-align: top; }
.sheet-row td { white-space: pre-wrap; }
.card h3 { font-size: .95rem; margin: 1rem 0 .3rem; }
td.date-link a { font-weight: 600; }

/* Icon-only row actions (Directory) */
.row-actions { white-space: nowrap; width: 1%; }
.row-actions > *, .row-actions form { margin-right: 4px; vertical-align: middle; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; background: var(--gold-soft); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-btn.blank { visibility: hidden; }
.row-actions-box { display: grid; grid-auto-flow: column; grid-auto-columns: 34px; gap: 6px; align-items: center; }
.row-actions-box > *, .row-actions-box form { margin: 0; }
.row-actions-box .tag { grid-column: span 2; }

/* Routine maintenance */
.badge.rt-overdue { color: var(--danger); }
.badge.rt-due_soon { color: var(--warn); }
.badge.rt-scheduled { color: var(--ok); }
.badge.rt-paused { color: var(--muted); }
.suggest-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Standard icon buttons: pencil = edit, trash = delete, plus = add */
.icon-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.icon-btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.head .icon-btn, .card-head .icon-btn { width: 40px; height: 40px; border-radius: 10px; }
.head .icon-btn svg, .card-head .icon-btn svg { width: 22px; height: 22px; }
.head .actions, .head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h2 .icon-btn { width: 30px; height: 30px; }
h2 .icon-btn svg { width: 16px; height: 16px; }
.icon-btn.small { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.small svg { width: 15px; height: 15px; }
.password-card h3 { display: flex; align-items: center; gap: .4rem; font-size: 1rem; margin: 0 0 .3rem; }
.password-card h3 svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--primary); }
.login-help { font-size: .88rem; margin: .9rem 0 0; }
td.row-del, th.row-del { width: 1%; padding-left: 0; text-align: right; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-right: 4px; }

/* Votes */
.badge.poll-draft { color: var(--muted); }
.badge.poll-open { color: var(--ok); }
.badge.poll-closed { color: var(--primary); }
.option-input { margin-bottom: .45rem; }
.unit-pick { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin-top: .4rem; padding-left: 1.6rem; }
.choice-list { margin: .3rem 0 1rem 1.2rem; }
.draft-card { border-left: 4px solid var(--gold); }
.result-row { margin-bottom: .9rem; }
.result-label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .25rem; }
.progress.big { height: 12px; width: 100%; }
.vote-choice { padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 9px; margin-bottom: .45rem; }
.vote-choice:has(input:checked) { border-color: var(--primary); background: var(--gold-soft); }
.card .prose + .props { margin-top: .9rem; }

/* The orange belongs to the menu itself, so it covers every icon even when the menu has to scroll. */
.rail::before { content: none; }
.rail { background: linear-gradient(180deg, rgba(232, 97, 44, .78), rgba(201, 79, 29, .78)); overscroll-behavior: contain; }
@media (prefers-color-scheme: dark) { .rail { background: linear-gradient(180deg, rgba(217, 88, 31, .72), rgba(184, 70, 26, .72)); } }
/* Short screens (iPad in landscape, small laptops): tighter icons so the whole menu fits. */
@media (min-width: 761px) and (max-height: 760px) {
  .rail { top: 10px; bottom: 10px; padding: 10px 8px; gap: 2px; }
  .rail-mark { width: 42px; height: 42px; margin-bottom: 4px; font-size: .9rem; }
  .rail-item, .rail .rail-item.bell { width: 46px; height: 46px; }
  .rail svg { width: 24px; height: 24px; }
  .rail-avatar { width: 34px; height: 34px; }
  .rail-spacer { min-height: 6px; margin-bottom: 4px; }
}
@media (min-width: 761px) and (max-height: 620px) {
  .rail-item, .rail .rail-item.bell { width: 40px; height: 40px; }
  .rail svg { width: 21px; height: 21px; }
  .rail-mark { width: 36px; height: 36px; font-size: .8rem; }
}

/* "Condo Management by DMBT" footer, like TactLab's */
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px;
  max-width: 1150px; margin: 0 auto; padding: 18px 24px 26px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer strong { color: var(--text); }
.site-footer a { color: var(--primary); }
.site-footer .dot { color: var(--border); }
@media (max-width: 760px) { .site-footer { padding-bottom: 110px; } .site-footer .dot { display: none; } }

/* Application logo */
.rail-mark { background: radial-gradient(circle at 35% 30%, #FFFDF8, #F6EDD6 75%) !important; box-shadow: inset 0 0 0 2px var(--gold-light), 0 2px 6px rgba(90, 30, 5, .2); overflow: hidden; }
.rail-mark img { width: 72%; height: auto; display: block; }
.page-top-name { display: inline-flex; align-items: center; gap: 8px; }
.page-top-logo { width: 26px; height: auto; }
.login h1 { display: flex; align-items: center; gap: 14px; }
.login-logo { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFFDF8, #F6EDD6 75%); box-shadow: inset 0 0 0 2px var(--gold-light); }
.login-logo img { width: 40px; height: auto; }

/* ---- Public home page (signed-out visitors at /) ---- */
.home-page { background:
  radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
  radial-gradient(800px 420px at -10% 30%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%), var(--bg); }
.small { font-size: .85rem; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2A211B; font-weight: 600; }
.btn.gold:hover { background: var(--gold-light); text-decoration: none; }
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem; }
.home-brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.home-brand:hover { text-decoration: none; }
.home-brand img { width: 44px; height: 44px; object-fit: contain; }
.home-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.home-brand strong { font-size: 1.05rem; }
.home-brand small { color: var(--gold-ink); font-weight: 600; letter-spacing: .04em; }
.home-nav { display: flex; align-items: center; gap: 1rem; }
.home-nav > a { color: var(--muted); font-weight: 500; }
.home { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem 2rem; }
.home h2 { margin: 0 0 .4rem; }
.home-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding: 3rem 0 4rem; }
.eyebrow { color: var(--gold-ink); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .8rem; }
.home-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 1rem; }
.home-hero h1 span { color: var(--brand); }
.home-hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 34rem; margin: 0 0 1.6rem; }
.home-card { max-width: 25rem; padding: 1.3rem 1.4rem; border-top: 4px solid var(--brand); }
.home-card h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.home-signin label { margin-bottom: .7rem; }
.home-signin p { margin: .7rem 0 0; }
.home-hero-art { position: relative; min-height: 420px; border-radius: 28px;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-deep) 55%, #8E5B2A 85%, var(--gold) 100%);
  box-shadow: 0 30px 60px -25px rgba(150, 60, 20, .55); overflow: hidden; }
.home-hero-art::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 260px at 80% 15%, rgba(255, 255, 255, .22), transparent 70%); }
.home-art-logo { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 190px; height: 190px;
  border-radius: 42px; background: #FBF5EA; display: grid; place-items: center; box-shadow: 0 18px 40px rgba(60, 25, 5, .35); z-index: 1; }
.home-art-logo img { width: 150px; height: 150px; object-fit: contain; }
.home-art-card { position: absolute; z-index: 2; width: 210px; background: var(--surface); color: var(--text); border-radius: 14px;
  padding: .75rem .9rem; box-shadow: 0 12px 28px rgba(40, 20, 5, .28); display: flex; flex-direction: column; gap: .3rem; }
.home-art-card strong { font-size: .92rem; }
.home-art-card.a { left: 6%; top: 8%; }
.home-art-card.b { right: 5%; top: 52%; }
.home-art-card.c { left: 9%; bottom: 7%; width: 180px; }
.home-art-card .tag { align-self: flex-start; background: var(--gold-soft); color: var(--gold-ink); border-color: var(--gold-light); }
.home-bar { height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.home-bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.home-bar.gold i { background: var(--gold); }
.home-features { padding: 2rem 0 3rem; text-align: center; }
.home-features > h2 { font-size: 1.8rem; }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.8rem; text-align: left; }
.home-grid article { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.3rem 1.3rem 1rem; box-shadow: var(--shadow); }
.home-grid h3 { margin: .8rem 0 .35rem; font-size: 1.05rem; }
.home-grid p { margin: 0; color: var(--muted); }
.home-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--brand-deep); }
.home-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-band { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2rem 2.2rem; margin: 1rem 0 3rem;
  border-radius: 20px; background: #2A211B; color: #F3ECE2; }
.home-band h2 { color: #fff; }
.home-band p { margin: 0; color: #CBBBA8; }
.home-contact { text-align: center; padding-bottom: 1rem; }
.home-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 820px; margin: 1.4rem auto 0; }
.home-contact-grid .card { display: flex; flex-direction: column; gap: .2rem; color: var(--text); margin: 0; }
.home-contact-grid .card:hover { border-color: var(--brand); text-decoration: none; }
.home-dialog { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--text); width: min(26rem, calc(100vw - 2rem));
  box-shadow: 0 30px 70px rgba(30, 15, 5, .35); }
.home-dialog::backdrop { background: rgba(30, 20, 12, .45); }
.home-dialog-box { position: relative; padding: 1.5rem 1.5rem 1.2rem; border-top: 4px solid var(--brand); }
.home-dialog-box h2 { margin: 0 0 .2rem; }
.home-dialog-close { position: absolute; right: .7rem; top: .5rem; border: 0; background: none; font-size: 1.6rem; color: var(--muted); cursor: pointer; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.5rem; }
  .home-hero-art { min-height: 340px; }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .home-brand small { display: none; }
  .home-nav { gap: .5rem; }
  .home-card { max-width: none; }
  .home-grid, .home-contact-grid { grid-template-columns: 1fr; }
  .home-band { flex-direction: column; align-items: flex-start; padding: 1.5rem; }
  .home-art-card { width: 170px; }
  .home-art-card.c { display: none; }
  .home-art-logo { width: 150px; height: 150px; border-radius: 34px; }
  .home-art-logo img { width: 118px; height: 118px; }
}
.home-features > h2, .home-contact > h2 { text-align: center; }
.home-nav .btn { white-space: nowrap; }
@media (max-width: 600px) { .home-nav .btn { padding: .4rem .7rem; } .home-brand strong { font-size: .95rem; } }
@media (max-width: 600px) { .home-head { padding: .8rem 1rem; gap: .5rem; } .home-brand { gap: .45rem; } .home-brand img { width: 34px; height: 34px; } .home-brand strong { font-size: .88rem; } }

/* Compact list filter: Active / Done / All with counts, plus a status drop-down */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: 0 0 1rem; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.segmented a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .9rem; border-radius: 7px; color: var(--muted); font-weight: 500; }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a.active { background: var(--primary); color: #fff; }
.segmented .count { font-size: .75rem; font-weight: 700; min-width: 1.4rem; padding: 0 .35rem; border-radius: 99px; text-align: center;
  background: var(--bg); color: var(--muted); }
.segmented a.active .count { background: rgba(255, 255, 255, .25); color: #fff; }
.status-pick select { width: auto; margin: 0; padding: .4rem 2rem .4rem .75rem; border-radius: 10px; background-color: var(--surface); }
.status-pick select.chosen { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.status-pick select { min-width: 11rem; max-width: 16rem; }
@media (max-width: 600px) { .filter-bar { gap: .6rem; } .status-pick, .status-pick select { width: 100%; max-width: none; } }
.home-brand strong.wordmark { color: #B08A45; font-size: 1.3rem; letter-spacing: .08em; font-weight: 800; }

/* Bank account card in Accounting */
.bank-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.bank-figures > div { display: flex; flex-direction: column; gap: .15rem; }
.bank-figures span:first-child { font-size: 1.15rem; font-weight: 700; }
.bank-figures span.bank-big { font-size: 1.6rem; }
@media (max-width: 600px) { .bank-figures { grid-template-columns: 1fr; } }
.head-tools { display: inline-flex; align-items: center; gap: .6rem; }
.sc-draft { color: var(--muted); }
.paid-before { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .3rem 1rem; margin-bottom: .8rem; }

/* Accounting → By unit: one button per unit */
.unit-picker { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.unit-picker a { min-width: 3.2rem; text-align: center; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; }
.unit-picker a:hover { border-color: var(--brand); text-decoration: none; }
.unit-picker a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Demo site: the sample accounts under the sign-in form */
.demo-login { margin-top: 1rem; padding: .8rem 1rem; border: 1px dashed var(--gold); border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); font-size: .9rem; }
.demo-login p { margin: .2rem 0 .4rem; }
.demo-login ul { margin: 0; padding-left: 1.1rem; }
.demo-login li { margin: .15rem 0; overflow-wrap: anywhere; }
.demo-login code { font-size: .85rem; }
