:root {
  color-scheme: light;
  --ink: #172321;
  --muted: #65716e;
  --subtle: #8b9692;
  --line: #dfe5e2;
  --line-strong: #cdd7d3;
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --owner: #187b72;
  --owner-soft: #e5f4f1;
  --property: #326bb2;
  --property-soft: #eaf1fb;
  --system: #7355a5;
  --system-soft: #f0ebf8;
  --success: #237a4b;
  --success-soft: #e8f5ed;
  --warning: #9a6700;
  --warning-soft: #fff4d9;
  --danger: #b53a3a;
  --danger-soft: #fdeceb;
  --neutral-soft: #eef1f0;
  --shadow-sm: 0 1px 2px rgba(22, 35, 33, 0.05), 0 5px 16px rgba(22, 35, 33, 0.04);
  --shadow-lg: 0 18px 48px rgba(22, 35, 33, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 1240px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "PingFang HK", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
}

.record-material-section {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  min-width: 0;
}
.record-material-section h3 { margin: 0 0 10px; }
.record-material-list { display: grid; gap: 12px; margin: 12px 0; }
.record-material { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; background: var(--surface); }
.record-material p, .pending-material small { color: var(--muted); font-size: 13px; }
.record-material strong, .record-material p, .pending-material strong { overflow-wrap: anywhere; }
.material-keep { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.material-keep input { width: 20px; height: 20px; }
.pending-material { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pending-material small { display: block; margin-top: 5px; }
.pending-material .form-field { margin: 0; }
.record-material-section input[type="file"] { width: 100%; max-width: 100%; min-width: 0; }
.material-picker { position: relative; display: grid; justify-items: start; gap: 8px; cursor: pointer; }
.material-picker small { color: var(--muted); }
.material-picker:focus-within .button { outline: 3px solid var(--owner); outline-offset: 3px; }
.record-material summary { min-height: 40px; padding: 10px 0; cursor: pointer; }
@media (max-width: 680px) {
  .record-material-section { padding: 14px; }
  .pending-material { grid-template-columns: minmax(0, 1fr); }
  .pending-material .button { justify-self: start; }
}
@media print {
  .record-material { break-inside: avoid; }
  .record-material .proof-preview { max-height: 130mm; object-fit: contain; }
}

* {
  box-sizing: border-box;
}

.sr-only {
  width: 1px !important;
  height: 1px !important;
  position: absolute !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

html {
  min-width: 280px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(24, 123, 114, 0.08), transparent 26rem),
    linear-gradient(180deg, #fbfcfb 0, var(--canvas) 28rem);
  line-height: 1.55;
}

body[data-role="property"] {
  --role: var(--property);
  --role-soft: var(--property-soft);
}

body[data-role="owner"] {
  --role: var(--owner);
  --role-soft: var(--owner-soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -80px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--role, var(--owner)) 55%, white);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  z-index: 60;
  top: 0;
  border-bottom: 1px solid rgba(205, 215, 211, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-main,
.primary-nav-inner,
.page-shell,
.app-footer-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.header-main {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  position: relative;
  border-radius: 11px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #fff;
}

.brand-mark::before {
  width: 16px;
  height: 5px;
  left: 9px;
  top: 9px;
  box-shadow: 0 7px 0 rgba(255, 255, 255, 0.72);
}

.brand-mark::after {
  width: 5px;
  height: 18px;
  right: 7px;
  bottom: 4px;
  background: var(--role, var(--owner));
}

.brand-copy {
  display: grid;
  line-height: 1.16;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.identity-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.identity-switch button {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.identity-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.icon-button,
.assistant-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 750;
}

.assistant-button {
  padding: 9px 14px;
}

.primary-nav {
  border-top: 1px solid rgba(223, 229, 226, 0.7);
}

[data-role-navigation="property"] {
  background: var(--property-soft);
}

.primary-nav-inner {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  color: var(--role, var(--owner));
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: currentColor;
}

.nav-action {
  margin-left: auto;
  color: var(--role, var(--owner));
}

.nav-action::before {
  content: "+";
  margin-right: 6px;
  font-size: 17px;
}

.page-shell {
  padding-block: 26px 56px;
}

.breadcrumbs {
  min-height: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--role, var(--owner));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  margin-bottom: 9px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 9px;
  font-size: clamp(20px, 2.4vw, 27px);
  letter-spacing: -0.022em;
}

h3 {
  margin-bottom: 7px;
  font-size: 16px;
}

.lede {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.page-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.success {
  color: var(--success);
  background: var(--success-soft);
}

.status.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.status.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.status.neutral {
  color: var(--muted);
  background: var(--neutral-soft);
}

.role-panel[hidden],
[data-form-panel][hidden],
[data-branch-panel][hidden],
.access-panel[hidden],
.assistant-drawer[hidden] {
  display: none !important;
}

[data-role-navigation][hidden],
[data-management-content][hidden] {
  display: none !important;
}

.notice-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--role, var(--owner)) 20%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--role-soft, var(--owner-soft)) 62%, white);
  color: color-mix(in srgb, var(--role, var(--owner)) 72%, var(--ink));
  font-size: 13px;
}

.notice-strip strong {
  color: var(--ink);
}

.notice-strip .strip-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--role, var(--owner));
  transform: rotate(45deg);
}

.hero-card {
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid color-mix(in srgb, var(--role, var(--owner)) 18%, var(--line));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.84)),
    var(--role-soft, var(--owner-soft));
  box-shadow: var(--shadow-lg);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -100px;
  top: -120px;
  border: 48px solid color-mix(in srgb, var(--role, var(--owner)) 12%, transparent);
  border-radius: 50%;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  margin-bottom: 12px;
  font-size: clamp(25px, 4vw, 36px);
}

