/* ==========================================================================
   PORTAL DCS · ADAPTADOR SOBRE LA SUITE TRINISALUD–FISIATEK
   Este archivo NO define colores propios: todo sale de las variables --st-*
   de suite.css (que debe cargarse ANTES). Viste las clases existentes de las
   plantillas con los componentes de la suite.
   Zonas: <html data-empresa="trinisalud"> = portal de empresas (naranja)
          <html data-empresa="fisiatek">   = panel interno (verde)
   ========================================================================== */

/* ---- Barra superior (st-barra) ---- */
body::before { content: ""; display: block; height: 3px; background: var(--st-acento-marca); }
.topbar {
  background: var(--st-superficie);
  border-bottom: 1px solid var(--st-borde);
  padding: var(--st-e-3) var(--st-e-6);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--st-e-3) var(--st-e-8);
}
.brand-name {
  font-family: var(--st-fuente-titulo); font-weight: 600; font-size: var(--st-t-14);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-marino);
}
.brand-name span { font-weight: 500; color: var(--st-texto-2); text-transform: none; letter-spacing: 0.02em; }
.brand-sub { font-size: var(--st-t-12); color: var(--st-texto-2); margin-top: 2px; }

.topbar nav { display: flex; gap: var(--st-e-1); align-items: center; flex-wrap: wrap; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: var(--st-e-2);
  padding: var(--st-e-2) var(--st-e-3); min-height: 40px;
  border-radius: var(--st-radio); font-size: var(--st-t-14); font-weight: 500;
  color: var(--st-texto-3); text-decoration: none; background: transparent;
}
.topbar nav a:hover { background: var(--st-fondo-2); color: var(--st-texto); text-decoration: none; }

/* Insignia del panel interno (st-insignia) */
.chip-zona {
  display: inline-flex; align-items: center; padding: 2px var(--st-e-2); margin-left: var(--st-e-2);
  border-radius: var(--st-radio-pill); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle;
  background: var(--st-acento-suave); color: var(--st-acento-texto);
}

/* ---- Contenido ---- */
.contenedor { max-width: 1120px; margin: 0 auto; width: 100%; padding: var(--st-e-8) var(--st-e-6) var(--st-e-12); box-sizing: border-box; }
.titulo-pagina {
  font-family: var(--st-fuente-titulo); font-weight: 600; font-size: var(--st-t-28);
  line-height: 1.25; letter-spacing: -0.01em; color: var(--st-marino);
  margin: 0 0 var(--st-e-6);
}

/* ---- Tarjetas (st-tarjeta) ---- */
.tarjeta {
  background: var(--st-superficie); border: 1px solid var(--st-borde);
  border-radius: var(--st-radio-l); box-shadow: var(--st-sombra);
  padding: var(--st-e-6); margin-bottom: var(--st-e-5);
}
.tarjeta h2 {
  font-family: var(--st-fuente-titulo); font-weight: 600; font-size: var(--st-t-20);
  color: var(--st-marino); margin: 0 0 var(--st-e-4);
}
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--st-e-4); }

/* ---- Formularios (st-campo / st-entrada) ---- */
label { display: block; font-size: var(--st-t-13); font-weight: 600; color: var(--st-texto); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px var(--st-e-3);
  font-family: var(--st-fuente); font-size: var(--st-t-14); color: var(--st-texto);
  background: var(--st-superficie); border: 1px solid var(--st-borde-fuerte);
  border-radius: var(--st-radio); box-sizing: border-box;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--st-acento-accion); }
