/* Layout container */
.container{
  width: min(var(--container-max), calc(100% - var(--container-pad)));
  margin: 0 auto;
}

/* Top bar */
.topbar{
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}
.topbar .row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.topbar .links{
  display:flex;
  gap: 14px;
  align-items:center;
}
.topbar a{ color:#fff; opacity:.95; }
.topbar a:hover{ opacity:1; text-decoration: underline; }

/* Header */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header .row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 220px;
}
.brand img{
  height: 54px;
  width: auto;
  display:block;
}

.is-hidden{ display:none !important; }
/* Desktop nav */
.nav{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: center;
}
.nav a{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}
.nav a:hover{ background: rgba(15,166,158,.10); color: var(--primary-dark); }
.nav a.active{
  background: rgba(15,166,158,.14);
  color: var(--primary-dark);
}

/* Mobile menu button */
.menu-btn{
  display:none;
  align-items:center;
  justify-content:center;
  height: 42px;
  width: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.menu-btn:active{ transform: translateY(1px); }
.menu-btn svg{ width:22px; height:22px; }

/* Page header */
.pagehead{
  padding: 18px 0 10px 0;
}
.pagehead .title{
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.pagehead h1{
  margin:0;
  font-size: 22px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.pagehead small{
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

/* Card */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card{ margin-top: 14px; }

/* App status */
#loading{ color: var(--muted); font-weight: 600; }
#error{
  margin-top: 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  border-radius: 12px;
  padding: 12px;
}

/* Footer: compacto */
.footer{
  margin-top: 24px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.footer .row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.footer .mini-links{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}
.footer .copy{
  color: var(--muted);
  font-size: 13px;
}

/* ===== Mobile drawer menu ===== */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 60;
  display:none;
}
.drawer{
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(320px, 86vw);
  background: #fff;
  z-index: 70;
  transform: translateX(-105%);
  transition: transform .2s ease;
  border-right: 1px solid var(--border);
  display:flex;
  flex-direction: column;
}
.drawer.open{ transform: translateX(0); }
.backdrop.open{ display:block; }

.drawer-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-header .close{
  height: 40px; width: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.drawer-nav{
  padding: 10px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-nav a{
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}
.drawer-nav a.active{ background: rgba(15,166,158,.14); color: var(--primary-dark); }
.drawer-nav a:hover{ background: rgba(15,166,158,.10); }

.drawer-footer{
  margin-top:auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* Responsive rules */
@media (max-width: 900px){
  .nav{ display:none; }
  .menu-btn{ display:inline-flex; }
  .brand img{ height: 46px; }
}

@media (max-width: 480px){
  .pagehead h1{ font-size: 18px; }
}


/* Grid compatible con .row / .col / .small-12 / .medium-4 / .large-4 etc */
.row{ display:flex; flex-wrap:wrap; gap: 14px; }
.col{ flex: 1 1 0; min-width: 0; }
.small-12{ flex-basis: 100%; }
@media (min-width: 640px){
  .medium-2{ flex-basis: calc(16.666% - 14px); }
  .medium-4{ flex-basis: calc(33.333% - 14px); }
  .medium-6{ flex-basis: calc(50% - 14px); }
  .medium-12{ flex-basis: 100%; }
}
@media (min-width: 1024px){
  .large-2{ flex-basis: calc(16.666% - 14px); }
  .large-4{ flex-basis: calc(33.333% - 14px); }
  .large-6{ flex-basis: calc(50% - 14px); }
  .large-12{ flex-basis: 100%; }
}


/* Hacemos que el footer se vaya al fondo*/
html, body { height: 100%; }
body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main{
  flex: 1;            /* empuja el footer al fondo */
}
/* Tus contenedores de layout */
#wrapper, #site-header, #site-footer{
  width: 100%;
}

/* Footer con fondo suave (no blanco) */
/* Footer verde oscuro + texto blanco */
.footer{
  background: #0a5f5a;              /* verde oscuro */
  border-top: 1px solid rgba(255,255,255,.12);
}

.footer .mini-links a,
.footer .copy{
  color: rgba(255,255,255,.92);
}

.footer .mini-links a:hover{
  color: #ffffff;
  text-decoration: underline;
}

  /* Leyenda Tabla */
.dt-legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.05);
}

.legend-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
}

.legend-item .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display:inline-block;
  box-shadow: 0 0 0 3px rgba(0,0,0,.03);
}

/* Colores alineados con tus clases de fila */
.legend-blue{ background: rgba(210, 227, 255, .35); }
.legend-blue .dot{ background: rgba(90, 140, 255, .95); }

.legend-green{ background: rgba(233, 255, 238, .55); }
.legend-green .dot{ background: rgba(20, 160, 90, .95); }

.legend-pink{ background: rgba(255, 239, 255, .70); }
.legend-pink .dot{ background: rgba(190, 90, 190, .95); }

.legend-red{ background: rgba(251, 239, 239, .80); }
.legend-red .dot{ background: rgba(220, 80, 80, .95); }