/* ==========================================================================
   Sistema visual
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f4f8;
  --border: #e5e8ee;
  --border-strong: #d3d8e1;
  --text: #0f172a;
  --text-2: #475467;
  --text-3: #8590a3;

  /* Colores de la marca FICRESAD (azul) */
  --marca: #0b3c8c;
  --brand: #1e7fd8;
  --brand-hover: #1667b5;
  --brand-soft: #e2f0fd;
  --brand-ink: #0f4f8f;

  --good: #067647;   --good-soft: #ecfdf3;   --good-mark: #12b76a;
  --warn: #b54708;   --warn-soft: #fffaeb;   --warn-mark: #f79009;
  --bad: #c4320a;    --bad-soft: #fef3f2;    --bad-mark: #d03b3b;
  --violet: #5b3fd1; --violet-soft: #f3f0ff;

  --serie-1: #1e7fd8;
  --grid: #edf0f4;

  /* Menú izquierdo: azul claro con la opción activa en azul */
  --side-bg: #e2f0fd;
  --side-text: #0f4f8f;
  --side-text-strong: #0c2d57;
  --side-muted: #4f79a8;
  --side-hover: rgba(30, 127, 216, .13);
  --side-active: #1e7fd8;
  --side-active-text: #ffffff;
  --side-border: rgba(30, 127, 216, .2);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sombra-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sombra-2: 0 4px 12px rgba(16, 24, 40, .08);
  --sombra-3: 0 24px 48px -12px rgba(16, 24, 40, .25);
  --fuente: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111e;
  --surface: #101a2b;
  --surface-2: #0d1626;
  --surface-3: #15223a;
  --border: #1e2b42;
  --border-strong: #2a3a55;
  --text: #e8edf5;
  --text-2: #a6b2c6;
  --text-3: #6f7d95;
  --brand: #5ea8ff;
  --brand-hover: #7dbaff;
  --brand-soft: #0f2a4f;
  --brand-ink: #bcdcff;
  --good: #47cd89;   --good-soft: #0f2e22;
  --warn: #fdb022;   --warn-soft: #33250b;
  --bad: #f97066;    --bad-soft: #3a1717;
  --violet: #a48afb; --violet-soft: #251e45;
  --serie-1: #5ea8ff;
  --grid: #1a263a;
  --side-bg: #0d2440;
  --side-text: #c9ddf7;
  --side-text-strong: #ffffff;
  --side-muted: #8fb0de;
  --side-hover: rgba(255, 255, 255, .08);
  --side-border: rgba(255, 255, 255, .1);
  --sombra-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sombra-2: 0 4px 14px rgba(0, 0, 0, .35);
  --sombra-3: 0 24px 48px -12px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--fuente); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