input[type="file"] { padding: 9px var(--st-e-3); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #8A929C; }
input:hover, select:hover, textarea:hover { border-color: #AEB5BE; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--st-acento-accion);
  box-shadow: 0 0 0 3px var(--st-acento-suave);
}

/* Ojo visor de contraseñas (st-entrada-grupo) */
.campo-clave { position: relative; display: flex; }
.campo-clave input { padding-right: 48px; }
.ver-clave {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; min-height: 0; border: 0; border-radius: var(--st-radio-s);
  background: transparent; color: var(--st-texto-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.ver-clave:hover { background: var(--st-fondo-2); color: var(--st-texto); }

/* ---- Botones (st-btn) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--st-e-2);
  min-height: 40px; padding: var(--st-e-2) var(--st-e-4);
  font-family: var(--st-fuente); font-size: var(--st-t-14); font-weight: 600; line-height: 1;
  border-radius: var(--st-radio); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { text-decoration: none; }
/* primario por zona (regla de la suite: un solo primario por pantalla) */
.btn-azul, .btn-verde { background: var(--st-acento-accion); color: var(--st-acento-sobre); }
.btn-azul:hover, .btn-verde:hover { background: var(--st-acento-accion-hover); color: var(--st-acento-sobre); }
.btn-gris { background: var(--st-superficie); border-color: var(--st-borde-fuerte); color: var(--st-texto); }
.btn-gris:hover { background: var(--st-fondo); color: var(--st-texto); }
.btn-rojo { background: var(--st-superficie); border-color: #F4C7C3; color: var(--st-peligro); }
.btn-rojo:hover { background: var(--st-peligro-fondo); color: var(--st-peligro); }

/* ---- Tablas (st-tabla) ---- */
table { width: 100%; border-collapse: collapse; font-size: var(--st-t-14); background: var(--st-superficie); }
th {
  text-align: left; white-space: nowrap; padding: var(--st-e-3) var(--st-e-4);
  background: var(--st-fondo); border-bottom: 1px solid var(--st-borde);
  font-size: var(--st-t-12); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--st-texto-2);
}
td { padding: 14px var(--st-e-4); border-bottom: 1px solid var(--st-borde); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tr:hover td { background: #FAFBFC; }

/* ---- Estados (st-estado) ---- */
.badge, .st-estado {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px var(--st-e-2); border-radius: var(--st-radio-s);
  font-size: var(--st-t-12); font-weight: 600; line-height: 1.4;
  background: var(--st-fondo-2); color: var(--st-texto-3);
}
.badge::before, .st-estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st-graf-neutro); }
.st-estado--exito   { background: var(--st-exito-fondo);   color: var(--st-exito); }
.st-estado--exito::before { background: var(--st-exito-punto); }
.st-estado--alerta  { background: var(--st-alerta-fondo);  color: var(--st-alerta); }
.st-estado--alerta::before { background: var(--st-alerta-punto); }
.st-estado--peligro { background: var(--st-peligro-fondo); color: var(--st-peligro); }
.st-estado--peligro::before { background: var(--st-peligro-punto); }
.st-estado--info    { background: var(--st-info-fondo);    color: var(--st-info); }
.st-estado--info::before { background: var(--st-info-punto); }

/* ---- Avisos (st-aviso) ---- */
.alerta {
  display: block;
  padding: var(--st-e-3) var(--st-e-4); border-radius: var(--st-radio);
  font-size: var(--st-t-14); margin-bottom: var(--st-e-4);
  background: var(--st-info-fondo); color: var(--st-info); border: 0;
}
.alerta-ok    { background: var(--st-exito-fondo);   color: var(--st-exito); }
.alerta-error { background: var(--st-peligro-fondo); color: var(--st-peligro); }
.alerta-info  { background: var(--st-info-fondo);    color: var(--st-info); }

/* ---- Pie (st-pie) ---- */
.pie {
  border-top: 1px solid var(--st-borde); background: var(--st-superficie);
  padding: var(--st-e-5) var(--st-e-6); text-align: center;
  font-size: var(--st-t-12); line-height: 1.7; color: var(--st-texto-2);
}

/* ---- Inicio de sesión (st-login) ---- */
.login-caja { max-width: 400px; margin: 9vh auto var(--st-e-10); }
.login-caja .tarjeta { padding: var(--st-e-8); }

/* ---- Detalles ---- */
.radicado {
  white-space: nowrap; font-family: var(--st-fuente);
  font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: 0.01em;
  color: var(--st-acento-texto);
}
.campo-nota { font-size: var(--st-t-12); color: var(--st-texto-2); margin-top: 2px; }

@media (max-width: 720px) {
  .contenedor { padding: var(--st-e-5) var(--st-e-4) var(--st-e-10); }
  .titulo-pagina { font-size: var(--st-t-20); }
  .topbar { padding: var(--st-e-3) var(--st-e-4); }
  .tarjeta { overflow-x: auto; }
}

@media print {
  body::before, .topbar, .btn { display: none !important; }
  body { background: #FFFFFF; }
  .tarjeta { box-shadow: none; break-inside: avoid; }
}
