/* Rental Portal styles. Mobile first; Bootstrap 5 underneath for the grid
   and a few components, restyled here. --brand is set per company in the
   layout; everything else derives from these tokens. */

:root {
  --brand: #1f4e79;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-softer: color-mix(in srgb, var(--brand) 5%, #fff);
  --brand-line: color-mix(in srgb, var(--brand) 28%, #fff);
  --brand-strong: color-mix(in srgb, var(--brand) 82%, #000);

  --ink: #101b2b;
  --ink-2: #3a4859;
  --muted: #687789;
  --line: #e4e8ee;
  --line-strong: #cfd6e0;
  --surface: #f5f7fa;
  --card: #fff;
  --danger: #b4332a;
  --danger-soft: #fdeceb;
  --success: #1e7a46;
  --success-soft: #e5f5ec;
  --warning: #8a5a00;
  --warning-soft: #fff5dc;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 27, 43, .05);
  --shadow: 0 1px 2px rgba(16, 27, 43, .04), 0 8px 24px -12px rgba(16, 27, 43, .12);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);

  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--ink);
  --bs-link-color-rgb: 0, 0, 0;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  color: var(--ink);
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--brand); text-underline-offset: .2em; }
a:hover { color: var(--brand-strong); }

h1, h2, h3 { letter-spacing: -.01em; }

.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.17em; }

:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- buttons ---------- */

