:root {
  --ink: #17212b;
  --muted: #667381;
  --line: #dbe3ea;
  --panel: #ffffff;
  --bg: #f5f7f8;
  --green: #1f8a70;
  --blue: #2563eb;
  --red: #c2412d;
  --gold: #b7791f;
  --shadow: 0 18px 44px rgba(23, 33, 43, 0.12);
}

body.theme-dark {
  --ink: #eef4f7;
  --muted: #aab7c2;
  --line: #2d3a46;
  --panel: #17212b;
  --bg: #0d141b;
  --green: #45c4a5;
  --blue: #79a7ff;
  --red: #f07a66;
  --gold: #e2a74c;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
body.theme-dark .topbar {
  background: rgba(13, 20, 27, 0.88);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-name {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}
.brand-name small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.header-logo {
  width: clamp(150px, 17vw, 240px);
  height: auto;
  margin-left: 14px;
  filter: brightness(0);
  opacity: .92;
}
body.theme-dark .header-logo {
  filter: none;
}
.theme-toggle-form {
  margin: 0 0 0 8px;
}
.theme-toggle-button {
  font-size: 1.05rem;
}
.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 6px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #17212b, #1f8a70);
  font-size: .64rem;
  line-height: 1;
  letter-spacing: 0;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 18px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  transform: rotate(45deg);
}
.brand-mark::after { transform: rotate(-45deg); }
.brand-mark span { position: relative; z-index: 1; }
.brand-mark.triangle span:first-child {
  grid-column: 1 / -1;
}
.brand-mark.triangle::before {
  left: 14px;
  top: 17px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid rgba(255, 255, 255, .92);
  background: transparent;
  transform: none;
}
.brand-mark.triangle::after { display: none; }
.nav { display: flex; align-items: center; gap: 6px; }
.mobile-nav-label {
  display: none;
}
.theme-toggle-menu-form {
  display: none;
  margin: 0;
}
.nav a,
.theme-toggle-menu-form button {
  position: relative;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334251;
  text-align: left;
  cursor: pointer;
}
.nav a:hover,
.theme-toggle-menu-form button:hover { background: #eef3f4; }
body.theme-dark .nav a,
body.theme-dark .theme-toggle-menu-form button {
  color: var(--ink);
}
body.theme-dark .nav a:hover,
body.theme-dark .theme-toggle-menu-form button:hover {
  background: #17212b;
}
.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
}
.nav-symbol {
  font-weight: 900;
  line-height: 1;
}
.avatar-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #17212b, #1f8a70);
  font-size: .82rem;
  font-weight: 900;
}
.nav-icon-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-icon-link::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 6px;
  color: white;
  background: #17212b;
  font-size: .74rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.nav-icon-link:hover::after,
.nav-icon-link:focus-visible::after {
  opacity: 1;
}
.dot {
  position: absolute;
  top: 8px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 64px; }

.hero {
  position: relative;
  min-height: calc(100vh - 152px);
  display: flex;
  align-items: center;
  padding: 48px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(23, 33, 43, 0.9), rgba(23, 33, 43, 0.2)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: white;
}
.hero-logo {
  position: absolute;
  top: 42px;
  right: 46px;
  width: min(42vw, 520px);
  height: auto;
  opacity: .95;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .35));
}
.hero-copy { max-width: 650px; }
.hero h1, .page-heading h1 { margin: 0; font-size: clamp(2rem, 6vw, 4.8rem); line-height: 1; }
.hero p { max-width: 560px; font-size: 1.18rem; color: rgba(255, 255, 255, 0.86); }
.eyebrow { margin: 0 0 10px; color: var(--green); font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 22px; }
.page-heading p { margin: 8px 0 0; color: var(--muted); }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}
.breadcrumbs a {
  color: var(--green);
}
.meta-line {
  font-size: .9rem;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-heading-actions {
  justify-content: flex-end;
}
.property-heading {
  display: grid;
  align-items: start;
  width: 100%;
}
.property-heading-main,
.property-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
}
.property-heading-main {
  display: block;
}
.property-title-row {
  align-items: center;
  gap: 16px;
}
.property-upload-action {
  justify-content: start;
  margin-top: 14px;
}
.map-action {
  justify-self: end;
  color: var(--green);
  font-size: 1.15rem;
}
.title-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.sold-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e8f6f1;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .78rem;
}
.sold-badge span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: .75rem;
}
.button, .icon-button, .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}
.button.primary { border-color: var(--green); background: var(--green); color: white; }
.button.danger { border-color: var(--red); background: var(--red); color: white; }
.button.ghost { background: #f8fafb; }
.icon-button, .icon-link { width: 40px; padding: 0; }
.menu-toggle { display: none; }

.panel, .form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(23, 33, 43, .04);
}
.panel { padding: 20px; margin-bottom: 18px; }
.panel-title, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-title h2, .property-preview h2 { margin: 0; font-size: 1.1rem; }
.mobile-drawer-toggle {
  display: none;
}
.mobile-drawer-body {
  min-width: 0;
}
.drawer-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.drawer-toggle:hover {
  border-color: #b7c5cf;
  background: white;
}
.dashboard-activity-drawer .panel-title {
  cursor: pointer;
}
.dashboard-activity-drawer.is-collapsed .panel-title {
  margin-bottom: 0;
}
.dashboard-activity-drawer:not(.is-collapsed) .drawer-toggle {
  transform: rotate(180deg);
}
.drawer-body[hidden] {
  display: none;
}
.drawer-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.metric-grid, .dashboard-grid, .detail-grid, .upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.metric-card {
  padding: 20px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #17212b, #285766);
  transition: transform .16s ease, box-shadow .16s ease;
}
.metric-card:hover,
.metric-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}
.metric-grid span { display: block; font-size: 2rem; font-weight: 900; }
.metric-grid p { margin: 4px 0 0; color: rgba(255,255,255,.8); }
.admin-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.admin-tool {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.admin-tool:hover {
  border-color: #b7c5cf;
  box-shadow: 0 10px 24px rgba(23, 33, 43, .08);
}
.admin-tool.disabled {
  opacity: .64;
}
.admin-tool-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #eef3f4;
  color: var(--green);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}
