:root {
  --bg: #f7f4f3;
  --card: #ffffff;
  --text: #1b2230;
  --muted: #6b6571;
  --line: #e4d9db;
  --primary: #630404;
  --primary-dark: #260101;
  --primary-soft: #f7ecef;
  --ok: #1d6c42;
  --ok-soft: #def4e7;
  --warn: #9a6408;
  --warn-soft: #fff3df;
  --danger: #b42318;
  --danger-soft: #ffe6e2;
  --shadow: 0 16px 40px rgba(43, 24, 28, 0.08);
}
* { box-sizing: border-box; }
.evaluator-entry-screen {
  display: none;
}
.evaluator-line-screen {
  display: none;
}
html.evaluator-entry-route body {
  min-height: 100vh;
  background: linear-gradient(180deg, #fafafa, #f2f3f5);
  color: #18181b;
  font-family: Arial, Helvetica, sans-serif;
}
html.evaluator-entry-route .evaluator-entry-screen {
  display: block;
  width: min(920px, calc(100% - 40px));
  margin: auto;
  padding: 30px 0 60px;
}
html.evaluator-entry-route body > .internal-top-header,
html.evaluator-entry-route:not(.evaluator-flow-form) body > .app-shell {
  display: none !important;
}
.evaluator-entry-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 22px;
  padding: 24px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #630404, #202020);
  color: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .1);
}
.evaluator-entry-header h1 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1.15;
}
.evaluator-entry-eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .14);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.evaluator-entry-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #e4e7ec;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .1);
}
.evaluator-entry-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.evaluator-entry-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.evaluator-entry-option {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
  padding: 24px;
  border: 2px solid #e4e7ec;
  border-radius: 20px;
  background: #fff;
  color: #18181b;
  font: inherit;
  cursor: pointer;
  transition: .18s ease;
}
.evaluator-entry-option:hover,
.evaluator-entry-option:focus-visible {
  border-color: #630404;
  background: #fcf1f3;
  transform: translateY(-2px);
  outline: 3px solid rgba(99, 4, 4, .12);
  outline-offset: 2px;
}
.evaluator-entry-option strong {
  font-size: 1.25rem;
}
.evaluator-entry-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #630404;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
}
.evaluator-line-screen {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #e4e7ec;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .1);
}
html.evaluator-entry-route.evaluator-flow-line .evaluator-entry-card {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-line .evaluator-line-screen {
  display: block;
}
.evaluator-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.evaluator-line-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 99px;
  background: #f8d7da;
  color: #630404;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.evaluator-change-option {
  border: 0;
  background: transparent;
  color: #630404;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.evaluator-change-option:focus-visible {
  outline: 3px solid rgba(99, 4, 4, .2);
  outline-offset: 3px;
}
.evaluator-line-screen h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.evaluator-line-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.evaluator-line-option {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 24px;
  border: 2px solid #e4e7ec;
  border-radius: 20px;
  background: #fff;
  color: #18181b;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: .18s ease;
}
.evaluator-line-option:hover,
.evaluator-line-option:focus-visible {
  border-color: #630404;
  background: #fcf1f3;
  transform: translateY(-2px);
  outline: 3px solid rgba(99, 4, 4, .12);
  outline-offset: 2px;
}
.evaluator-line-option strong {
  font-size: 1.15rem;
  line-height: 1.35;
}
html.evaluator-entry-route.evaluator-flow-form .evaluator-entry-card,
html.evaluator-entry-route.evaluator-flow-form .evaluator-line-screen {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .evaluator-entry-screen {
  padding-bottom: 0;
}
html.evaluator-entry-route.evaluator-flow-form body > .app-shell {
  display: block !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}
html.evaluator-entry-route.evaluator-flow-form .app-shell > .hero {
  display: none !important;
}

/* Formulario público: lenguaje visual de solicitud.apmerr.com. */
.public-evaluator-form-heading {
  display: none;
}
.cae-title-public,
.cae-label-public,
.phone-label-public,
.cae-public-required {
  display: none;
}
html.evaluator-entry-route .phone-label-legacy {
  display: none;
}
html.evaluator-entry-route .phone-label-public,
html.evaluator-entry-route .cae-public-required {
  display: inline;
}

html.evaluator-entry-route.evaluator-flow-form body {
  background: linear-gradient(180deg, #fafafa, #f2f3f5);
  color: #18181b;
  font-family: Arial, Helvetica, sans-serif;
}

html.evaluator-entry-route.evaluator-flow-form body > .app-shell {
  width: min(920px, calc(100% - 40px));
  max-width: 920px;
  padding: 0 0 60px;
  font-family: Arial, Helvetica, sans-serif;
}

html.evaluator-entry-route.evaluator-flow-form .tab-panel.active {
  margin-top: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #e4e7ec;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .1);
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign > .public-evaluator-form-heading {
  display: block;
  margin-bottom: 22px;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-form-kicker {
  margin: 0 0 6px;
  color: #630404;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-form-heading h2 {
  margin: 0;
  color: #18181b;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign > .section-heading > :first-child {
  display: none;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign > .section-heading {
  justify-content: flex-end;
  margin-bottom: 0;
}

html.evaluator-entry-route.evaluator-flow-form #startButton,
html.evaluator-entry-route.evaluator-flow-form #saveButton,
html.evaluator-entry-route.evaluator-flow-form #emptyRentalSaveButton,
html.evaluator-entry-route.evaluator-flow-form #newCaeButton,
html.evaluator-entry-route.evaluator-flow-form #saveInternalCaeButton {
  display: none !important;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign label,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign label {
  display: block;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .checkbox-grid label,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .checkbox-grid label {
  display: flex;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign label > input:not([type="checkbox"]):not([type="radio"]),
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign label > select,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign label > textarea,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign label > input:not([type="checkbox"]):not([type="radio"]),
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign label > select,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign label > textarea {
  display: block;
  margin-top: 6px;
}

html.evaluator-entry-route.evaluator-flow-form .required-marker {
  display: inline !important;
  white-space: nowrap;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .mode-banner {
  display: none !important;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign form {
  display: flex;
  flex-direction: column;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-controls {
  display: contents;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-progress-block {
  order: -10;
  margin: 0;
  gap: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-progress-meta {
  display: block;
  margin-top: 18px;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-step-counter {
  display: block;
  margin: 0;
  color: #630404;
  font-size: 16px;
  font-weight: 800;
  line-height: normal;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-step-title,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-step-percent {
  display: none;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-progress-bar {
  height: 8px;
  margin: 9px 0 26px;
  border-radius: 99px;
  background: #f0e3e5;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-progress-fill {
  background: linear-gradient(90deg, #630404, #7A0A0A);
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .form-section {
  order: 0;
  margin-top: 22px;
  padding-top: 22px;
  border-color: #e4e7ec;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .form-section.wizard-step-active:first-of-type {
  margin-top: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .form-section h3 {
  margin: 0 0 18px;
  color: #18181b;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .grid {
  gap: 18px;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign label {
  gap: 7px;
  color: #27272a;
  font-size: .94rem;
  font-weight: 700;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign input,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign select,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign textarea {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d6d9df;
  border-radius: 13px;
  color: #18181b;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign textarea {
  min-height: 108px;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign input:focus,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign select:focus,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign textarea:focus {
  border-color: #630404;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(99, 4, 4, .1);
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-step-validation,
html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .form-alert {
  border: 1px solid #f0b8b1;
  border-radius: 13px;
  background: #fff4f2;
  color: #b42318;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .wizard-navigation {
  order: 10;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e4e7ec;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .btn {
  border-radius: 14px;
  padding: 12px 18px;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .btn-primary {
  background: #630404;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .btn-primary:hover {
  background: #260101;
}

html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign .btn-secondary {
  border-color: #630404;
  color: #630404;
}

/* CAE público: misma estructura visual que Rehabilitación y Vivienda vacía. */
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #e4e7ec;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .1);
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .public-evaluator-form-heading {
  display: block;
  margin-bottom: 22px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .section-heading > :first-child,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .hero-copy {
  display: none;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .section-heading {
  justify-content: flex-end;
  margin-bottom: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .section-heading .inline-actions {
  justify-content: flex-end;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-progress {
  margin: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-progress-block {
  margin: 0;
  gap: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-progress-meta {
  display: block;
  margin-top: 18px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-step-counter {
  display: block;
  margin: 0;
  color: #630404;
  font-size: 16px;
  font-weight: 800;
  line-height: normal;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-step-title,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-step-percent {
  display: none;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-progress-bar {
  height: 8px;
  margin: 9px 0 26px;
  border-radius: 99px;
  background: #f0e3e5;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .wizard-progress-fill {
  background: linear-gradient(90deg, #630404, #7A0A0A);
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-steps-form {
  gap: 0;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-step-block {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-step-head {
  margin-bottom: 18px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-step-head h3 {
  margin: 0;
  color: #18181b;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-step-badge,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-step-head > p,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-note,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .cae-title-legacy,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .cae-label-legacy {
  display: none;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .cae-title-public,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .cae-label-public {
  display: inline;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .grid {
  gap: 18px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign label {
  gap: 7px;
  color: #27272a;
  font-size: .94rem;
  font-weight: 700;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign input,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign select,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign textarea {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d6d9df;
  border-radius: 13px;
  color: #18181b;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign textarea {
  min-height: 108px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign input:focus,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign select:focus,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign textarea:focus {
  border-color: #630404;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(99, 4, 4, .1);
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .form-alert {
  border: 1px solid #f0b8b1;
  border-radius: 13px;
  background: #fff4f2;
  color: #b42318;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-controls {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e4e7ec;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions {
  gap: 12px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .btn {
  padding: 12px 18px;
  border-radius: 14px;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .btn-primary {
  background: #630404;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .btn-primary:hover {
  background: #260101;
}

html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .btn-secondary {
  border-color: #630404;
  color: #630404;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
@media (max-width: 700px) {
  html.evaluator-entry-route .evaluator-entry-screen {
    width: min(calc(100% - 24px), 920px);
    padding: 12px 0 36px;
  }
  .evaluator-entry-header {
    padding: 19px 20px;
    border-radius: 0 0 18px 18px;
  }
  .evaluator-entry-card {
    padding: 20px;
    border-radius: 18px;
  }
  .evaluator-entry-options {
    grid-template-columns: 1fr;
  }
  .evaluator-line-screen {
    padding: 20px;
    border-radius: 18px;
  }
  .evaluator-line-header {
    align-items: flex-start;
  }
  .evaluator-line-options {
    grid-template-columns: 1fr;
  }
  .evaluator-entry-option {
    min-height: 135px;
  }
  .evaluator-line-option {
    min-height: 135px;
  }
}

/* HUB Expedientes: acciones burdeos y gestión interna responsive. */
html.hub-expedientes-route .record-view-modal button:not(.hub-record-accordion-toggle),
html.hub-expedientes-route .record-delete-confirm-modal button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}
html.hub-expedientes-route .record-view-modal button:not(.hub-record-accordion-toggle):hover:not(:disabled),
html.hub-expedientes-route .record-delete-confirm-modal button:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}
html.hub-expedientes-route .record-view-modal button:not(.hub-record-accordion-toggle):focus-visible,
html.hub-expedientes-route .record-delete-confirm-modal button:focus-visible {
  outline: 3px solid rgba(99, 4, 4, .24);
  outline-offset: 2px;
}
html.hub-expedientes-route .record-view-modal button:not(.hub-record-accordion-toggle):disabled,
html.hub-expedientes-route .record-delete-confirm-modal button:disabled {
  cursor: not-allowed;
  opacity: .48;
}
html.hub-expedientes-route .record-view-modal .internal-notes-actions .internal-observations-action {
  min-width: 178px;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  font-family: Arial;
  font-size: inherit;
  font-weight: 700;
}
html.hub-expedientes-route .record-view-modal .internal-notes-actions .internal-observations-action:disabled {
  cursor: not-allowed;
  opacity: .5;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  pointer-events: auto;
}
.hub-record-management-status { margin-bottom: 20px; padding: 20px; border: 1px solid #e5e7eb; border-radius: 17px; background: #fbfbfc; }
.hub-record-management-status h5 { margin: 0 0 14px; color: var(--primary); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.hub-record-management-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.hub-record-management-button { flex: 1 1 170px; }
.hub-record-management-button.is-current { box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.hub-record-management-feedback { min-height: 1.4em; margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.hub-record-accordion-actions { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eceef0; }

/* HUB global: defensas contra anchos rígidos y alturas pequeñas. */
html.hub-expedientes-route,
html.hub-expedientes-route body { max-width: 100%; overflow-x: hidden; }
html.hub-expedientes-route .app-shell,
html.hub-expedientes-route #internalPanel,
html.hub-expedientes-route .internal-record-navigation,
html.hub-expedientes-route .housing-record-columns { min-width: 0; max-width: 100%; }
html.hub-expedientes-route .app-shell > .tab-panel { margin-top: 0; }
html.hub-expedientes-route .internal-record-navigation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 260px); gap: 10px; }
html.hub-expedientes-route .internal-status-tabs { min-width: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; overflow: visible; }
html.hub-expedientes-route .internal-status-tab { min-width: 0; padding-inline: 10px; font-size: .82rem; }
html.hub-expedientes-route .internal-record-search { min-width: 0; width: 100%; }
html.hub-expedientes-route .hub-record-detail-header .inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
html.hub-expedientes-route .record-view-modal.modal-expanded .hub-record-detail-panel { width: calc(100vw - 24px); max-width: none; max-height: calc(100vh - 24px); }
html.hub-expedientes-route .record-view-modal.modal-expanded .modal-body { max-height: calc(100vh - 190px); }

@media (max-width: 1024px) {
  html.hub-expedientes-route .internal-record-navigation { grid-template-columns: 1fr; }
  html.hub-expedientes-route .internal-record-search { width: 100%; }
}
@media (max-width: 768px) {
  html.hub-expedientes-route .internal-status-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  html.hub-expedientes-route .housing-record-columns { grid-template-columns: 1fr; }
  html.hub-expedientes-route .hub-record-detail-header .inline-actions .btn { flex: 1 1 140px; }
  html.hub-expedientes-route .modal-kv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px), (max-height: 640px) {
  html.hub-expedientes-route .record-view-modal { padding: 4px; }
  html.hub-expedientes-route .record-view-modal .hub-record-detail-panel,
  html.hub-expedientes-route .record-view-modal.modal-expanded .hub-record-detail-panel { width: 100%; max-height: calc(100vh - 8px); border-radius: 12px; }
  html.hub-expedientes-route .hub-record-detail-header { padding: 14px; }
  html.hub-expedientes-route .record-view-modal .modal-body,
  html.hub-expedientes-route .record-view-modal.modal-expanded .modal-body { padding: 12px; max-height: calc(100vh - 255px); }
  html.hub-expedientes-route .internal-status-tabs { grid-template-columns: 1fr; }
  html.hub-expedientes-route .hub-record-management-button { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .evaluator-entry-option {
    transition: none;
  }
  .evaluator-line-option {
    transition: none;
  }
}
body.mode-web-publica .internal-only {
  display: none !important;
}
html.evaluator-entry-route .public-obsolete-field {
  display: none !important;
}
.applicant-label-public,
.ownership-label-public,
.applicant-required-public {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .applicant-label-legacy {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .ownership-label-legacy {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .applicant-label-public,
html.evaluator-entry-route.evaluator-flow-form .ownership-label-public,
html.evaluator-entry-route.evaluator-flow-form .applicant-required-public {
  display: inline;
}
html.evaluator-entry-route.evaluator-flow-form .public-applicant-fields {
  margin-top: 18px;
}
html.evaluator-entry-route.evaluator-flow-form .public-cae-applicant-fields {
  grid-column: 1 / -1;
  margin-top: 0;
}
html.evaluator-entry-route.evaluator-flow-form .public-cae-legacy-applicant-field {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .public-applicant-source-relocated,
html.evaluator-entry-route.evaluator-flow-form .public-conditional-hidden {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .checkbox-group-block.progressive-invalid-group {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
html.evaluator-entry-route.evaluator-flow-form .empty-rental-documents-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
html.evaluator-entry-route.evaluator-flow-form .empty-rental-documents-heading .muted {
  margin: 0;
  color: #27272a;
  font-size: .94rem;
  font-weight: 700;
}
html.evaluator-entry-route.evaluator-flow-form .empty-rental-documents-heading .progressive-field-error {
  margin: 0 0 0 auto;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalDocumentsGroup .checkbox-grid label {
  color: #27272a;
  font-weight: 400;
  background: transparent;
  box-shadow: none;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalDocumentsGroup .checkbox-grid label:has(input:checked) {
  background: transparent;
  box-shadow: none;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalDocumentsGroup .checkbox-grid input:focus {
  outline: 0;
  box-shadow: none;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalDocumentsGroup .checkbox-grid input:focus-visible {
  outline: 2px solid #630404;
  outline-offset: 3px;
}
html.evaluator-entry-route.evaluator-flow-form .public-historical-document-option {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .ownership-notes-label-legacy {
  display: none;
}
.ownership-notes-label-public {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .ownership-notes-label-public {
  display: inline;
}
.vacancy-notes-label-public,
.work-notes-label-public,
.action-heading-public {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .action-heading-legacy {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .action-heading-public {
  display: flex;
}
html.evaluator-entry-route.evaluator-flow-form .vacancy-notes-label-legacy,
html.evaluator-entry-route.evaluator-flow-form .work-notes-label-legacy {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .vacancy-notes-label-public,
html.evaluator-entry-route.evaluator-flow-form .work-notes-label-public {
  display: inline;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalVacancyProofGroup,
html.evaluator-entry-route.evaluator-flow-form #emptyRentalActionTypesGroup {
  border: 1px solid #d6d9df;
  background: #fff;
  padding: 16px;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalVacancyProofGroup .muted,
html.evaluator-entry-route.evaluator-flow-form #emptyRentalActionTypesGroup .muted {
  color: #27272a;
  font-weight: 700;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalVacancyProofGroup .checkbox-grid label,
html.evaluator-entry-route.evaluator-flow-form #emptyRentalActionTypesGroup .checkbox-grid label {
  color: #27272a;
  font-weight: 400;
  background: transparent;
  box-shadow: none;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalVacancyProofGroup .checkbox-grid label:has(input:checked),
html.evaluator-entry-route.evaluator-flow-form #emptyRentalActionTypesGroup .checkbox-grid label:has(input:checked) {
  background: transparent;
  box-shadow: none;
}
html.evaluator-entry-route.evaluator-flow-form #emptyRentalVacancyProofGroup input:focus-visible,
html.evaluator-entry-route.evaluator-flow-form #emptyRentalActionTypesGroup input:focus-visible {
  outline: 2px solid #630404;
  outline-offset: 3px;
}
html.evaluator-entry-route.evaluator-flow-form .public-referral-question {
  color: #27272a;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
}
.public-copy-current,
.public-contact-address-extra,
.public-report-download {
  display: none;
}
.rehab-copy-public,
.rehab-required-public,
.rehab-public-only,
.rehab-consent-label-public {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .rehab-copy-legacy,
html.evaluator-entry-route.evaluator-flow-form .public-rehab-property-note,
html.evaluator-entry-route.evaluator-flow-form .public-rehab-floor-field {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .rehab-copy-public,
html.evaluator-entry-route.evaluator-flow-form .rehab-required-public,
html.evaluator-entry-route.evaluator-flow-form .rehab-consent-label-public {
  display: inline;
}
html.evaluator-entry-route.evaluator-flow-form .rehab-consent-label-legacy {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .rehab-public-only {
  display: block;
}
html.evaluator-entry-route.evaluator-flow-form [data-tab-panel="rehab"] .final-derivation-section .checkbox-grid label,
html.evaluator-entry-route.evaluator-flow-form [data-tab-panel="rehab"] .final-derivation-section .checkbox-grid label:has(input:checked) {
  background: transparent !important;
  box-shadow: none !important;
}
html.evaluator-entry-route.evaluator-flow-form [data-tab-panel="rehab"] .final-derivation-section .checkbox-grid input:focus-visible {
  outline: 2px solid #630404;
  outline-offset: 3px;
}
html.evaluator-entry-route.evaluator-flow-form #exportButton {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form #exportButton.public-step-six-visible {
  display: inline-flex;
}
html.evaluator-entry-route.evaluator-flow-form .public-copy-legacy,
html.evaluator-entry-route.evaluator-flow-form .email-required-legacy {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .public-copy-current {
  display: inline;
}
html.evaluator-entry-route.evaluator-flow-form .public-contact-address-extra {
  display: flex;
}
html.evaluator-entry-route.evaluator-flow-form .public-report-download {
  display: inline-flex;
}
html.evaluator-entry-route.evaluator-flow-form .public-report-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
html.evaluator-entry-route.evaluator-flow-form .public-report-meta > div {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
html.evaluator-entry-route.evaluator-flow-form .public-report-meta span,
html.evaluator-entry-route.evaluator-flow-form .public-report-meta strong {
  display: block;
}
html.evaluator-entry-route.evaluator-flow-form .public-report-meta span {
  color: #667085;
  font-size: .82rem;
  margin-bottom: 4px;
}
.public-cae-result-report {
  display: none;
}
html.evaluator-entry-route.evaluator-flow-form .public-cae-result-report {
  display: block;
}
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .cae-internal-result-fields {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .wizard-navigation > [data-wizard-next],
html.evaluator-entry-route.evaluator-flow-form .wizard-navigation > [data-wizard-submit] {
  margin-left: auto;
}
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions #internalCaeNextButton,
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions #internalCaeFinishButton {
  margin-left: auto;
}
html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions .btn[hidden] {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .field-danger:not(.progressive-invalid),
html.evaluator-entry-route.evaluator-flow-form input:not(.progressive-invalid)[aria-invalid="true"],
html.evaluator-entry-route.evaluator-flow-form select:not(.progressive-invalid)[aria-invalid="true"],
html.evaluator-entry-route.evaluator-flow-form textarea:not(.progressive-invalid)[aria-invalid="true"] {
  border-color: #d6d9df !important;
  background: #fff !important;
  box-shadow: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .progressive-invalid {
  border-color: #d92d20 !important;
  background: #fff6f5 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .1) !important;
}
html.evaluator-entry-route.evaluator-flow-form .field-message {
  display: none !important;
}
.progressive-field-error {
  display: block;
  margin-top: 2px;
  color: #b42318;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
}
.progressive-field-error[hidden] {
  display: none !important;
}
.progressive-field-status {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.35;
}
.progressive-field-status[hidden] {
  display: none !important;
}
html.evaluator-entry-route.evaluator-flow-form .btn:disabled,
html.evaluator-entry-route.evaluator-flow-form button[disabled] {
  opacity: .46;
  cursor: not-allowed;
  filter: grayscale(.2);
  transform: none !important;
}
body.mode-web-publica .top-tab.hidden,
body.mode-web-publica .tab-panel.hidden {
  display: none !important;
}
body.mode-web-publica #emptyRentalExportButton {
  display: none !important;
}
body.mode-web-publica .hero-actions {
  justify-content: flex-end;
}
body.internal-panel-open .evaluation-workspace > .form-panel,
body.internal-panel-open .evaluation-workspace > .tab-panel,
body.internal-panel-open .evaluation-workspace > .public-form-section,
body.internal-panel-open .evaluation-workspace > .empty-rental-section,
html.hub-expedientes-route .evaluation-workspace > .form-panel,
html.hub-expedientes-route .evaluation-workspace > .tab-panel,
html.hub-expedientes-route .evaluation-workspace > .public-form-section,
html.hub-expedientes-route .evaluation-workspace > .empty-rental-section {
  display: none !important;
}
body.internal-panel-open .evaluation-workspace > #internalPanel,
html.hub-expedientes-route .evaluation-workspace > #internalPanel {
  display: block !important;
}
body.internal-panel-open .app-shell > .hero,
html.hub-expedientes-route .app-shell > .hero {
  display: none !important;
}
body.internal-panel-open #internalPanel > .section-heading,
html.hub-expedientes-route #internalPanel > .section-heading {
  display: none !important;
}
.internal-top-header {
  display: none;
  width: 100%;
  min-height: 88px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: #fff;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}
body.internal-panel-open .internal-top-header,
html.hub-expedientes-route .internal-top-header {
  display: block;
}
.internal-top-header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px clamp(24px, 4vw, 58px);
}
.internal-top-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.internal-top-badge {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
  font-stretch: 100%;
  font-variant: normal;
  font-kerning: auto;
  font-feature-settings: normal;
  font-variation-settings: normal;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}
.internal-top-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.internal-top-copy strong {
  color: rgb(17, 17, 17);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
  font-stretch: 100%;
  font-variant: normal;
  font-kerning: auto;
  font-feature-settings: normal;
  font-variation-settings: normal;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}
.internal-top-copy span {
  color: rgb(107, 114, 128);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
  font-stretch: 100%;
  font-variant: normal;
  font-kerning: auto;
  font-feature-settings: normal;
  font-variation-settings: normal;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}
.internal-hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--primary);
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.internal-hub-link:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.internal-hub-link:focus-visible {
  outline: 3px solid rgba(99, 4, 4, .2);
  outline-offset: 3px;
}
.internal-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
body.internal-panel-open .app-shell,
html.hub-expedientes-route .app-shell {
  max-width: 1440px;
  padding: 30px clamp(24px, 4vw, 58px) 54px;
}
body.internal-panel-open #internalPanel,
html.hub-expedientes-route #internalPanel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.internal-management-hero {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 22px;
  padding: 36px 42px;
  border-radius: 24px;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  box-shadow: 0 18px 46px rgba(73, 9, 20, 0.22);
}
.internal-management-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 70px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  pointer-events: none;
}
.internal-management-eyebrow {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 0 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
}
.internal-management-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.internal-management-summary {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.04rem;
  line-height: 1.55;
}
.internal-record-navigation {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin: 22px 0;
}
.internal-status-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.internal-status-tab {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e3e5e8;
  border-radius: 16px;
  background: #fff;
  color: #26272b;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 7px 22px rgba(17, 24, 39, 0.055);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.internal-status-tab strong {
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f1f3;
  color: #5b6069;
  font-size: 0.78rem;
  font-weight: 800;
}
.internal-status-tab:hover {
  transform: translateY(-2px);
  border-color: #cfc4c7;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.09);
}
.internal-status-tab:focus-visible {
  outline: 3px solid rgba(99, 4, 4, 0.2);
  outline-offset: 3px;
}
.internal-status-tab.active {
  border-color: #630404;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(99, 4, 4, 0.26);
}
.internal-status-tab.active strong {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.housing-record-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.monthly-record-groups {
  display: grid;
  gap: 16px;
}
.monthly-record-group {
  border: 1px solid #e5e7ea;
  border-radius: 17px;
  background: #fff;
  overflow: hidden;
}
.monthly-record-group > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 20px;
  color: #26272b;
  font-size: 1.14rem;
  font-weight: 800;
  cursor: pointer;
}
.monthly-record-group > .housing-record-groups {
  padding: 0 20px 20px;
}
.housing-record-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #e5e7ea;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(17, 24, 39, 0.04);
}
.housing-record-card > h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  color: #26272b;
  font-size: 1.14rem;
}
.housing-record-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2e9eb;
  color: #630404;
  font-size: 0.78rem;
  font-weight: 800;
}
.housing-record-card .records-list.empty {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px dashed #d9dce1;
  border-radius: 13px;
  background: #fafafb;
  color: #6b7280;
  text-align: center;
}
.selected-status-heading {
  margin: 26px 0 16px;
}
.selected-status-heading h2 {
  margin: 0;
  color: #26272b;
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.25;
}
.compact-record-table {
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e8e9ec;
  border-radius: 13px;
}
.housing-record-card .records-list:not(.empty) {
  max-height: 480px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.housing-record-card .compact-record-row.follow-up-overdue,
.housing-record-card .compact-record-row.follow-up-overdue:focus-visible {
  background: var(--primary);
  color: #fff;
  box-shadow: inset 4px 0 0 var(--primary-dark);
}
.housing-record-card .compact-record-row.follow-up-overdue:hover {
  background: var(--primary-dark);
}
.housing-record-card .compact-record-row.follow-up-overdue .compact-record-cell,
.housing-record-card .compact-record-row.follow-up-overdue .compact-record-name,
.housing-record-card .compact-record-row.follow-up-overdue .compact-record-cell::before { color: #fff; }

/* Alerta de asignación: burdeos corporativo APMERR */
.housing-record-card .compact-record-row.assigned-alert-overdue,
.housing-record-card .compact-record-row.assigned-alert-overdue:focus-visible {
  background: var(--primary);
  color: #fff;
  box-shadow: inset 4px 0 0 var(--primary-dark);
}
.housing-record-card .compact-record-row.assigned-alert-overdue:hover {
  background: var(--primary-dark);
}
.housing-record-card .compact-record-row.assigned-alert-overdue .compact-record-cell,
.housing-record-card .compact-record-row.assigned-alert-overdue .compact-record-name,
.housing-record-card .compact-record-row.assigned-alert-overdue .compact-record-cell::before {
  color: #fff;
}

.compact-record-table.is-empty {
  border: 0;
}
.compact-record-table.is-empty .compact-record-table-head {
  display: none;
}
.compact-record-table-head,
.compact-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.compact-record-table .assigned-partners-column {
  display: none;
}
.compact-record-table.show-assigned-partners .compact-record-table-head,
.compact-record-table.show-assigned-partners .compact-record-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, 1.15fr);
}
.compact-record-table.show-assigned-partners .assigned-partners-column {
  display: block;
}
.assigned-partners-cell {
  color: var(--primary-dark);
  font-weight: 700;
}
.record-referral-slot {
  display: contents;
}
.hub-record-metadata-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.hub-record-metadata-actions.has-referral {
  justify-content: space-between;
}
.hub-record-terminal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border-top: 4px solid var(--primary);
  border-radius: 14px;
  background: #fff;
}
.hub-record-terminal-actions.only-delete {
  justify-content: flex-end;
}
html.hub-expedientes-route .record-view-modal .hub-record-terminal-actions .hub-terminal-action {
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
}
html.hub-expedientes-route .record-view-modal .hub-record-terminal-actions .hub-terminal-action:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .hub-record-terminal-actions {
    align-items: stretch;
    flex-direction: column;
  }
  html.hub-expedientes-route .record-view-modal .hub-record-terminal-actions .hub-terminal-action {
    width: 100%;
  }
}
.compact-record-table-head {
  padding: 11px 13px;
  border-bottom: 1px solid #e8e9ec;
  background: #f6f7f8;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.housing-record-card .records-list:not(.empty) {
  display: block;
}
.housing-record-card .compact-record-row {
  margin: 0;
  padding: 13px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.housing-record-card .compact-record-row + .compact-record-row {
  border-top: 1px solid #eef0f2;
}
.housing-record-card .compact-record-row:hover {
  background: #faf7f8;
}
.housing-record-card .compact-record-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(99, 4, 4, 0.2);
  outline-offset: -3px;
  background: #faf7f8;
}
.compact-record-cell {
  min-width: 0;
  color: #4b5058;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}
.compact-record-name {
  color: #24262a;
  font-weight: 750;
}
.internal-record-search {
  position: relative;
  flex: 0 0 286px;
  min-width: 260px;
  display: flex;
  align-items: center;
  margin: 0;
}
.internal-record-search > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.internal-record-search::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid #747982;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}
.internal-record-search::after {
  content: "";
  position: absolute;
  left: 31px;
  top: calc(50% + 7px);
  width: 7px;
  height: 2px;
  background: #747982;
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}
.internal-record-search input {
  width: 100%;
  min-height: 68px;
  padding: 0 18px 0 48px;
  border: 1px solid #e3e5e8;
  border-radius: 16px;
  background: #fff;
  color: #26272b;
  font: inherit;
  box-shadow: 0 7px 22px rgba(17, 24, 39, 0.055);
}
.internal-record-search input:focus {
  border-color: #630404;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(99, 4, 4, 0.1), 0 7px 22px rgba(17, 24, 39, 0.055);
}
.app-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px;
}
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.layout-fullwidth {
  grid-template-columns: 1fr;
}
.single-panel-layout {
  display: block;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.inset-card {
  margin-top: 16px;
  background: #fcf8f8;
  box-shadow: none;
}
.hero, .section-heading, .hero-actions, .inline-actions {
  display: flex;
  gap: 12px;
}
.hero {
  flex-wrap: wrap;
  overflow: hidden;
}
.inline-actions-wrap {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.section-heading-stack-mobile {
  gap: 16px;
}
.hero, .section-heading {
  justify-content: space-between;
  align-items: flex-start;
}
.hero-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1 1 540px;
  max-width: 100%;
}
.hero-copy, .muted, p, li { line-height: 1.55; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
h1, h2, h3 { margin: 0 0 12px; }
.intro-card p { margin: 8px 0 0; }
.top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px auto 0;
  width: 100%;
  max-width: 760px;
  justify-content: center;
  align-items: stretch;
}
.top-tab {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.top-tab.active,
.top-tab[aria-selected="true"] {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(99, 4, 4, 0.18);
}
.tab-panel {
  margin-top: 20px;
}
.public-autosave-status {
  margin: 4px 0 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(99, 4, 4, 0.06);
  border: 1px solid rgba(99, 4, 4, 0.12);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.public-autosave-status.is-empty {
  display: none;
}
.public-autosave-status.is-success {
  background: rgba(34, 139, 34, 0.08);
  border-color: rgba(34, 139, 34, 0.18);
  color: #1f5f1f;
}
.public-autosave-status.is-warning {
  background: rgba(181, 116, 0, 0.08);
  border-color: rgba(181, 116, 0, 0.18);
  color: #7a5400;
}
.public-autosave-status.is-danger {
  background: rgba(184, 46, 46, 0.08);
  border-color: rgba(184, 46, 46, 0.18);
  color: #8a1f1f;
}
.wizard-step-hidden {
  display: none !important;
}
.wizard-synthetic-section {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.wizard-controls {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wizard-progress-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wizard-progress-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.wizard-step-validation {
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(99, 4, 4, 0.18);
  background: #fff4f5;
  color: #630404;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.wizard-step-counter,
.wizard-step-percent {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}
.wizard-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.wizard-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #efe4e6;
  overflow: hidden;
}
.wizard-progress-fill {
  display: block;
  height: 100%;
  width: 17%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7A0A0A);
  transition: width 0.25s ease;
}

.cae-standalone-shell {
  max-width: 1240px;
}

.cae-hero-card {
  border-color: rgba(29, 108, 66, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
}

.cae-section-heading h2,
.cae-form-panel .eyebrow,
.cae-form-panel .wizard-step-counter,
.cae-form-panel .wizard-step-percent {
  color: #1d6c42;
}

.cae-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.cae-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(29, 108, 66, 0.2);
  background: #eaf7f0;
  color: #1d6c42;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cae-hero-badge-soft {
  background: #f3faf6;
}

.wizard-intro-card-cae,
.cae-step-card,
.cae-final-note,
.cae-consent-box {
  border-color: rgba(29, 108, 66, 0.16);
}

.cae-step-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
}

.cae-step-card.cae-step-active {
  box-shadow: 0 18px 42px rgba(29, 108, 66, 0.08);
}

.cae-step-lead,
.cae-hero-note {
  color: #356b52;
}

.cae-form-panel .wizard-progress-bar {
  background: #dceee4;
}

.cae-form-panel .wizard-progress-fill {
  background: linear-gradient(90deg, #1d6c42, #38a169);
}

.cae-form-panel .wizard-navigation .btn.btn-primary,
.cae-form-panel .btn.btn-primary[data-wizard-submit="cae"] {
  background: #1d6c42;
  border-color: #1d6c42;
}

.cae-form-panel .wizard-navigation .btn.btn-primary:hover,
.cae-form-panel .btn.btn-primary[data-wizard-submit="cae"]:hover {
  background: #175434;
  border-color: #175434;
}

.cae-form-panel .wizard-navigation .btn.btn-secondary {
  color: #1d6c42;
  border-color: rgba(29, 108, 66, 0.22);
  background: #f8fcfa;
}

.cae-step-error-message {
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  background: #fff4f2;
  color: #a1261c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.cae-field-error {
  border: 2px solid #c8372d !important;
  background: #fff5f4 !important;
  box-shadow: 0 0 0 3px rgba(200, 55, 45, 0.08);
}

.cae-field-error:focus {
  outline: 2px solid rgba(200, 55, 45, 0.18) !important;
  border-color: #b42318 !important;
}

.cae-result-flag-danger {
  border: 2px solid #c8372d !important;
  background: #fff1f0 !important;
  box-shadow: 0 0 0 3px rgba(200, 55, 45, 0.10);
}

.cae-result-flag-warn {
  border: 2px solid #d97706 !important;
  background: #fff7ed !important;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.10);
}

.cae-result-flag-neutral {
  border: 2px solid #f59e0b !important;
  background: #fffaf0 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}

.cae-result-review-block {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(99, 4, 4, 0.04);
  border: 1px solid rgba(99, 4, 4, 0.10);
}

.cae-result-review-block h5 {
  margin: 0 0 10px;
  font-size: 15px;
}

.cae-result-review-block ul {
  margin: 0;
  padding-left: 18px;
}
.wizard-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wizard-navigation .btn {
  min-width: 170px;
}
.wizard-intro-card {
  background: #fcf8f8;
  border: 1px solid rgba(99, 4, 4, 0.12);
  border-radius: 18px;
  padding: 20px;
}
.wizard-intro-list {
  margin: 14px 0;
  padding-left: 18px;
}
.wizard-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.wizard-summary-item {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wizard-summary-item span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wizard-preview-card {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.wizard-preview-success {
  background: var(--ok-soft);
  border-color: rgba(29, 108, 66, 0.18);
}
.wizard-preview-danger {
  background: var(--danger-soft);
  border-color: rgba(180, 35, 24, 0.16);
}
.wizard-preview-warn,
.wizard-preview-neutral {
  background: var(--warn-soft);
  border-color: rgba(154, 100, 8, 0.16);
}
.wizard-preview-label {
  margin-bottom: 8px;
  font-weight: 800;
}
.wizard-preview-title {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
}
.wizard-step-result .public-result-card {
  margin-top: 0;
}
.hidden { display: none !important; }
.form-panel.hidden { display: none; }
.form-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.form-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.internal-cae-steps-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.internal-cae-steps-form > .form-section {
  margin-top: 0;
}
.internal-cae-step-block {
  border: 1px solid rgba(29, 108, 66, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcf9 100%);
  border-radius: 18px;
  padding: 18px;
}
.internal-cae-step-head {
  margin-bottom: 14px;
}
.internal-cae-step-head h3 {
  margin-bottom: 8px;
  color: #1d6c42;
}
.internal-cae-step-head p {
  margin: 0;
  color: var(--muted);
}
.internal-cae-step-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(29, 108, 66, 0.1);
  color: #1d6c42;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.internal-cae-step-block-result {
  border-color: rgba(99, 4, 4, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #fcf7f8 100%);
}
.internal-cae-wizard-progress {
  margin: 6px 0 18px;
}
.internal-cae-wizard-step-hidden {
  display: none !important;
}
.internal-cae-wizard-step-active {
  display: block;
}
.internal-cae-wizard-controls {
  margin-top: 0;
}
.internal-cae-wizard-actions {
  justify-content: space-between;
  align-items: center;
}
.internal-cae-wizard-actions .btn {
  min-width: 140px;
}
.internal-cae-wizard-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.grid {
  display: grid;
  gap: 14px;
}
.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-grid { margin-bottom: 12px; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  align-self: start;
}
.required-marker {
  display: inline;
  color: var(--primary);
  font-weight: 800;
  margin-left: 4px;
  vertical-align: baseline;
}
.contact-note {
  margin: 0 0 14px;
  color: var(--muted);
}
.field-help-block {
  align-items: flex-start;
}
.field-help-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}
.field-help-note {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.inherited-address-block {
  margin-bottom: 14px;
}
.inherited-address-block.hidden {
  display: none !important;
}
.legacy-address-notice {
  margin-bottom: 18px;
  color: var(--muted);
}
.btn-inline-helper {
  width: auto;
  padding: 10px 12px;
  font-size: 13px;
}
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #d5c6ca;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  margin-top: 0;
}
textarea {
  min-height: 88px;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(99, 4, 4, 0.14);
  border-color: var(--primary);
}
.checkbox-group-block {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
}
.checkbox-group-block .muted {
  margin: 0 0 10px;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.checkbox-grid label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.checkbox-grid input {
  width: auto;
}
.btn {
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover:not([disabled]) {
  box-shadow: 0 10px 24px rgba(43, 24, 28, 0.14);
}
.btn:active:not([disabled]),
.btn.is-pressed:not([disabled]) {
  transform: scale(0.98);
  box-shadow: 0 6px 14px rgba(43, 24, 28, 0.18);
}
.btn:focus-visible {
  outline: 3px solid rgba(99, 4, 4, 0.22);
  outline-offset: 2px;
}
.btn.is-success:not([disabled]) {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
}
.btn.is-loading:not([disabled]) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.btn.is-error:not([disabled]) {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-primary {
  border: 0;
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-email-accent {
  background: #fff;
  color: #1f8f5f;
  border: 1px solid #8ac8ab;
  font-weight: 800;
  min-width: 44px;
  padding-inline: 12px;
}
.btn-email-accent:hover {
  background: #f4fbf7;
  border-color: #5cad84;
}
.btn.btn-active,
.btn[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn.btn-active:hover,
.btn[aria-pressed="true"]:hover {
  background: var(--primary-dark);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

body.internal-panel-open #internalPanel #resultCard,
body.internal-panel-open #internalPanel #resultDetails,
body.internal-panel-open #internalPanel .internal-section-first,
body.internal-panel-open #internalPanel .internal-panel-rehab-extra,
body.internal-panel-open #internalPanel .internal-records-card > .section-heading,
body.internal-panel-open #internalPanel .internal-records-card > .grid.two-col.compact-grid,
body.internal-panel-open #internalPanel .internal-records-card > .records-toolbar,
body.internal-panel-open #internalPanel #recordsAlert,
html.hub-expedientes-route #internalPanel #resultCard,
html.hub-expedientes-route #internalPanel #resultDetails,
html.hub-expedientes-route #internalPanel .internal-section-first,
html.hub-expedientes-route #internalPanel .internal-panel-rehab-extra,
html.hub-expedientes-route #internalPanel .internal-records-card > .section-heading,
html.hub-expedientes-route #internalPanel .internal-records-card > .grid.two-col.compact-grid,
html.hub-expedientes-route #internalPanel .internal-records-card > .records-toolbar,
html.hub-expedientes-route #internalPanel #recordsAlert {
  display: none !important;
}

#emptyRentalEvaluationForm input[name="emptyRentalBudgetAmount"] {
  display: none !important;
}

#emptyRentalEvaluationForm input[name="emptyRentalBudgetAmount"]:not([type="hidden"]) {
  display: none !important;
}

#emptyRentalEvaluationForm label:has(input[name="emptyRentalBudgetAmount"]) {
  display: none !important;
}

button.top-tab[data-tab="gestion"],
[data-tab-panel="gestion"] {
  display: none !important;
}

#internalPanel [data-edit-id],
#internalPanel [data-archive-id],
#internalPanel [data-export-id],
#internalPanel [data-restore-id],
#internalPanel .record-edit-button,
#internalPanel [data-analyze-id] {
  display: none !important;
}

.public-result-reasons li strong {
  font-weight: 800;
  color: var(--text);
}
.mode-banner {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}
.form-alert {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  background: #fff5f3;
  color: var(--danger);
  border: 1px solid #f2c9c2;
}
.hidden {
  display: none !important;
}
.applicant-conditional-hidden,
.property-conditional-hidden {
  display: none !important;
}
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.result-badge.ok { background: var(--ok-soft); color: var(--ok); }
.result-badge.warn { background: var(--warn-soft); color: var(--warn); }
.result-badge.pending { background: #efe9ea; color: var(--muted); }
.result-badge.danger { background: var(--danger-soft); color: var(--danger); }
.summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.summary-metrics-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 10px 0 0;
}
.metric {
  min-height: 88px;
}
.metric {
  padding: 14px;
  border-radius: 14px;
  background: #fcf8f8;
  border: 1px solid var(--line);
}
.metric strong {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.issue-item {
  border: 1px solid var(--line);
  border-left: 6px solid var(--warn);
  background: #fffaf3;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.issue-item.danger {
  border-left-color: var(--danger);
  background: #fff6f4;
}
.issue-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.issue-status {
  font-size: 12px;
  font-weight: 800;
  color: var(--warn);
}
.issue-item.danger .issue-status { color: var(--danger); }
.plain-list {
  margin: 0;
  padding-left: 18px;
}
.opportunity-card {
  border-radius: 12px;
  padding: 14px;
  background: #fcf8f8;
  border: 1px solid var(--line);
}
.result-strip {
  margin: 18px 0 22px;
  padding: 18px;
}
.card-soft {
  background: linear-gradient(180deg, #fffdfd 0%, #fcf6f7 100%);
}
.result-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.result-strip-head h3 {
  margin-bottom: 0;
}
.result-strip-opportunity {
  margin-top: 10px;
}
.result-strip-opportunity h4,
.documentation-panel h4 {
  margin: 0 0 10px;
  color: var(--text);
}
.details-card {
  margin: 0 0 22px;
  padding: 0;
  overflow: hidden;
}
.details-card summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 700;
  color: var(--primary);
  background: #fff;
}
.details-card summary::-webkit-details-marker {
  display: none;
}
.details-card summary::after {
  content: '▾';
  float: right;
  color: var(--primary);
}
.details-card[open] summary::after {
  content: '▴';
}
.details-body {
  padding: 0 20px 20px;
}
.documentation-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.records-card-fullwidth {
  width: 100%;
}
.internal-panel {
  margin-bottom: 20px;
}
.internal-section-first {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.internal-records-card {
  margin-top: 22px;
}
.records-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.records-toolbar label {
  min-width: 220px;
}
.records-sections {
  display: grid;
  gap: 18px;
}
.records-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fcf8f8;
}
.records-group.hidden {
  display: none !important;
}
.records-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.records-group-header h3 {
  margin-bottom: 0;
}
.records-list {
  display: grid;
  gap: 14px;
}
.record-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fffdfd;
  box-shadow: 0 8px 24px rgba(43, 24, 28, 0.04);
}
.record-row,
.record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.record-main {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px 14px;
}
.record-field {
  min-width: 0;
}
.record-field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 800;
}
.record-field-value {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.record-line-badge {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #7A0A0A;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.45;
}
.record-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 8px;
  min-width: 230px;
  align-self: stretch;
}
.record-actions .btn-danger-soft {
  border-color: #efc2bb;
  color: var(--danger);
  background: #fff6f4;
}
.record-actions .btn {
  width: 100%;
  white-space: nowrap;
  min-width: 0;
  padding: 9px 10px;
  font-size: 12px;
}
.record-actions .record-edit-button {
  min-width: 0;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 33, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}
.modal-dialog {
  width: min(1200px, 92vw);
  max-width: 92vw;
  max-height: 88vh;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
}
.modal-body {
  padding: 20px;
  overflow: auto;
  max-height: calc(88vh - 90px);
}
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.modal-grid-readable {
  gap: 16px;
}
.modal-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcf8f8;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(99, 4, 4, 0.03);
}
.modal-block.full {
  grid-column: 1 / -1;
}
.modal-block h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--primary);
}
.modal-inline-subtitle {
  margin: 16px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}
.modal-kv {
  margin: 0;
}
.modal-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.modal-kv-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #efe3e5;
}
.modal-kv div + div {
  margin-top: 8px;
}
.modal-kv dt {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal-kv dd {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}
.record-view-modal .modal-block .plain-list {
  margin: 0;
  padding-left: 18px;
}
.record-view-modal .modal-block .plain-list li {
  margin-bottom: 10px;
  line-height: 1.55;
}
.record-view-modal .modal-block p {
  margin: 0;
  line-height: 1.6;
}
.internal-notes-panel {
  display: grid;
  gap: 12px;
}
.hub-record-history {
  display: grid;
  gap: 14px;
}
.hub-record-history h5 {
  margin-bottom: 0;
}
.internal-history-list {
  display: grid;
  gap: 10px;
}
.internal-history-entry,
.internal-history-legacy {
  padding: 12px 14px;
  border: 1px solid #eadde0;
  border-radius: 12px;
  background: #fff;
}
.internal-history-entry time,
.internal-history-legacy > span {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
}
.internal-history-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.internal-history-delete {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--primary);
  border-radius: 11px;
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.internal-history-delete:hover,
.internal-history-delete:focus-visible {
  background: var(--primary);
  color: #fff;
}
.internal-history-entry p,
.internal-history-legacy p,
.internal-history-empty {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.internal-notes-read,
.internal-notes-edit {
  display: grid;
  gap: 12px;
}
.internal-notes-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid #d9c7cb;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.internal-notes-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 10, 10, 0.12);
}
.internal-notes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.incidence-list {
  display: grid;
  gap: 14px;
}
.incidence-item {
  padding: 12px 0 0;
  border-top: 1px dashed #d9c7cb;
}
.incidence-item:first-child {
  padding-top: 0;
  border-top: 0;
}
.incidence-index {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 6px;
}
.incidence-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 8px;
}
.incidence-valuation-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 4px;
}
.incidence-valuation-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.serious-issues-hero h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.serious-issues-hero h4::before,
.serious-issues-hero h4::after {
  content: '';
  flex: 1 1 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(122, 10, 10, 0.18), rgba(122, 10, 10, 0.7), rgba(122, 10, 10, 0.18));
}
.serious-issues-highlight-list {
  display: grid;
  gap: 22px;
}
.serious-issues-highlight-item {
  padding: 18px 20px;
  border: 1px solid #ead7dc;
  border-radius: 14px;
  background: #fff9fa;
}
.serious-issues-step {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--primary);
  margin-bottom: 10px;
}
.serious-issues-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--text);
}
.serious-issues-general-note {
  margin-top: 24px;
  padding: 18px 20px;
  border-top: 2px solid #d9c7cb;
  background: #fff;
}
.serious-issues-general-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.serious-issues-general-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--text);
}
.record-view-modal.modal-expanded .modal-dialog {
  width: 96vw;
  max-width: 96vw;
  max-height: 94vh;
}
@media (max-width: 900px) {
  .modal-kv-grid,
  .modal-grid {
    grid-template-columns: 1fr;
  }
}
.record-view-modal.modal-expanded .modal-body {
  max-height: calc(94vh - 90px);
}

/* HUB Expedientes: lenguaje visual administrativo reutilizado de HUB Solicitudes. */
html.hub-expedientes-route .record-view-modal .hub-record-detail-panel {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 40px);
  border: 1px solid #e3e4e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}
html.hub-expedientes-route .hub-record-detail-header {
  align-items: flex-start;
  padding: 24px 28px;
  border-bottom: 1px solid #e6e7ea;
  background: linear-gradient(135deg, #fff 0%, #faf7f8 100%);
}
html.hub-expedientes-route .hub-record-detail-heading { min-width: 0; }
html.hub-expedientes-route .hub-record-detail-header h3 {
  margin: 6px 0 4px;
  color: #202126;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
html.hub-expedientes-route .hub-record-detail-meta { margin: 0; color: #747982; }
html.hub-expedientes-route .record-view-modal .modal-body {
  padding: 24px 28px 30px;
  max-height: calc(100vh - 185px);
  background: transparent;
}
html.hub-expedientes-route .hub-record-detail-content { display: grid; gap: 12px; }
html.hub-expedientes-route .hub-record-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.045);
  overflow: hidden;
}
html.hub-expedientes-route .hub-record-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
html.hub-expedientes-route .hub-record-accordion-toggle:hover { background: #f7f2f4; }
html.hub-expedientes-route .hub-record-accordion-toggle:focus-visible {
  outline: 2px solid rgba(99, 4, 4, 0.2);
  outline-offset: -2px;
}
html.hub-expedientes-route .hub-record-accordion-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 800;
  transition: transform .18s ease;
}
html.hub-expedientes-route .hub-record-accordion:not(.is-collapsed) .hub-record-accordion-icon { transform: rotate(180deg); }
html.hub-expedientes-route .hub-record-accordion-panel[hidden] { display: none; }
html.hub-expedientes-route .hub-record-accordion-panel-inner { padding: 2px 24px 24px; }
html.hub-expedientes-route .hub-record-accordion .modal-block {
  margin-top: 14px;
  border-color: #e5e7ea;
  border-radius: 17px;
  background: #fbfbfc;
  box-shadow: none;
}
html.hub-expedientes-route .hub-record-accordion .modal-kv-item {
  padding: 12px 14px;
  border-color: #ececef;
  background: #fff;
}
html.hub-expedientes-route .hub-record-subsection {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #e5e7ea;
  border-radius: 17px;
  background: #fbfbfc;
}
html.hub-expedientes-route .hub-record-subsection h5 {
  margin: 0 0 16px;
  color: #630404;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.record-delete-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(22, 15, 17, 0.58);
}
.record-delete-confirm-dialog {
  position: relative;
  width: min(100%, 500px);
  max-width: none;
  max-height: none;
  display: block;
  overflow: visible;
  padding: 26px;
  border: 1px solid #e5d7da;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(40, 8, 14, 0.24);
  font-family: Arial, Helvetica, sans-serif;
}
.record-delete-confirm-dialog h5 {
  margin: 0 36px 8px 0;
  color: #630404;
  font-size: 1rem;
  font-weight: 700;
}
.record-delete-confirm-dialog p {
  margin: 0 0 20px;
  color: #5f6269;
  font-size: 16px;
  line-height: 1.5;
}
.record-delete-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}
html.hub-expedientes-route .record-delete-confirm-modal .record-delete-confirm-actions button {
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #7A0A0A 0%, #630404 52%, #260101 100%);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
  transition: all .18s ease;
}
html.hub-expedientes-route .record-delete-confirm-modal .record-delete-confirm-actions button:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}
html.hub-expedientes-route .record-delete-confirm-modal .unlink-destination-close {
  position: absolute;
  top: 12px;
  right: 14px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #630404;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: normal;
  cursor: pointer;
  transform: none;
}
html.hub-expedientes-route .record-delete-confirm-modal .unlink-destination-close:hover:not(:disabled) {
  background: transparent;
  color: #630404;
  transform: none;
}

@media (max-width: 700px) {
  html.hub-expedientes-route .record-view-modal { padding: 8px; align-items: stretch; }
  html.hub-expedientes-route .record-view-modal .hub-record-detail-panel { width: 100%; max-height: calc(100vh - 16px); border-radius: 18px; }
  html.hub-expedientes-route .hub-record-detail-header { padding: 18px; flex-direction: column; }
  html.hub-expedientes-route .hub-record-detail-header .inline-actions { width: 100%; justify-content: flex-start; }
  html.hub-expedientes-route .record-view-modal .modal-body { padding: 16px; max-height: calc(100vh - 245px); }
  html.hub-expedientes-route .hub-record-accordion-toggle { padding: 17px 18px; }
  html.hub-expedientes-route .hub-record-accordion-panel-inner { padding: 2px 18px 18px; }
}
.edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.edit-overlay-dialog {
  width: min(1280px, 94vw);
  height: min(90vh, 980px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.edit-overlay-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid #ead7dc;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.edit-overlay-header.dirty {
  border-bottom-color: #e1b7bf;
  box-shadow: inset 0 -2px 0 rgba(225, 183, 191, 0.45);
}
.edit-overlay-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 24px;
  background: #f8f5f6;
}
.edit-overlay-body .form-panel {
  position: static !important;
  inset: auto !important;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: visible;
  box-shadow: none;
}
body.edit-overlay-open {
  overflow: hidden;
}
body.edit-overlay-open .app-shell {
  overflow: hidden;
}
body.edit-overlay-open .evaluation-workspace > #internalPanel {
  visibility: hidden;
  pointer-events: none;
}
.final-derivation-section {
  padding-bottom: 12px;
}
.final-consent-row {
  margin-top: 18px;
  margin-bottom: 20px;
}
.final-consent-row label {
  align-self: stretch;
}
.wizard-final-evaluation-block {
  margin-top: 18px;
  margin-bottom: 18px;
}

[data-tab-panel="cae"] #caeEvaluationForm > .form-section:not(.wizard-step-active) {
  display: none;
}

[data-tab-panel="cae"] #caeEvaluationForm > .wizard-controls {
  display: flex;
}
.wizard-final-evaluation-block > h4 {
  margin: 0 0 8px;
}
.wizard-final-evaluation-block > .muted {
  margin-bottom: 14px;
}
.final-result-section {
  margin-top: 8px;
  padding-bottom: 6px;
}
.public-result-card {
  border: 1px solid #ead8dc;
  border-radius: 18px;
  padding: 20px;
  box-shadow: none;
  background: var(--primary-soft);
}
.public-result-card .plain-list {
  margin-top: 6px;
}
.action-types-error {
  margin-top: 10px;
  color: var(--danger);
  font-weight: 700;
  font-size: 13px;
}
.public-result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.public-result-status-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.public-result-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  border: 3px solid currentColor;
  flex: 0 0 auto;
}
.public-result-label {
  font-size: 20px;
  font-weight: 800;
}
.public-result-reasons {
  margin-top: 14px;
}
.public-result-reasons h4 {
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 800;
}
.public-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.public-result-actions .btn {
  flex: 0 0 auto;
}
.public-result-neutral .public-result-icon {
  color: var(--muted);
  background: #efe9ea;
  box-shadow: inset 0 0 0 6px rgba(107, 101, 113, 0.08);
}
.public-result-legal {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.public-result-neutral {
  background: var(--primary-soft);
  color: var(--text);
}
.public-result-neutral .public-result-icon {
  color: var(--muted);
  background: #efe9ea;
}
.public-result-ok {
  border-color: #d8c8cd;
  background: var(--primary-soft);
}
.public-result-ok .public-result-icon,
.public-result-ok .public-result-label {
  color: var(--ok);
}
.public-result-ok .public-result-icon {
  background: var(--ok-soft);
  box-shadow: inset 0 0 0 6px rgba(29, 108, 66, 0.08);
}
.public-result-warn {
  border-color: #d8c8cd;
  background: var(--primary-soft);
}
.public-result-warn .public-result-icon,
.public-result-warn .public-result-label {
  color: var(--warn);
}
.public-result-warn .public-result-icon {
  background: var(--warn-soft);
  box-shadow: inset 0 0 0 6px rgba(154, 100, 8, 0.08);
}
.public-result-danger {
  border-color: #d8c8cd;
  background: var(--primary-soft);
}
.public-result-danger .public-result-icon,
.public-result-danger .public-result-label {
  color: var(--danger);
}
.public-result-danger .public-result-icon {
  background: var(--danger-soft);
  box-shadow: inset 0 0 0 6px rgba(180, 35, 24, 0.08);
}
.record-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.archive-note {
  display: inline-block;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}
.record-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.record-pill.ok { background: var(--ok-soft); color: var(--ok); }
.record-pill.warn { background: var(--warn-soft); color: var(--warn); }
.record-pill.danger { background: var(--danger-soft); color: var(--danger); }
.history-list {
  margin: 0;
  padding-left: 18px;
}
.history-list li {
  margin-bottom: 6px;
}
.empty {
  color: var(--muted);
  font-style: italic;
}
.placeholder-panel {
  padding: 24px;
}
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.placeholder-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fcf8f8;
}
.placeholder-note {
  margin-top: 18px;
}
.field-warning,
.field-danger {
  border-width: 2px;
}
.field-warning {
  border-color: #b42318;
  background: #fff1ef;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.10);
}
.field-danger {
  border-color: #b42318;
  background: #fff1ef;
}
.field-message {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}
.field-message-warning {
  color: #b42318;
}
.field-message-danger {
  color: #b42318;
}
.helper-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
  margin-bottom: 6px;
  background: var(--primary-soft);
  color: var(--primary);
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .summary-metrics-compact,
  .documentation-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .record-main {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
  .placeholder-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .hero-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .hero-actions .btn,
  .inline-actions .btn,
  .public-result-actions .btn {
    flex: 1 1 220px;
    max-width: 100%;
    white-space: normal;
  }
  .record-row,
  .record-card {
    grid-template-columns: 1fr;
  }
  .record-main {
    grid-template-columns: 1fr 1fr;
  }
  .record-actions {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-width: 0;
  }
  .edit-overlay {
    padding: 12px;
  }
  .edit-overlay-dialog {
    width: min(96vw, 1280px);
    height: min(92vh, 980px);
  }
  .edit-overlay-header,
  .modal-header {
    padding: 16px;
  }
  .edit-overlay-body,
  .modal-body {
    padding: 16px;
  }
  .final-consent-row {
    align-items: start;
  }
  .final-consent-row label {
    min-width: 0;
  }
}
@media (max-width: 720px) {
  .wizard-progress-meta {
    grid-template-columns: 1fr;
  }
  .wizard-summary-grid {
    grid-template-columns: 1fr;
  }
  .wizard-navigation {
    flex-direction: column;
  }
  .wizard-navigation .btn {
    width: 100%;
  }
}
@media (max-width: 1150px) {
  .internal-record-navigation {
    flex-direction: column;
  }
  .internal-status-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .internal-record-search {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .housing-record-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  html.evaluator-entry-route.evaluator-flow-form body > .app-shell {
    width: min(calc(100% - 24px), 920px);
    padding: 0 0 36px;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign {
    padding: 20px;
    border-radius: 18px;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign {
    padding: 20px;
    border-radius: 18px;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-evaluator-form-meta {
    align-items: flex-start;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign > .section-heading .inline-actions {
    width: 100%;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-evaluator-redesign > .section-heading .btn {
    width: 100%;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .section-heading .inline-actions {
    width: 100%;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign > .section-heading .btn {
    width: 100%;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions {
    flex-direction: column;
    align-items: stretch;
  }
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions .btn {
    width: 100%;
  }
  html.evaluator-entry-route.evaluator-flow-form .wizard-navigation > [data-wizard-next],
  html.evaluator-entry-route.evaluator-flow-form .wizard-navigation > [data-wizard-submit],
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions #internalCaeNextButton,
  html.evaluator-entry-route.evaluator-flow-form .public-cae-redesign .internal-cae-wizard-actions #internalCaeFinishButton {
    margin-left: 0;
  }
  .internal-top-header-inner {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }
  html.hub-expedientes-route .internal-top-brand {
    width: 100%;
  }
  html.hub-expedientes-route .internal-top-badge {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
  html.hub-expedientes-route .internal-top-copy strong {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }
  html.hub-expedientes-route .internal-top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    align-items: stretch;
    gap: 8px;
  }
  html.hub-expedientes-route .internal-top-actions .internal-hub-link {
    width: 100%;
    min-width: 0;
  }
  .internal-hub-link {
    min-height: 42px;
    padding: 9px 13px;
  }
  body.internal-panel-open .app-shell,
  html.hub-expedientes-route .app-shell {
    padding: 20px 16px 36px;
  }
  .internal-management-hero {
    min-height: 190px;
    padding: 26px 22px;
    border-radius: 20px;
  }
  .internal-record-navigation {
    flex-direction: column;
  }
  .internal-status-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .internal-status-tab {
    min-width: 0;
    min-height: 58px;
    padding: 11px 13px;
    font-size: 0.86rem;
  }
  .internal-record-search {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }
  .internal-record-search input {
    min-height: 58px;
  }
  .compact-record-table-head {
    display: none;
  }
  .compact-record-table {
    border: 0;
    border-radius: 0;
  }
  .housing-record-card .compact-record-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    border: 1px solid #e8e9ec;
    border-radius: 12px;
  }
  .housing-record-card .compact-record-row + .compact-record-row {
    border-top: 1px solid #e8e9ec;
  }
  .compact-record-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #747982;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .two-col, .checkbox-grid, .summary-metrics, .summary-metrics-compact, .documentation-panel {
    grid-template-columns: 1fr;
  }
  .records-toolbar,
  .records-group-header {
    flex-direction: column;
  }
  .hero, .section-heading, .hero-actions, .inline-actions, .result-strip-head, .public-result-head, .public-result-status-wrap {
    flex-direction: column;
  }
  html.hub-expedientes-route .record-view-modal .hub-record-detail-header .inline-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }
  html.hub-expedientes-route .record-view-modal .hub-record-detail-header .inline-actions .btn {
    width: auto;
    max-width: 100%;
    min-height: 42px;
    flex: 0 0 auto;
    white-space: normal;
  }
  .top-tabs {
    flex-direction: column;
    max-width: 100%;
  }
  .top-tab {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    text-align: left;
    flex-basis: auto;
  }
}
@media (max-width: 340px) {
  html.hub-expedientes-route .internal-top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.hub-expedientes-route .internal-top-actions .hub-expedientes-logout {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  body[data-app-origin="cae_publico_visual"] {
    padding-bottom: 0;
  }

  body[data-app-origin="cae_publico_visual"] .wizard-controls {
    margin-bottom: 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  body[data-app-origin="cae_publico_visual"] .form-section,
  body[data-app-origin="cae_publico_visual"] .cae-step-card {
    padding-bottom: 16px;
  }
}


#actionTypesGrid.field-danger,
#actionTypesGrid.field-warning,
#actionTypesSection.field-danger,
#actionTypesSection.field-warning {
  border: 2px solid #b42318;
  background: #fff1ef;
  border-radius: 12px;
  padding: 10px;
}


/* ============================================================
   Resultado APTO PRELIMINAR
   Estado principal en verde, pendientes en bloque de revisión.
   ============================================================ */

.public-result-card.public-result-success {
  border-color: #1f8f4d !important;
  background: linear-gradient(180deg, #f1fbf5 0%, #f1fbf5 120px, #fcf7f8 120px, #fcf7f8 100%) !important;
}

.public-result-card.public-result-success .public-result-icon {
  color: #1f8f4d !important;
  border-color: #1f8f4d !important;
  background: #e6f7ed !important;
}

.public-result-card.public-result-success .public-result-label {
  color: #13733a !important;
}

.public-result-card.public-result-success h4,
.public-result-card.public-result-success .public-result-reasons-title {
  color: #13733a !important;
}

.public-result-card.public-result-success li::marker {
  color: #1f8f4d !important;
}

.public-result-card.public-result-success.public-result-has-pending .public-result-reasons {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(99, 4, 4, 0.18);
  border-radius: 14px;
  background: #fff7f8;
}

.public-result-card.public-result-success.public-result-has-pending .public-result-reasons h4,
.public-result-card.public-result-success.public-result-has-pending .public-result-reasons-title {
  color: #630404 !important;
}

.public-result-card.public-result-success.public-result-has-pending .public-result-reasons ul,
.public-result-card.public-result-success.public-result-has-pending .public-result-reasons li,
.public-result-card.public-result-success.public-result-has-pending .public-result-reasons p {
  color: #1f2937 !important;
}

.public-result-card.public-result-success.public-result-has-pending .public-result-reasons li::marker {
  color: #630404 !important;
}
.partner-dismissals article+article{margin-top:16px;padding-top:16px;border-top:1px dashed #d9dde3}.partner-dismissals .internal-history-legacy{margin-top:12px}


/* APMERR - Historial de visitas técnicas */

.hub-record-history .internal-history-visit-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.hub-record-history .internal-history-visit-editor label,
.hub-record-history .internal-history-file-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #630404;
  font-weight: 650;
}

.hub-record-history .internal-history-visit-editor input,
.hub-record-history .internal-history-file-label input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px;
  border: 1px solid #decaca;
  border-radius: 9px;
  background: #fff;
  color: #292323;
  font: inherit;
}

.hub-record-history .internal-history-file-help {
  margin: 7px 0 15px;
  color: #756969;
  font-size: .85rem;
}

.hub-record-history .internal-history-visit {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 3px solid #630404;
  border-radius: 0 7px 7px 0;
  background: #f9f1f1;
}

.hub-record-history .internal-history-attachments {
  margin-top: 14px;
}

.hub-record-history .internal-history-attachments ul {
  list-style: none;
  padding: 0;
  margin: 9px 0 0;
}

.hub-record-history .internal-history-attachments li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #eadddd;
}

.hub-record-history .internal-history-file-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-record-history .internal-history-file-actions a {
  color: #630404;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 620px) {
  .hub-record-history .internal-history-visit-editor {
    grid-template-columns: 1fr;
  }
}