.oculto { display: none !important; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.sec { color: var(--text-2); }
.peq { font-size: 12.5px; }
.negrita { font-weight: 600; }
.rojo { color: var(--bad); } .verde { color: var(--good); } .ambar { color: var(--warn); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
::selection { background: var(--brand-soft); }

/* Barras de desplazamiento discretas */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ==========================================================================
   Formularios
   ========================================================================== */
input, select, textarea {
  font: inherit; color: var(--text); width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 72px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.campo small { color: var(--text-3); font-size: 12px; }
.rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.rejilla .todo, .rejilla-3 .todo { grid-column: 1 / -1; }
.con-icono { position: relative; }
.con-icono > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.con-icono > input { padding-left: 36px; }
.error { color: var(--bad); font-size: 13px; min-height: 0; margin: 0; }
.error:not(:empty) { margin: 4px 0 12px; padding: 9px 12px; background: var(--bad-soft); border-radius: var(--r-sm); }

/* Interruptor */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 36px; height: 20px; border-radius: 20px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sombra-1); transition: transform .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }

/* Selector segmentado */
.segmentos { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; flex-wrap: wrap; }
.segmentos button, .segmentos label { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.segmentos input { display: none; }
.segmentos button:hover, .segmentos label:hover { color: var(--text); }
.segmentos .activo, .segmentos input:checked + span { color: var(--text); }
.segmentos .activo, .segmentos label:has(input:checked) { background: var(--surface); box-shadow: var(--sombra-1); color: var(--text); }
.segmentos .cuenta { font-size: 11px; background: var(--surface-3); border-radius: 10px; padding: 0 6px; color: var(--text-2); }
.segmentos .activo .cuenta { background: var(--brand-soft); color: var(--brand-ink); }

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px;
  box-shadow: var(--sombra-1); transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primario:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-peligro { color: var(--bad); }
.btn-peligro:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-peligro-lleno { background: var(--bad-mark); border-color: var(--bad-mark); color: #fff; }
.btn-peligro-lleno:hover { background: #b42318; }
.btn-exito { background: #079455; border-color: #079455; color: #fff; }
.btn-exito:hover { background: #067647; }
.btn-fantasma { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn-fantasma:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-chico { padding: 5px 10px; font-size: 12.5px; gap: 5px; }
.btn-icono { padding: 7px; }
.btn-chico.btn-icono { padding: 5px; }
.btn-ancho { width: 100%; padding: 11px; }
.btn .atajo { font-size: 11px; font-weight: 500; color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.grupo-btn { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ==========================================================================
   Inicio de sesión
   ========================================================================== */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); background: #fff; color-scheme: light; --brand: #1e7fd8; --brand-soft: #e2f0fd; --brand-ink: #0f4f8f; }

/* Panel de marca */
.login-marca {
  position: relative; overflow: hidden; color: #fff; padding: 44px clamp(32px, 5vw, 72px); display: grid; grid-template-rows: auto 1fr auto; gap: 32px;
  background: radial-gradient(900px 600px at 0% 0%, #3aa0ff 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #0a4fa3 0%, transparent 65%), linear-gradient(160deg, #1b8af0 0%, #1170d1 50%, #0b56ad 100%);
}
.login-marca::before { /* emblema como marca de agua */
  content: ""; position: absolute; width: 560px; height: 560px; right: -170px; bottom: -150px; pointer-events: none;
  background: url(/marca/emblema.png) center / contain no-repeat; filter: grayscale(1) invert(1); mix-blend-mode: screen; opacity: .13;
}
.login-marca::after { /* anillos decorativos */
  content: ""; position: absolute; width: 640px; height: 640px; left: -260px; top: -300px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 90px rgba(255,255,255,.035), 0 0 0 180px rgba(255,255,255,.025);
}
.login-marca > * { position: relative; z-index: 1; }
.login-logo { display: flex; align-items: center; gap: 14px; }
.login-logo .ficha-emblema { border-radius: 14px; box-shadow: 0 10px 24px -8px rgba(5, 40, 90, .5); }
.login-logo b { display: block; font-size: 21px; font-weight: 800; letter-spacing: .08em; line-height: 1.1; }
.login-logo small { display: block; margin-top: 3px; color: #d6ebff; font-size: 12.5px; font-weight: 500; }
.login-centro { align-self: center; max-width: 520px; }
.login-marca h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.login-marca h1 span { display: block; color: #bfe3ff; }
.login-marca p { color: #e3f1ff; font-size: 16.5px; line-height: 1.55; max-width: 460px; margin: 18px 0 0; }
.login-puntos { display: grid; gap: 12px; margin-top: 36px; }
.login-puntos div { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.login-puntos svg { flex: none; width: 40px; height: 40px; padding: 10px; border-radius: 11px; color: #1170d1; background: #fff; box-shadow: 0 6px 14px -6px rgba(5, 40, 90, .45); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-puntos div span { display: block; font-size: 13.5px; line-height: 1.4; color: #dcedff; }
.login-puntos div b { display: block; font-size: 14.5px; color: #fff; margin-bottom: 2px; }
.login-pie { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); color: #cfe6ff; font-size: 12.5px; }

/* Formulario */
.login-form { display: grid; grid-template-rows: 1fr auto; padding: 40px clamp(28px, 4vw, 64px) 28px; background: #fff; }
.login-caja { width: min(400px, 100%); align-self: center; justify-self: center; animation: login-entra .5s ease-out; }
.login-form .emblema-movil { display: none; }
.login-sello { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.login-sello svg, .login-input > svg, .ver-clave svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-sello svg { width: 14px; height: 14px; }
.login-caja h2 { margin-top: 18px; color: #0c2d57; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.login-caja .sub { color: #5f7895; font-size: 15px; margin: 6px 0 30px; }
.login-caja .campo { margin-bottom: 18px; }
.login-caja .campo > span { color: #0c2d57; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.login-input { position: relative; display: flex; align-items: center; }
.login-input > svg { position: absolute; left: 15px; width: 18px; height: 18px; color: #8aa9c9; pointer-events: none; transition: color .15s; }
.login-input:focus-within > svg { color: var(--brand); }
.login-caja .login-input input {
  width: 100%; height: 50px; padding: 0 14px 0 46px; font-size: 15px; border-radius: 12px; border: 1.5px solid #d5e5f5; background: #f6faff; color: #0c2d57;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-caja .login-input input[name=password] { padding-right: 50px; }
.login-caja .login-input input::placeholder { color: #9bb1c8; }
.login-caja .login-input input:hover { border-color: #a9cdf0; }
.login-caja .login-input input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.ver-clave { position: absolute; right: 7px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: #8aa9c9; cursor: pointer; }
.ver-clave:hover, .ver-clave.activo { color: var(--brand); background: var(--brand-soft); }
.ver-clave svg { width: 18px; height: 18px; }
.login-caja .error:not(:empty) { margin: 0 0 14px; }
.login-caja .btn-ancho {
  height: 52px; margin-top: 8px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #fff;
  background: linear-gradient(180deg, #2b93f5, var(--brand)); box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--brand) 85%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.login-caja .btn-ancho:hover { transform: translateY(-1px); filter: brightness(1.06); }
.login-caja .btn-ancho:active { transform: none; filter: brightness(.97); }
.login-ayuda { margin-top: 22px; font-size: 13px; color: #6f88a4; text-align: center; }
.login-legal { text-align: center; font-size: 12px; color: #93a8bf; }
@keyframes login-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 1000px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-marca { display: none; }
  .login-form { min-height: 100vh; padding: 28px 22px 20px; background: linear-gradient(180deg, var(--brand-soft), #fff 340px); }
  .login-form .emblema-movil { display: flex; justify-content: center; margin-bottom: 22px; }
}

/* ==========================================================================
   Estructura de la aplicación
   ========================================================================== */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.lateral { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.lateral .marca { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px; border-bottom: 1px solid var(--side-border); }
.lateral .marca .monograma { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
.marca-texto { min-width: 0; }
.marca-texto b { display: block; color: var(--side-text-strong); font-size: 15px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca-texto small { color: var(--side-muted); font-size: 11px; line-height: 1.3; display: block; }
.menu { padding: 10px 10px 16px; flex: 1; }
.menu-grupo { margin-top: 14px; }
.menu-grupo > span { display: block; padding: 0 10px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); }
.menu a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); font-weight: 700; text-transform: uppercase; font-size: 12.5px; letter-spacing: .03em; text-decoration: none; margin-bottom: 2px; }
.menu a:hover { background: var(--side-hover); color: var(--side-text-strong); }
.menu a.activo, .menu a.activo:hover { background: var(--side-active); color: var(--side-active-text); box-shadow: 0 1px 2px rgba(16, 24, 40, .15); }
.menu a.activo svg { color: var(--side-active-text); }
.menu .contador { margin-left: auto; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #d92d20; color: #fff; }
.menu .contador.suave { background: var(--side-hover); color: var(--side-text); }
.menu a.activo .contador.suave { background: rgba(255,255,255,.25); color: #fff; }
.lateral-pie { padding: 12px; border-top: 1px solid var(--side-border); }
.estado-sistema { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--side-text); font-size: 12px; }
.estado-sistema div { display: flex; align-items: center; gap: 8px; }
.punto { width: 7px; height: 7px; border-radius: 50%; background: #6f7f99; flex: none; }
.punto.on { background: #32d583; box-shadow: 0 0 0 3px #32d58322; }
.punto.sim { background: #fdb022; box-shadow: 0 0 0 3px #fdb02222; }

main { min-width: 0; display: flex; flex-direction: column; }
.superior {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 62px; padding: 0 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border);
}
.ruta { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; min-width: 0; }
.ruta b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buscador-btn {
  margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(340px, 34vw); padding: 7px 10px 7px 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-3); font-size: 13.5px; text-align: left;
}
.buscador-btn:hover { border-color: var(--text-3); }
.buscador-btn span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buscador-btn .atajo { flex: none; }
.superior .acciones { display: flex; gap: 6px; align-items: center; }
.usuario-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px 4px 4px; border-radius: 10px; text-align: left; }
.usuario-btn:hover { background: var(--surface-3); }
.usuario-btn b { display: block; font-size: 13px; line-height: 1.2; }
.usuario-btn small { display: block; color: var(--text-3); font-size: 11.5px; line-height: 1.2; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; color: #fff; letter-spacing: .02em; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.menu-flotante { position: absolute; z-index: 60; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sombra-3); padding: 6px; }
.menu-flotante .cab { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-flotante button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; border-radius: 8px; text-align: left; color: var(--text); }
.menu-flotante button:hover { background: var(--surface-3); }
.menu-flotante button.peligro { color: var(--bad); }
.btn-menu { display: none; }

.contenido { padding: 26px 28px 48px; width: 100%; max-width: 1480px; margin: 0 auto; }
.cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cabecera h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.cabecera p { margin: 4px 0 0; color: var(--text-2); }
.cabecera .volver { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 13px; margin-bottom: 8px; font-weight: 500; }
.cabecera .volver:hover { color: var(--text); text-decoration: none; }
.titulo-ficha { display: flex; gap: 16px; align-items: center; }
.titulo-ficha .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: 13px; margin-top: 6px; }
.titulo-ficha .meta span { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--sombra-3); }
  .app.menu-abierto .lateral { transform: none; }
  .app.menu-abierto::after { content: ""; position: fixed; inset: 0; background: #0b142480; z-index: 25; }
  .btn-menu { display: inline-flex; }
  .superior { padding: 0 16px; }
  .contenido { padding: 20px 16px 40px; }
}
@media (max-width: 640px) {
  .buscador-btn span, .buscador-btn .atajo, .usuario-btn div, .superior .acciones .ocultable { display: none; }
  .buscador-btn { width: auto; }
  .ruta { display: none; }
  .rejilla, .rejilla-3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Tarjetas, indicadores y paneles
   ========================================================================== */
.tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sombra-1); min-width: 0; }
.tarjeta + .tarjeta { margin-top: 18px; }
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tarjeta-cab h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tarjeta-cab p { margin: 2px 0 0; color: var(--text-3); font-size: 12.5px; }
.tarjeta-cuerpo { padding: 18px 20px; }
.tarjeta-cuerpo.sin-padding, .sin-padding { padding: 0; }
.tarjeta-pie { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpis.compactos { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sombra-1); min-width: 0; }
.kpi .cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kpi .etiqueta-kpi { font-size: 13px; font-weight: 500; color: var(--text-2); }
.kpi .chip-icono { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi .valor { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis.compactos .kpi .valor { font-size: 20px; }
.kpi .valor .moneda { font-size: .55em; font-weight: 600; color: var(--text-3); margin-right: 2px; vertical-align: .35em; }
.kpi .valor .cts { font-size: .6em; color: var(--text-3); font-weight: 600; }
.kpi .pie { margin-top: 8px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi.alerta { border-color: color-mix(in srgb, var(--bad-mark) 35%, var(--border)); }
.kpi.alerta .valor { color: var(--bad); }
.ci-azul { background: var(--brand-soft); color: var(--brand-ink); }
.ci-verde { background: var(--good-soft); color: var(--good); }
.ci-ambar { background: var(--warn-soft); color: var(--warn); }
.ci-rojo { background: var(--bad-soft); color: var(--bad); }
.ci-violeta { background: var(--violet-soft); color: var(--violet); }

.medidor { height: 6px; background: var(--surface-3); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.medidor > i { display: block; height: 100%; border-radius: 6px; background: var(--brand); }
.medidor.verde > i { background: var(--good-mark); }
.medidor.rojo > i { background: var(--bad-mark); }
.medidor.ambar > i { background: var(--warn-mark); }

.columnas { display: grid; gap: 18px; margin-bottom: 18px; }
.columnas > .tarjeta + .tarjeta { margin-top: 0; }
.col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.col-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .col-2, .col-3-1, .col-1-2 { grid-template-columns: 1fr; } }
.pila { display: grid; gap: 18px; align-content: start; }
.pila > .tarjeta + .tarjeta { margin-top: 0; }

/* Lista de definición (datos de una ficha) */
.datos { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 13.5px; }
.datos dt { color: var(--text-3); }
.datos dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ==========================================================================
   Tablas
   ========================================================================== */
.tabla-cont { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tr.clic { cursor: pointer; }
tr.clic:hover td { background: var(--surface-2); }
tr.anulado td { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }
tr.anulado td:last-child { text-decoration: none; }
td .sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.celda-persona { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.celda-persona b { font-weight: 600; }
.acciones-fila { display: flex; gap: 4px; justify-content: flex-end; }
.tabla-compacta td, .tabla-compacta th { padding: 9px 14px; }
.tabla-scroll { max-height: 520px; overflow: auto; }
.tabla-scroll th { position: sticky; top: 0; z-index: 1; }
.sin-salto td { white-space: nowrap; }

/* ==========================================================================
   Insignias y calificaciones
   ========================================================================== */
.insignia { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.insignia::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.insignia.sin-punto::before { display: none; }
.b-verde { background: var(--good-soft); color: var(--good); }
.b-azul { background: var(--brand-soft); color: var(--brand-ink); }
.b-ambar { background: var(--warn-soft); color: var(--warn); }
.b-rojo { background: var(--bad-soft); color: var(--bad); }
.b-gris { background: var(--surface-3); color: var(--text-2); }
.b-violeta { background: var(--violet-soft); color: var(--violet); }

.nota-cal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; font-size: 13px; flex: none; }
.nota-cal.lg { width: 48px; height: 48px; border-radius: 13px; font-size: 22px; }
.cal-A { background: var(--good-soft); color: var(--good); }
.cal-B { background: var(--brand-soft); color: var(--brand-ink); }
.cal-C { background: var(--warn-soft); color: var(--warn); }
.cal-D { background: var(--bad-soft); color: var(--bad); }
.cal-N { background: var(--surface-3); color: var(--text-3); }
.calificacion { display: inline-flex; align-items: center; gap: 8px; }
.calificacion small { color: var(--text-2); font-size: 12.5px; }

/* ==========================================================================
   Barra de filtros
   ========================================================================== */
.filtros { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.filtros .con-icono { flex: 1; min-width: 220px; max-width: 380px; }
.filtros .der { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Pestañas */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.pestanas button { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.pestanas button:hover { color: var(--text); }
.pestanas button.activo { color: var(--brand); border-bottom-color: var(--brand); }
.pestanas .cuenta { font-size: 11px; background: var(--surface-3); color: var(--text-2); padding: 0 7px; border-radius: 10px; }

/* ==========================================================================
   Estados vacíos, carga y avisos
   ========================================================================== */
.vacio { text-align: center; padding: 48px 24px; color: var(--text-2); }
.vacio .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--surface-3); color: var(--text-3); }
.vacio b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.vacio p { margin: 0 auto 16px; max-width: 380px; font-size: 13.5px; }
.vacio.chico { padding: 28px 16px; }
.vacio.chico .ico { width: 38px; height: 38px; margin-bottom: 10px; }

.esqueleto { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: brillo 1.2s infinite; border-radius: 8px; }
@keyframes brillo { to { background-position: -200% 0; } }
.cargando-vista { display: grid; gap: 16px; }
.cargando-vista .fila { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid; margin-bottom: 18px; }
.banner b { display: block; margin-bottom: 2px; }
.banner p { margin: 0; font-size: 13.5px; }
.banner .der { margin-left: auto; }
.banner.info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand-ink); }
.banner.alerta { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn-mark) 35%, transparent); color: var(--warn); }
.banner.peligro { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad-mark) 30%, transparent); color: var(--bad); }

.avisos { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: #101828; color: #fff; box-shadow: var(--sombra-3); animation: entra .25s ease-out; font-size: 13.5px; }
.aviso svg { margin-top: 1px; color: #32d583; }
.aviso.mal svg { color: #fda29b; }
.aviso.saliendo { animation: sale .2s ease-in forwards; }
@keyframes entra { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes sale { to { opacity: 0; transform: translateY(8px); } }

/* ==========================================================================
   Modales
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(10, 17, 30, .55); backdrop-filter: blur(3px); animation: aparece .15s; }
@keyframes aparece { from { opacity: 0; } }
.modal-caja { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sombra-3); animation: sube .2s ease-out; }
@keyframes sube { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-caja.ancho { width: min(980px, 100%); }
.modal-caja.medio { width: min(720px, 100%); }
.modal-cab { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px 0; }
.modal-cab .chip-icono { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.modal-cab h2 { font-size: 18px; font-weight: 700; }
.modal-cab p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; }
.modal-cuerpo { padding: 20px 24px; }
.modal-pie { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); position: sticky; bottom: 0; }
.modal-pie .izq { margin-right: auto; }
.cerrar-modal { position: absolute; right: 14px; top: 14px; z-index: 2; }

/* Paleta de comandos */
.paleta { position: fixed; inset: 0; z-index: 80; background: rgba(10, 17, 30, .5); backdrop-filter: blur(3px); display: flex; justify-content: center; padding-top: 12vh; animation: aparece .12s; }
.paleta-caja { width: min(620px, calc(100vw - 32px)); max-height: 66vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sombra-3); overflow: hidden; border: 1px solid var(--border); animation: sube .15s; }
.paleta-entrada { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.paleta-entrada input { border: 0; padding: 4px 0; font-size: 16px; box-shadow: none !important; background: none; }
.paleta-lista { overflow-y: auto; padding: 8px; }
.paleta-grupo { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 6px; }
.paleta-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; color: var(--text); }
.paleta-item .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.paleta-item small { color: var(--text-3); margin-left: auto; font-size: 12px; white-space: nowrap; }
.paleta-item.sel { background: var(--brand-soft); }
.paleta-item.sel .ico { background: var(--brand); color: #fff; }
.paleta-pie { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; background: var(--surface-2); }
.tecla { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; font-size: 11px; text-align: center; color: var(--text-2); background: var(--surface); }

/* Selector de cliente con búsqueda */
.selector { position: relative; }
.selector-lista { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--sombra-2); padding: 4px; }
.selector-lista button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 6px; text-align: left; }
.selector-lista button:hover, .selector-lista button.sel { background: var(--surface-3); }
.selector-lista small { color: var(--text-3); margin-left: auto; }
.seleccionado { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface-2); }
.seleccionado .btn { margin-left: auto; }

/* Resumen del simulador */
.resumen-plan { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.resumen-plan > div { background: var(--surface); padding: 12px 14px; }
.resumen-plan small { display: block; color: var(--text-3); font-size: 12px; }
.resumen-plan b { font-size: 17px; font-variant-numeric: tabular-nums; }
.resumen-plan .destacado { grid-column: 1 / -1; background: var(--brand-soft); }
.resumen-plan .destacado b { font-size: 24px; color: var(--brand-ink); }
.lado-modal { background: var(--surface-2); border-left: 1px solid var(--border); padding: 20px 24px; }
.modal-dividido { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .modal-dividido { grid-template-columns: 1fr; } .lado-modal { border-left: 0; border-top: 1px solid var(--border); } }

/* Evaluación de crédito */
.evaluacion { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.evaluacion .cab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.evaluacion .cab b { font-size: 13.5px; }
.evaluacion .cuerpo { padding: 12px 14px; font-size: 13px; }
.evaluacion ul { margin: 4px 0 10px; padding-left: 18px; }
.evaluacion li { margin: 2px 0; }
.evaluacion h5 { margin: 8px 0 2px; font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.indicadores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.indicadores > div { padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.indicadores small { display: block; color: var(--text-3); font-size: 11.5px; }
.indicadores b { font-size: 15px; }
.veredicto { padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; }
.veredicto.aprobar { background: var(--good-soft); color: var(--good); }
.veredicto.aprobar_con_condiciones { background: var(--warn-soft); color: var(--warn); }
.veredicto.no_recomendado { background: var(--bad-soft); color: var(--bad); }
.veredicto b { display: block; }
.veredicto p { margin: 2px 0 0; color: var(--text); font-size: 13px; }

/* ==========================================================================
   Panel: agenda e informe
   ========================================================================== */
.saludo h1 { font-size: 26px; }
.agenda { display: grid; }
.agenda-item { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.agenda-item:last-child { border-bottom: 0; }
a.agenda-item:hover, button.agenda-item:hover { background: var(--surface-2); }
button.agenda-item { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; }
.agenda-item .chip-icono { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.agenda-item .txt { flex: 1; min-width: 0; }
.agenda-item .txt b { display: block; font-weight: 600; }
.agenda-item .txt small { color: var(--text-3); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item .cifra { font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda-item > svg:last-child { color: var(--text-3); }
.todo-al-dia { display: flex; flex-direction: column; align-items: center; padding: 36px 20px; text-align: center; color: var(--text-2); }
.todo-al-dia .ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--good-soft); color: var(--good); margin-bottom: 12px; }

.informe-ia { position: relative; overflow: hidden; }
.informe-ia::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #0b3c8c, #2f7de1, #8cc8ff); }
.chip-ia { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: #0f2f5c; flex: none; }
.md { font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.md p { margin: 0 0 10px; }
.md p:last-child, .md ul:last-child, .md ol:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md h4 { font-size: 14px; margin: 12px 0 6px; }
.md code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.md table { margin: 8px 0 12px; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: block; overflow-x: auto; }
.md th, .md td { padding: 7px 10px; }
.escribiendo { display: inline-flex; gap: 4px; padding: 4px 0; }
.escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: rebote 1.2s infinite; }
.escribiendo i:nth-child(2) { animation-delay: .15s; } .escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes rebote { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ==========================================================================
   Gráficas
   ========================================================================== */
.grafica { position: relative; }
.grafica svg { display: block; width: 100%; overflow: visible; }
.grafica .eje { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.grafica .linea-grid { stroke: var(--grid); stroke-width: 1; }
.grafica .base { stroke: var(--border-strong); stroke-width: 1; }
.grafica .barra { fill: var(--serie-1); transition: opacity .15s; }
.grafica .barra.tenue { opacity: .35; }
.grafica .etiqueta-valor { font-size: 11.5px; font-weight: 600; fill: var(--text-2); }
.grafica .zona { fill: transparent; cursor: default; }
.tooltip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sombra-2); border-radius: 9px; padding: 8px 11px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tooltip b { display: block; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tooltip small { color: var(--text-3); }
.ver-tabla { margin-top: 10px; font-size: 12.5px; }
.ver-tabla summary { cursor: pointer; color: var(--text-3); display: inline-flex; gap: 6px; align-items: center; }
.ver-tabla summary:hover { color: var(--text); }
.ver-tabla table { margin-top: 8px; border: 1px solid var(--border); }

.barras-h { display: grid; gap: 12px; }
.barra-h { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.barra-h .pista { height: 10px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.barra-h .pista i { display: block; height: 100%; border-radius: 5px; }
.barra-h .valor { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }
.barra-h small { color: var(--text-3); font-weight: 400; }

/* ==========================================================================
   Línea de tiempo (gestiones de cobranza)
   ========================================================================== */
.linea-tiempo { list-style: none; margin: 0; padding: 0; }
.linea-tiempo li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.linea-tiempo li::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--border); }
.linea-tiempo li:last-child::before { display: none; }
.linea-tiempo .chip-icono { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.linea-tiempo .txt { flex: 1; min-width: 0; padding-top: 4px; }
.linea-tiempo .txt p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.linea-tiempo small { color: var(--text-3); font-size: 12px; }

/* ==========================================================================
   Chat (WhatsApp y asistente)
   ========================================================================== */
.chat-mensajes { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.burbuja { max-width: min(78%, 640px); padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: 13.5px; overflow-wrap: anywhere; box-shadow: var(--sombra-1); }
.burbuja.texto-plano { white-space: pre-wrap; }
.burbuja.yo, .burbuja.salida { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.burbuja.ia, .burbuja.entrada { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.burbuja small { display: block; opacity: .7; font-size: 11px; margin-top: 4px; }
.burbuja.salida.error-envio { background: var(--bad-soft); color: var(--bad); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--r) var(--r); }
.chat-form textarea { min-height: 42px; max-height: 160px; resize: none; }
.asistente { display: flex; flex-direction: column; height: calc(100vh - 62px - 26px - 48px - 76px); min-height: 460px; }
.asistente .chat-mensajes { border-radius: var(--r) var(--r) 0 0; }
.bienvenida-ia { margin: auto; text-align: center; max-width: 560px; padding: 20px; }
.bienvenida-ia .chip-ia { width: 52px; height: 52px; border-radius: 15px; margin-bottom: 14px; }
.bienvenida-ia h3 { font-size: 19px; margin-bottom: 6px; }
.bienvenida-ia p { color: var(--text-2); margin: 0 0 20px; }
.sugerencias { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.sugerencias button { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.sugerencias button:hover { border-color: var(--brand); color: var(--text); }
.sugerencias svg { color: var(--brand); margin-top: 2px; }
@media (max-width: 640px) { .sugerencias { grid-template-columns: 1fr; } }

.conv { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 62px - 160px); min-height: 480px; }
.conv-lista { border-right: 1px solid var(--border); overflow-y: auto; }
.conv-item { display: flex; gap: 11px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; color: var(--text); text-decoration: none !important; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.activo { background: var(--brand-soft); }
.conv-item .txt { flex: 1; min-width: 0; }
.conv-item b { display: block; font-size: 13.5px; }
.conv-item small { display: block; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.conv-item time { font-size: 11px; color: var(--text-3); align-self: flex-start; white-space: nowrap; }
.conv-detalle { display: flex; flex-direction: column; min-width: 0; }
.conv-detalle .cab { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
@media (max-width: 860px) { .conv { grid-template-columns: 1fr; height: auto; } .conv-lista { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--border); } .conv-detalle { min-height: 420px; } }

/* ==========================================================================
   Usuarios y permisos
   ========================================================================== */
.permisos-lista { display: grid; gap: 4px; }
.permisos-grupo { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 12px 0 4px; }
.permiso { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.permiso:hover { border-color: var(--border-strong); }
.permiso:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--brand-soft); }
.permiso b { display: block; font-size: 13.5px; }
.permiso small { color: var(--text-2); font-size: 12.5px; }
.permiso .switch { margin-left: auto; padding-top: 2px; }
.tipo-acceso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tipo-acceso label { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; }
.tipo-acceso label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.tipo-acceso b { display: block; font-size: 13.5px; }
.tipo-acceso small { color: var(--text-2); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }

/* Ajustes */
.seccion-ajustes { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.seccion-ajustes:first-child { padding-top: 0; }
.seccion-ajustes h3 { font-size: 15px; }
.seccion-ajustes p { color: var(--text-2); font-size: 13px; margin: 4px 0 0; }
@media (max-width: 900px) { .seccion-ajustes { grid-template-columns: 1fr; gap: 12px; } }

/* Recibo en pantalla */
.recibo { font-size: 13.5px; }
.recibo .linea { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.recibo .linea:last-child { border-bottom: 0; }
.recibo .linea span { color: var(--text-2); }
.recibo .linea b { text-align: right; font-variant-numeric: tabular-nums; }
.recibo .total { text-align: center; padding: 18px; background: var(--good-soft); border-radius: var(--r); margin-bottom: 14px; }
.recibo .total small { display: block; color: var(--good); font-weight: 600; }
.recibo .total b { font-size: 30px; color: var(--good); font-variant-numeric: tabular-nums; }
.recibo.anulado .total { background: var(--bad-soft); }
.recibo.anulado .total b, .recibo.anulado .total small { color: var(--bad); }

.montos-rapidos { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.montos-rapidos button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 20px; padding: 4px 11px; font-size: 12.5px; color: var(--text-2); }
.montos-rapidos button:hover { border-color: var(--brand); color: var(--brand); }
.montos-rapidos button b { color: var(--text); font-weight: 600; }

.diferencia { padding: 14px; border-radius: 10px; text-align: center; margin-bottom: 14px; font-weight: 600; }

/* ==========================================================================
   Impresión
   ========================================================================== */
#impresion { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  body > *:not(#impresion) { display: none !important; }
  #impresion { display: block; color: #000; font-family: var(--fuente); font-size: 11.5pt; }
}
.doc { color: #111; }
.doc-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid #111; margin-bottom: 16px; }
.doc-cab h1 { font-size: 20pt; }
.doc-cab .empresa { font-size: 10pt; color: #444; }
.doc-cab .derecha { text-align: right; }
.doc-cab .derecha h2 { font-size: 14pt; }
.doc h3 { font-size: 12pt; margin: 18px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 10pt; }
.doc th { background: #f2f2f2 !important; color: #111; border: 1px solid #ccc; padding: 6px 8px; font-size: 9pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc td { border: 1px solid #ddd; padding: 5px 8px; }
.doc .resumen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.doc .resumen div { border: 1px solid #ccc; padding: 8px; border-radius: 6px; }
.doc .resumen small { display: block; color: #555; font-size: 8.5pt; }
.doc .resumen b { font-size: 12pt; }
.doc .firmas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 70px; text-align: center; font-size: 10pt; }
.doc .firmas div { border-top: 1px solid #111; padding-top: 6px; }
.doc .pie-doc { margin-top: 24px; font-size: 8.5pt; color: #666; text-align: center; }
.doc .sello-anulado { border: 3px solid #b42318; color: #b42318; padding: 6px 14px; font-weight: 800; font-size: 16pt; display: inline-block; transform: rotate(-6deg); margin: 10px 0; }
.ticket { width: 80mm; margin: 0 auto; font-size: 10pt; }
.ticket .centro { text-align: center; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.ticket .fila { display: flex; justify-content: space-between; gap: 8px; margin: 3px 0; }
.ticket .grande { font-size: 16pt; font-weight: 800; text-align: center; margin: 8px 0; }

/* ==========================================================================
   Cerebro: asistente disponible en todas las pantallas
   ========================================================================== */
.btn-cerebro {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; align-items: center; gap: 11px; padding: 7px 18px 7px 7px;
  border: 1px solid #0d2c57; border-radius: 14px; color: #fff; text-align: left;
  background: #0f2f5c; box-shadow: 0 6px 18px rgba(9, 30, 66, .22);
  transition: background .15s, box-shadow .15s, transform .15s;
}
.btn-cerebro:hover { background: #133a70; box-shadow: 0 10px 24px rgba(9, 30, 66, .28); transform: translateY(-1px); }
.btn-cerebro:focus-visible { outline: 3px solid #8bb8f0; outline-offset: 2px; }
.btn-cerebro .txt b { display: block; font-size: 14px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; }
.btn-cerebro .txt small { display: block; font-size: 11.5px; font-weight: 500; color: #b9cbe6; line-height: 1.2; }
.logo-asistente { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; }
.logo-asistente img { display: block; }
.cerebro-cab .logo-asistente { width: 36px; height: 36px; border: 1px solid var(--border); }
body.cerebro-abierto .btn-cerebro { display: none; }
.avisos { bottom: 84px; }

.cerebro {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--sombra-3); transform: translateX(105%); transition: transform .25s ease;
}
body.cerebro-abierto .cerebro { transform: none; }
@media (min-width: 1500px) { body.cerebro-abierto main { margin-right: 460px; } }
.cerebro-cab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cerebro-cab .txt { flex: 1; min-width: 0; }
.cerebro-cab b { display: block; font-size: 15px; }
.cerebro-cab small { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cerebro .chat-mensajes { background: var(--surface-2); }
.cerebro .bienvenida-ia { padding: 10px 4px; }
.cerebro .sugerencias { grid-template-columns: 1fr; }
.contexto-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--brand-ink); background: var(--brand-soft); border-radius: 20px; padding: 2px 9px; margin-bottom: 4px; }

/* Tarjetas de acción que el usuario confirma */
.accion-ia { align-self: stretch; max-width: 100%; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); border-radius: 14px; background: var(--surface); box-shadow: var(--sombra-2); overflow: hidden; }
.accion-ia.peligro { border-color: color-mix(in srgb, var(--bad-mark) 45%, var(--border)); }
.accion-ia .cab { display: flex; gap: 10px; align-items: center; padding: 11px 14px; background: var(--brand-soft); }
.accion-ia.peligro .cab { background: var(--bad-soft); }
.accion-ia .cab b { flex: 1; font-size: 13.5px; }
.accion-ia .cab svg { color: var(--brand-ink); }
.accion-ia.peligro .cab svg { color: var(--bad); }
.accion-ia dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 0; padding: 11px 14px; font-size: 13px; }
.accion-ia dt { color: var(--text-3); }
.accion-ia dt::first-letter { text-transform: uppercase; }
.accion-ia dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.accion-ia .previo { margin: 0 14px 11px; padding: 10px 12px; border-radius: 10px; background: var(--surface-3); font-size: 13px; white-space: pre-wrap; line-height: 1.5; }
.accion-ia .previo small { display: block; color: var(--text-3); font-size: 11px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.accion-ia .aviso-accion { margin: 0 14px 11px; font-size: 12.5px; color: var(--warn); display: flex; gap: 6px; align-items: center; }
.accion-ia .pie { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.accion-ia .pie .resultado { margin-right: auto; font-size: 12.5px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.accion-ia.hecho .cab { background: var(--good-soft); } .accion-ia.hecho .cab svg { color: var(--good); }
.accion-ia.descartado { opacity: .6; } .accion-ia.descartado .cab { background: var(--surface-3); }
.accion-hecha { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 20px; background: var(--good-soft); color: var(--good); font-size: 12.5px; font-weight: 600; }
.accion-hecha a { color: inherit; text-decoration: underline; }
.grupo-acciones { display: grid; gap: 8px; align-self: stretch; }
.grupo-acciones .todas { display: flex; justify-content: flex-end; }

/* Bandeja de WhatsApp */
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; align-self: flex-start; }
.no-leidos { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #12b76a; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.estado-msj { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.estado-msj svg { width: 14px; height: 14px; }
.estado-msj.leido svg { color: #7dd3fc; }
.burbuja.salida .estado-msj.leido svg { color: #a5f3fc; }
.estado-msj.error { color: var(--bad); }
.separador-dia { align-self: center; font-size: 11.5px; color: var(--text-3); margin: 6px 0; }
.separador-dia span { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
.tag-plantilla { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .75; margin-bottom: 3px; }
.aviso-chat { display: flex; gap: 8px; align-items: center; padding: 8px 14px; font-size: 12.5px; color: var(--brand-ink); background: var(--brand-soft); border-top: 1px solid var(--border); }
.aviso-chat.alerta { color: var(--warn); background: var(--warn-soft); }
.chat-form textarea:disabled { background: var(--surface-3); cursor: not-allowed; }

/* Guía de conexión de WhatsApp */
.pasos { counter-reset: paso; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pasos li { counter-increment: paso; display: flex; gap: 12px; font-size: 13.5px; }
.pasos li::before { content: counter(paso); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 12px; }
.pasos li.hecho::before { content: "✓"; background: var(--good-soft); color: var(--good); }
.pasos li > div > b { display: block; }
.pasos p { margin: 2px 0 0; color: var(--text-2); }
.copiable { display: flex; gap: 6px; }
.copiable input { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); }
.resultado-prueba { margin-top: 10px; }

/* Chat con la apariencia familiar de WhatsApp (bandeja y ficha del cliente) */
:root { --wa-fondo: #efeae2; --wa-entrada: #ffffff; --wa-salida: #d9fdd3; --wa-texto: #111b21; --wa-hora: #667781; --wa-leido: #53bdeb; --wa-barra: #f0f2f5; --wa-verde: #00a884; }
:root[data-theme="dark"] { --wa-fondo: #0b141a; --wa-entrada: #202c33; --wa-salida: #005c4b; --wa-texto: #e9edef; --wa-hora: #8696a0; --wa-barra: #202c33; }
.conv .chat-mensajes, #chat-cliente {
  background-color: var(--wa-fondo);
  background-image: radial-gradient(color-mix(in srgb, var(--wa-hora) 16%, transparent) 1px, transparent 1.2px), radial-gradient(color-mix(in srgb, var(--wa-hora) 10%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px;
  padding: 18px 6%; gap: 6px;
}
.conv .burbuja, #chat-cliente .burbuja { position: relative; max-width: min(72%, 560px); padding: 7px 10px 6px; border-radius: 9px; color: var(--wa-texto); font-size: 14px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); border: 0; }
.conv .burbuja.entrada, #chat-cliente .burbuja.entrada { background: var(--wa-entrada); border-top-left-radius: 0; }
.conv .burbuja.salida, #chat-cliente .burbuja.salida { background: var(--wa-salida); border-top-right-radius: 0; }
.conv .burbuja.entrada::before, #chat-cliente .burbuja.entrada::before { content: ""; position: absolute; top: 0; left: -8px; border: 8px solid transparent; border-top-color: var(--wa-entrada); border-right-color: var(--wa-entrada); border-width: 0 8px 10px 0; border-color: transparent var(--wa-entrada) transparent transparent; }
.conv .burbuja.salida::before, #chat-cliente .burbuja.salida::before { content: ""; position: absolute; top: 0; right: -8px; border-style: solid; border-width: 0 0 10px 8px; border-color: transparent transparent transparent var(--wa-salida); }
.conv .burbuja small, #chat-cliente .burbuja small { display: flex; justify-content: flex-end; align-items: center; gap: 4px; color: var(--wa-hora); opacity: 1; font-size: 11px; margin: 2px 0 0 24px; }
.conv .burbuja .estado-msj svg, #chat-cliente .burbuja .estado-msj svg { color: var(--wa-hora); }
.conv .burbuja .estado-msj.leido svg, #chat-cliente .burbuja .estado-msj.leido svg { color: var(--wa-leido); }
.conv .burbuja.error-envio, #chat-cliente .burbuja.error-envio { background: var(--bad-soft); color: var(--bad); }
.conv .separador-dia span, #chat-cliente .separador-dia span { background: var(--wa-entrada); border: 0; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); color: var(--wa-hora); padding: 4px 12px; border-radius: 8px; display: inline-block; }
.separador-dia span::first-letter { text-transform: uppercase; }
.conv .chat-form, .conv-detalle .chat-form { background: var(--wa-barra); border-top: 0; }
.conv .chat-form textarea { border-radius: 10px; border-color: transparent; }
.conv .chat-form .btn-primario { background: var(--wa-verde); border-color: var(--wa-verde); border-radius: 50%; width: 42px; height: 42px; padding: 0; }
.conv-detalle .cab { background: var(--wa-barra); border-bottom: 0; }
.conv-lista { background: var(--surface); }
.conv-item { border-bottom: 1px solid var(--border); padding: 11px 14px; transition: background .12s; }
.conv-item.activo { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--wa-verde); }
.conv-item b .chip { vertical-align: middle; }
.conv-item:has(.no-leidos) b { font-weight: 700; }
.conv-item:has(.no-leidos) time { color: var(--wa-verde); font-weight: 600; }
.no-leidos { background: var(--wa-verde); }
.tag-plantilla { color: var(--wa-verde); opacity: 1; }
:root[data-theme="dark"] .tag-plantilla { color: #7ae3c3; }

.conv-lista .filtros { padding: 10px; }
.conv-lista .segmentos { display: flex; width: 100%; flex-wrap: nowrap; }
.conv-lista .segmentos button { flex: 1; justify-content: center; padding: 6px 4px; font-size: 12.5px; }

/* Logo original de FICRESAD */
.ficha-emblema { display: inline-grid; place-items: center; flex: none; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.logo-completo { display: block; height: auto; }
@media print { .logo-completo { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

.login-form .emblema-movil .logo-completo { border-radius: 20px; box-shadow: 0 14px 30px -14px rgba(15, 79, 143, .45); }

/* ==========================================================================
   Mensajes masivos y garantías
   ========================================================================== */
.col-3-2 { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); }
@media (max-width: 1100px) { .col-3-2 { grid-template-columns: 1fr; } }
.paso-masivo { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.paso-masivo:not(:first-child) { margin-top: 22px; }
.paso-masivo span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 800; flex: none; }
.paso-masivo h3 { font-size: 15px; font-weight: 700; }
.canales-masivos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .canales-masivos { grid-template-columns: 1fr; } }
.canal-masivo { position: relative; display: grid; gap: 4px; justify-items: start; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--r); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.canal-masivo:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.canal-masivo input { position: absolute; opacity: 0; pointer-events: none; }
.canal-masivo .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 4px; }
.canal-masivo small { color: var(--text-3); font-size: 12px; line-height: 1.35; }
.canal-masivo .insignia { margin-top: 6px; }
.canal-masivo:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.canal-masivo:has(input:checked) .ico { background: var(--brand); color: #fff; }
.chips-plantillas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.variables-masivos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -4px; }
.variable { border: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.variable:hover { border-style: solid; }
.previa-canal { border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.previa-cab { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.previa-canal .previa-burbuja { margin: 12px; }
.previa-canal.whatsapp { background: var(--wa-fondo); }
.previa-burbuja { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; line-height: 1.5; white-space: normal; }
.previa-canal.whatsapp .previa-burbuja { background: var(--wa-salida); color: var(--wa-texto); border: 0; max-width: 92%; margin-left: auto; }
.lista-destinatarios { display: grid; gap: 2px; margin-top: 14px; }
.lista-destinatarios > div { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.lista-destinatarios > div > span { flex: 1; min-width: 0; }
.lista-destinatarios b { display: block; font-size: 13px; }
.lista-destinatarios small { color: var(--text-3); font-size: 12px; }
.recorte { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
fieldset.garantia { border: 1.5px dashed color-mix(in srgb, var(--brand) 35%, var(--border)); border-radius: var(--r); padding: 12px 14px 0; margin: 4px 0 14px; background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
fieldset.garantia legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--brand-ink); }

/* Recuadros del panel */
.recuadros { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.recuadro { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: var(--r); border: 1px solid; text-align: left; cursor: pointer; box-shadow: var(--sombra-1); transition: transform .12s, box-shadow .12s; }
.recuadro:hover { transform: translateY(-2px); box-shadow: var(--sombra-2, var(--sombra-1)); }
.recuadro .ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff8; }
.recuadro .ico svg { width: 26px; height: 26px; }
.recuadro b { display: block; font-size: 14px; color: var(--text); }
.recuadro strong { display: block; font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.recuadro small { display: block; font-size: 12px; color: var(--text-3); }
.rc-verde, .k-verde { --k1: #16a34a; --k2: #0f7a37; }
.rc-gris, .k-gris { --k1: #64748b; --k2: #475569; }
.rc-rojo, .k-rojo { --k1: #dc2626; --k2: #a91b1b; }
.rc-marron { --k1: #92521f; --k2: #6b3a14; }
.k-azul { --k1: #1677e0; --k2: #0b55a8; }
.k-ambar { --k1: #ea8a0c; --k2: #c26a04; }
.k-violeta { --k1: #7c3aed; --k2: #5b21b6; }
/* Tarjetas con color fuerte según lo que presentan */
.recuadro, .kpi { background: linear-gradient(135deg, var(--k1), var(--k2)); border-color: transparent; color: #fff; }
.recuadro b, .recuadro strong, .recuadro small, .kpi .etiqueta-kpi, .kpi .pie, .kpi .pie *, .kpi .valor, .kpi .valor .moneda, .kpi .valor .cts { color: #fff; }
.recuadro small, .kpi .pie, .kpi .etiqueta-kpi, .kpi .valor .moneda, .kpi .valor .cts { opacity: .88; }
.recuadro .ico, .kpi .chip-icono { background: rgba(255, 255, 255, .2); color: #fff; }
.kpi .medidor { background: rgba(255, 255, 255, .28); }
.kpi .medidor > i { background: #fff; }
.kpi.alerta { border-color: transparent; box-shadow: 0 0 0 3px color-mix(in srgb, var(--k1) 30%, transparent), var(--sombra-1); }
.kpi a { color: #fff; text-decoration: underline; }

/* Barra superior */
.btn-suave { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); font-weight: 600; }

/* Calculadora simple */
.calc-pantalla { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; text-align: right; margin-bottom: 12px; }
.calc-pantalla small { display: block; min-height: 18px; color: var(--text-3); font-size: 13px; }
.calc-pantalla b { display: block; font-size: 30px; font-weight: 700; overflow-wrap: anywhere; }
.calc-teclas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-teclas .btn { height: 50px; justify-content: center; font-size: 18px; }
.calc-teclas .doble { grid-column: span 2; }

/* Solicitudes */
dl.datos { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
dl.datos dt { color: var(--text-3); font-size: 13px; }
dl.datos dd { margin: 0; }
.sol-historial > div { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--border); margin-left: 5px; }
.sol-historial > div:last-child { border-left-color: transparent; }
.sol-historial i { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.sol-historial b, .sol-historial span, .sol-historial small { display: block; }
.sol-historial span { font-size: 13px; color: var(--text-2); }
.sol-historial small { font-size: 12px; color: var(--text-3); }
.superior .ruta { display: none; }
.superior .acciones { min-width: 0; }
.nowrap { white-space: nowrap; }
@media (max-width: 1650px) { .superior .texto-ancho { display: none; } }
.kpi.alerta .valor { color: #fff; }

/* Mapa */
.columnas.col-mapa { grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); }
@media (max-width: 1100px) { .columnas.col-mapa { grid-template-columns: 1fr; } }
.mapa-envoltura { position: relative; margin: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.mapa { height: 470px; background: #e8eef5; z-index: 0; }
.mapa-envoltura.completo .mapa { height: calc(100vh - 250px); min-height: 460px; }
.mapa-buscar { position: absolute; top: 12px; left: 56px; z-index: 500; width: min(340px, 60%); background: var(--surface); border-radius: 10px; box-shadow: var(--sombra-2); }
.mapa-buscar input { border: 0; }
.mapa-botones { position: absolute; bottom: 14px; right: 12px; z-index: 500; display: flex; gap: 8px; }
.mapa-botones .btn, .mapa-leyenda { box-shadow: var(--sombra-2); background: var(--surface); }
.mapa-leyenda { position: absolute; bottom: 14px; left: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; border-radius: 10px; font-size: 12px; color: var(--text-2); max-width: 60%; }
.mapa-leyenda span { display: flex; align-items: center; gap: 6px; }
.mapa-leyenda i { width: 10px; height: 10px; border-radius: 50%; }
.mapa-leyenda i.linea { width: 20px; height: 3px; border-radius: 2px; background: #1170d1; }
.mapa-lista { position: absolute; top: 12px; right: 12px; bottom: 60px; width: 270px; z-index: 600; background: var(--surface); border-radius: 12px; box-shadow: var(--sombra-3); overflow: auto; }
.mapa-lista .cab { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.mapa-lista > button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; color: var(--text); border-bottom: 1px solid var(--border); }
.mapa-lista > button:hover { background: var(--surface-3); }
.mapa-lista i { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; }
.mapa-lista small { display: block; color: var(--text-3); font-size: 12px; }
.mapa-nota { padding: 0 14px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mapa-nota:empty { display: none; }
.pin-mapa { background: none; border: 0; }
.pin-mapa svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.popup-mapa { display: flex; flex-direction: column; gap: 3px; min-width: 180px; font-family: inherit; }
.popup-mapa .estado { font-weight: 600; font-size: 12.5px; }
.popup-mapa small { color: #555; }
.mapa-mini { height: 230px; border-radius: 10px; border: 1px solid var(--border); z-index: 0; }
.ubic-pie { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.ubic-pie small { flex: 1; min-width: 160px; }
.leaflet-container { font-family: inherit; }

/* Calendario */
.cal { padding: 12px 16px 16px; }
.cal.completo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 1000px) { .cal.completo { grid-template-columns: 1fr; } }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-nav b { font-size: 17px; }
.cal-rejilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-sem { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 4px 0; }
.cal-celda { border: 0; background: none; padding: 3px 0 4px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text); cursor: pointer; }
.cal-celda:hover { background: var(--surface-3); }
.cal-celda span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
.cal.completo .cal-celda span { width: 42px; height: 42px; font-size: 15px; }
.cal-celda.fuera { color: var(--text-3); opacity: .6; }
.cal-celda.hoy span { background: #1170d1; color: #fff; font-weight: 700; }
.cal-celda.con-vencidas:not(.hoy) span { background: #dc2626; color: #fff; font-weight: 700; }
.cal-celda.sel span { box-shadow: 0 0 0 2px #f59e0b; }
.cal-celda i { display: flex; gap: 2px; height: 6px; }
.cal-celda i b, .cal-claves b { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.p-rojo { background: #dc2626; } .p-azul { background: #1170d1; } .p-ambar { background: #ea8a0c; } .p-verde { background: #16a34a; }
.cal-claves { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.cal-claves span { display: flex; align-items: center; gap: 5px; }
.cal-dia { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.cal.completo .cal-dia { border-top: 0; margin-top: 0; padding-top: 0; }
.cal-dia h4 { font-size: 14px; margin: 0 0 10px; }
.recs { display: flex; flex-direction: column; gap: 8px; }
.rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface); }
a.rec:hover { background: var(--surface-3); }
.rec > i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.rec .hora { font-size: 12.5px; font-weight: 600; min-width: 64px; color: var(--text-2); }
.rec .txt { flex: 1; min-width: 0; }
.rec .txt b, .rec .txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .txt small { color: var(--text-3); font-size: 12px; }
.rec .acc { display: flex; gap: 2px; }
.rec.hecho { opacity: .55; } .rec.hecho .txt b { text-decoration: line-through; }

/* Campana */
.campana { position: relative; }
.campana-n { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.campana-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; }
.campana-item:hover { background: var(--surface-3); }
.campana-item .chip-icono { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.rango-fechas { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 8px; color: var(--text-3); }
.rango-fechas input { border: 0; padding: 6px 2px; width: 130px; background: none; }
.paginacion { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.paginacion > div { display: flex; gap: 6px; align-items: center; }
/* Variación contra el mes anterior, sobre tarjetas de color fuerte */
.tendencia { display: inline-flex; align-items: center; gap: 5px; margin: 3px 0 2px; padding: 2px 8px; border-radius: 20px; background: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; width: fit-content; }
.tendencia small { font-weight: 500; color: #6b7280 !important; opacity: 1 !important; font-size: 11px; margin: 0 !important; display: inline !important; }
.tendencia.buena { color: #15803d !important; } .tendencia.mala { color: #c62828 !important; } .tendencia.neutra { color: #475569 !important; }
.recuadro .tendencia { display: flex; }

/* Cobranza: tarjetas de acción */
.acciones-cobro { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.accion-cobro { border-radius: var(--r); padding: 18px 20px; border: 1px solid; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--sombra-1); }
.accion-cobro .cab { display: flex; gap: 14px; align-items: center; }
.accion-cobro .ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.22); color: #fff; }
.accion-cobro .ico svg { width: 26px; height: 26px; }
.accion-cobro b { display: block; font-size: 17px; color: #fff; }
.accion-cobro small { display: block; font-size: 12.5px; color: #fff; opacity: .9; }
.accion-cobro .btn { justify-content: space-between; background: #fff; border-color: #fff; font-weight: 700; padding: 10px 16px; }
.ac-azul { background: linear-gradient(135deg, #1677e0, #0b3f8a); border-color: transparent; } .ac-azul .btn { color: #0b3f8a; }
.ac-rojo { background: linear-gradient(135deg, #dc2626, #a91b1b); border-color: transparent; } .ac-rojo .btn { color: #b91c1c; }
.ac-ambar { background: linear-gradient(135deg, #ea8a0c, #b45309); border-color: transparent; } .ac-ambar .btn { color: #b45309; }
.barra-seleccion { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; font-weight: 600; }

/* Reportes */
.rep-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 16px; }
.rep-tarjeta { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.rep-tarjeta:hover { border-color: var(--brand); box-shadow: var(--sombra-2); transform: translateY(-1px); }
.rep-tarjeta .chip-icono { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.rep-tarjeta .txt { flex: 1; min-width: 0; }
.rep-tarjeta b { display: block; font-size: 14px; margin-bottom: 3px; }
.rep-tarjeta small { display: block; color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.rep-tarjeta > svg { margin-top: 12px; color: var(--text-3); }
.rep-recientes, .rep-programados { padding: 6px 0; }
.rep-reciente { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.rep-reciente .chip-icono { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.rep-reciente .txt { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 0; color: var(--text); cursor: pointer; }
.rep-reciente .txt b, .rep-reciente .txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-reciente .txt b { font-size: 13.5px; } .rep-reciente .txt small { font-size: 12px; color: var(--text-3); }
.rep-reciente .txt:hover b { color: var(--brand); }
.rep-prog { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.rep-prog:last-child { border-bottom: 0; }
.rep-prog b { display: block; font-size: 13.5px; } .rep-prog small { color: var(--text-3); font-size: 12px; }
.interruptor { position: relative; width: 42px; height: 24px; flex: none; cursor: pointer; }
.interruptor input { opacity: 0; width: 0; height: 0; position: absolute; }
.interruptor span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 12px; transition: background .15s; }
.interruptor span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.interruptor input:checked + span { background: #16a34a; }
.interruptor input:checked + span::after { transform: translateX(18px); }
.rep-totales { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px 4px; }
.rep-totales div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; }
.rep-totales small { display: block; font-size: 11.5px; color: var(--text-3); } .rep-totales b { font-size: 16px; }
.rep-tabla { max-height: 60vh; overflow: auto; }
.rep-tabla tfoot td { background: var(--surface-2); position: sticky; bottom: 0; }
.modal-pie { flex-wrap: wrap; }
.rep-tabla td, .rep-tabla th { white-space: nowrap; }

/* Manual de uso */
.manual { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .manual { grid-template-columns: 1fr; } .manual-indice { position: static !important; } }
.manual-indice { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 8px; }
.manual-indice a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.manual-indice a:hover, .manual-indice a.activo { background: var(--brand-soft); color: var(--brand-ink); }
.manual-sec { padding: 20px 26px; margin-bottom: 16px; scroll-margin-top: 80px; line-height: 1.6; font-size: 14.5px; }
.manual-sec h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 10px; color: var(--brand-ink); }
.manual-sec h4 { font-size: 15px; margin: 16px 0 6px; }
.manual-sec ol, .manual-sec ul { padding-left: 22px; margin: 6px 0; } .manual-sec li { margin: 4px 0; }
.manual-sec p { margin: 8px 0; }
.manual-sec .nota { background: var(--brand-soft); color: var(--brand-ink); padding: 10px 14px; border-radius: 10px; }
.manual-sec .faq dt { font-weight: 700; margin-top: 12px; } .manual-sec .faq dd { margin: 4px 0 0; color: var(--text-2); }
.c-verde { color: #16a34a; } .c-gris { color: #64748b; } .c-rojo { color: #dc2626; } .c-marron { color: #92521f; }
.manual-doc section { page-break-inside: avoid; margin-bottom: 14px; } .manual-doc h2 { font-size: 14pt; border-bottom: 1px solid #ccc; padding-bottom: 4px; }

/* Historial de conversaciones del asistente */
.historial-ia { padding: 12px 14px; }
.hist-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hist-buscar { margin-bottom: 6px; }
.hist-grupo { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 14px 4px 6px; }
.hist-item { display: flex; align-items: center; gap: 6px; border-radius: 10px; padding: 2px 4px 2px 0; }
.hist-item:hover, .hist-item.activa { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.hist-item .txt { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 8px 10px; color: var(--text); cursor: pointer; }
.hist-item.memoria .txt { cursor: default; }
.hist-item .txt b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-item.memoria .txt b { white-space: normal; font-weight: 500; }
.hist-item .txt small { display: block; font-size: 12px; color: var(--text-3); }
.hist-item .btn { opacity: .55; } .hist-item:hover .btn { opacity: 1; }
.conv-ajena { display: flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-ink); padding: 8px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }

/* Documentos */
.doc-icono { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; }
.doc-icono.hoja { background: #1d7a46; } .doc-icono.texto { background: #1f5fb8; }
.doc-barra { display: flex; align-items: center; gap: 10px; margin: -6px 0 12px; flex-wrap: wrap; }
.doc-barra .der { flex: 1; }
.doc-titulo { font-size: 18px; font-weight: 700; border: 1px solid transparent; background: transparent; padding: 6px 10px; border-radius: 8px; min-width: 220px; width: min(520px, 40vw); color: var(--text); }
.doc-titulo:hover, .doc-titulo:focus { border-color: var(--border-strong); background: var(--surface); outline: none; }
.doc-compartir select { padding: 6px 10px; }
.doc-editor { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.doc-editor.hoja { height: calc(100vh - 150px); min-height: 480px; }
.doc-editor.hoja .x-spreadsheet { font-family: inherit; }
.doc-editor.texto { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 480px; }
.doc-herramientas { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.doc-herramientas .btn { min-width: 32px; justify-content: center; font-size: 13.5px; }
.doc-herramientas select { width: auto; padding: 5px 8px; font-size: 13px; }
.doc-herramientas .sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.doc-herramientas .color { position: relative; display: inline-grid; place-items: center; width: 32px; height: 30px; border-radius: 8px; font-weight: 800; cursor: pointer; color: #c62828; }
.doc-herramientas .color.fondo { color: #e6c200; }
.doc-herramientas .color:hover { background: var(--surface-3); }
.doc-herramientas .color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-hoja-papel { flex: 1; overflow: auto; background: #e9edf3; padding: 28px 16px; }
[data-theme=dark] .doc-hoja-papel { background: #1b2230; }
.doc-pagina { background: #fff; color: #1f2937; max-width: 816px; min-height: 1056px; margin: 0 auto; padding: 72px 80px; box-shadow: 0 2px 10px rgba(0,0,0,.12); font-family: Calibri, 'Segoe UI', Arial, sans-serif; font-size: 16px; line-height: 1.5; outline: none; }
.doc-pagina h1 { font-size: 28px; margin: 0 0 12px; } .doc-pagina h2 { font-size: 22px; margin: 18px 0 8px; } .doc-pagina h3 { font-size: 18px; margin: 14px 0 6px; }
.doc-pagina p { margin: 0 0 8px; }
.doc-pagina table, .doc-texto table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.doc-pagina td, .doc-pagina th, .doc-texto td, .doc-texto th { border: 1px solid #b8c0cc; padding: 6px 8px; min-width: 40px; vertical-align: top; }
.doc-pagina th { background: #f1f4f8; }
.doc-pagina blockquote { border-left: 4px solid #c9d3e0; margin: 8px 0; padding: 4px 14px; color: #4b5563; }
.doc-pagina a { color: #1170d1; }
@media (max-width: 900px) { .doc-pagina { padding: 36px 28px; } }