.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .55rem 1rem;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-sm { padding: .35rem .7rem; font-size: .875rem; --bs-btn-border-radius: 8px; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn:focus-visible { box-shadow: var(--focus); }

.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-strong); --bs-btn-hover-border-color: var(--brand-strong);
  --bs-btn-active-bg: var(--brand-strong); --bs-btn-active-border-color: var(--brand-strong);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(16, 27, 43, .15);
}
.btn-outline-primary, .btn-light {
  --bs-btn-color: var(--ink-2); --bs-btn-bg: #fff; --bs-btn-border-color: var(--line-strong);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--surface); --bs-btn-hover-border-color: var(--line-strong);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--line); --bs-btn-active-border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-outline-secondary { --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: var(--surface); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--line-strong); background: #fff; }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: color-mix(in srgb, var(--danger) 40%, #fff); --bs-btn-hover-bg: var(--danger-soft); --bs-btn-hover-color: var(--danger); --bs-btn-hover-border-color: var(--danger); background: #fff; }
.btn-link { color: var(--brand); text-decoration: none; font-weight: 600; }
.btn-link:hover { color: var(--brand-strong); text-decoration: underline; }

/* ---------- form controls ---------- */

.form-label, legend.form-label {
  font-weight: 600;
  font-size: .925rem;
  color: var(--ink);
  margin-bottom: .4rem;
}
.form-label .optional, .optional { color: var(--muted); font-weight: 400; font-size: .85em; margin-left: .25rem; }

.form-control, .form-select {
  min-height: 2.9rem;
  padding: .6rem .85rem;
  font-size: 1rem;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #9aa6b4; }
.form-control:hover, .form-select:hover { border-color: #b8c2cf; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: var(--focus); }
textarea.form-control { min-height: 6rem; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); background-image: none; padding-right: .85rem; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }

.input-group-text { background: var(--surface); border-color: var(--line-strong); color: var(--muted); border-radius: var(--radius-sm); }
.input-group > .form-control { box-shadow: none; }

.form-text { color: var(--muted); font-size: .825rem; margin-top: .35rem; }
.invalid-feedback, .field-error {
  display: flex !important;
  align-items: flex-start;
  gap: .35rem;
  color: var(--danger);
  font-size: .85rem;
  font-weight: 500;
  margin-top: .4rem;
}
.field-validation-error { color: var(--danger); font-size: .85rem; }
.input-validation-error { border-color: var(--danger); }
.validation-summary-valid { display: none; }

.form-check-input { width: 1.15em; height: 1.15em; border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: var(--focus); border-color: var(--brand); }

/* ---------- alerts ---------- */

.alert { border-radius: var(--radius-sm); border: 1px solid transparent; display: flex; gap: .6rem; align-items: flex-start; }
.alert > .icon { margin-top: .15rem; }
.alert-danger { background: var(--danger-soft); color: #7d1f19; border-color: color-mix(in srgb, var(--danger) 25%, #fff); }
.alert-success { background: var(--success-soft); color: #14532f; border-color: color-mix(in srgb, var(--success) 25%, #fff); }
.alert-warning { background: var(--warning-soft); color: #6b4600; border-color: #f2dfa8; }
.alert-info { background: var(--brand-soft); color: var(--ink-2); border-color: var(--brand-line); }
.alert .alert-link { color: inherit; }
.alert > div { flex: 1; min-width: 0; }

/* ---------- page frame ---------- */

.demo-banner {
  background: #fff5dc;
  color: #6b4600;
  border-bottom: 1px solid #f2dfa8;
  font-size: .85rem;
  text-align: center;
  padding: .45rem 1rem;
}
.demo-banner a { color: inherit; font-weight: 600; margin-left: .3rem; }

.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.site-header .container { min-height: 3.75rem; }

.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark {
  flex: none;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.brand-logo { padding: 0; background: none; box-shadow: none; object-fit: contain; }
.brand-name { font-weight: 650; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.staff-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link-staff {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
  font-size: .925rem;
  padding: .45rem .7rem;
  border-radius: 8px;
}
.nav-link-staff:hover { background: var(--surface); color: var(--ink); }
.nav-link-staff.active { color: var(--brand); background: var(--brand-soft); }

.user-menu-button {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .25rem .6rem .25rem .3rem; font-weight: 550; font-size: .9rem; color: var(--ink-2);
}
.user-menu-button:hover { background: var(--surface); }
.avatar {
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}
.dropdown-menu {
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: .35rem; font-size: .925rem; min-width: 14rem;
}
.dropdown-item { border-radius: 7px; padding: .5rem .7rem; display: flex; align-items: center; gap: .55rem; color: var(--ink-2); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface); color: var(--ink); }
.dropdown-item.active, .dropdown-item:active { background: var(--brand-soft); color: var(--brand); }
.dropdown-header { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .5rem .7rem .25rem; }

.site-footer { color: var(--muted); border-top: 1px solid var(--line); background: #fff; font-size: .85rem; }
.site-footer a { color: var(--ink-2); }

/* ---------- cards and page headers ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 576px) { .panel { padding: 1.5rem; } }

.narrow { max-width: 30rem; margin: 0 auto; }
.readable { max-width: 50rem; margin: 0 auto; }
.wide { max-width: 72rem; margin: 0 auto; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.page-head > div:first-child { flex: 1; min-width: 14rem; }
.page-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .2rem; }
.page-sub { color: var(--muted); margin-bottom: 1.5rem; }
.page-head .page-sub { margin-bottom: 0; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 550; color: var(--muted); text-decoration: none; margin-bottom: .75rem; }
.back-link:hover { color: var(--ink); }

.section-title { font-size: 1.05rem; font-weight: 650; margin-bottom: 1rem; }
.form-section > h2 { font-size: 1.05rem; font-weight: 650; margin-bottom: 1rem; }
.form-section { margin-bottom: 1rem; }

.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: .875rem; }

/* ---------- public: company page ---------- */

.hero {
  background: linear-gradient(180deg, var(--brand-soft), var(--surface));
  border-bottom: 1px solid var(--line);
  padding: 2rem 0 1.75rem;
}
.hero h1 { font-size: 1.75rem; font-weight: 750; margin-bottom: .35rem; }
.hero p { color: var(--ink-2); margin-bottom: 0; }
@media (min-width: 768px) { .hero { padding: 3rem 0 2.5rem; } .hero h1 { font-size: 2.2rem; } }

.property-card { padding: 0; overflow: hidden; }
.property-card .property-body { padding: 1.25rem 1.25rem 1rem; }
.property-card h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .25rem; }
.property-card .address { color: var(--muted); font-size: .9rem; display: flex; gap: .35rem; align-items: center; }
.property-card .description { color: var(--ink-2); margin: .75rem 0 0; }
.property-forms { border-top: 1px solid var(--line); }
.property-form {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem; text-decoration: none; color: var(--ink);
  border-top: 1px solid var(--line);
}
.property-form:first-child { border-top: none; }
.property-form:hover { background: var(--brand-softer); color: var(--ink); }
.property-form .form-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 9px; flex: none;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
}
.property-form .form-name { font-weight: 650; }
.property-form .form-desc { color: var(--muted); font-size: .875rem; }
.property-form .chev { margin-left: auto; color: var(--muted); }
.property-form.primary .form-icon { background: var(--brand); color: #fff; }

/* pictures (SiteImages): a property's photo on its card, and a photo behind
   a page's heading, darkened so the white text on it stays readable */
.property-photo { display: block; aspect-ratio: 16 / 9; background: var(--brand-soft); overflow: hidden; }
.property-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.property-photo:hover img { transform: scale(1.025); }
@media (min-width: 768px) { .property-photo { aspect-ratio: 5 / 2; } }

.photo-hero {
  position: relative;
  isolation: isolate;
  background: #1c2733 var(--hero-image) center / cover no-repeat;
  border-bottom: none;
  color: #fff;
}
.photo-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 16, 24, .38), rgba(10, 16, 24, .7));
}
.hero.photo-hero h1 { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .3); }
.hero.photo-hero p, .hero.photo-hero .where, .hero.photo-hero .intro { color: rgba(255, 255, 255, .92); }
.hero.photo-hero .back-link { color: rgba(255, 255, 255, .85); }
.hero.photo-hero .back-link:hover { color: #fff; }
.home-hero { padding: 4.5rem 0 3.5rem; background-position: 30% 60%; }
.home-hero::before { background: linear-gradient(180deg, rgba(10, 16, 24, .22), rgba(10, 16, 24, .62)); }
@media (min-width: 768px) { .home-hero { padding: 7.5rem 0 5.5rem; } }
.form-hero.photo-hero { padding: 2.5rem 0 2rem; }
@media (min-width: 768px) { .form-hero.photo-hero { padding: 4.5rem 0 2.75rem; } }

/* ---------- demo page: an application's PDF, the staff screen and the form on a phone ---------- */

.showcase { position: relative; margin-top: 2rem; padding: 0 11% 5rem 8%; }
.paper {
  position: absolute;
  left: 0;
  bottom: .5rem;
  z-index: 2;
  width: 34%;
  margin: 0;
  background: #fff;
  border-radius: 3px;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 1px rgba(16, 27, 43, .08), 0 24px 40px -18px rgba(16, 27, 43, .45);
}
.paper img { display: block; width: 100%; height: auto; border-radius: 3px; }
.paper figcaption {
  position: absolute; left: 50%; top: -.8rem; transform: translateX(-50%) rotate(4deg);
  background: var(--brand); color: #fff; font-size: .7rem; font-weight: 600;
  padding: .1rem .6rem; border-radius: 999px; white-space: nowrap;
}
.browser {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -32px rgba(16, 27, 43, .4), var(--shadow);
}
.browser-bar { display: flex; align-items: center; gap: .3rem; padding: .4rem .6rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.browser-bar > span:not(.browser-url) { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-strong); flex: none; }
.browser-url {
  margin-left: .6rem; flex: 1; max-width: 16rem;
  font-size: .7rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .05rem .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser img { display: block; width: 100%; height: auto; }
.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  padding: .3rem;
  background: #121a24;
  border-radius: 1.4rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 28px 50px -22px rgba(16, 27, 43, .55);
  transition: transform .25s ease;
  z-index: 3;
}
.phone:hover { transform: translateY(-3px); }
.phone-screen { display: block; overflow: hidden; border-radius: 1.15rem; background: #fff; }
.phone-screen img { display: block; width: 100%; height: auto; }
.showcase-caption { text-align: center; font-size: .875rem; color: var(--muted); margin: .9rem 0 0; }
@media (min-width: 768px) {
  .showcase { padding: 0 12% 4.5rem 9%; }
  .paper { width: 27%; }
  .phone { width: 24%; padding: .45rem; border-radius: 2.1rem; }
  .phone-screen { border-radius: 1.7rem; }
}

/* ---------- public: a form ---------- */

.form-hero { padding: 1.5rem 0 1.25rem; }
.form-hero h1 { font-size: 1.7rem; font-weight: 750; margin-bottom: .3rem; }
.form-hero .where { color: var(--ink-2); display: flex; gap: .35rem; align-items: center; }
.form-hero .intro { color: var(--ink-2); margin: .9rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .75rem; font-size: .825rem; color: var(--ink-2); font-weight: 500;
}
.chip .icon { color: var(--brand); }

.form-steps { counter-reset: step; }
.form-step {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
@media (min-width: 576px) { .form-step { padding: 1.75rem; } }
.form-step[hidden] { display: none; }
.step-head { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1.35rem; }
.step-head::before {
  content: counter(step);
  flex: none;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: .875rem;
  margin-top: -.05rem;
}
.step-head h2 { font-size: 1.15rem; font-weight: 700; margin: .15rem 0 0; }
.step-head p { color: var(--muted); font-size: .9rem; margin: .3rem 0 0; }

.form-field[hidden] { display: none !important; }

/* yes/no and short choices as buttons */
.choice-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice-group.stack { flex-direction: column; }
.choice-option { position: relative; }
.choice-group:not(.stack) .choice-option { flex: 1 1 0; min-width: 0; max-width: 11rem; }
.choice-option input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.choice-option label {
  display: flex; align-items: center; gap: .55rem;
  min-height: 2.9rem;
  padding: .55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, background-color .15s, color .15s;
  user-select: none;
}
.choice-option label::before {
  content: "";
  width: 1.1rem; height: 1.1rem; flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  transition: all .15s;
}
.choice-option.multi label::before { border-radius: 5px; }
.choice-option label:hover { border-color: #b8c2cf; background: var(--surface); }
.choice-option input:checked + label { border-color: var(--brand); background: var(--brand-softer); color: var(--ink); }
.choice-option input:checked + label::before {
  border-color: var(--brand);
  background: var(--brand) radial-gradient(circle, #fff 0 32%, transparent 36%);
}
.choice-option.multi input:checked + label::before {
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/80% no-repeat;
}
.choice-option input:focus-visible + label { box-shadow: var(--focus); }
.choice-group.is-invalid .choice-option label { border-color: color-mix(in srgb, var(--danger) 55%, #fff); }
.choice-group.stack .choice-option label { width: 100%; }

/* agreement checkbox as a card */
.consent-card {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 550;
}
.consent-card:hover { background: var(--surface); }
.consent-card .form-check-input { margin: .1rem 0 0; width: 1.3rem; height: 1.3rem; flex: none; }
.consent-card:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); }
.consent-card.is-invalid { border-color: var(--danger); }

.terms-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-line);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  color: var(--ink-2);
  font-size: .9rem;
  line-height: 1.55;
  white-space: pre-line;
  max-height: 16rem;
  overflow-y: auto;
}

.info-callout {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm); padding: .8rem 1rem; color: var(--ink-2); font-size: .925rem;
}
.info-callout .icon { color: var(--brand); margin-top: .1rem; }

.signature-input {
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
  font-size: 1.45rem !important;
  min-height: 3.4rem !important;
  border-width: 0 0 2px 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-left: .25rem !important;
}
.signature-input:focus { border-color: var(--brand) !important; }
.signature-input::placeholder { font-family: var(--bs-body-font-family); font-size: 1rem; }

/* "Add another" rows */
.repeat-rows { counter-reset: item; display: grid; gap: .75rem; margin-bottom: .75rem; }
.repeat-row {
  counter-increment: item;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem 1rem;
  background: var(--surface);
}
.repeat-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.repeat-row-title { font-weight: 650; font-size: .9rem; }
.repeat-row-title::after { content: " " counter(item); }
.repeat-remove {
  border: none; background: none; color: var(--muted); font-size: .85rem; font-weight: 550;
  display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .4rem; border-radius: 6px;
}
.repeat-remove:hover { color: var(--danger); background: var(--danger-soft); }
.repeat-add {
  width: 100%;
  border: 1.5px dashed var(--line-strong) !important;
  background: #fff !important;
  color: var(--brand) !important;
  box-shadow: none !important;
  min-height: 2.9rem;
}
.repeat-add:hover { border-color: var(--brand) !important; background: var(--brand-softer) !important; }
.repeat-row .form-control { background: #fff; }

.submit-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.submit-panel .secure-note { display: flex; gap: .6rem; align-items: flex-start; color: var(--muted); font-size: .875rem; }
.submit-panel .secure-note .icon { color: var(--success); margin-top: .1rem; }
@media (min-width: 576px) {
  .submit-panel { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; }
  .submit-panel .btn { flex: none; }
}

.error-summary { position: sticky; top: 4.5rem; z-index: 5; }

.other-forms { margin-top: 1.75rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* confirmation */
.done-mark {
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: grid; place-items: center; margin: 0 auto 1rem;
}
.done-mark .icon { width: 1.8rem; height: 1.8rem; }

/* ---------- staff: sign-in pages ---------- */

.auth { max-width: 26rem; margin: 1.5rem auto; }
@media (min-width: 576px) { .auth { margin-top: 3rem; } }
.auth .panel { box-shadow: var(--shadow); }
.auth-mark { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.auth-mark .brand-mark { width: 3rem; height: 3rem; font-size: 1.1rem; border-radius: 13px; }
.auth h1 { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: .35rem; }
.auth .lead-text { text-align: center; color: var(--muted); margin-bottom: 1.5rem; font-size: .95rem; }

.qr { width: 190px; height: 190px; margin: 1rem auto; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qr svg { width: 100%; height: 100%; display: block; }
.secret-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; background: var(--surface); padding: .15rem .4rem; border-radius: 5px; }
.recovery-codes {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1rem;
  list-style: none; padding: 1rem; margin: 0; background: var(--surface); border-radius: var(--radius-sm);
}
.steps-list { padding-left: 1.2rem; }
.steps-list li { margin-bottom: .6rem; }
.steps-list li::marker { color: var(--brand); font-weight: 700; }

.company-choice {
  display: flex; align-items: center; gap: .85rem; width: 100%;
  padding: .9rem 1rem; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  box-shadow: var(--shadow-sm);
}
.company-choice:hover { border-color: var(--brand-line); background: var(--brand-softer); }
.choice-mark { background: var(--choice-color) !important; }

/* ---------- staff: lists ---------- */

.toolbar { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.toolbar .search-field { grid-column: 1 / -1; }
.toolbar .search-button { display: none; }
@media (min-width: 768px) {
  .toolbar { grid-template-columns: minmax(0, 2fr) 1fr 1fr auto; }
  .toolbar .search-field { grid-column: auto; }
  .toolbar .search-button { display: inline-flex; }
}
.selection-actions:not([hidden]) { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field .form-control { padding-left: 2.5rem; }

.list-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-head {
  display: none;
  font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .6rem 1rem .6rem 3rem;
}
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: flex-start; gap: .75rem; padding: 0 0 0 1rem; border-top: 1px solid var(--line); }
.list-rows > .list-row:first-child { border-top: none; }
.list-row:hover { background: var(--brand-softer); }
.list-row .row-select { margin-top: 1.15rem; flex: none; }
.row-link { flex: 1; min-width: 0; display: block; padding: .85rem 1rem .85rem 0; color: inherit; text-decoration: none; }
.row-link:hover { color: inherit; }
.row-name { font-weight: 650; display: flex; align-items: center; gap: .45rem; }
.unread-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--brand); flex: none; }
.row-cols { display: grid; gap: .15rem; }
@media (min-width: 768px) {
  .list-head { display: grid; }
  .app-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 1rem; }
  .user-cols { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 1rem; }
  .property-cols { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, .5fr) minmax(0, 1fr); align-items: center; gap: 1rem; }
}
.property-cols .row-name .status { font-size: .7rem; padding: .1rem .5rem; }
.list-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

.selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: #fff; min-height: 3.2rem; }

.status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 650;
  padding: .2rem .6rem; border-radius: 999px;
  background: #eef1f5; color: #3d4a5c; white-space: nowrap;
}
.status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .85; }
.status-New { background: #e6effb; color: #1d4f91; }
.status-InReview { background: #fff3d6; color: #7a5800; }
.status-Approved, .user-status-Active { background: var(--success-soft); color: var(--success); }
.status-Denied { background: var(--danger-soft); color: var(--danger); }
.status-Withdrawn, .user-status-Disabled, .user-status-NotSetUp { background: #eef1f5; color: #5f6b7a; }
.user-status-Invited { background: #e6effb; color: #1d4f91; }
.user-status-InviteExpired { background: #fff3d6; color: #7a5800; }

.badge-role { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.badge-role.staff { color: var(--muted); }
.is-disabled { opacity: .6; }

/* ---------- staff: one submission ---------- */

.detail-layout { display: grid; gap: 1rem; }
@media (min-width: 992px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
  .detail-side { position: sticky; top: 5rem; }
}
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem; margin-bottom: 1rem; }
.side-card h2 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .75rem; }
.side-actions { display: grid; gap: .5rem; }
.side-actions .btn { justify-content: flex-start; }
.facts { display: grid; gap: .55rem; margin: 0; font-size: .9rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; text-align: right; font-weight: 550; overflow-wrap: anywhere; }

.answers-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem 1.25rem .5rem; margin-bottom: 1rem; }
.answers-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.answers { margin: 0; }
.answer { display: grid; gap: .1rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.answer:first-child { border-top: none; }
@media (min-width: 576px) { .answer { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; } }
.answer dt { color: var(--muted); font-weight: 500; font-size: .9rem; }
.answer dd { margin: 0; overflow-wrap: anywhere; }
.answer .pre { white-space: pre-line; }
.answer.wide { grid-template-columns: 1fr; }
.repeat-display { background: var(--surface); border-radius: 8px; padding: .5rem .75rem; margin-bottom: .4rem; font-size: .925rem; white-space: normal; }
.repeat-display div { display: flex; gap: .4rem; }
.terms-display { color: var(--ink-2); font-size: .9rem; white-space: pre-line; background: var(--surface); border-radius: 8px; padding: .6rem .8rem; }
.ssn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

.history { list-style: none; padding: 0; margin: 0; font-size: .875rem; }
.history li { position: relative; padding: 0 0 .7rem 1.1rem; }
.history li::before { content: ""; position: absolute; left: 0; top: .45rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--line-strong); }
.history li::after { content: ""; position: absolute; left: .19rem; top: 1rem; bottom: 0; width: 1px; background: var(--line); }
.history li:last-child::after { display: none; }
.history .when { color: var(--muted); font-size: .8rem; display: block; }

/* ---------- staff: activity, links, users ---------- */

.activity { padding: .25rem 1.25rem 1rem; }
.activity-day { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.1rem 0 .4rem; }
.activity-row { display: grid; grid-template-columns: 4.75rem 1fr; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .925rem; }
.activity-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.link-row { padding: .9rem 0; border-top: 1px solid var(--line); }
.link-row:first-of-type { border-top: none; padding-top: 0; }
.link-label { font-weight: 650; }
.link-url {
  display: block; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  padding: .45rem .65rem; border-radius: 8px; word-break: break-all; font-size: .85rem; margin-top: .35rem;
}

.detail-grid { display: grid; gap: .75rem 1.5rem; grid-template-columns: 1fr; margin: 0; }
@media (min-width: 576px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-grid dt { font-weight: 500; color: var(--muted); font-size: .825rem; margin: 0; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- printing a submission: just the answers ---------- */

@media print {
  .demo-banner, .site-header, .site-footer, .no-print, .detail-side { display: none !important; }
  body { background: #fff; }
  main.container { padding: 0 !important; max-width: none; }
  .detail-layout { display: block; }
  .answers-card { border: none; box-shadow: none; padding: 0; break-inside: avoid; }
  .answers-card h2 { color: var(--brand); }
  a { color: inherit; text-decoration: none; }
}
.repeat-rows:empty { display: none; }
@media (max-width: 991.98px) {
  .detail-side { order: -1; }
  .detail-side .side-card:last-child, .detail-side .facts-card { display: none; }
  .side-actions { grid-template-columns: 1fr 1fr; }
  .side-actions .btn { justify-content: center; font-size: .875rem; padding: .55rem .5rem; white-space: nowrap; }
}
@media (min-width: 768px) { .toolbar.toolbar-3 { grid-template-columns: 1fr 1fr auto; } }
@media (max-width: 767.98px) {
  .app-cols { grid-template-columns: 1fr auto; align-items: center; column-gap: .75rem; }
  .app-cols > :first-child { grid-column: 1 / -1; }
}

/* ---------- demo guide ---------- */

.guide-button {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1030;
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: .7rem 1.05rem; font-weight: 600; font-size: .925rem;
  box-shadow: 0 6px 20px -6px rgba(16, 27, 43, .45);
}
.guide-button:hover { background: #22324a; }
.guide-nudge {
  position: fixed; right: 1rem; bottom: 4.4rem; z-index: 1030;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: .65rem 2.3rem .65rem .9rem; font-size: .9rem; cursor: pointer; max-width: 16rem;
}
.guide-nudge::after {
  content: ""; position: absolute; right: 1.6rem; bottom: -6px; width: 12px; height: 12px;
  background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
.guide-nudge-close { position: absolute; right: .35rem; top: .35rem; border: none; background: none; color: var(--muted); padding: .2rem; }
.guide-panel { --bs-offcanvas-width: 24rem; border-left: 1px solid var(--line) !important; }
.guide-panel .offcanvas-header { align-items: flex-start; border-bottom: 1px solid var(--line); }
.guide-panel .offcanvas-title { font-size: 1.15rem; font-weight: 700; margin-top: .15rem; }
.guide-eyebrow, .guide-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.guide-body { color: var(--ink-2); }
.guide-try { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); padding: .75rem .9rem; margin-bottom: 1.25rem; }
.guide-try ul { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .925rem; }
.guide-try li { margin-bottom: .25rem; }
.guide-bar { height: 6px; background: var(--line); border-radius: 999px; margin: .4rem 0 .75rem; overflow: hidden; }
.guide-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; width: 0; }
.guide-steps { list-style: none; padding: 0; margin: 0 0 .5rem; }
.guide-steps a { display: flex; gap: .7rem; padding: .55rem .4rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.guide-steps a:hover { background: var(--surface); color: var(--ink); }
.guide-check {
  flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; color: transparent; margin-top: .05rem;
}
.guide-check .icon { width: .85rem; height: .85rem; }
.guide-steps li.done .guide-check { background: var(--success); border-color: var(--success); color: #fff; }
.guide-steps li.done .guide-step-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.guide-step-title { display: block; font-weight: 600; font-size: .925rem; }
.guide-step-hint { display: block; color: var(--muted); font-size: .825rem; }
@media print { .guide-button, .guide-nudge { display: none !important; } }
.has-guide main { padding-bottom: 5.5rem !important; }

/* ---------- demo FAQ ---------- */

.faq-search .form-control { background: #fff; }
.faq-topic { margin-bottom: 1.5rem; }
.faq-topic h2 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .6rem; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:first-child { border-top: none; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--brand-softer); }
.faq-item summary .icon { color: var(--muted); transition: transform .2s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 0 1.25rem 1.1rem; margin: 0; color: var(--ink-2); line-height: 1.6; }
.faq-contact { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 576px) { .faq-contact { flex-direction: row; align-items: center; justify-content: space-between; } }
.faq-contact .btn { flex-shrink: 0; white-space: nowrap; align-self: flex-start; }
@media (min-width: 576px) { .faq-contact .btn { align-self: center; } }

/* ---------- signup (/start) ---------- */

.icon-xl { width: 3rem; height: 3rem; }
/* choice buttons (units, forms): the chosen one is filled */
.btn-check:checked + .btn-outline-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-check:focus-visible + .btn-outline-primary { outline: 2px solid var(--brand); outline-offset: 2px; }
.estimate { border-color: var(--brand-line); background: var(--brand-softer); }
.estimate-total { font-size: 2rem; font-weight: 700; color: var(--brand); }
