/* =========================================================================
   PORTAL CSA — ESTILOS (v2)
   Paleta ancla: el teal del logotipo de CSA (#3E6C79). Look de portal
   administrativo/financiero: limpio, ordenado en tabla, sin ilustración
   decorativa. Cada bloque de negocio usa un color de identificación
   propio, pero el cromado general (barra superior, pie, acentos) es teal.
   ========================================================================= */

:root {
  --bg: #f4f6f6;
  --paper: #ffffff;
  --paper-soft: #f7f9f9;
  --ink: #1c2a2d;
  --ink-soft: #5c6b6e;
  --line: #e1e7e8;

  --teal: #3e6c79;
  --teal-dark: #24424c;
  --teal-deep: #14262b;
  --teal-tint: #eaf1f2;

  --gold: #c0923d;
  --gold-dark: #9c7226;

  --restaurantes: #b6532f;
  --comedores: #a9832a;
  --trenes: #2f5470;
  --eventos: #7c3a4d;
  --personal: #57534a;
  --corporativo: #3e6c79;

  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(20, 38, 43, 0.05), 0 8px 20px -14px rgba(20, 38, 43, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------------------------------------------------------------------
   Barra superior — logo CSA grande, alineado arriba a la izquierda
   --------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 3px solid var(--teal);
  padding: 10px clamp(18px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 6px 16px -12px rgba(20, 38, 43, 0.45);
}

.topbar__logo {
  height: 80px;
  width: auto;
  flex: none;
  object-fit: contain;
}

.topbar__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--teal-dark);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.topbar__subtitle {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 500;
}

/* ---------------------------------------------------------------------
   Contenedor de bloques
   --------------------------------------------------------------------- */

.board {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) clamp(16px, 4vw, 40px) 50px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.block {
  --accent: var(--teal);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: var(--teal-tint);
  border-left: 5px solid var(--accent);
  background-image: linear-gradient(0deg, color-mix(in srgb, var(--accent) 9%, var(--teal-tint)), color-mix(in srgb, var(--accent) 9%, var(--teal-tint)));
}

.block__head svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
}

.block__head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.block__count {
  margin-left: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
}

.block__rows {
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------------
   Fila de unidad: logo + nombre a la izquierda, botones a la derecha
   --------------------------------------------------------------------- */

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 16px 18px 16px 40px;
  border-top: 1px solid var(--line);
}

.row:nth-child(odd) {
  background: var(--paper-soft);
}

.row__unit {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  width: 240px;
  min-width: 200px;
}

.row__logo {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.row__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.row__logo--placeholder {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--paper));
}

.row__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.row__dashboards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

/* ---------------------------------------------------------------------
   Botón "Ver Dashboard"
   --------------------------------------------------------------------- */

.dbtn {
  --accent: var(--teal);
  display: flex;
  height:70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-decoration: none;
  min-width: 118px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fdfaf3;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, black);
  box-shadow: 0 4px 10px -6px rgba(20, 38, 43, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.dbtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.dbtn:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

.dbtn__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dbtn__name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.88;
}

.dbtn--pending {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  box-shadow: none;
  cursor: default;
}

.dbtn--pending:hover { transform: none; filter: none; }

/* Botones del bloque Corporativo: un poco más prominentes (dorado) */
/*.block--corporativo .dbtn:not(.dbtn--pending) {
  background: var(--gold);
  border-color: var(--gold-dark);
}*/

/* ---------------------------------------------------------------------
   Pie de página
   --------------------------------------------------------------------- */

.site-footer {
  background: var(--teal-deep);
  color: #e7edec;
  padding: 22px 20px;
  text-align: center;
  overflow-x: auto;
}

.site-footer__brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: #f4f6f6;
}

.site-footer__address {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(9.5px, 1.6vw, 11.5px);
  letter-spacing: 0.02em;
  color: #b9c8c6;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.7;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */

@media (max-width: 620px) {
  .row { flex-direction: column; align-items: stretch; padding-left: 22px; }
  .row__unit { width: auto; }
  .dbtn { flex: 1 1 auto; }
  .block__count { display: none; }
  .topbar { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
