:root {
  --redondos-rojo: #f3272b;
  --redondos-hover: #d91f24;
  --azul-seguridad: #10244d;
  --texto-principal: #263238;
  --texto-secundario: #657085;
  --borde: #d5ddea;
  --fondo: #f4f7fb;
  --blanco: #ffffff;
  --exito: #108a43;
  --exito-fondo: #e9f8ef;
  --ink: var(--texto-principal);
  --muted: var(--texto-secundario);
  --line: var(--borde);
  --blue: var(--azul-seguridad);
  --blue-dark: var(--azul-seguridad);
  --blue-soft: #edf2f8;
  --green: var(--exito);
  --green-soft: var(--exito-fondo);
  --red: var(--redondos-rojo);
  --surface: var(--blanco);
  --page: var(--fondo);
  --shadow: 0 14px 40px rgba(16, 36, 77, .12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 78% 8%, #edf2f8 0, transparent 260px), var(--page);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 clamp(18px, 4vw, 52px);
  color: #fff;
  background: var(--redondos-rojo);
  box-shadow: 0 2px 18px rgba(217, 31, 36, .24);
}

.brand,
.help-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand {
  font-size: 22px;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 6px;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #fff;
}

.brand-mark::before {
  top: 12px;
}

.brand-mark::after {
  top: 20px;
}

.brand-mark span {
  position: absolute;
  right: -7px;
  bottom: 5px;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.help-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.topbar-button {
  min-height: 38px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .65);
}

.page-shell {
  width: min(1540px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: center;
  min-height: 176px;
  padding: 28px 0 10px;
}

.compact-hero {
  min-height: 118px;
}

.hero h1 {
  margin: 0 0 14px;
  color: var(--azul-seguridad);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.hero p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 18px;
}

.hero p strong {
  color: var(--redondos-rojo);
}

.hero-art {
  position: relative;
  height: 150px;
}

.document-visual {
  position: absolute;
  right: 62px;
  top: 8px;
  width: 220px;
  height: 124px;
  border: 8px solid var(--azul-seguridad);
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 10px 0 #dce3ee;
}

.doc-line {
  width: 92px;
  height: 6px;
  margin: 18px 0 0 38px;
  background: #d7dde8;
  border-radius: 999px;
}

.doc-line.long {
  width: 120px;
  background: var(--redondos-rojo);
}

.doc-line.short {
  width: 70px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 118px;
  margin: 14px 0 0 38px;
}

.doc-grid i {
  height: 8px;
  background: #e8edf5;
  border-radius: 2px;
}

.lens {
  position: absolute;
  right: 24px;
  top: 54px;
  width: 72px;
  height: 72px;
  border: 8px solid var(--azul-seguridad);
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}

.lens::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -24px;
  width: 50px;
  height: 10px;
  background: var(--azul-seguridad);
  border-radius: 999px;
  transform: rotate(45deg);
}

.shield {
  position: absolute;
  left: 84px;
  bottom: 12px;
  width: 58px;
  height: 64px;
  background: var(--green);
  clip-path: polygon(50% 0, 92% 18%, 84% 74%, 50% 100%, 16% 74%, 8% 18%);
}

.shield::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 23px;
  width: 24px;
  height: 13px;
  border-left: 6px solid #fff;
  border-bottom: 6px solid #fff;
  transform: rotate(-45deg);
}

.panel {
  margin-top: 16px;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-shell {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 150px);
  padding-top: 48px;
}

.auth-panel {
  width: min(520px, 100%);
}

.stack-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.panel-title,
.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-title h2 {
  margin: 0;
  color: var(--azul-seguridad);
  font-size: 22px;
}

.title-icon {
  width: 18px;
  height: 18px;
  border: 3px solid var(--redondos-rojo);
  border-radius: 50%;
}

.title-icon::after {
  content: "";
  display: block;
  width: 10px;
  height: 3px;
  margin: 12px 0 0 12px;
  background: var(--redondos-rojo);
  border-radius: 999px;
  transform: rotate(45deg);
}