.maintenance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d7c38f;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff9ec;
  color: #5f4212;
}
.maintenance-banner div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.maintenance-banner strong {
  font-size: .94rem;
}
.maintenance-banner span {
  color: #7a5a22;
  font-size: .86rem;
  font-weight: 800;
}
.admin-tool-icon.user-icon::before,
.admin-tool-icon.user-icon::after {
  content: "";
  display: block;
  background: currentColor;
}
.admin-tool-icon.user-icon::before {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-top: 5px;
}
.admin-tool-icon.user-icon::after {
  width: 28px;
  height: 14px;
  border-radius: 14px 14px 5px 5px;
  margin-top: -5px;
}
.admin-tool strong {
  font-size: 1.22rem;
}
.admin-tool p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}
.dashboard-grid, .detail-grid, .upload-grid { grid-template-columns: 1fr 1fr; }
.detail-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 18px;
  margin-bottom: 18px;
}
.mobile-only { display: none; }

.table-wrap { overflow-x: auto; }
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}
.filter-chip {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: #394856;
  font-weight: 900;
  cursor: pointer;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: #17624f;
  background: #e8f6f1;
  color: var(--green);
}
.filter-chip.watch.active,
.filter-chip.watch:hover {
  border-color: #8a5b00;
  background: #fff4dd;
  color: #8a5b00;
}
.filter-chip.risk.active,
.filter-chip.risk:hover {
  border-color: #a83222;
  background: #fdecea;
  color: var(--red);
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; cursor: pointer; }
td a { color: inherit; font-weight: 700; }
.property-type-table {
  min-width: 920px;
}
.checkbox-cell {
  text-align: center;
}
.readonly-check {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  opacity: 1;
}
.table-link {
  color: inherit;
  text-decoration: none;
}
.table-link:hover { color: var(--green); }
.task-issue-link {
  color: inherit;
}
.copy-link {
  display: block;
  max-width: 280px;
  color: var(--muted);
  font-size: .78rem;
  overflow-wrap: anywhere;
  white-space: normal;
}
.audit-action {
  display: inline-grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  font-weight: 800;
}
.audit-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef3f4;
  color: var(--green);
  font-size: .95rem;
  font-weight: 900;
  line-height: 1;
}
.audit-settings { color: var(--gold); }
.audit-document { color: var(--blue); }
.audit-task { color: var(--red); }
.audit-detail {
  display: grid;
  gap: 5px;
}
.audit-context-link {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}
.audit-context-link:hover {
  color: var(--green);
}
.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.row-actions form { margin: 0; }
.blocked-row { background: #fff8f7; }
.user-name-link:hover { color: var(--green); }
.user-actions { justify-content: flex-start; }
.primary-line,
.mobile-subline {
  display: block;
}
.mobile-subline {
  display: none;
  margin-top: 5px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
}
.search, input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: 7px; color: #394856; font-weight: 700; }
.dropzone {
  position: relative;
}
.dropzone input[type="file"] {
  cursor: pointer;
}
.dropzone span {
  display: none;
}

@media (min-width: 841px) {
  .dropzone {
    padding: 18px;
    border: 1px dashed #b7c5cf;
    border-radius: 8px;
    background: #fbfcfd;
    transition: border-color .16s ease, background .16s ease;
  }
  .dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
  }
  .dropzone span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
    overflow-wrap: anywhere;
  }
  .dropzone.drag-over {
    border-color: var(--green);
    background: #effaf6;
  }
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-stack, .modal-form, .form-card { display: grid; gap: 14px; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-form {
  max-width: 420px;
}
.maintenance-form {
  max-width: 760px;
}
.maintenance-section-title {
  margin: 10px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.input-with-suffix input {
  border-radius: 8px 0 0 8px;
}
.input-with-suffix span {
  display: grid;
  place-items: center;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #eef3f4;
  color: var(--muted);
  font-weight: 900;
}
.optional-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.optional-panel[hidden] { display: none; }
.form-card { width: min(460px, 100%); padding: 24px; }
.theme-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.theme-choice label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: #394856;
  cursor: pointer;
}
.theme-choice input {
  position: absolute;
  opacity: 0;
}
.theme-choice span {
  font-weight: 900;
}
.theme-choice label:has(input:checked) {
  border-color: var(--green);
  background: #e8f6f1;
  color: var(--green);
}
.setup-card { width: min(680px, 100%); }
.setup-card pre {
  overflow-x: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #f3f6f8;
  color: #24313d;
}
.auth-panel { display: grid; place-items: center; min-height: 62vh; }
.inline-form { display: flex; gap: 10px; margin-top: 18px; }
.check-row { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--green);
}
.check-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.check-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}
.packet-picker {
  display: grid;
  gap: 10px;
}
.packet-picker .check-row {
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  font-weight: 800;
}
.packet-picker .muted {
  margin: -2px 0 2px;
  padding: 0 2px;
  font-size: .86rem;
}
.print-packet-form .button {
  justify-self: start;
}
.switch-row {
  display: inline-flex;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 9px;
  width: auto;
  white-space: nowrap;
  color: #394856;
}
.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.switch-row.compact {
  font-size: .88rem;
}