.hero-card p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.hero-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
}

.button.primary {
  color: #fff;
  background: var(--role, var(--owner));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--role, var(--owner)) 24%, transparent);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.button.ghost {
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
}

.button.danger {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.identity-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.identity-card .avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--role, var(--owner));
  font-size: 15px;
  font-weight: 800;
}

.identity-card dl,
.record-meta {
  display: grid;
  grid-template-columns: minmax(80px, 0.7fr) minmax(0, 1.3fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 12px;
}

.identity-card dt,
.record-meta dt {
  color: var(--muted);
}

.identity-card dd,
.record-meta dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.section-block {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading p {
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.metric-value {
  display: block;
  margin-top: 7px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 820;
  letter-spacing: -0.04em;
}

.metric-note {
  display: block;
  margin-top: 3px;
  color: var(--subtle);
  font-size: 11px;
}

.service-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card,
.content-card,
.record-card,
.panel-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.service-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.service-card:hover {
  border-color: color-mix(in srgb, var(--role, var(--owner)) 38%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(22, 35, 33, 0.08);
}

.service-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 17px;
}

.service-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
  font-size: 12px;
  font-weight: 850;
}

.service-card h3 {
  margin-bottom: 6px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.service-footer {
  margin-top: auto;
  padding-top: 14px;
  color: var(--role, var(--owner));
  font-size: 12px;
  font-weight: 760;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  align-items: start;
  gap: 18px;
}

.split-layout.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-layout.catalog-layout {
  grid-template-columns: minmax(240px, 0.58fr) minmax(0, 1.72fr);
}

.content-card,
.panel-card,
.record-card {
  padding: 20px;
}

.content-card + .content-card,
.panel-card + .panel-card,
.record-card + .record-card {
  margin-top: 14px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-header h2,
.card-header h3,
.card-header p {
  margin-bottom: 0;
}

.card-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.6fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.record-row strong,
.record-row small {
  display: block;
}

.record-row small {
  margin-top: 3px;
  color: var(--muted);
}

.filter-row,
.segmented-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip,
.segment-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.filter-chip[aria-pressed="true"],
.segment-button[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--role, var(--owner)) 28%, var(--line));
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 760;
}

tr:last-child td {
  border-bottom: 0;
}

.table-action {
  color: var(--role, var(--owner));
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form-section legend {
  max-width: 100%;
  padding: 0 7px;
  font-size: 15px;
  font-weight: 800;
}

.form-section-help {
  margin: -1px 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label,
.field-label {
  font-size: 12px;
  font-weight: 750;
}

.required-mark {
  margin-left: 3px;
  color: var(--danger);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
}

.form-field input[readonly],
.form-field textarea[readonly] {
  border-style: dashed;
  color: var(--muted);
  background: var(--surface-soft);
}

.field-help {
  margin: 0;
  color: var(--subtle);
  font-size: 11px;
}

.check-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.check-card input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--role, var(--owner));
}

.check-card.full {
  grid-column: 1 / -1;
}

.check-card strong,
.check-card small {
  display: block;
}

.check-card small {
  margin-top: 3px;
  color: var(--muted);
}

.form-actions {
  position: sticky;
  z-index: 8;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  padding: 11px;
  border: 1px solid rgba(205, 215, 211, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(22, 35, 33, 0.11);
  backdrop-filter: blur(16px);
}

.inline-feedback {
  min-height: 21px;
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.inline-feedback.success {
  color: var(--success);
}

.inline-feedback.error {
  color: var(--danger);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -14px;
  width: 1px;
  background: var(--line-strong);
}

.timeline-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.timeline-item.complete .timeline-dot {
  border-color: var(--success);
  color: #fff;
  background: var(--success);
}

.timeline-copy strong,
.timeline-copy small {
  display: block;
}

.timeline-copy small {
  margin-top: 3px;
  color: var(--muted);
}

.callout {
  padding: 15px;
  border-left: 4px solid var(--role, var(--owner));
  border-radius: 4px 13px 13px 4px;
  color: var(--muted);
  background: var(--role-soft, var(--owner-soft));
  font-size: 12px;
}

.callout strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.callout.warning {
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.callout.danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(0, 1.35fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt,
.detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-list dd {
  font-size: 13px;
  font-weight: 680;
}

.notice-list {
  display: grid;
  gap: 12px;
}

.notice-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.notice-card .priority-bar {
  border-radius: 999px;
  background: var(--success);
}

.notice-card.important .priority-bar {
  background: var(--warning);
}

.notice-card.urgent .priority-bar {
  background: var(--danger);
}

.notice-card h3 {
  margin-bottom: 5px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.notice-card .notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: var(--subtle);
  font-size: 11px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.stepper-item {
  position: relative;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 720;
}

.stepper-item.active {
  border-color: color-mix(in srgb, var(--role, var(--owner)) 36%, var(--line));
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
}

.attachment-preview {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background:
    linear-gradient(45deg, rgba(23, 35, 33, 0.025) 25%, transparent 25%, transparent 75%, rgba(23, 35, 33, 0.025) 75%),
    linear-gradient(45deg, rgba(23, 35, 33, 0.025) 25%, transparent 25%, transparent 75%, rgba(23, 35, 33, 0.025) 75%),
    var(--surface-soft);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  text-align: center;
  font-size: 12px;
}

.payment-proof-field {
  margin-top: 2px;
}

.payment-proof-upload {
  min-height: 132px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1.5px dashed #a9c9c3;
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(135deg, #f9fdfc, #f3f9f7);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.payment-proof-upload:hover,
.payment-proof-upload:focus-within {
  border-color: var(--owner);
  background: #f2faf8;
  box-shadow: 0 0 0 4px var(--owner-soft);
}

.payment-proof-upload.has-file {
  border-style: solid;
  border-color: #82b9af;
  background: #edf8f5;
}

.payment-proof-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--owner);
  background: var(--owner-soft);
  font-size: 22px;
  font-weight: 820;
}

.payment-proof-upload.has-file .payment-proof-icon {
  color: #fff;
  background: var(--owner);
}

.payment-proof-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.payment-proof-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.payment-proof-copy small {
  color: var(--muted);
  font-size: 12px;
}

.payment-proof-choose {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--owner);
  background: #fff;
  font-size: 12px;
  font-weight: 780;
}

.fee-function-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.fee-function-nav a {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.fee-function-nav a:hover,
.fee-function-nav a:focus-visible,
.fee-function-nav a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--property) 45%, var(--line));
  background: var(--property-soft);
}

.fee-function-nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--property), var(--shadow-sm);
}

.fee-function-nav strong,
.fee-function-nav small {
  display: block;
}

.fee-function-nav strong {
  font-size: 14px;
}

.fee-function-nav small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.fee-function-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--property);
  background: #fff;
  font-size: 18px;
  font-weight: 820;
}