.title-icon.document {
  border-radius: 3px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 30px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

label span {
  font-size: 14px;
}

label b {
  color: var(--red);
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(243, 39, 43, .18);
  border-color: var(--redondos-rojo);
}

.amount-field {
  display: grid;
  grid-template-columns: 58px 1fr;
}

.amount-field span {
  display: grid;
  place-items: center;
  height: 48px;
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 6px 0 0 6px;
}

.amount-field input {
  border-radius: 0 6px 6px 0;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.captcha-box {
  display: inline-grid;
  place-items: center;
  min-width: 148px;
  height: 50px;
  margin-top: 18px;
  color: #087019;
  background: #e9f7e9;
  border: 1px solid #96d79c;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 800;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.inline-actions {
  align-items: end;
  justify-content: flex-start;
  margin-top: 0;
}

.documents-filter {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

button {
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .68;
}

.primary-button {
  min-width: 260px;
  color: #fff;
  background: var(--redondos-rojo);
  border: 1px solid var(--redondos-rojo);
}

.primary-button:hover {
  background: var(--redondos-hover);
  border-color: var(--redondos-hover);
}

.outline-button,
.icon-link {
  color: var(--redondos-rojo);
  background: #fff;
  border: 1px solid rgba(243, 39, 43, .55);
}

.outline-button {
  min-width: 190px;
  padding: 0 20px;
}

.outline-button.green {
  color: var(--green);
  border-color: #74c890;
}

.icon-link {
  padding: 0 12px;
}

.notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  color: var(--azul-seguridad);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.notice.error {
  color: var(--redondos-hover);
  background: #fff3f3;
  border-color: #f1b8b8;
}

.notice.success {
  color: #0b5f2b;
  background: var(--green-soft);
  border-color: #b8e5c5;
}

.result-panel {
  margin-bottom: 28px;
}

.result-header {
  justify-content: space-between;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  font-weight: 800;
}

.status-pill.compact {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.status-pill.inactive {
  color: #657085;
  background: #eef2f6;
}

.result-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  margin-top: 18px;
}

.preview-card {
  display: grid;
  gap: 12px;
}

.receipt {
  height: 260px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #eef3fa;
}

.receipt strong,
.receipt span {
  display: block;
}

.receipt span {
  margin-top: 8px;
  color: var(--azul-seguridad);
  font-size: 12px;
  font-weight: 800;
}

.receipt hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #dce5f0;
}

.receipt i {
  display: block;
  height: 12px;
  margin-bottom: 10px;
  background: #edf1f6;
  border-radius: 2px;
}

.receipt-total {
  margin-top: 26px;
  text-align: right;
  font-weight: 800;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.data-grid div {
  min-height: 78px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.data-grid div:nth-child(4n) {
  border-right: 0;
}

.data-grid dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.data-grid dd {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.download-row {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 22px;
}

.table-wrap {
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
}

.documents-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.documents-table th,
.documents-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.documents-table th {
  color: var(--azul-seguridad);
  background: #f8fafc;
  font-size: 13px;
}

.documents-table td {
  color: var(--ink);
  font-size: 14px;
}

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

.table-actions .outline-button {
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
}

.admin-grid {
  margin-top: 18px;
}

.portal-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f7fb;
}

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  color: #fff;
  background: linear-gradient(180deg, #97161a 0%, #671013 100%);
  box-shadow: 10px 0 28px rgba(16, 36, 77, .14);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 22px;
  font-weight: 800;
}

.portal-nav {
  display: grid;
  gap: 6px;
  padding: 24px 14px;
}

.portal-nav p {
  margin: 18px 10px 6px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  text-transform: uppercase;
}

.portal-nav a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  color: rgba(255, 255, 255, .9);
  border-radius: 8px;
  font-weight: 700;
}

.portal-nav a.active,
.portal-nav a:hover {
  background: rgba(255, 255, 255, .16);
}

.portal-nav span {
  position: relative;
  width: 18px;
  height: 18px;
}

.nav-home {
  border: 2px solid currentColor;
  border-top: 0;
}

.nav-home::before,
.nav-search::after,
.nav-file::before,
.nav-help::before,
.nav-support::before {
  content: "";
  position: absolute;
}

.nav-home::before {
  left: 1px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-search {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-search::after {
  right: -5px;
  bottom: -3px;
  width: 8px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.nav-file {
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-file::before {
  left: 4px;
  right: 4px;
  top: 6px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.nav-help,
.nav-support {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-help::before {
  content: "?";
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.nav-support::before {
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.portal-app {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 10px rgba(16, 36, 77, .06);
}

.portal-topbar > strong {
  color: var(--azul-seguridad);
  font-size: 18px;
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--azul-seguridad);
}

.portal-user small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--redondos-rojo);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}

.notification-dot {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid var(--azul-seguridad);
  border-radius: 50%;
}

.notification-dot::after {
  content: "3";
  position: absolute;
  right: -8px;
  top: -9px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #fff;
  background: var(--redondos-rojo);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.ghost-button {
  min-height: 38px;
  padding: 0 16px;
  color: var(--redondos-rojo);
  background: #fff;
  border: 1px solid rgba(243, 39, 43, .45);
}

.ghost-button:hover {
  background: #fff4f4;
}

.portal-content {
  width: min(1480px, calc(100% - 52px));
  flex: 1;
  margin: 0 auto;
  padding: 28px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb span {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
}

.breadcrumb strong {
  color: var(--azul-seguridad);
}

.portal-title-block {
  padding: 28px 0 16px;
}

.portal-title-block h1 {
  margin: 0 0 10px;
  color: var(--azul-seguridad);
  font-size: 34px;
  line-height: 1.15;
}

.portal-title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.dashboard-card {
  margin-top: 18px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 36, 77, .08);
}

.dashboard-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-card-title h2 {
  margin: 0;
  color: var(--azul-seguridad);
  font-size: 20px;
}

.dashboard-card-title::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid var(--redondos-rojo);
  border-radius: 50%;
  box-shadow: 8px 8px 0 -5px var(--redondos-rojo);
}

.portal-filter-form {
  display: grid;
  grid-template-columns: minmax(210px, 1.05fr) minmax(128px, .68fr) minmax(170px, .9fr) minmax(170px, .85fr) minmax(160px, .78fr) minmax(160px, .78fr);
  gap: 16px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.portal-document-form {
  display: grid;
  grid-template-columns: 1.1fr .75fr .9fr .9fr 1fr .9fr;
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.admin-filter-form {
  display: grid;
  grid-template-columns: .85fr .85fr .95fr .65fr .8fr .95fr .95fr 1.35fr;
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.client-user-form {
  display: grid;
  grid-template-columns: .9fr 1fr 1fr .9fr 1.35fr .9fr .75fr;
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.user-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.claim-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.claim-dialog {
  width: min(1080px, 100%);
}

.claim-dialog .claim-form {
  border-bottom: 0;
}

.full-filter {
  grid-column: 1 / -1;
}

.claim-form textarea,
.status-form textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.claim-form textarea:focus,
.status-form textarea:focus {
  outline: 2px solid rgba(243, 39, 43, .18);
  border-color: var(--redondos-rojo);
}

.documents-fieldset {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.documents-fieldset legend {
  padding: 0 8px;
  color: var(--azul-seguridad);
  font-weight: 800;
}

.claim-document-row {
  display: grid;
  grid-template-columns: 1.1fr .75fr .75fr 1.35fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.claim-table {
  min-width: 1080px;
}

.status-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.history-dialog {
  width: min(760px, 100%);
}

.history-timeline {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.claim-description-box {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fffafa;
  border: 1px solid #ffd5d6;
  border-radius: 8px;
}

.claim-description-box strong {
  display: block;
  color: var(--azul-seguridad);
}

.claim-description-box p {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.history-entry {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 18px;
}

.history-entry::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: #edf1f6;
}

.history-entry:last-child {
  padding-bottom: 0;
}

.history-entry:last-child::before {
  display: none;
}

.history-marker {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  background: #fff;
  border: 4px solid var(--redondos-rojo);
  border-radius: 50%;
}

.history-content {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-entry-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--azul-seguridad);
}

.history-entry-header span,
.history-content small {
  color: var(--muted);
  font-size: 13px;
}

.history-content p {
  margin: 10px 0;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.client-response-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e8edf5;
}

.wide-filter {
  min-width: 220px;
}

.portal-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.compact-button {
  min-width: 150px;
}

.dashboard-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  color: var(--redondos-rojo);
  background: #fff1f1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
}

.help-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.help-answer {
  margin-top: 20px;
  padding: 16px 18px;
  color: var(--azul-seguridad);
  background: #fffafa;
  border: 1px solid #ffd5d6;
  border-radius: 8px;
}

.help-answer strong {
  display: block;
  font-size: 17px;
}

.help-answer p {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.55;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.faq-topic {
  min-height: 138px;
  padding: 16px;
  text-align: left;
  color: var(--azul-seguridad);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.faq-topic:hover {
  border-color: #ff9fa1;
  box-shadow: 0 14px 34px rgba(16, 36, 77, .12);
  transform: translateY(-1px);
}

.faq-topic strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.faq-topic span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.small-button {
  min-width: 132px;
  min-height: 42px;
}

.portal-documents-table {
  min-width: 1080px;
  border: 0;
}

.internal-documents-table {
  min-width: 1340px;
}

.client-users-table {
  min-width: 1120px;
}

.portal-documents-table th {
  background: #f6f8fb;
}

.portal-documents-table tbody tr:hover {
  background: #fffafa;
}

.portal-documents-table strong {
  color: #b7191d;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.compact-notice {
  flex: 1;
  margin: 0;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.page-button {
  min-width: 104px;
}

.page-size-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--azul-seguridad);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1480px, calc(100% - 52px));
  margin: 0 auto;
  padding: 18px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.portal-footer nav {
  display: flex;
  gap: 24px;
}

.portal-footer a {
  color: var(--redondos-rojo);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(38, 50, 56, .48);
  backdrop-filter: blur(1px);
}

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

.loading-dialog {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, 100%);
  padding: 28px 30px;
  color: var(--azul-seguridad);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 36, 77, .22);
  text-align: center;
}

.loading-dialog strong {
  font-size: 18px;
}

.loading-dialog small {
  color: var(--muted);
  line-height: 1.45;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f2d3d4;
  border-top-color: var(--redondos-rojo);
  border-radius: 50%;
  animation: loading-spin .8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(38, 50, 56, .55);
}

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

.totals-dialog {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 26px;
  color: var(--azul-seguridad);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 36, 77, .28);
}

.totals-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf5;
}

.totals-header h2 {
  margin: 0;
  font-size: 24px;
}

.totals-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.icon-close-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--redondos-rojo);
  background: #fff;
  border: 1px solid #ff9fa1;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.icon-close-button:hover {
  color: #fff;
  background: var(--redondos-rojo);
}

.totals-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.total-card {
  min-height: 106px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.total-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.total-card strong {
  display: block;
  margin-top: 10px;
  color: var(--azul-seguridad);
  font-size: 24px;
}

.total-card em {
  display: block;
  margin-top: 6px;
  color: var(--redondos-rojo);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.totals-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.totals-sections h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.compact-table-wrap {
  margin-top: 0;
}

.totals-table {
  min-width: 100%;
}

.totals-table th,
.totals-table td {
  padding: 12px 14px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1540px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer nav {
  display: flex;
  gap: 24px;
}

.footer a {
  color: var(--redondos-rojo);
}

@media (max-width: 1100px) {
  .portal-body {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    height: auto;
  }

  .portal-brand {
    min-height: 66px;
  }

  .portal-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 14px;
  }

  .portal-nav p,
  .portal-nav a[href="#"] {
    display: none;
  }

  .portal-nav a {
    min-width: max-content;
    min-height: 40px;
  }

  .portal-topbar {
    padding: 14px 24px;
  }

  .portal-content,
  .portal-footer {
    width: min(100% - 32px, 1480px);
  }

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

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

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

  .claim-form,
  .claim-document-row,
  .client-user-form,
  .user-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }

  .form-grid,
  .documents-filter,
  .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .preview-card {
    grid-template-columns: minmax(180px, 280px) minmax(180px, 1fr);
    align-items: end;
  }

  .totals-summary-grid,
  .faq-grid,
  .totals-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .portal-topbar,
  .portal-user,
  .dashboard-result-header,
  .dashboard-actions,
  .table-footer,
  .pagination-bar,
  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-user {
    width: 100%;
  }

  .portal-title-block h1 {
    font-size: 28px;
  }

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

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

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

  .faq-grid,
  .claim-form,
  .claim-document-row,
  .client-user-form,
  .user-filter-form {
    grid-template-columns: 1fr;
  }

  .portal-filter-actions {
    flex-direction: column;
  }

  .small-button,
  .compact-button,
  .ghost-button {
    width: 100%;
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .brand {
    font-size: 18px;
  }

  .page-shell {
    width: min(100% - 24px, 1540px);
  }

  .form-grid,
  .documents-filter,
  .data-grid,
  .result-layout,
  .preview-card,
  .download-row {
    grid-template-columns: 1fr;
  }

  .download-row {
    display: grid;
  }

  .outline-button,
  .primary-button {
    width: 100%;
    min-width: 0;
  }

  .totals-dialog {
    padding: 20px;
  }

  .totals-header {
    align-items: flex-start;
  }

  .totals-header h2 {
    font-size: 20px;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .data-grid div,
  .data-grid div:nth-child(4n) {
    border-right: 0;
  }
}