.status, .tag-list span, .alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px 6px;
  line-height: 1.05;
  font-size: .82rem;
  font-weight: 800;
  background: #eef3f4;
  color: #324352;
}
.status.active, .status.working, .status.pending { background: #e8f1ff; color: var(--blue); }
.status.problem, .status.blocked, .status.urgent { background: #fdecea; color: var(--red); }
.status.sold, .status.complete { background: #e8f6f1; color: var(--green); }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.warning-tags span {
  background: #fdecea;
  color: var(--red);
}
.alert-pill { background: #fdecea; color: var(--red); }

.bar-list { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 34px; gap: 10px; align-items: center; }
.bar-row div { height: 10px; border-radius: 999px; background: #edf1f4; overflow: hidden; }
.bar-row i { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--green); }
.bar-list.accent i { background: var(--blue); }

.detail-list { display: grid; grid-template-columns: 120px 1fr; gap: 12px; margin: 0; }
.detail-list dt { color: var(--muted); font-weight: 800; }
.detail-list dd { margin: 0; }
.transaction-detail-list {
  grid-template-columns: minmax(150px, max-content) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f6f9fa 100%);
}
.transaction-detail-list dt,
.transaction-detail-list dd {
  min-height: 42px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(183, 197, 207, .45);
}
.transaction-detail-list dt {
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #62707d;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.transaction-detail-list dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #24313d;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}
.transaction-detail-list dt:nth-last-child(2),
.transaction-detail-list dd:last-child {
  border-bottom: 0;
}
.dashboard-health-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.dashboard-health-layout > .panel {
  min-width: 0;
}
.health-list {
  display: grid;
  gap: 10px;
}
.health-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 160px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.health-row:hover {
  border-color: #b7c5cf;
}
.health-score {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 58px;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #edf9f5 0%, #b9dfd3 100%);
  border: 1px solid #17624f;
  color: #123f34;
  text-align: center;
}
.health-score span {
  color: inherit;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}
.health-score small {
  color: inherit;
  max-width: 100%;
  font-size: .62rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}
.health-row.watch .health-score {
  background: linear-gradient(180deg, #fff7e6 0%, #e6bd72 100%);
  border-color: #8a5b00;
  color: #5d3c00;
}
.health-row.risk .health-score {
  background: linear-gradient(180deg, #fff0ee 0%, #e99b92 100%);
  border-color: #a83222;
  color: #6e2117;
}
.health-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.health-main strong,
.health-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.health-main span {
  color: var(--muted);
  font-size: .86rem;
}
.health-meter {
  height: 10px;
  border-radius: 999px;
  background: #edf1f4;
  overflow: hidden;
}
.health-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}
.health-row.watch .health-meter i {
  background: #c88723;
}
.health-row.risk .health-meter i {
  background: var(--red);
}
.health-chart {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 220px;
}
.chart-carousel {
  display: grid;
  min-height: 100%;
}
.chart-slides {
  display: grid;
}
.chart-slide {
  grid-area: 1 / 1;
}
.chart-slide[hidden] {
  display: none;
}
.chart-slide .panel-title {
  margin-bottom: 16px;
}
.health-pie {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 38%),
    conic-gradient(var(--red) 0 var(--risk-end), #c88723 var(--risk-end) var(--watch-end), var(--green) var(--watch-end) 360deg);
  box-shadow: inset -18px -22px 28px rgba(23, 33, 43, .2), inset 14px 12px 20px rgba(255, 255, 255, .28);
  transform: perspective(780px) rotateX(48deg);
  transform-style: preserve-3d;
}
.health-pie::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .36);
  box-shadow: inset 0 0 0 1px rgba(23, 33, 43, .08);
}
.health-pie::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background:
    conic-gradient(#8c2e24 0 var(--risk-end), #8f641d var(--risk-end) var(--watch-end), #0d5f4d var(--watch-end) 360deg);
  box-shadow: 0 24px 20px rgba(23, 33, 43, .22);
  transform: translateY(18px) translateZ(-20px);
}
.type-pie {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 38%),
    conic-gradient(var(--type-gradient));
}
.type-pie::after {
  background: conic-gradient(var(--type-gradient));
}
.health-legend {
  display: grid;
  gap: 10px;
}
.health-legend p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
}
.health-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.health-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.health-legend span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}
.health-legend strong {
  color: var(--ink);
  font-size: 1.05rem;
}
.risk-dot { background: var(--red); }
.watch-dot { background: #c88723; }
.good-dot { background: var(--green); }
.chart-nav {
  display: grid;
  grid-template-columns: 34px 1fr 34px auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.chart-nav-button {
  width: 34px;
  min-height: 34px;
  font-size: 1.2rem;
}
.chart-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}
.chart-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5dd;
  cursor: pointer;
}
.chart-dots button.active {
  width: 22px;
  background: var(--green);
}
.chart-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
.chart-lock input {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
}
.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f6f1;
  color: var(--green);
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}
.health-pill > span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  font-size: .66rem;
  line-height: 1;
}
.health-pill.watch {
  background: #fff4dd;
  color: #8a5b00;
}
.health-pill.risk {
  background: #fdecea;
  color: var(--red);
}
.dashboard-activity {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.activity-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.activity-card[hidden] {
  display: none;
}
.activity-card:hover {
  border-color: #b7c5cf;
}
.activity-card .activity-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1;
}
.activity-card .activity-icon.complete-icon,
.activity-item .activity-icon.complete-icon,
.timeline-event-icon.complete-icon {
  background: linear-gradient(180deg, #f7d98b 0%, #b7791f 100%);
  color: #3f2900;
}
.activity-card strong,
.activity-card p,
.activity-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.activity-card p {
  margin: 3px 0 0;
  color: #394856;
  font-size: .88rem;
}
.activity-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.doc-list, .note-list, .missing-list, .property-grid { display: grid; gap: 12px; }
.quick-list {
  display: grid;
  gap: 10px;
}
.quick-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.quick-item:hover {
  border-color: #b7c5cf;
}
.quick-item span {
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}
.task-calendar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.calendar-day {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.calendar-day header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.calendar-day header strong {
  color: var(--ink);
}
.calendar-day header span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}
.calendar-day.today {
  border-color: #9ecabf;
  background: #f2fbf8;
}
.calendar-day.overdue {
  border-color: #efb8b0;
  background: #fff7f6;
}
.calendar-task-list {
  display: grid;
  gap: 8px;
}
.calendar-task {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.calendar-task:hover {
  border-color: #b7c5cf;
}
.calendar-task strong,
.calendar-task span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.calendar-task span {
  color: var(--muted);
  font-size: .8rem;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.featured-images .image-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.image-gallery {
  display: grid;
  gap: 12px;
}
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.gallery-pagination span {
  min-width: 54px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 900;
  text-align: center;
}
.property-image {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
  cursor: pointer;
  text-align: left;
}
.property-image[hidden] {
  display: none;
}
.property-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.property-image span {
  color: var(--muted);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.doc-row .button {
  align-self: stretch;
}
.doc-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.send-button,
.doc-action-button {
  display: inline-grid;
  justify-items: center;
  align-items: center;
  align-content: center;
  gap: 2px;
  min-width: 62px;
  padding: 8px 10px;
  line-height: 1;
}
.send-label {
  font-size: .72rem;
}
.send-icon {
  font-size: 1.45rem;
  line-height: 1;
}
.doc-action-button {
  min-width: 70px;
}
.doc-action-button .send-icon {
  font-size: 1.25rem;
}
.doc-item {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  cursor: pointer;
}
.doc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  border-radius: 5px;
  font-size: .66rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
}
.pdf-icon {
  color: #a83222;
  background: #fdecea;
}
.map-icon {
  color: #17624f;
  background: #e8f6f1;
}
.file-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3fb;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 900;
}
.file-type-pill.image {
  background: #e8f6f1;
  color: var(--green);
}
.file-type-pill.sheet {
  background: #fff4dd;
  color: #8a5b00;
}
.file-type-pill.video {
  background: #f1ecfb;
  color: #61429a;
}
.resource-link {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.resource-link span,
.resource-link small {
  color: var(--muted);
  font-size: .86rem;
}
.resource-link small { font-size: .78rem; }
.doc-item span, .note span, .missing-list span, .property-tile span, .timeline span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; }
.doc-item span {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.note, .missing-list article, .property-tile { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfcfd; }
.note-action {
  margin-top: 10px;
}
.property-tile { display: grid; gap: 12px; }
.tile-missing {
  display: grid;
  gap: 8px;
}
.tile-missing > span {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.tile-actions { display: flex; gap: 8px; }
.timeline { margin: 0; padding-left: 22px; }
.timeline li { margin: 0 0 12px; }
.timeline strong {
  display: block;
  margin-top: 2px;
}
.timeline p {
  margin: 4px 0 0;
  color: #394856;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.full-timeline {
  position: relative;
  padding-left: 0;
  list-style: none;
}
.full-timeline li {
  position: relative;
  padding-left: 28px;
  padding-bottom: 14px;
  border-left: 2px solid var(--line);
}
.full-timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}
.event-timeline {
  display: grid;
  gap: 18px;
}
.timeline-day {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.timeline-day h3 {
  position: sticky;
  top: 84px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: #394856;
  font-size: .78rem;
  text-align: center;
}
.timeline-day ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline-day li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.timeline-day li::before {
  content: "";
  position: absolute;
  left: 28px;
  top: -11px;
  height: 10px;
  border-left: 2px solid var(--line);
}
.timeline-day li:first-child::before {
  display: none;
}
.timeline-event-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e8f6f1;
  color: var(--green);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}
.timeline-day time {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.timeline-day strong {
  display: block;
  margin-top: 2px;
}
.timeline-day p {
  margin: 4px 0 0;
  color: #394856;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.event-document-uploaded .timeline-event-icon,
.event-document-replaced .timeline-event-icon {
  background: #edf3fb;
  color: var(--blue);
}
.event-task-created .timeline-event-icon,
.event-task-status-changed .timeline-event-icon {
  background: #fff4dd;
  color: #8a5b00;
}
.event-status-changed .timeline-event-icon {
  background: #f1ecfb;
  color: #61429a;
}
.event-note-added .timeline-event-icon {
  background: #f7eeee;
  color: #8c3b3b;
}
.event-property-image-added .timeline-event-icon {
  background: #eef4e9;
  color: #4f6f2a;
}
.event-timeline.compact {
  gap: 14px;
}
.event-timeline.compact .timeline-day {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
}
.event-timeline.compact .timeline-day li {
  padding: 10px;
}
.activity-item .activity-icon {
  position: absolute;
  left: -16px;
  top: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid white;
  background: var(--green);
  color: white;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
}
.activity-item::before {
  display: none;
}
.muted { color: var(--muted); }

.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: white; }
.flash.success { border-color: #cbeadf; background: #effaf6; }
.flash.error { border-color: #f4c5bd; background: #fff1ef; }

.maintenance-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(31, 138, 112, .12), transparent 26%),
    linear-gradient(135deg, #f8fafc 0%, #eef3f4 100%);
  color: #17212b;
}
.maintenance-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 18px;
}
.maintenance-card {
  width: min(760px, 100%);
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 70px rgba(23, 33, 43, .12);
}
.maintenance-kicker {
  margin: 0 0 12px;
  color: #1f8a70;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.maintenance-card h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 1;
}
.maintenance-card > p:not(.maintenance-kicker) {
  max-width: 640px;
  margin: 18px 0 0;
  color: #52606d;
  font-size: 1.08rem;
  line-height: 1.6;
}
.maintenance-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}
.maintenance-times div {
  padding: 14px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fbfcfd;
}
.maintenance-times dt {
  margin-bottom: 4px;
  color: #667381;
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}
.maintenance-times dd {
  margin: 0;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 24, .55);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 24px;
}
.modal:has(.gallery-viewer) {
  width: min(1120px, calc(100vw - 48px));
  overflow-x: hidden;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 36px;
  width: 36px;
  line-height: 1;
}
.modal-form h2 { margin: 0 48px 4px 0; }
.modal-form.compact { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal,
.modal-form,
.modal-form > * {
  min-width: 0;
}
.modal-form .muted {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.file-preview, .image-preview { width: 100%; height: min(70vh, 720px); border: 1px solid var(--line); border-radius: 8px; object-fit: contain; }
.gallery-viewer {
  width: 100%;
}
.gallery-viewer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-right: 52px;
}
.gallery-viewer-title h2 {
  margin: 0;
}
.gallery-viewer-title span {
  color: var(--muted);
  font-weight: 900;
}
.gallery-viewer-frame {
  position: relative;
  display: grid;
  place-items: center;
}
.gallery-full-image {
  height: min(76vh, 780px);
  max-height: min(76vh, 780px);
  background: #fbfcfd;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}
.gallery-nav-prev {
  left: 12px;
}
.gallery-nav-next {
  right: 12px;
}
.gallery-nav:hover {
  border-color: #b7c5cf;
  background: white;
}
.file-fallback {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.modal-open { overflow: hidden; }

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #0f1821;
  border-color: var(--line);
  color: var(--ink);
}
body.theme-dark input:disabled,
body.theme-dark select:disabled,
body.theme-dark textarea:disabled {
  background: #1b2631;
  color: #c3ced8;
  opacity: 1;
}
body.theme-dark label,
body.theme-dark .modal-form label,
body.theme-dark .switch-row,
body.theme-dark .panel-title h2,
body.theme-dark .modal-form h2 {
  color: var(--ink);
}
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #778592;
}
body.theme-dark .button.ghost,
body.theme-dark .icon-button,
body.theme-dark .icon-link {
  background: #101922;
  border-color: var(--line);
  color: var(--ink);
}
body.theme-dark .button.ghost:hover,
body.theme-dark .icon-button:hover,
body.theme-dark .icon-link:hover {
  background: #20303e;
  border-color: #526272;
}
body.theme-dark .metric-card,
body.theme-dark .admin-tool,
body.theme-dark .filter-chip,
body.theme-dark .theme-choice label,
body.theme-dark .quick-item,
body.theme-dark .health-row,
body.theme-dark .health-score,
body.theme-dark .calendar-day,
body.theme-dark .calendar-task,
body.theme-dark .activity-card,
body.theme-dark .doc-item,
body.theme-dark .note,
body.theme-dark .missing-list article,
body.theme-dark .property-tile,
body.theme-dark .property-image,
body.theme-dark .timeline-day h3,
body.theme-dark .timeline-day li,
body.theme-dark .property-type-table tr,
body.theme-dark .modal,
body.theme-dark .flash,
body.theme-dark .optional-panel,
body.theme-dark .setup-card pre,
body.theme-dark .packet-page {
  background: #17212b;
  border-color: var(--line);
  color: var(--ink);
}
body.theme-dark .health-score,
body.theme-dark .calendar-task,
body.theme-dark .activity-card,
body.theme-dark .quick-item,
body.theme-dark .doc-item,
body.theme-dark .property-image {
  background: #101922;
}
body.theme-dark .transaction-detail-list {
  background: linear-gradient(180deg, #101922 0%, #13202a 100%);
  border-color: var(--line);
}
body.theme-dark .transaction-detail-list dt,
body.theme-dark .transaction-detail-list dd {
  border-bottom-color: rgba(82, 98, 114, .45);
}
body.theme-dark .transaction-detail-list dt {
  color: #9fb0bf;
}
body.theme-dark .transaction-detail-list dd {
  color: var(--ink);
}
body.theme-dark .gallery-full-image {
  background: #101922;
}
body.theme-dark .gallery-nav {
  background: rgba(16, 25, 34, .92);
  border-color: var(--line);
  color: var(--ink);
}
body.theme-dark .gallery-nav:hover {
  background: #17212b;
}
body.theme-dark .metric-card {
  background: linear-gradient(135deg, #20303e 0%, #1f5f63 100%);
  border: 1px solid #3d5362;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
body.theme-dark .metric-card:hover,
body.theme-dark .metric-card:focus-visible {
  border-color: #6f8795;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}
body.theme-dark .health-row.good .health-score,
body.theme-dark .health-row:not(.watch):not(.risk) .health-score {
  background: linear-gradient(180deg, #edf9f5 0%, #b9dfd3 100%);
  border-color: #17624f;
  color: #123f34;
}
body.theme-dark .health-row.watch .health-score {
  background: linear-gradient(180deg, #fff7e6 0%, #e6bd72 100%);
  border-color: #8a5b00;
  color: #5d3c00;
}
body.theme-dark .health-row.risk .health-score {
  background: linear-gradient(180deg, #fff0ee 0%, #e99b92 100%);
  border-color: #a83222;
  color: #6e2117;
}
body.theme-dark .activity-card p {
  color: #c6d0d8;
}
body.theme-dark .maintenance-banner {
  border-color: #74582b;
  border-left-color: var(--gold);
  background: #241c12;
  color: #f7ddb4;
}
body.theme-dark .maintenance-banner span {
  color: #e2c48f;
}
body.theme-dark .health-pie {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 38%),
    conic-gradient(var(--red) 0 var(--risk-end), #c88723 var(--risk-end) var(--watch-end), var(--green) var(--watch-end) 360deg);
  box-shadow: inset -18px -22px 28px rgba(0, 0, 0, .32), inset 14px 12px 20px rgba(255, 255, 255, .1);
}
body.theme-dark .health-pie::after {
  box-shadow: 0 24px 20px rgba(0, 0, 0, .34);
}
body.theme-dark .type-pie {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 38%),
    conic-gradient(var(--type-gradient));
}
body.theme-dark .type-pie::after {
  background: conic-gradient(var(--type-gradient));
}
body.theme-dark .health-legend div {
  background: #101922;
  border-color: var(--line);
}
body.theme-dark th,
body.theme-dark td {
  border-bottom-color: var(--line);
}
body.theme-dark .bar-row div,
body.theme-dark .health-meter {
  background: #293642;
}
body.theme-dark .file-fallback,
body.theme-dark .modal-backdrop {
  color: var(--ink);
}
body.theme-dark .status.active,
body.theme-dark .status.working,
body.theme-dark .status.pending {
  background: #1f3150;
  color: #a8c5ff;
}
body.theme-dark .status.problem,
body.theme-dark .status.blocked,
body.theme-dark .status.urgent,
body.theme-dark .alert-pill {
  background: #432018;
  color: #ffb2a4;
}
body.theme-dark .status.sold,
body.theme-dark .status.complete,
body.theme-dark .theme-choice label:has(input:checked),
body.theme-dark .filter-chip.active {
  background: #17382f;
  color: #75d9bf;
}
body.theme-dark .file-type-pill {
  background: #1f3150;
  color: #a8c5ff;
}
body.theme-dark .file-type-pill.image {
  background: #17382f;
  color: #75d9bf;
}
body.theme-dark .file-type-pill.sheet {
  background: #432f13;
  color: #f1c46b;
}
body.theme-dark .file-type-pill.video {
  background: #2e2647;
  color: #c4b5fd;
}
body.theme-dark .nav,
body.theme-dark .mobile-drawer-toggle,
body.theme-dark .drawer-toggle {
  background: #101922;
  border-color: var(--line);
  color: var(--ink);
}
body.theme-dark .modal-close {
  background: #20303e;
  border-color: #526272;
  color: #eef4f7;
}

.packet-body {
  background: #e9eef2;
}
.packet-page {
  width: min(100% - 32px, 980px);
  margin: 24px auto 60px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.packet-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
}
.packet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}
.packet-header h1 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1;
}
.packet-header p {
  margin: 8px 0 0;
  color: var(--muted);
}
.packet-header img {
  width: min(210px, 26vw);
  filter: brightness(0);
}
.packet-hero {
  display: grid;
  gap: 22px;
  align-items: stretch;
  margin-top: 22px;
}
.packet-hero.has-image {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
}
.packet-hero.no-image {
  grid-template-columns: 1fr;
}
.packet-summary,
.packet-section {
  margin-top: 22px;
}
.packet-hero .packet-summary {
  margin-top: 0;
}
.packet-hero-image {
  margin: 0;
}
.packet-hero-image img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  border-radius: 8px;
}
.packet-section h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.packet-note {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: .86rem;
}
.packet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}
.packet-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.packet-image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.packet-checklist,
.packet-documents {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.packet-checklist li,
.packet-documents li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.packet-checklist li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
}
.packet-checklist span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 900;
}
.packet-checklist .complete span {
  background: #e8f6f1;
  color: var(--green);
}
.packet-checklist .missing span {
  background: #fdecea;
  color: var(--red);
}
.packet-documents span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
}
.packet-documents a {
  display: inline-block;
  margin-top: 4px;
  color: var(--green);
  font-size: .84rem;
  font-weight: 800;
}
.packet-attachments {
  display: grid;
  gap: 18px;
}
.packet-attachment {
  display: grid;
  gap: 12px;
}
.packet-attachment header h3 {
  margin: 0;
  font-size: 1rem;
}
.packet-attachment header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}
.packet-document-page {
  margin: 0;
}
.packet-document-page img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.packet-document-page figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: .8rem;
}
.packet-timeline {
  break-inside: avoid;
}

@media (max-width: 840px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .topbar { padding: 0 16px; }
  .brand { order: 1; }
  .brand-name { display: none; }
  .header-logo {
    order: 2;
    width: min(34vw, 132px);
    margin-left: 0;
  }
  .menu-toggle { display: inline-flex; order: 3; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    background: white;
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav-icon-link {
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
  }
  .nav-icon-link::after { display: none; }
  .desktop-nav-label,
  .desktop-nav-icon {
    display: none;
  }
  .mobile-nav-label {
    display: inline;
  }
  .nav-icon-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .shell { width: min(100% - 24px, 1180px); margin-top: 18px; }
  .hero { min-height: calc(100vh - 116px); padding: 28px; align-items: end; }
  .hero-logo {
    top: 42px;
    right: 34px;
    width: min(78vw, 360px);
  }
  .page-heading { align-items: stretch; flex-direction: column; }
  .property-heading {
    display: block;
  }
  .property-title-row {
    align-items: center;
    gap: 12px;
  }
  .heading-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .user-heading-actions {
    justify-content: stretch;
  }
  .property-upload-action {
    justify-content: center;
    align-items: center;
    margin-top: 12px;
  }
  .property-upload-action .button {
    width: auto;
  }
  .breadcrumbs {
    flex-wrap: wrap;
  }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filter-chip-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .resource-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filter-chip {
    width: 100%;
  }
  .mobile-drawer .panel-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
    cursor: pointer;
  }
  .mobile-drawer .panel-title h2 {
    min-width: 0;
  }
  .mobile-drawer .panel-title > .button {
    grid-column: 2;
    white-space: nowrap;
  }
  .mobile-drawer .panel-title > .mobile-drawer-toggle {
    grid-column: 3;
  }
  .dashboard-task-title .panel-actions {
    display: flex;
    grid-column: 2;
  }
  .dashboard-task-title .panel-actions .button {
    grid-column: 2;
    white-space: nowrap;
  }
  .dashboard-task-title .mobile-drawer-toggle {
    grid-column: 3;
  }
  .dashboard-completed-toggle {
    grid-column: 1 / -1;
    width: max-content;
  }
  .dashboard-history-toggle {
    width: max-content;
  }
  .mobile-drawer.mobile-collapsed .dashboard-completed-toggle {
    display: none;
  }
  .mobile-drawer.mobile-collapsed .dashboard-history-toggle {
    display: none;
  }
  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .mobile-drawer-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fbfcfd;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    transition: transform .16s ease;
  }
  .mobile-drawer:not(.mobile-collapsed) .mobile-drawer-toggle {
    transform: rotate(180deg);
  }
  .mobile-drawer.mobile-collapsed .panel-title {
    margin-bottom: 0;
  }
  .mobile-drawer.mobile-collapsed .mobile-drawer-body {
    display: none;
  }
  .switch-row { justify-content: flex-start; }
  .switch-row,
  .check-row {
    min-width: 0;
    white-space: normal;
  }
  .switch-row {
    align-items: flex-start;
  }
  .switch-row input,
  .check-row input {
    flex: 0 0 auto;
    margin-top: 2px;
  }
  .switch-row span,
  .check-row {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .title-line { align-items: flex-start; flex-direction: column; gap: 10px; }
  .sold-badge { min-height: 32px; }
  .dashboard-health-layout {
    display: block;
  }
  .health-chart-panel {
    display: none;
  }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid {
    gap: 0;
    margin-bottom: 0;
  }
  .dashboard-grid .panel,
  .shell > .panel {
    margin-bottom: 12px;
  }
  .health-row {
    grid-template-columns: 66px minmax(0, 1fr);
  }
  .health-score {
    min-height: 60px;
    padding: 7px 5px;
  }
  .health-score span {
    font-size: 1.25rem;
  }
  .health-score small {
    font-size: .56rem;
    letter-spacing: 0;
  }
  .health-meter {
    grid-column: 1 / -1;
  }
  .dashboard-activity {
    grid-template-columns: 1fr;
  }
  .task-calendar {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  .calendar-day {
    min-height: 0;
  }
  .admin-tool-grid { grid-template-columns: 1fr; }
  .maintenance-banner div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .dashboard-grid, .detail-grid, .upload-grid { grid-template-columns: 1fr; }
  .detail-grid,
  .detail-media-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }
  .detail-grid .panel,
  .detail-media-grid .panel {
    margin-bottom: 12px;
  }
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-panel,
  .settings-form,
  .maintenance-form {
    max-width: 100%;
    min-width: 0;
  }
  .maintenance-times { grid-template-columns: 1fr; }
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .form-actions .button {
    width: 100%;
  }
  .inline-form { flex-direction: column; }
  .detail-list { grid-template-columns: 1fr; }
  .transaction-detail-list {
    grid-template-columns: minmax(128px, max-content) minmax(0, 1fr);
  }
  .transaction-detail-list dt,
  .transaction-detail-list dd {
    min-height: 40px;
    padding: 10px 11px;
  }
  .transaction-detail-list dt {
    font-size: .72rem;
  }
  .transaction-detail-list dd {
    font-size: .9rem;
  }
  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }
  .modal-backdrop:has(.gallery-viewer) {
    align-items: center;
  }
  .modal {
    width: 100%;
    max-width: 100%;
    max-height: min(86vh, calc(100dvh - 24px));
    padding: 22px 18px 20px;
    border-radius: 8px 8px 0 0;
    overscroll-behavior: contain;
  }
  .modal-close {
    top: 10px;
    right: 10px;
    min-height: 40px;
    width: 40px;
  }
  .modal-form {
    gap: 16px;
    padding-top: 2px;
  }
  .modal-form h2 {
    margin-right: 52px;
    line-height: 1.12;
  }
  .modal-form label {
    gap: 8px;
  }
  .modal-form input,
  .modal-form select,
  .modal-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
  }
  .modal-form .check-row {
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
    line-height: 1.25;
  }
  .modal-form .check-row input[type="checkbox"],
  .modal-form .check-row input[type="radio"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 1px;
  }
  .modal-form textarea {
    min-height: 112px;
  }
  .gallery-viewer {
    gap: 10px;
  }
  .gallery-viewer-title {
    padding-right: 48px;
  }
  .gallery-full-image {
    height: min(54vh, 430px);
    max-height: min(54vh, 430px);
  }
  .gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 1.7rem;
  }
  .gallery-nav-prev {
    left: 8px;
  }
  .gallery-nav-next {
    right: 8px;
  }
  .print-packet-form {
    gap: 12px;
  }
  .print-packet-form h2 {
    margin-bottom: 0;
  }
  .packet-picker {
    gap: 8px;
  }
  .packet-picker .check-row {
    min-height: 44px;
    padding: 9px 10px;
    line-height: 1.2;
  }
  .packet-picker .check-row input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
  }
  .packet-picker .muted {
    margin: -1px 0 1px;
    font-size: .82rem;
    line-height: 1.35;
  }
  .print-packet-form .button {
    width: 100%;
    justify-self: stretch;
  }
  .doc-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-row .button {
    width: 100%;
  }
  .send-button {
    min-width: 0;
  }
  .property-document-list .doc-row {
    position: relative;
  }
  .property-document-list .doc-item {
    padding-right: 58px;
  }
  .property-document-list .doc-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .property-document-list .doc-actions .button:not(.send-button):not(.manage-doc-action) {
    flex: 1 1 120px;
  }
  .property-document-list .manage-doc-action {
    display: none;
  }
  .property-document-list .send-button {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }
  .property-document-list .send-label {
    display: none;
  }
  .property-document-list .send-icon {
    font-size: 1.25rem;
  }
  .timeline-day,
  .event-timeline.compact .timeline-day {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .timeline-day h3 {
    position: static;
    width: max-content;
    max-width: 100%;
    text-align: left;
  }
  .timeline-day li {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 10px;
  }
  .timeline-event-icon {
    width: 32px;
    height: 32px;
  }
  .timeline-day li::before {
    left: 27px;
  }
  #property-table { min-width: 0; }
  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  #property-table th:nth-child(n+3),
  #property-table td:nth-child(n+3) {
    display: none;
  }
  #property-table th:nth-child(2),
  #property-table td:nth-child(2) {
    text-align: right;
  }
  #property-table .health-pill {
    justify-content: center;
    min-height: 30px;
    padding: 5px 8px;
    font-size: .72rem;
  }
  #users-table { min-width: 0; }
  #users-table th:last-child,
  #users-table td:last-child {
    display: none;
  }
  #invitations-table { min-width: 0; }
  #invitations-table th:nth-child(2),
  #invitations-table td:nth-child(2),
  #invitations-table th:nth-child(4),
  #invitations-table td:nth-child(4),
  #invitations-table th:nth-child(5),
  #invitations-table td:nth-child(5) {
    display: none;
  }
  #audit-table { min-width: 0; }
  #audit-table th:nth-child(3),
  #audit-table td:nth-child(3),
  #audit-table th:nth-child(4),
  #audit-table td:nth-child(4) {
    display: none;
  }
  #audit-table th:first-child,
  #audit-table td:first-child {
    width: 38%;
  }
  #audit-table th:nth-child(2),
  #audit-table td:nth-child(2) {
    width: 62%;
  }
  #audit-table .audit-action {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
  }
  #audit-table .audit-icon {
    width: 28px;
    height: 28px;
  }
  #audit-table .audit-detail,
  #audit-table .audit-detail > span,
  #audit-table .audit-context-link {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #audit-table .mobile-subline {
    display: block;
  }
  .property-type-table {
    min-width: 0;
  }
  .property-type-table thead {
    display: none;
  }
  .property-type-table,
  .property-type-table tbody,
  .property-type-table tr,
  .property-type-table td {
    display: block;
    width: 100%;
  }
  .property-type-table tr {
    position: relative;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
  }
  .property-type-table tr + tr {
    margin-top: 14px;
  }
  .property-type-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }
  .property-type-table td::before {
    content: attr(data-label);
    min-width: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
    overflow-wrap: anywhere;
  }
  .property-type-table td:first-child {
    align-items: flex-start;
    min-height: 40px;
    padding-right: 50px;
    padding-top: 0;
    font-size: 1rem;
    text-align: left;
  }
  .property-type-table td:first-child::before {
    display: none;
  }
  .property-type-table .checkbox-cell {
    display: none;
  }
  .property-type-table .checkbox-cell.is-required {
    display: flex;
  }
  .property-type-table .checkbox-cell.is-required::after {
    content: "Required";
    color: var(--green);
    font-weight: 900;
  }
  .property-type-table .checkbox-cell.is-required .readonly-check {
    display: none;
  }
  .property-type-table td:last-child {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    padding: 0;
    border-bottom: 0;
  }
  .property-type-table td:last-child::before {
    display: none;
  }
  .property-type-table .row-actions {
    width: auto;
  }
  .property-type-table .row-actions .icon-button {
    width: 40px;
    min-height: 40px;
  }
  #resources-table { min-width: 0; }
  #resources-table th:nth-child(2),
  #resources-table td:nth-child(2),
  #resources-table th:last-child,
  #resources-table td:last-child {
    display: none;
  }
  #dashboard-task-table { min-width: 0; }
  #dashboard-task-table th:nth-child(2),
  #dashboard-task-table td:nth-child(2),
  #dashboard-task-table th:nth-child(3),
  #dashboard-task-table td:nth-child(3) {
    display: none;
  }
  #property-table th,
  #property-table td,
  #users-table th,
  #users-table td,
  #invitations-table th,
  #invitations-table td,
  #audit-table th,
  #audit-table td,
  #resources-table th,
  #resources-table td,
  #dashboard-task-table th,
  #dashboard-task-table td {
    padding: 12px 8px;
  }
  #dashboard-task-table th:first-child,
  #dashboard-task-table td:first-child {
    width: 68%;
  }
  #dashboard-task-table th:nth-child(4),
  #dashboard-task-table td:nth-child(4) {
    width: 32%;
    text-align: right;
    white-space: nowrap;
  }
  #dashboard-task-table .primary-line {
    display: inline;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #dashboard-task-table .mobile-subline {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .property-address {
    display: inline-block;
    max-width: 58vw;
  }
  .full-timeline li {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 14px;
  }
  .full-timeline li::before { display: none; }
  .activity-item {
    position: relative;
    padding: 0 42px 14px 0;
  }
  .activity-item .activity-icon {
    left: auto;
    right: 0;
    top: 0;
  }
  .packet-page {
    width: min(100% - 20px, 980px);
    padding: 18px;
  }
  .packet-header,
  .packet-grid,
  .packet-hero.has-image {
    grid-template-columns: 1fr;
  }
  .packet-header img {
    width: min(60vw, 220px);
  }
  .packet-header h1 {
    font-size: 2rem;
  }
  .packet-image-grid {
    grid-template-columns: 1fr 1fr;
  }
  .packet-hero-image img {
    max-height: 260px;
  }
}