.billing-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: 28px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--owner) 24%, var(--line));
  border-radius: 22px;
  background: linear-gradient(135deg, #f6fcfa, #eef8f5);
  box-shadow: var(--shadow-sm);
}

.billing-summary h2,
.billing-summary p,
.bill-list-toolbar h2,
.bill-list-toolbar p,
.payment-panel-heading h2,
.payment-panel-heading p {
  margin-bottom: 0;
}

.billing-summary-copy > p:last-child,
.bill-list-toolbar p,
.payment-panel-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.billing-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.billing-summary-metrics div {
  padding: 13px 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.billing-summary-metrics span,
.billing-summary-metrics strong {
  display: block;
}

.billing-summary-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.billing-summary-metrics strong {
  margin-top: 3px;
  font-size: 22px;
}

.bill-list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.bill-list-toolbar,
.payment-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.bill-list-toolbar {
  border-bottom: 1px solid var(--line);
}

.bill-sort-note {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--owner);
  background: var(--owner-soft);
  font-size: 12px;
  font-weight: 760;
}

.bill-list-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.bill-list-table td {
  vertical-align: middle;
}

.bill-list-table td strong,
.bill-list-table td small {
  display: block;
}

.bill-list-table td small {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 12px;
}

.bill-row[data-payment-state="unpaid"] {
  background: color-mix(in srgb, var(--warning-soft) 48%, #fff);
}

.bill-row[data-payment-state="submitted"] {
  background: color-mix(in srgb, var(--owner-soft) 38%, #fff);
}

.bill-row[data-payment-state="verified"] {
  background: #fff;
}

.button.compact {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
}

.payment-submit-panel,
.payment-review-panel {
  scroll-margin-top: 112px;
}

.payment-submit-panel {
  padding: 0 20px 20px;
  border: 1px solid color-mix(in srgb, var(--owner) 26%, var(--line));
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fcfb, #fff 180px);
  box-shadow: var(--shadow-md);
}

.payment-panel-heading {
  padding-inline: 0;
}

.payment-submit-panel .form-section {
  box-shadow: none;
}

.payment-review-panel .content-card {
  border-color: color-mix(in srgb, var(--property) 32%, var(--line));
  box-shadow: var(--shadow-md);
}

.fee-metrics {
  margin-top: 0;
}

.fee-create-layout {
  align-items: start;
}

.fee-create-summary {
  position: sticky;
  top: 112px;
}

.access-panel {
  max-width: 700px;
  margin: 70px auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.access-panel p {
  color: var(--muted);
}

.empty-state {
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  background: var(--surface-soft);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state span {
  max-width: 460px;
  margin: 5px auto 0;
  color: var(--muted);
  font-size: 12px;
}

.assistant-trigger {
  position: fixed;
  z-index: 45;
  right: max(18px, calc((100vw - var(--max-width)) / 2));
  bottom: 20px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid color-mix(in srgb, var(--role, var(--owner)) 30%, var(--line));
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-size: 12px;
  font-weight: 780;
}

.assistant-trigger::before {
  content: "?";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--role, var(--owner));
}

.assistant-backdrop {
  position: fixed;
  z-index: 79;
  inset: 0;
  background: rgba(16, 26, 24, 0.26);
}

.assistant-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 48px rgba(22, 35, 33, 0.16);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 20px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.assistant-note {
  padding: 13px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--role-soft, var(--owner-soft));
  font-size: 12px;
}

.chat-bubble {
  width: fit-content;
  max-width: 88%;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px 16px 16px 5px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 13px;
}

.suggestion-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.suggestion-list button {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.form-management-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.form-management-sidebar {
  position: sticky;
  top: 18px;
  padding: 4px 22px 4px 0;
  border-right: 1px solid var(--line);
}

.form-management-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.form-management-nav a {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.form-management-nav a:hover {
  background: var(--surface-soft);
}

.form-management-nav a[aria-current="page"] {
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
  box-shadow: inset 3px 0 0 var(--role, var(--owner));
}

.form-management-nav strong,
.form-management-nav span {
  display: block;
}

.form-management-nav span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.form-management-nav b {
  color: inherit;
}

.form-management-content {
  min-width: 0;
}

.form-template-heading {
  align-items: center;
  margin-bottom: 18px;
}

.form-template-heading p {
  max-width: 680px;
}

.template-management-layout {
  grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1.7fr) !important;
}

.template-selector {
  text-align: left;
}

.template-selector strong,
.template-selector small {
  display: block;
}

.template-selector small {
  margin-top: 3px;
  color: var(--ink-muted);
}

.template-selector[aria-current="true"] {
  border-color: color-mix(in srgb, var(--role, var(--owner)) 34%, var(--line));
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
}

.template-form-actions [data-feedback] {
  flex: 1 1 260px;
}

.empty-state.compact {
  min-height: 150px;
  margin-top: 16px;
}

.form-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-page-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form-page-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.form-availability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.template-availability-switch {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.template-availability-switch .switch-track {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 24px;
  background: var(--muted);
}

.template-availability-switch .switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

.template-availability-switch[aria-checked="true"] .switch-track {
  background: var(--success);
}

.template-availability-switch[aria-checked="true"] .switch-thumb {
  transform: translateX(18px);
}

.template-availability-switch:focus-visible {
  outline: 3px solid var(--success);
  outline-offset: 3px;
}

.template-availability-switch:disabled {
  cursor: wait;
  opacity: 0.6;
}

.form-page-card h2 {
  margin: 3px 0 7px;
  font-size: 20px;
}

.form-page-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.form-page-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.form-page-meta div {
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.form-page-meta dt,
.form-page-meta dd {
  margin: 0;
}

.form-page-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.form-page-meta dd {
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.page-back-row {
  margin-bottom: 18px;
}

.page-builder {
  max-width: 960px;
}

.page-pair-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.page-pair-preview div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.page-pair-preview span {
  color: var(--muted);
  font-size: 13px;
}

.page-pair-preview a {
  color: var(--role, var(--owner));
  font-weight: 700;
}

.form-page-intro {
  margin-bottom: 20px;
}

.form-page-outline {
  display: flex;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.form-page-outline strong {
  flex: 0 0 auto;
  color: var(--ink);
}

body[data-surface="resident-form"] .page-heading {
  display: none;
}

body[data-surface="resident-form"] .notice-strip {
  margin-bottom: 24px;
}

.resident-form-page {
  --resident-deep: #0f3f3a;
  --resident-deeper: #092e2b;
  --resident-mint: #bce9df;
}

.resident-form-layout {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.55fr);
  align-items: start;
  gap: 24px;
  margin-inline: auto;
}

.resident-form-sidebar {
  position: sticky;
  top: 148px;
  overflow: hidden;
  padding: 27px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.16), transparent 16rem),
    linear-gradient(155deg, var(--resident-deeper) 0%, var(--resident-deep) 48%, #176b63 100%);
  box-shadow: 0 24px 60px rgba(15, 56, 53, 0.2);
}

.resident-form-sidebar::after {
  content: "";
  width: 160px;
  height: 160px;
  position: absolute;
  right: -92px;
  bottom: 68px;
  border: 30px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  pointer-events: none;
}

.resident-form-summary,
.resident-form-steps,
.resident-form-record,
.resident-form-print {
  position: relative;
  z-index: 1;
}

.resident-form-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.resident-form-kicker > span:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  color: var(--resident-mint);
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.resident-form-kicker .status {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
}

.resident-form-summary h2 {
  margin: 20px 0 10px;
  color: #fff;
  font-size: clamp(25px, 3vw, 31px);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.resident-form-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.7;
}

.resident-form-steps,
.resident-form-record {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.resident-form-steps > strong,
.resident-form-record > strong {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

[data-template-page-sections] {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.resident-form-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 650;
}

.resident-form-step b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: var(--resident-mint);
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.resident-form-record [data-record-snapshot] {
  margin-top: 9px;
}

.resident-form-record [data-record-snapshot] > p {
  margin: 4px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.resident-form-record [data-record-snapshot] > .field-help {
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
}

.resident-form-record details {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.resident-form-record details .detail-list > div {
  border-color: rgba(255, 255, 255, 0.12);
}

.resident-form-record details dt {
  color: rgba(255, 255, 255, 0.58);
}

.resident-form-record details dd {
  color: rgba(255, 255, 255, 0.92);
}

.resident-form-print {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.resident-form-print:hover {
  color: #fff;
}

.resident-form-card {
  counter-reset: resident-form-section;
  gap: 0;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(205, 215, 211, 0.82);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 58px rgba(22, 35, 33, 0.1);
}

.resident-form-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 2px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.resident-form-toolbar .eyebrow {
  margin-bottom: 7px;
}

.resident-form-toolbar h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.resident-form-toolbar p:not(.eyebrow) {
  max-width: 520px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.resident-form-privacy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  color: var(--owner);
  background: var(--owner-soft);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.resident-form-card [data-static-form-content],
.resident-form-card [data-generated-form-content]:not([hidden]) {
  display: grid;
  gap: 0;
}

.resident-form-card .stepper {
  display: none;
}

.resident-form-card .form-section {
  counter-increment: resident-form-section;
  padding: 29px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.resident-form-card .form-section:last-child {
  padding-bottom: 20px;
  border-bottom: 0;
}

.resident-form-card .form-section legend {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 9px;
  padding: 0;
  color: var(--resident-deeper);
  font-size: 19px;
  line-height: 1.3;
}

.resident-form-card .form-section legend::before {
  content: counter(resident-form-section, decimal-leading-zero);
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--owner);
  background: var(--owner-soft);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.resident-form-card .form-section-help {
  margin: 0 0 19px 43px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.resident-form-card .form-grid {
  gap: 19px 16px;
}

.resident-form-card .form-field {
  gap: 8px;
}

.resident-form-card .form-field label,
.resident-form-card .field-label {
  color: #263936;
  font-size: 13px;
  font-weight: 750;
}

.resident-form-card .form-field input,
.resident-form-card .form-field select,
.resident-form-card .form-field textarea {
  min-height: 50px;
  padding: 12px 14px;
  border-color: #cfdad6;
  border-radius: 12px;
  background: #fbfcfc;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.resident-form-card .form-field textarea {
  min-height: 118px;
}

.resident-form-card .form-field input:hover,
.resident-form-card .form-field select:hover,
.resident-form-card .form-field textarea:hover {
  border-color: #9db8b2;
  background: #fff;
}

.resident-form-card .form-field input:focus,
.resident-form-card .form-field select:focus,
.resident-form-card .form-field textarea:focus {
  outline: none;
  border-color: var(--owner);
  background: #fff;
  box-shadow: 0 0 0 4px var(--owner-soft);
}

.resident-form-card .form-field input[readonly],
.resident-form-card .form-field textarea[readonly] {
  border-style: solid;
  color: #53625f;
  background: #f2f6f5;
}

.resident-form-card .field-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.resident-form-card .check-card {
  padding: 15px 16px;
  border-color: #d7e1de;
  border-radius: 14px;
  background: #f7faf9;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.resident-form-card .check-card:hover,
.resident-form-card .check-card:focus-within {
  border-color: #9fc8c1;
  background: #f1f8f6;
  box-shadow: 0 0 0 3px rgba(229, 244, 241, 0.82);
}

.resident-form-card .form-actions {
  bottom: 16px;
  gap: 10px;
  margin-top: 10px;
  padding: 13px;
  border-radius: 16px;
  box-shadow: 0 13px 34px rgba(22, 35, 33, 0.13);
}

.resident-form-card .form-actions .button {
  min-height: 48px;
  padding-inline: 18px;
}

.drawer-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  max-width: min(520px, calc(100% - 28px));
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
}

.app-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.app-footer-inner {
  min-height: 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding-block: 20px;
  color: var(--muted);
  font-size: 11px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  text-decoration: none;
  font-weight: 700;
}

.print-layout {
  max-width: 920px;
  margin: 0 auto;
}

.print-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.print-sheet {
  min-height: 1120px;
  padding: clamp(26px, 7vw, 72px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.print-masthead {
  padding-bottom: 24px;
  border-bottom: 4px solid var(--ink);
  text-align: center;
}

.print-masthead .notice-word {
  color: var(--danger);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3em;
}

.print-masthead h1 {
  margin: 12px 0 4px;
  font-size: clamp(28px, 5vw, 42px);
}

.print-masthead p {
  margin: 0;
  color: var(--muted);
}

.print-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 26px 0;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.print-meta div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(90px, 0.65fr) minmax(0, 1.35fr);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.print-meta dt,
.print-meta dd {
  margin: 0;
  padding: 10px;
  overflow-wrap: anywhere;
}

.print-meta dt {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 750;
}

.print-meta dd {
  font-size: 12px;
  font-weight: 650;
}

.print-section {
  margin-top: 26px;
}

.print-section h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 18px;
}

.print-section p,
.print-section li {
  font-size: 13px;
  line-height: 1.8;
}

.print-footer {
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.numbered-list {
  counter-reset: item;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.numbered-list li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.numbered-list li::before {
  content: counter(item, decimal-leading-zero);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--role, var(--owner));
  background: var(--role-soft, var(--owner-soft));
  font-size: 10px;
  font-weight: 850;
}

@media (max-width: 980px) {
  .header-main,
  .primary-nav-inner,
  .page-shell,
  .app-footer-inner {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .demo-tag {
    display: none;
  }

  .hero-card,
  .split-layout,
  .split-layout.equal,
  .split-layout.catalog-layout {
    grid-template-columns: 1fr;
  }

  .form-management-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-management-sidebar {
    position: static;
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .form-management-nav {
    grid-template-columns: 1fr;
  }

  .template-management-layout {
    grid-template-columns: 1fr !important;
  }

  .template-management-layout [data-template-list] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-page-grid {
    grid-template-columns: 1fr;
  }

  .resident-form-layout {
    grid-template-columns: 1fr;
  }

  .resident-form-sidebar {
    position: relative;
    top: auto;
  }

  [data-template-page-sections] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }

  .hero-card {
    gap: 18px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assistant-trigger {
    right: 14px;
  }
}

@media (max-width: 680px) {
  .fee-function-nav,
  .billing-summary {
    grid-template-columns: 1fr;
  }

  .billing-summary {
    gap: 18px;
    padding: 20px;
  }

  .bill-list-toolbar,
  .payment-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .bill-list-toolbar .filter-row {
    width: 100%;
  }

  .bill-list-table {
    min-width: 680px;
  }

  .payment-submit-panel {
    padding: 0 15px 15px;
  }

  .fee-create-summary {
    position: static;
  }

  .header-main {
    min-height: 62px;
    gap: 10px;
  }

  .assistant-button {
    display: none;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .identity-switch {
    margin-left: auto;
  }

  .identity-switch button {
    min-height: 36px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .nav-link {
    min-height: 46px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .page-shell {
    padding-top: 18px;
  }

  .form-template-heading {
    align-items: stretch;
  }

  .form-template-heading .button {
    width: 100%;
  }

  .template-management-layout [data-template-list] {
    grid-template-columns: 1fr;
  }

  .page-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }

  .page-meta {
    justify-content: flex-start;
  }

  h1 {
    font-size: 29px;
  }

  .notice-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notice-strip .button {
    grid-column: 1 / -1;
  }

  .hero-card {
    padding: 22px;
    border-radius: 20px;
  }

  .hero-card h2 {
    font-size: 27px;
  }

  .metric-grid,
  .service-grid,
  .card-grid,
  .system-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 146px;
  }

  .section-heading,
  .card-header,
  .print-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-page-meta,
  .page-pair-preview {
    grid-template-columns: 1fr;
  }

  .form-page-card-main,
  .form-page-outline {
    display: grid;
  }

  body[data-surface="resident-form"] .notice-strip {
    margin-bottom: 18px;
  }

  .resident-form-layout {
    gap: 16px;
  }

  .resident-form-sidebar {
    padding: 21px;
    border-radius: 20px;
  }

  [data-template-page-sections] {
    grid-template-columns: 1fr;
  }

  .resident-form-card {
    padding: 19px;
    border-radius: 20px;
  }

  .resident-form-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding-bottom: 21px;
  }

  .resident-form-toolbar h2 {
    font-size: 25px;
  }

  .resident-form-privacy {
    white-space: normal;
  }

  .resident-form-card .form-section {
    padding: 24px 0;
  }

  .resident-form-card .form-section-help {
    margin-left: 0;
  }

  .record-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .notice-card {
    grid-template-columns: 5px minmax(0, 1fr);
  }

  .notice-card > .button,
  .notice-card > .button-row {
    grid-column: 2;
  }

  .stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-section,
  .content-card,
  .panel-card,
  .record-card {
    padding: 16px;
  }

  .form-actions {
    bottom: 8px;
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }

  .payment-proof-upload {
    min-height: 118px;
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 15px;
  }

  .payment-proof-choose {
    grid-column: 1 / -1;
    width: 100%;
  }

  .inline-feedback {
    width: 100%;
    margin: 0;
  }

  .app-footer-inner {
    grid-template-columns: 1fr;
  }

  .assistant-trigger {
    width: 48px;
    padding: 0;
    justify-content: center;
  }

  .assistant-trigger span {
    display: none;
  }

  .assistant-trigger::before {
    width: 26px;
    height: 26px;
  }

  .print-sheet {
    min-height: 0;
    padding: 24px 18px;
  }

  .print-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .header-main,
  .primary-nav-inner,
  .page-shell,
  .app-footer-inner {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .brand-copy strong { font-size: 12px; }
  .brand-copy span { font-size: 10px; }

  .identity-switch button {
    padding-inline: 8px;
  }

  .hero-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .button-row .button {
    width: 100%;
  }

  .identity-card dl,
  .record-meta,
  .print-meta div,
  .detail-list > div {
    grid-template-columns: 1fr;
  }

  .print-meta dt {
    border-bottom: 1px solid var(--line);
  }
}

@page {
  size: A4;
  margin: 14mm;
}

@media print {
  html,
  body {
    background: #fff !important;
  }

  .app-header,
  .breadcrumbs,
  .page-heading,
  .notice-strip,
  .print-toolbar,
  .assistant-trigger,
  .assistant-drawer,
  .assistant-backdrop,
  .app-footer,
  .no-print,
  .toast {
    display: none !important;
  }

  .page-shell,
  .print-layout {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-sheet {
    min-height: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .print-section,
  .print-meta,
  .print-masthead {
    break-inside: avoid;
  }
}

/* Cross-page state additions. */
.approval-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.approval-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line, #d8dfe7);
  border-radius: 14px;
  background: var(--surface, #fff);
}

.approval-card small {
  min-height: 38px;
  color: var(--ink-muted, #667085);
  line-height: 1.45;
}

.approval-card .table-action {
  justify-self: start;
}

@media (max-width: 840px) {
  .approval-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .approval-board {
    grid-template-columns: 1fr;
  }
}
[hidden] { display: none !important; }

/* Shared, versioned estate rules reader. */
.rules-version-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; }
.rules-version-card h2 { margin: 8px 0; }
.rules-version-card p { margin: 6px 0; color: var(--muted); }
.rules-version-card dl { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; }
.rules-version-card dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.rules-version-card dd { margin: 0; font-weight: 650; }
.rules-summary-note { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 16px 0 24px; }
.rules-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 28px; align-items: start; }
.rules-sidebar { position: sticky; top: 140px; }
.rules-sidebar nav { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 20px; }
.rules-sidebar h2 { font-size: 16px; margin: 0 0 14px; }
.rules-sidebar nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.rules-sidebar nav a span { font-size: 12px; color: var(--muted); }
.rules-sidebar > p { font-size: 12px; line-height: 1.7; color: var(--muted); padding-inline: 12px; }
.rules-content { min-width: 0; }
.rules-search { margin-bottom: 20px; }
.rules-search label { display: block; margin-bottom: 10px; font-weight: 650; }
.rules-search > div { display: flex; gap: 10px; }
.rules-search input { min-width: 0; flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; background: var(--surface); color: var(--ink); }
.rules-search > p { font-size: 13px; color: var(--muted); }
.rules-chapters { display: grid; gap: 24px; }
.rules-chapter, .rules-item, .rules-history { scroll-margin-top: 145px; }
.rules-chapter header h2 { margin: 8px 0; }
.rules-chapter header > p:last-child { color: var(--muted); margin-bottom: 24px; }
.rules-item { padding: 20px 0; border-top: 1px solid var(--line); }
.rules-item h3 { font-size: 17px; margin: 0 0 10px; }
.rules-item p { line-height: 1.85; margin: 0 0 12px; }
.rules-item:target { background: var(--surface-soft); outline: 2px solid var(--line); outline-offset: 6px; border-radius: 4px; }
.rules-permalink, .rules-record-link { font-size: 13px; text-underline-offset: 3px; }
.rules-history { margin-top: 28px; }
.rules-history summary { cursor: pointer; font-weight: 700; padding-block: 8px; }
.rules-history li { margin-block: 18px; }
.rules-history p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.record-rules-reference { overflow-wrap: anywhere; line-height: 1.7; }
@media (max-width: 840px) {
  .rules-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .rules-sidebar { position: static; }
  .rules-sidebar nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; }
  .rules-sidebar h2 { grid-column: 1 / -1; }
  .rules-version-card dl { gap: 14px 22px; }
}
@media (max-width: 380px) {
  .rules-search > div { flex-wrap: wrap; }
  .rules-search input { width: 100%; flex-basis: 100%; }
}
@media (max-width: 680px) {
  .rules-version-card { gap: 14px; padding: 18px; }
  .rules-version-card h2 { margin: 4px 0; font-size: 22px; }
  .rules-version-card dl { width: 100%; gap: 14px 20px; }
  .rules-version-card dl > div:last-child { display: none; }
  .rules-version-card .button-row { flex-direction: row; flex-wrap: wrap; margin: 0; }
  .rules-version-card .button-row .button { width: auto; flex: 0 0 auto; min-height: 40px; }
  .rules-sidebar nav { padding: 16px; }
  .rules-sidebar nav a { font-size: 13px; gap: 7px; }
}
[data-record-snapshot], [data-print-snapshot] { overflow-wrap: anywhere; }
[data-record-snapshot] details { margin: 12px 0; }
[data-record-snapshot] summary { cursor: pointer; font-weight: 600; }
[data-form-record] textarea { width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #d6dedc; border-radius: 10px; font: inherit; }
@media print { [data-print-snapshot] details > summary { display: none; } [data-print-snapshot] .detail-list > div { break-inside: avoid; } }

/* Priority 1/2 remediation: reusable controls, readable records, mobile actions. */
[data-global-feedback]:empty { display: none; }
[data-business-page] { min-width: 0; }
[data-business-page] .content-card, [data-business-page] .panel-card { padding: clamp(16px, 3vw, 28px); }
.form-field > span, .schema-setting > span { font-size: 13px; font-weight: 700; color: var(--ink); }
.form-field { min-width: 0; }
.form-field input, .form-field select, .form-field textarea,
.schema-setting input:not([type="checkbox"]), .schema-setting select, .schema-setting textarea {
  width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 10px 12px; background: #fff; color: var(--ink); font: inherit;
}
.form-field textarea, .schema-setting textarea { min-height: 105px; }
.form-field input:read-only { background: var(--surface-soft); }
.form-field input[type="file"] { max-width: 100%; padding: 12px; }
.form-grid { row-gap: 18px; }
.button-row { flex-wrap: wrap; }
.button-row .button { overflow-wrap: anywhere; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.filter-row [aria-pressed="true"] { background: var(--owner); color: white; border-color: var(--owner); }
.focus-panel, #repair-detail, #attachment-detail, .form-section { scroll-margin-top: 140px; }
.record-row { min-width: 0; }
.record-row small, .record-row p, .responsive-record-table small, .preserve-lines { overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-wrap; }
.proof-preview { display: block; width: 100%; max-height: 600px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; margin: 16px 0; }
iframe.proof-preview { min-height: 480px; }
.sample-proof { margin: 20px 0; padding: 24px; border: 2px dashed var(--line-strong); background: var(--surface-soft); }
.schema-editor-list { display: grid; gap: 22px; margin-top: 20px; }
.schema-section { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.schema-field-row { display: grid; grid-template-columns: minmax(150px,2fr) minmax(110px,1fr) 60px minmax(120px,1fr); gap: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.schema-setting { display: grid; gap: 6px; align-content: start; min-width: 0; }
.schema-setting input[type="checkbox"] { width: 22px; height: 22px; margin-top: 10px; }
.schema-field-row .button-row { grid-column: 1 / -1; }
.schema-setting:has(textarea) { grid-column: 1 / -1; }
.resident-form-summary h1 { margin: 18px 0 12px; font-size: 32px; line-height: 1.35; color: #fff; letter-spacing: -.03em; }
.resident-form-step { text-decoration: none; min-height: 44px; }
.resident-form-step:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #bc802a; outline-offset: 3px; }
.resident-form-sidebar details > summary { cursor: pointer; font-size: 14px; font-weight: 700; padding: 8px 0; }
.notice-strip { padding-block: 8px; margin-bottom: 18px; }
.notice-strip .button { min-height: 36px; }
.notice-live-preview { padding: 18px; border: 1px solid var(--line); background: white; }
.notice-live-preview h2 { color: #9f3731; }
.record-details .detail-list div { break-inside: avoid; }
@media(max-width: 680px) {
  .schema-field-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .schema-field-row .schema-setting:first-child { grid-column: 1 / -1; }
  .notice-strip { display: flex; align-items: center; gap: 8px; font-size: 11px; padding: 7px 10px; margin-bottom: 12px; }
  .notice-strip .button { width: auto; min-width: auto; padding: 6px; font-size: 11px; }
  .notice-strip .strip-mark { display: none; }
  .page-heading { margin-bottom: 16px; }
  .responsive-record-table, .responsive-record-table tbody, .responsive-record-table tr, .responsive-record-table td { display: block; min-width: 0; width: 100%; }
  .responsive-record-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .responsive-record-table tr { padding: 14px 0; border-top: 1px solid var(--line-strong); }
  .responsive-record-table td { padding: 8px 4px; border: 0; }
  .responsive-record-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .responsive-record-table .button-row { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }
  .responsive-record-table small { display: block; }
  .resident-form-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
  .resident-form-sidebar { display: contents; }
  .resident-form-sidebar::after { display: none; }
  .resident-form-summary { grid-row: 1; padding: 14px 16px; border-radius: 16px; background: #224946; color: white; }
  .resident-form-summary h1 { font-size: 24px; margin: 8px 0; }
  .resident-form-summary p { margin: 0; font-size: 12px; line-height: 1.5; }
  .resident-form-card { grid-row: 2; margin: 0; }
  .resident-form-steps, .resident-form-record { margin: 0; padding: 12px 16px; background: #224946; border-radius: 12px; color: white; }
  .resident-form-steps { grid-row: 3; }
  .resident-form-record { grid-row: 4; }
  .resident-form-print { grid-row: 5; color: var(--owner); }
  .resident-form-toolbar { padding: 16px; }
  .resident-form-toolbar .eyebrow, .resident-form-privacy { display: none; }
  .resident-form-toolbar h2 { font-size: 18px; }
  .resident-form-toolbar p { margin-top: 4px; font-size: 12px; }
  .resident-form-card .form-section { padding: 16px; }
  .resident-form-card .form-actions { position: static; padding: 12px; box-shadow: none; flex-wrap: wrap; }
  .resident-form-card .form-actions .inline-feedback { flex-basis: 100%; }
  .resident-form-card .form-section legend { font-size: 16px; }
  .resident-form-card .form-section-help { margin-block: 4px 10px; }
  .resident-form-card .form-grid { gap: 12px; }
  body[data-surface="resident-form"] .page-back-row { margin-bottom: 10px; }
  .focus-panel, #repair-detail, #attachment-detail, .form-section { scroll-margin-top: 118px; }
  .record-row { display: flex; flex-wrap: wrap; }
  .record-row > div { flex-basis: 100%; }
  .proof-preview { max-height: 420px; }
}
@media print {
  [data-global-feedback], .toast { display: none !important; }
  .print-sheet { padding: 12mm; min-height: 0; box-shadow: none; border: none; }
  .record-details > summary { display: none; }
  .record-details { display: block; }
  .record-details .detail-list > div, .print-meta > div, .notice-live-preview dl > div { break-inside: avoid; }
  .print-sheet .detail-list { overflow: visible; }
  .print-sheet p, .print-sheet dd { overflow-wrap: anywhere; }
}

@media (max-width: 640px) {
  .resident-form-card .form-actions { display: flex; flex-direction: column; align-items: stretch; }
  .resident-form-card .form-actions > * { width: 100%; min-width: 0; margin: 0; }
}

.form-section { scroll-margin-top: 140px; }
@media (max-width: 680px) {
  [data-business-page] .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  [data-business-page] .metric-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-business-page] .metric-card { min-width: 0; padding: 12px; border-radius: 14px; }
  [data-business-page] .metric-value { font-size: 26px; margin-top: 7px; }
  [data-business-page] .metric-label { font-size: 12px; }
}

@media (max-width: 680px) {
  .resident-form-card .form-actions { flex-wrap: nowrap; }
  .resident-form-card .form-actions > * { flex: none; }
  .resident-form-card .form-actions .inline-feedback { flex-basis: auto; }
}
@media (max-width: 680px) {
  body[data-surface="resident-form"] .resident-form-summary > p { display: none; }
  body[data-surface="resident-form"] .resident-form-toolbar h2 { display: none; }
  body[data-surface="resident-form"] .resident-form-toolbar { padding-block: 8px; }
}

@media (max-width: 680px) {
  body[data-surface="resident-form"] .breadcrumbs { display: none; }
}

/* Batch billing keeps owner selection and confirmation in the existing service page. */
.bill-recipient-tools { display: grid; gap: 12px; margin-bottom: 12px; }
.bill-recipient-tools .form-field { margin: 0; }
.bill-recipient-list { display: grid; gap: 10px; }
.bill-recipient-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.bill-recipient-row:has(input:checked) { background: #eff8f5; border-color: var(--owner); }
.bill-recipient-row > label { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 44px; cursor: pointer; }
.bill-recipient-row input { width: 20px; height: 20px; flex: none; accent-color: var(--owner); }
.bill-recipient-row small { display: block; color: var(--muted); margin-top: 4px; }
.bill-recipient-row > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bill-recipient-row.unavailable { background: #f5f6f5; }
.bill-recipient-row.unavailable label { cursor: default; }
.bill-recipient-row[hidden] { display: none; }
#bill-batch-preview, [data-bill-batch-result] { scroll-margin-top: 135px; }
[data-bill-batch-preview] small, [data-bill-batch-result] small { display: block; }
[data-bill-batch-preview] td, [data-bill-batch-result] td { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .bill-batch-actions { position: static; flex-wrap: nowrap; }
  .bill-batch-actions > * { flex: none; width: 100%; }
  .bill-recipient-row { padding: 12px; }
  .bill-recipient-row > div { width: 100%; }
}

/* Owner directory and registered contact details. */
.profile-search-tools { display: flex; align-items: end; gap: 12px; margin: 20px 0 12px; }
.profile-search-tools .form-field { flex: 1; max-width: 560px; margin: 0; }
.profile-directory-table td { overflow-wrap: anywhere; }
.profile-directory-table small { display: block; color: var(--muted); margin-top: 4px; }
.profile-name-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.profile-directory-table [hidden], .profile-directory-table[hidden], .profile-empty[hidden] { display: none; }
.profile-empty { padding: 24px; }
.profile-unregistered { color: var(--muted); font-weight: 400; }
.profile-back { margin-bottom: 18px; }
.profile-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.profile-detail-heading p { margin: 6px 0 0; }
.profile-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.profile-sections h2 { font-size: 20px; margin-bottom: 16px; }
.profile-detail-list { margin: 0; }
.profile-detail-list > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-detail-list > div:last-child { border-bottom: 0; }
.profile-detail-list dt { color: var(--muted); }
.profile-detail-list dd { margin: 0; overflow-wrap: anywhere; }
.profile-change-record { padding: 12px 0; }
.profile-change-record h3 { margin-bottom: 12px; }
@media (max-width: 680px) {
  .profile-search-tools, .profile-detail-heading { flex-direction: column; align-items: stretch; }
  .profile-sections { grid-template-columns: minmax(0,1fr); }
  .profile-detail-list > div { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .profile-directory-table .profile-name-link { padding-top: 0; }
}
