:root {
  --private-navy: #08245f;
  --private-blue: #075fd0;
  --private-line: #dbe5f4;
  --private-soft: #f5f8fc;
  --private-ink: #101d3d;
  --private-muted: #64708a;
  --private-sidebar: #06265e;
  --private-sidebar-dark: #021936;
  --private-green: #11823b;
  --private-violet: #6f32ff;
  --private-orange: #f08319;
}

.auth-page {
  background: linear-gradient(135deg, #f6f9fd 0%, #eef4fb 100%);
  min-height: 100vh;
}

.auth-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(8, 36, 95, 0.12);
  max-width: 430px;
  padding: 34px;
  width: 100%;
}

.auth-panel-wide {
  max-width: 520px;
}

.auth-brand {
  align-items: center;
  color: var(--private-navy);
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 900;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-brand img {
  height: 48px;
  width: 48px;
}

.auth-brand small {
  color: var(--private-blue);
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.auth-panel h1,
.private-content h1 {
  color: var(--private-navy);
  font-weight: 850;
}

.auth-panel p,
.private-content p,
.private-topbar span {
  color: var(--private-muted);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-form label {
  color: var(--private-ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.auth-form button {
  margin-top: 8px;
}

.auth-check {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.auth-check input {
  flex: 0 0 auto;
  margin-top: 5px;
}

.auth-alt {
  margin: 18px 0 0;
  text-align: center;
}

.auth-alt a,
.auth-check a {
  color: var(--private-blue);
  font-weight: 800;
}

.private-app {
  background: var(--private-soft);
  color: var(--private-ink);
  display: grid;
  grid-template-columns: 304px 1fr;
  min-height: 100vh;
}

.private-sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(46, 136, 255, 0.32), transparent 34%),
    linear-gradient(180deg, var(--private-sidebar) 0%, var(--private-sidebar-dark) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px 24px;
}

.private-brand {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(219, 229, 244, 0.95);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(0, 19, 56, 0.18);
  color: var(--private-ink);
  display: flex;
  justify-content: center;
  min-height: 92px;
  padding: 14px 16px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 38px;
  text-transform: uppercase;
}

.private-brand img {
  display: block;
  height: auto;
  max-width: 210px;
  width: 100%;
}

.private-brand span {
  display: none;
}

.private-nav {
  display: grid;
  gap: 10px;
}

.private-nav a {
  align-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  gap: 14px;
  font-weight: 700;
  min-height: 52px;
  padding: 13px 14px;
  position: relative;
}

.nav-badge {
  align-items: center;
  background: #ef233c;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  margin-left: auto;
  min-width: 22px;
  padding: 0 6px;
}

.private-nav a i {
  align-items: center;
  display: inline-flex;
  font-size: 1.2rem;
  justify-content: center;
  width: 24px;
}

.private-nav a.active,
.private-nav a:hover,
.private-nav a:focus {
  background: var(--private-blue);
  box-shadow: 0 12px 28px rgba(7, 95, 208, 0.32);
  color: #ffffff;
}

.sidebar-help {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 18px;
}

.sidebar-help strong,
.sidebar-help span,
.sidebar-help a {
  color: #ffffff;
}

.sidebar-help span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
}

.sidebar-help a {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 750;
}

.sidebar-help i {
  color: #47a1ff;
  font-size: 1.1rem;
}

.private-main {
  min-width: 0;
}

.private-topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--private-line);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 32px;
}

.private-topbar span {
  display: block;
  font-size: 0.86rem;
}

.icon-button,
.notification-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--private-navy);
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.icon-button {
  font-size: 1.6rem;
}

.topbar-user {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.notification-button {
  font-size: 1.3rem;
  height: 36px;
  position: relative;
  width: 36px;
}

.notification-button span {
  align-items: center;
  background: #ed1c2f;
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 0.68rem;
  font-weight: 850;
  height: 18px;
  justify-content: center;
  position: absolute;
  right: 2px;
  top: 0;
  width: 18px;
}

.topbar-user-copy {
  text-align: right;
}

.topbar-user-copy strong {
  color: var(--private-navy);
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, #d8e9ff, #ffffff);
  border: 1px solid var(--private-line);
  border-radius: 999px;
  color: var(--private-navy);
  display: flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.private-content {
  padding: 34px 32px 46px;
}

.dashboard-heading {
  margin-bottom: 24px;
}

.dashboard-heading h1 {
  font-size: clamp(1.7rem, 2.1vw, 2.25rem);
  margin-bottom: 6px;
}

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

.metric-card,
.dashboard-panel {
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(8, 36, 95, 0.08);
}

.metric-card {
  align-items: center;
  display: flex;
  gap: 18px;
  min-height: 132px;
  padding: 22px;
}

.metric-card-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.metric-card-link:hover,
.metric-card-link:focus-visible {
  border-color: rgba(15, 98, 210, 0.32);
  box-shadow: 0 14px 36px rgba(8, 36, 95, 0.13);
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.metric-card-link:focus-visible {
  outline: 3px solid rgba(15, 98, 210, 0.18);
  outline-offset: 3px;
}

.metric-card span {
  color: var(--private-navy);
  font-weight: 700;
}

.metric-card strong {
  color: var(--private-navy);
  display: block;
  font-size: 1.7rem;
  line-height: 1.2;
  margin-top: 4px;
}

.metric-icon {
  align-items: center;
  border-radius: 999px;
  display: flex;
  flex: 0 0 58px;
  font-size: 1.8rem;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.metric-icon.blue {
  background: #e5f0ff;
  color: var(--private-blue);
}

.metric-icon.green {
  background: #e3f6e9;
  color: var(--private-green);
}

.metric-icon.violet {
  background: #efe5ff;
  color: var(--private-violet);
}

.metric-icon.orange {
  background: #fff0df;
  color: var(--private-orange);
}

.dashboard-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dashboard-panel {
  min-height: 300px;
  padding: 22px;
}

.panel-title {
  align-items: center;
  border-bottom: 1px solid var(--private-line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
}

.panel-title h2 {
  color: var(--private-navy);
  font-size: 1.18rem;
  font-weight: 850;
  margin: 0;
}

.panel-title a {
  color: var(--private-blue);
  font-weight: 750;
  text-decoration: underline;
}

.status-pill {
  background: #dff7e6;
  border-radius: 999px;
  color: var(--private-green);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 12px;
}

.status-pill.warning {
  background: #fff0df;
  color: var(--private-orange);
}

.status-pill.neutral {
  background: #eef3f9;
  color: var(--private-muted);
}

.status-pill.danger {
  background: #fde2e2;
  color: #b42318;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.empty-state {
  align-items: center;
  color: var(--private-muted);
  display: grid;
  justify-items: center;
  min-height: 205px;
  padding: 28px;
  text-align: center;
}

.empty-state i {
  color: #9ab3d4;
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.empty-state p {
  max-width: 320px;
}

.admin-content-grid {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.single-column-grid {
  grid-template-columns: 1fr;
}

.form-panel,
.table-panel {
  min-height: 0;
}

.collapsible-form-panel {
  display: grid;
  gap: 18px;
}

.collapsible-form-panel summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-self: start;
  list-style: none;
}

.collapsible-form-panel summary::-webkit-details-marker {
  display: none;
}

.collapsible-form-panel:not([open]) {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.collapsible-form-panel:not([open]) summary {
  margin: 0;
}

.collapsible-form-panel[open] summary {
  margin-bottom: 4px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  color: var(--private-navy);
  display: grid;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 7px;
}

.admin-form .check-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-form .check-row input {
  height: 18px;
  width: 18px;
}

.admin-form .form-control {
  border-color: var(--private-line);
  border-radius: 8px;
  min-height: 44px;
}

.admin-form textarea.form-control {
  min-height: 104px;
}

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

.admin-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--private-line);
  color: var(--private-ink);
  padding: 14px 12px;
  vertical-align: middle;
}

.admin-table th {
  color: var(--private-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

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

.admin-table strong {
  color: var(--private-navy);
}

.view-toggle-bar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.view-toggle-bar strong {
  color: var(--private-navy);
  display: block;
  font-weight: 900;
}

.view-toggle-bar span {
  color: var(--private-muted);
  display: block;
  font-size: 0.92rem;
}

.segmented-control {
  background: #eaf1fb;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.segmented-control a {
  align-items: center;
  border-radius: 7px;
  color: var(--private-muted);
  display: inline-flex;
  font-weight: 850;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

.segmented-control a.active {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(13, 37, 78, 0.1);
  color: var(--private-blue);
}

.forecast-filter-panel {
  display: grid;
  gap: 14px;
}

.compact-filter-panel {
  padding: 14px;
}

.compact-filter-grid {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(210px, 1.2fr) minmax(250px, 1.4fr) minmax(160px, 1fr) auto;
}

.compact-filter-grid label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.compact-filter-grid .form-control {
  min-height: 36px;
  padding-bottom: 7px;
  padding-top: 7px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.compact-filter-actions {
  align-items: center;
  align-self: end;
  flex-wrap: nowrap;
  justify-content: flex-end;
  padding-bottom: 0;
}

.compact-filter-actions .btn {
  min-height: 36px;
  white-space: nowrap;
}

.multi-filter-field {
  min-width: 0;
}

.multi-chip-picker {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: flex;
  gap: 6px;
  min-height: 36px;
  padding: 4px 6px;
}

.multi-chip-picker:focus-within {
  border-color: var(--private-blue);
  box-shadow: 0 0 0 3px rgba(0, 103, 216, 0.12);
}

.multi-chip-list {
  display: flex;
  flex: 0 1 auto;
  gap: 5px;
  max-width: 60%;
  overflow: hidden;
}

.filter-chip {
  align-items: center;
  background: #eaf1fb;
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  color: var(--private-navy);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 850;
  gap: 4px;
  max-width: 150px;
  min-height: 26px;
  padding: 0 5px 0 10px;
}

.filter-chip button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--private-muted);
  cursor: pointer;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  padding: 0;
  width: 22px;
}

.filter-chip small {
  color: var(--private-blue);
  font-size: 0.68rem;
  font-weight: 900;
}

.multi-chip-picker input.form-control {
  border: 0;
  box-shadow: none;
  flex: 1 1 110px;
  min-width: 110px;
  padding-left: 2px;
}

.multi-chip-picker input.form-control:focus {
  box-shadow: none;
}

.worker-coverage-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.worker-coverage-picker {
  align-items: flex-start;
  flex-direction: column;
  overflow: visible;
}

.worker-coverage-picker .multi-chip-list {
  flex: 1 1 auto;
  flex-wrap: wrap;
  max-width: none;
  overflow: visible;
  width: 100%;
}

.worker-coverage-picker .filter-chip {
  flex: 0 1 auto;
  max-width: 100%;
}

.worker-coverage-picker input.form-control {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
}

.plan-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  margin-right: 8px;
  width: 10px;
}

.plan-color-1 { --plan-accent: #0f6eea; --plan-bg: #eef5ff; --plan-border: #bcd7ff; }
.plan-color-2 { --plan-accent: #0f8a3a; --plan-bg: #edfdf3; --plan-border: #bdeccf; }
.plan-color-3 { --plan-accent: #6d35f2; --plan-bg: #f3efff; --plan-border: #d6c7ff; }
.plan-color-4 { --plan-accent: #d66a00; --plan-bg: #fff4e7; --plan-border: #ffd7ad; }
.plan-color-5 { --plan-accent: #be2455; --plan-bg: #fff0f5; --plan-border: #f8bdd1; }
.plan-color-6 { --plan-accent: #007c89; --plan-bg: #eafcff; --plan-border: #b9edf3; }

.forecast-row .plan-dot {
  background: var(--plan-accent);
}

.visit-calendar-panel {
  overflow: hidden;
}

.calendar-title {
  align-items: center;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  text-align: center;
}

.calendar-title h2 {
  margin: 0;
}

.visit-calendar-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  margin-top: 14px;
  overflow-x: auto;
}

.calendar-weekday {
  background: #f3f7fc;
  color: var(--private-muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 10px;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  background: #ffffff;
  border: 1px solid var(--private-line);
  min-height: 132px;
  padding: 10px;
}

.calendar-day.muted {
  background: #f8fbff;
}

.calendar-day.weekend {
  background: #ffe7e7;
}

.calendar-day.muted.weekend {
  background: #fff0f0;
}

.calendar-day.today {
  background: #dbeeff;
  box-shadow: inset 0 0 0 2px var(--private-blue);
}

.calendar-day.today.weekend {
  background: #dbeeff;
}

.calendar-day-number {
  color: var(--private-navy);
  font-weight: 850;
  margin-bottom: 8px;
}

.calendar-day.muted .calendar-day-number {
  color: var(--private-muted);
}

.calendar-visit-card {
  margin: 0 0 6px;
}

.calendar-visit-card button,
.calendar-visit-card a {
  background: var(--plan-bg, #eef5ff);
  border: 1px solid var(--plan-border, #c9ddff);
  border-radius: 8px;
  color: var(--private-ink);
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 8px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.calendar-visit-card button:hover,
.calendar-visit-card a:hover {
  background: #dfeeff;
  border-color: var(--plan-accent, var(--private-blue));
}

.calendar-visit-created a {
  background: #f4f8f5;
  border-color: #bde8ca;
}

.calendar-visit-created small {
  color: #10833a;
  font-weight: 800;
}

.calendar-visit-card strong {
  color: var(--plan-accent, var(--private-blue));
  font-size: 0.84rem;
}

.calendar-visit-card span {
  color: var(--private-navy);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.calendar-visit-card small {
  color: var(--private-muted);
  font-size: 0.75rem;
  line-height: 1.2;
}

.calendar-more-button {
  background: #ffffff;
  border: 1px dashed var(--private-blue);
  border-radius: 8px;
  color: var(--private-blue);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  min-height: 34px;
  width: 100%;
}

.calendar-more-button:hover {
  background: #eef5ff;
}

.confirm-overlay {
  align-items: center;
  background: rgba(8, 25, 55, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2200;
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-dialog {
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(3, 19, 46, 0.22);
  max-width: 460px;
  padding: 28px;
  position: relative;
  width: min(100%, 460px);
}

.day-visits-dialog {
  max-width: 560px;
}

.day-visits-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 560px);
  overflow: auto;
}

.day-visits-list .calendar-visit-card {
  margin: 0;
}

.confirm-dialog h2 {
  color: var(--private-navy);
  font-size: 1.45rem;
  font-weight: 900;
  margin: 16px 0 8px;
}

.confirm-dialog p {
  color: var(--private-muted);
  margin: 0 0 18px;
}

.confirm-summary {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  margin: 0 0 20px;
}

.confirm-summary div {
  border-bottom: 1px solid var(--private-line);
  padding: 12px 14px;
}

.confirm-summary div:last-child {
  border-bottom: 0;
}

.confirm-summary dt {
  color: var(--private-muted);
  font-size: 0.74rem;
  font-weight: 850;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.confirm-summary dd {
  color: var(--private-navy);
  font-weight: 800;
  margin: 0;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.client-property-list {
  display: grid;
  gap: 16px;
}

.client-property-card {
  align-items: center;
  border-bottom: 1px solid var(--private-line);
  display: grid;
  gap: 16px;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 0 0 16px;
}

.client-property-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.property-thumb {
  align-items: center;
  background: #e5f0ff;
  border-radius: 8px;
  color: var(--private-blue);
  display: flex;
  font-size: 2rem;
  height: 74px;
  justify-content: center;
  width: 96px;
}

.property-card-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.property-card-title strong {
  color: var(--private-navy);
  font-size: 1.04rem;
}

.client-property-card p {
  color: var(--private-muted);
  margin: 0 0 4px;
}

.editable-property-list {
  gap: 22px;
}

.editable-property-card {
  align-items: start;
  grid-template-columns: 150px minmax(0, 1fr);
}

.property-photo {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 96px;
}

.admin-property-photo {
  width: 88px;
}

.property-photo-placeholder {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #eaf2ff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  color: var(--private-blue);
  display: inline-flex;
  font-size: 1.5rem;
  justify-content: center;
  width: 88px;
}

.property-photo-placeholder.large {
  width: 150px;
}

.property-photo-editor {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 160px minmax(0, 1fr);
}

.property-photo-editor .property-photo {
  width: 150px;
}

.editable-property-card > .property-photo {
  width: 150px;
}

.property-edit-body {
  min-width: 0;
  position: relative;
}

.compact-form {
  gap: 10px;
}

.property-actions {
  display: flex;
  gap: 10px;
}

.property-delete-form {
  margin-top: 10px;
}

.floating-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.floating-form > summary {
  display: inline-flex;
  list-style: none;
}

.floating-form > summary::-webkit-details-marker {
  display: none;
}

.floating-form[open]::before {
  background: rgba(4, 19, 49, 0.52);
  content: "";
  inset: 0;
  position: fixed;
  z-index: 1100;
}

.form-modal {
  background: #ffffff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(8, 36, 95, 0.26);
  left: 50%;
  max-height: min(86vh, 920px);
  max-width: 760px;
  overflow: auto;
  padding: 24px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 32px), 760px);
  z-index: 1110;
}

.form-modal-wide {
  max-width: 980px;
  width: min(calc(100vw - 32px), 980px);
}

.form-modal-head {
  align-items: flex-start;
  border-bottom: 1px solid #dbe6f2;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.form-modal-head h2 {
  color: var(--private-navy);
  font-size: 1.2rem;
  font-weight: 850;
  margin: 0;
}

.form-modal-head p {
  margin: 4px 0 0;
}

.modal-close {
  align-items: center;
  background: #eef4fb;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  color: var(--private-navy);
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  text-decoration: none;
  width: 36px;
}

.contract-legal-floating {
  margin-bottom: 18px;
}

.contract-legal-trigger {
  margin-bottom: 18px;
}

.contract-legal-modal .admin-form {
  margin: 0;
}

.contract-legal-modal .btn-primary {
  margin-top: 4px;
}

.contract-legal-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 0.35fr) 1fr;
  margin-top: 4px;
}

.contract-legal-actions .btn {
  justify-content: center;
}

.identity-floating {
  margin-bottom: 18px;
}

.identity-modal .admin-form {
  margin: 0;
}

.identity-status-box {
  background: #f4f8ff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.identity-status-box p {
  color: #53657f;
  margin: 0;
}

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

.identity-capture-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.identity-capture-card input[type="file"] {
  font-size: 0.92rem;
  max-width: 100%;
  min-width: 0;
}

.dni-camera-frame {
  align-items: center;
  aspect-ratio: 1.58 / 1;
  background: #f4f8ff;
  border: 3px solid #e11931;
  border-radius: 10px;
  color: #53657f;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  max-height: 210px;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  position: relative;
  text-align: center;
  width: 100%;
}

.dni-camera-frame::before {
  border: 1px dashed rgba(225, 25, 49, 0.55);
  border-radius: 7px;
  content: "";
  inset: 10px;
  pointer-events: none;
  position: absolute;
}

.dni-camera-frame img {
  display: block;
  height: 100%;
  inset: 0;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.dni-camera-frame > span {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.35;
  padding: 0 18px;
}

.dni-capture-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dni-capture-actions .btn {
  justify-content: center;
  width: 100%;
}

.dni-camera-modal {
  align-items: center;
  background: rgba(4, 19, 49, 0.82);
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1200;
}

.dni-camera-modal:not([hidden]) {
  display: flex;
}

.dni-camera-shell {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 14px;
  max-width: 980px;
  overflow: hidden;
  padding: 16px;
  width: min(100%, 980px);
}

.dni-camera-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.dni-camera-head strong,
.dni-camera-head span {
  display: block;
}

.dni-camera-head strong {
  color: var(--private-navy);
  font-size: 1.05rem;
}

.dni-camera-head span {
  color: #53657f;
  font-size: 0.92rem;
  margin-top: 2px;
}

.dni-live-stage {
  aspect-ratio: 16 / 10;
  background: #061a3e;
  border-radius: 10px;
  max-height: min(68dvh, 620px);
  overflow: hidden;
  position: relative;
}

.dni-live-stage video {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.dni-live-frame {
  aspect-ratio: 1.58 / 1;
  border: 4px solid #e11931;
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  left: 50%;
  max-width: calc(100% - 28px);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(82%, 680px);
}

.dni-live-frame::before {
  border: 1px dashed rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  content: "";
  inset: 10px;
  position: absolute;
}

.dni-camera-buttons {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(140px, 0.35fr) 1fr;
}

.dni-camera-buttons .btn {
  justify-content: center;
}

body.dni-camera-active {
  overflow: hidden;
}

@media (orientation: landscape) and (max-height: 560px) {
  .form-modal.identity-modal {
    left: 50%;
    max-height: calc(100dvh - 18px);
    max-width: min(980px, calc(100vw - 34px));
    padding: 14px;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .identity-modal .form-modal-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .identity-modal .form-modal-head p {
    display: none;
  }

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

  .identity-modal .dni-camera-frame {
    max-height: 150px;
  }

  .identity-modal .contract-legal-actions {
    grid-template-columns: minmax(150px, 0.35fr) 1fr;
  }

  .dni-camera-modal {
    align-items: stretch;
    padding: 0;
  }

  .dni-camera-shell {
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    height: 100dvh;
    max-height: 100dvh;
    max-width: none;
    padding: 10px 12px;
    width: 100vw;
  }

  .dni-camera-head {
    align-items: center;
  }

  .dni-camera-head span {
    display: none;
  }

  .dni-live-stage {
    aspect-ratio: auto;
    height: 100%;
    max-height: none;
    min-height: 0;
  }

  .dni-live-frame {
    width: min(74vw, calc((100dvh - 112px) * 1.58));
  }

  .dni-camera-buttons {
    grid-template-columns: 0.36fr 1fr;
  }

  .dni-camera-shell > .table-note {
    font-size: 0.78rem;
    margin: -4px 0 0;
  }
}

.property-card-read {
  display: grid;
  gap: 6px;
}

.property-card-read p {
  margin: 0;
}

.property-card-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.client-contract-box {
  border-top: 1px solid #dbe6f2;
  margin-top: 16px;
  padding-top: 16px;
}

.contract-summary-row {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.contract-summary-row strong,
.contract-summary-row span {
  display: block;
}

.contract-summary-row span {
  color: #53657f;
  font-size: 0.88rem;
}

.contract-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contract-document-box {
  align-items: center;
  background: #f4f8ff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.contract-plan-picker summary {
  display: inline-flex;
  list-style: none;
}

.contract-plan-picker summary::-webkit-details-marker {
  display: none;
}

.plan-choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.plan-choice-card {
  align-items: flex-start;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.plan-choice-card input {
  margin-top: 4px;
}

.contract-sign-page {
  max-width: 1180px;
}

.contract-sign-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
}

.contract-document-actions,
.signature-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contract-sign-meta {
  background: #f4f8ff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  margin-top: 18px;
  padding: 12px;
}

.contract-sign-meta small {
  color: #53657f;
  overflow-wrap: anywhere;
}

.signature-panel {
  display: grid;
  gap: 14px;
}

.signature-canvas {
  background: #fff;
  border: 2px dashed #b7c9e2;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(8, 39, 95, 0.04);
  height: 260px;
  touch-action: none;
  width: 100%;
}

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

.plan-choice-card small {
  color: #53657f;
  margin-top: 2px;
}

.empty-inline {
  color: #53657f;
  font-size: 0.92rem;
}

.inline-form {
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--private-blue);
  font-weight: 800;
  padding: 0;
  text-decoration: underline;
}

.danger-link {
  color: #b42318;
}

.dni-admin-cell,
.dni-admin-links,
.dni-admin-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dni-admin-cell {
  flex-direction: column;
}

.danger-link {
  color: #dc2626;
}

.actions-cell {
  min-width: 180px;
}

.actions-cell,
.actions-cell .inline-form {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.inline-edit {
  display: inline-block;
}

.inline-edit > summary {
  cursor: pointer;
  display: inline-flex;
  list-style: none;
}

.inline-edit > summary::-webkit-details-marker {
  display: none;
}

.inline-edit-panel {
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(8, 36, 95, 0.16);
  margin-top: 10px;
  min-width: min(680px, calc(100vw - 80px));
  padding: 16px;
  position: absolute;
  right: 28px;
  z-index: 20;
}

.muted-cell {
  color: var(--private-muted);
}

.table-note {
  color: var(--private-muted);
  display: block;
  font-size: 0.86rem;
  margin-top: 4px;
}

.compact-check-list {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  max-width: 360px;
  padding: 0;
}

.compact-check-list li {
  color: var(--private-ink);
  font-size: 0.9rem;
}

.compact-check-list span {
  color: var(--private-muted);
  font-weight: 800;
}

.plan-check-editor {
  display: grid;
  gap: 10px;
}

.plan-check-head,
.plan-check-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 72px minmax(120px, 0.75fr) minmax(220px, 1.6fr) minmax(120px, 0.75fr) minmax(110px, 0.7fr) 42px;
}

.plan-check-head {
  color: var(--private-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.plan-check-empty {
  border: 1px dashed #cbd8ea;
  border-radius: 8px;
  color: var(--private-muted);
  padding: 14px;
}

.plan-check-remove {
  align-items: center;
  align-self: center;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.plan-check-actions {
  display: flex;
  margin-top: 2px;
}

.plan-list {
  display: grid;
  gap: 14px;
}

.plan-edit-card {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  padding: 16px;
}

.plan-edit-card summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
}

.plan-edit-card summary::-webkit-details-marker {
  display: none;
}

.plan-edit-card summary strong,
.plan-edit-card summary small {
  display: block;
}

.plan-edit-card summary strong {
  color: var(--private-navy);
}

.plan-edit-card summary small {
  color: var(--private-muted);
  margin-top: 3px;
}

.plan-edit-card[open] summary {
  border-bottom: 1px solid var(--private-line);
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.plan-lock-note {
  margin-bottom: 16px;
}

.plan-secondary-actions {
  display: flex;
  gap: 16px;
  margin-top: 14px;
}

.contract-status-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

.contract-status-form .form-control {
  min-width: 132px;
}

.visit-actions-cell {
  display: grid;
  gap: 10px;
  min-width: 260px;
}

.visit-actions-cell .btn {
  justify-content: center;
  width: 100%;
}

.visit-workflow-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.activation-copy {
  display: grid;
  gap: 10px;
}

.activation-copy input {
  font-size: 0.9rem;
}

.private-message-page {
  align-items: center;
  background: var(--private-soft);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.private-message {
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  max-width: 460px;
  padding: 32px;
  text-align: center;
}

.visit-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.visit-detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  margin-bottom: 18px;
}

.meta-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.meta-list div {
  border-bottom: 1px solid var(--private-line);
  padding-bottom: 12px;
}

.meta-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-list dt {
  color: var(--private-muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.meta-list dd {
  color: var(--private-ink);
  font-weight: 700;
  margin: 0;
}

.compact-form {
  gap: 10px;
}

.compact-empty {
  min-height: 130px;
}

.budget-review {
  border-top: 1px solid var(--private-line);
  margin-top: 12px;
  padding-top: 12px;
}

.budget-review > summary {
  cursor: pointer;
  display: inline-flex;
  list-style: none;
}

.budget-review > summary::-webkit-details-marker {
  display: none;
}

.budget-review-form {
  background: #f8fbff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  margin-top: 10px;
  padding: 14px;
}

.property-search-picker {
  display: grid;
  gap: 10px;
}

.property-picker-results {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
}

.property-result-card {
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  color: var(--private-ink);
  display: grid;
  gap: 3px;
  padding: 12px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.property-result-card:hover,
.property-result-card.selected {
  background: #f8fbff;
  border-color: var(--private-blue);
  box-shadow: 0 10px 26px rgba(0, 103, 216, 0.12);
}

.property-result-card strong {
  color: var(--private-navy);
}

.property-result-card span,
.property-result-card small {
  color: var(--private-muted);
}

.property-picker-selected {
  align-items: center;
  background: #e8f7ee;
  border: 1px solid #c8efda;
  border-radius: 8px;
  color: #087a2f;
  display: flex;
  font-weight: 800;
  gap: 8px;
  padding: 10px 12px;
}

.visit-photo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  margin-top: 18px;
}

.visit-photo-card {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.photo-lightbox-trigger {
  background: transparent;
  border: 0;
  display: block;
  padding: 0;
  position: relative;
  width: 100%;
}

.visit-photo-card img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.photo-lightbox-trigger > span {
  align-items: center;
  background: rgba(6, 36, 92, 0.82);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 32px;
}

.visit-photo-card figcaption {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
}

.visit-photo-card figcaption strong {
  color: var(--private-ink);
  font-size: 0.82rem;
}

.visit-photo-card figcaption span {
  color: var(--private-muted);
  font-size: 0.78rem;
}

.pending-photo-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.photo-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.photo-source-actions .btn {
  justify-content: center;
}

.pending-photo-card {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.pending-photo-card img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.pending-photo-card figcaption {
  color: var(--private-muted);
  font-size: 0.76rem;
  overflow: hidden;
  padding: 7px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-photo-remove {
  align-items: center;
  background: rgba(6, 36, 92, 0.88);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 28px;
}

.photo-lightbox {
  align-items: center;
  background: rgba(2, 11, 31, 0.92);
  display: grid;
  gap: 14px;
  grid-template-rows: 1fr auto;
  inset: 0;
  justify-items: center;
  padding: 28px;
  position: fixed;
  z-index: 1500;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox img {
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  max-height: calc(100vh - 110px);
  max-width: min(1120px, calc(100vw - 40px));
  object-fit: contain;
}

.photo-lightbox p {
  color: #ffffff;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.photo-lightbox-close {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 999px;
  color: var(--private-navy);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  position: fixed;
  right: 18px;
  top: 18px;
  width: 42px;
  z-index: 1510;
}

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

.timeline-item {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.timeline-item strong {
  color: var(--private-navy);
}

.timeline-item span,
.timeline-item small {
  color: var(--private-muted);
  font-size: 0.84rem;
}

.timeline-item p {
  margin: 4px 0 0;
}

.visit-check-panel {
  display: grid;
  gap: 18px;
}

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

.visit-check-item {
  align-items: start;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 0.9fr);
  padding: 14px;
}

.visit-check-copy {
  display: grid;
  gap: 5px;
}

.visit-check-copy strong {
  color: var(--private-ink);
}

.visit-check-copy span {
  color: var(--private-blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.visit-check-copy p {
  color: var(--private-muted);
  margin: 0;
}

.visit-check-fields {
  display: grid;
  gap: 10px;
}

.visit-result-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.visit-result-option {
  cursor: pointer;
  margin: 0;
}

.visit-result-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visit-result-option span {
  align-items: center;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  color: var(--private-ink);
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 8px;
  text-align: center;
}

.visit-result-option input:checked + span {
  border-color: var(--private-blue);
  box-shadow: 0 0 0 3px rgba(7, 95, 208, 0.12);
  color: var(--private-blue);
}

.visit-result-option.ok input:checked + span {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.visit-result-option.incidencia input:checked + span {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.visit-result-option.no_aplica input:checked + span {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #3730a3;
}

.visit-save-bar {
  align-items: center;
  border-top: 1px solid var(--private-line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
}

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

.latest-report-card,
.report-card {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.report-card.unread-report {
  border-color: #f4a340;
  box-shadow: 0 14px 30px rgba(244, 163, 64, 0.14);
}

.report-card.unread-report h3 {
  font-weight: 900;
}

.latest-report-card h3,
.report-card h3 {
  color: var(--private-ink);
  font-size: 1rem;
  margin: 8px 0 4px;
}

.latest-report-card p,
.report-card p,
.report-summary {
  color: var(--private-muted);
  margin: 0;
}

.report-list {
  display: grid;
  gap: 14px;
}

.report-card {
  align-items: center;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, auto) auto;
}

.report-card dl {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  margin: 0;
}

.report-card dt {
  color: var(--private-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.report-card dd {
  color: var(--private-ink);
  font-weight: 800;
  margin: 0;
}

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

.client-check-item {
  align-items: start;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 120px 1fr;
  padding: 12px;
}

.client-check-item strong {
  color: var(--private-ink);
}

.client-check-item p {
  color: var(--private-muted);
  margin: 4px 0 0;
}

.check-result {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  padding: 6px 10px;
  text-align: center;
}

.check-result.ok {
  background: #dcfce7;
  color: #15803d;
}

.check-result.incidencia {
  background: #fee2e2;
  color: #b91c1c;
}

.check-result.no_aplica {
  background: #e0e7ff;
  color: #3730a3;
}

.check-result.pendiente {
  background: #f1f5f9;
  color: #475569;
}

.public-report-page {
  background: var(--private-soft);
  color: var(--private-ink);
  min-height: 100vh;
}

.public-report-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1040px;
  padding: 28px 18px 42px;
}

.public-report-hero {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--private-line);
  border-radius: 10px;
  color: var(--private-navy);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 26px;
}

.public-report-hero h1 {
  color: var(--private-navy);
  font-size: 2rem;
  margin: 0 0 6px;
}

.public-report-hero p {
  color: var(--private-muted);
  margin: 0;
}

.public-report-brand {
  align-items: center;
  display: flex;
}

.public-report-brand img {
  display: block;
  height: auto;
  max-width: 240px;
  width: 240px;
}

.public-meta-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.weekday-grid {
  border: 1px solid var(--private-line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding: 16px;
}

.weekday-grid legend {
  color: var(--private-ink);
  float: none;
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 4px;
  padding: 0;
  width: auto;
}

.weekday-grid .check-row {
  align-items: center;
  background: #f8fbff;
  border: 1px solid var(--private-line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
}

.weekday-grid .check-row input {
  accent-color: var(--private-blue);
  height: 18px;
  width: 18px;
}

.weekday-grid .check-row span {
  color: var(--private-ink);
  font-weight: 700;
}

@media (max-width: 860px) {
  .private-app {
    display: block;
    padding-left: 72px;
  }

  .private-sidebar {
    inset: 0 auto 0 0;
    min-height: 100vh;
    overflow-y: auto;
    padding: 12px 10px;
    position: fixed;
    width: 72px;
    z-index: 1000;
  }

  .private-brand {
    justify-content: center;
    min-height: 52px;
    margin-bottom: 18px;
    padding: 7px 6px;
  }

  .private-brand img {
    max-width: 54px;
  }

  .private-nav {
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .private-nav a {
    gap: 0;
    justify-content: center;
    min-height: 48px;
    padding: 0;
  }

  .private-nav a i {
    font-size: 1.35rem;
    width: auto;
  }

  .private-nav a span {
    display: none;
  }

  .nav-badge {
    font-size: 0.68rem;
    height: 20px;
    margin-left: 0;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: 6px;
    top: 5px;
  }

  .sidebar-help {
    display: none;
  }

  .private-topbar {
    gap: 10px;
    min-height: 64px;
    padding: 12px 14px;
  }

  .private-content {
    padding: 24px 14px 36px;
  }

  .form-modal,
  .form-modal-wide {
    left: calc(72px + ((100vw - 72px) / 2));
    max-height: calc(100dvh - 150px);
    padding: 18px;
    top: 92px;
    transform: translateX(-50%);
    width: calc(100vw - 96px);
  }

  .form-modal-head {
    background: #ffffff;
    gap: 10px;
    margin: -18px -18px 16px;
    padding: 18px 18px 14px;
    position: sticky;
    top: -18px;
    z-index: 2;
  }

  .form-modal-head h2 {
    font-size: 1.05rem;
  }

  .form-modal-head p {
    font-size: 0.92rem;
  }

  .topbar-user-copy {
    display: none;
  }

  .metric-grid,
  .dashboard-grid,
  .admin-content-grid,
  .contract-sign-grid,
  .form-row,
  .visit-detail-grid,
  .visit-check-item,
  .visit-summary-fields,
  .report-card,
  .report-card dl,
  .client-check-item,
  .public-meta-list {
    grid-template-columns: 1fr;
  }

  .contract-legal-actions {
    grid-template-columns: 1fr;
  }

  .identity-capture-grid {
    grid-template-columns: 1fr;
  }

  .dni-camera-frame {
    max-height: 170px;
  }

  .dni-capture-actions,
  .dni-camera-buttons {
    grid-template-columns: 1fr;
  }

  .dni-camera-modal {
    padding: 10px;
  }

  .dni-camera-shell {
    border-radius: 8px;
    padding: 12px;
  }

  .dni-live-stage {
    aspect-ratio: 3 / 4;
    max-height: 62dvh;
  }

  .dni-live-frame {
    width: calc(100% - 32px);
  }

  .visit-heading {
    align-items: start;
    flex-direction: column;
  }

  .visit-workflow-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .view-toggle-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control a {
    flex: 1;
    justify-content: center;
  }

  .compact-filter-grid {
    grid-template-columns: 1fr;
  }

  .compact-filter-actions {
    justify-content: stretch;
  }

  .compact-filter-actions .btn {
    flex: 1;
  }

  .multi-chip-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .multi-chip-list {
    flex-wrap: wrap;
    max-width: none;
  }

  .visit-calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-x: visible;
  }

  .calendar-weekday {
    font-size: 0.62rem;
    padding: 7px 2px;
  }

  .calendar-day {
    min-height: 78px;
    padding: 4px;
  }

  .calendar-day-number {
    font-size: 0.76rem;
    margin-bottom: 4px;
  }

  .calendar-visit-card {
    margin-bottom: 3px;
  }

  .calendar-visit-card button,
  .calendar-visit-card a {
    border-radius: 6px;
    gap: 0;
    min-height: 24px;
    padding: 3px 2px;
    text-align: center;
  }

  .calendar-visit-card span,
  .calendar-visit-card small {
    display: none;
  }

  .calendar-visit-card strong {
    font-size: 0.64rem;
  }

  .calendar-more-button {
    font-size: 0.66rem;
    min-height: 24px;
    padding: 0 2px;
  }

  .visit-workflow-actions .btn,
  .visit-save-bar .btn {
    justify-content: center;
    width: 100%;
  }

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

  .public-report-hero {
    align-items: start;
    flex-direction: column;
  }

  .client-property-card,
  .editable-property-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .property-photo-editor {
    grid-template-columns: 1fr;
  }

  .property-photo-editor .property-photo,
  .property-photo-placeholder,
  .property-photo-placeholder.large {
    max-width: 220px;
    width: 100%;
  }

  .plan-check-head {
    display: none;
  }

  .plan-check-row {
    border: 1px solid var(--private-line);
    border-radius: 8px;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .plan-check-remove {
    justify-self: start;
    width: auto;
    padding: 0 12px;
  }

  .property-thumb,
  .property-photo,
  .editable-property-card > .property-photo {
    max-width: 220px;
    width: 100%;
  }

  .signature-canvas {
    height: 190px;
  }

  .contract-document-actions .btn,
  .signature-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .private-app {
    padding-left: 64px;
  }

  .private-sidebar {
    padding: 10px 8px;
    width: 64px;
  }

  .form-modal,
  .form-modal-wide {
    left: calc(64px + ((100vw - 64px) / 2));
    max-height: calc(100dvh - 145px);
    top: 88px;
    width: calc(100vw - 82px);
  }

  .private-nav a {
    min-height: 44px;
  }

  .notification-button {
    display: none;
  }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* DNI camera: final landscape override for mobile browsers */
@media (orientation: landscape) and (max-height: 620px) {
  body.dni-camera-active {
    overflow: hidden !important;
  }

  body.dni-camera-active .dni-camera-modal:not([hidden]) {
    align-items: stretch !important;
    background: rgba(4, 19, 49, 0.92) !important;
    display: flex !important;
    height: 100dvh !important;
    inset: 0 !important;
    justify-content: stretch !important;
    padding: 0 !important;
    position: fixed !important;
    width: 100vw !important;
    z-index: 9999 !important;
  }

  body.dni-camera-active .dni-camera-shell {
    border-radius: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    max-width: none !important;
    padding: 8px 12px !important;
    width: 100vw !important;
  }

  body.dni-camera-active .dni-camera-head {
    align-items: center !important;
    min-height: 34px !important;
  }

  body.dni-camera-active .dni-camera-head span,
  body.dni-camera-active .dni-camera-shell > .table-note {
    display: none !important;
  }

  body.dni-camera-active .dni-live-stage {
    aspect-ratio: auto !important;
    border-radius: 8px !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  body.dni-camera-active .dni-live-frame {
    left: 50% !important;
    max-width: calc(100vw - 48px) !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(84vw, calc((100dvh - 98px) * 1.58)) !important;
  }

  body.dni-camera-active .dni-camera-buttons {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(120px, 0.32fr) 1fr !important;
    margin-top: 0 !important;
  }

  .form-modal.identity-modal {
    border-radius: 8px !important;
    inset: 8px !important;
    left: 8px !important;
    max-height: calc(100dvh - 16px) !important;
    max-width: none !important;
    padding: 12px !important;
    top: 8px !important;
    transform: none !important;
    width: calc(100vw - 16px) !important;
  }

  .identity-modal .form-modal-head {
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
  }

  .identity-modal .form-modal-head p {
    display: none !important;
  }

  .identity-modal .identity-capture-grid {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .identity-modal .dni-camera-frame {
    margin: 0 auto !important;
    max-height: 148px !important;
    width: min(100%, 360px) !important;
  }

  .identity-modal .contract-legal-actions {
    grid-template-columns: minmax(120px, 0.32fr) 1fr !important;
  }
}