@media print {
  @page {
    margin: .42in;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body {
    background: white;
    color: #000;
    font-size: 10pt;
    line-height: 1.28;
  }
  .packet-body {
    background: white;
  }
  .packet-page {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .packet-toolbar {
    display: none;
  }
  .packet-header {
    gap: 12px;
    padding-bottom: 8px;
    border-bottom-width: 1px;
    break-inside: avoid;
  }
  .packet-header h1 {
    font-size: 21pt;
    line-height: 1.05;
  }
  .packet-header p {
    margin-top: 3px;
  }
  .packet-header img {
    max-width: 130px;
  }
  .packet-summary,
  .packet-section,
  .packet-hero,
  .packet-grid {
    margin-top: 10px;
  }
  .packet-hero {
    gap: 12px;
    align-items: stretch;
    break-inside: avoid;
  }
  .packet-hero.has-image {
    grid-template-columns: minmax(0, 1fr) 2.35in;
  }
  .packet-hero.no-image {
    grid-template-columns: 1fr;
  }
  .packet-hero-image img {
    min-height: 0;
    max-height: 1.8in;
    height: 100%;
    border-radius: 3px;
  }
  .packet-hero .packet-summary {
    margin-top: 0;
  }
  .packet-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    break-inside: auto;
  }
  .packet-section h2 {
    margin-bottom: 5px;
    font-size: 12pt;
    line-height: 1.15;
    break-after: avoid;
    page-break-after: avoid;
  }
  .packet-section p {
    margin: 0;
  }
  .packet-note {
    margin: -2px 0 5px;
    font-size: 8.5pt;
  }
  .packet-summary .detail-list {
    grid-template-columns: 78px 1fr 78px 1fr;
    gap: 3px 10px;
    align-items: start;
  }
  .packet-hero .detail-list {
    grid-template-columns: 78px 1fr;
  }
  .packet-summary .detail-list dt,
  .packet-summary .detail-list dd {
    padding: 0;
    margin: 0;
  }
  .packet-image-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .packet-image-grid img {
    max-height: 1.25in;
    border-radius: 3px;
  }
  .packet-checklist,
  .packet-documents {
    gap: 0;
  }
  .packet-checklist li,
  .packet-documents li {
    padding: 3px 0;
    line-height: 1.22;
  }
  .packet-checklist span {
    width: 16px;
    height: 16px;
    font-size: 7.5pt;
  }
  .packet-documents strong,
  .packet-documents span,
  .packet-documents a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .packet-documents span,
  .packet-documents a {
    margin-top: 2px;
    font-size: 8pt;
  }
  .packet-attachments {
    display: block;
  }
  .packet-attachments.has-attachments {
    break-before: page;
    page-break-before: always;
  }
  .packet-attachments > h2 {
    margin-bottom: 0;
  }
  .packet-attachment {
    display: block;
  }
  .packet-attachment + .packet-attachment {
    break-before: page;
    page-break-before: always;
  }
  .packet-attachment header {
    margin-bottom: 6px;
    break-after: avoid;
    page-break-after: avoid;
  }
  .packet-attachment header h3 {
    margin: 0;
    font-size: 12pt;
  }
  .packet-attachment header p,
  .packet-document-page figcaption {
    margin-top: 2px;
    font-size: 8pt;
  }
  .packet-document-page {
    margin: 0 0 10px;
    break-inside: avoid;
  }
  .packet-document-page img {
    width: 100%;
    max-height: 9.2in;
    object-fit: contain;
    border: 0;
    border-radius: 0;
  }
  .packet-timeline {
    break-inside: auto;
  }
  .packet-timeline li {
    break-inside: avoid;
    margin-bottom: 5px;
    padding-bottom: 7px;
  }
  .packet-documents a::after {
    content: " (" attr(href) ")";
    color: #555;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .packet-image-grid img,
  .packet-checklist li,
  .packet-documents li {
    break-inside: avoid;
  }
}
