/* ════════════════════════════════════════════
   FITMENT — Panel de gestión
   ════════════════════════════════════════════ */
:root {
  --bg: #14181c;
  --bg-2: #1b2127;
  --bg-3: #232b32;
  --ink: #f4f6f7;
  --muted: #97a3ab;
  --line: #2d363e;
  --accent: #4fb8af;
  --accent-soft: rgba(79, 184, 175, .14);
  --danger: #e0626c;
  --warn: #e0b35f;
  --ok: #6fcf8e;
  --font: 'Archivo', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
img { display: block; }
button { font-family: var(--font); }
[hidden] { display: none !important; }

/* ── Splash ────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .5s ease, visibility .5s;
}
.splash.done { opacity: 0; visibility: hidden; }
.splash-logo {
  width: 60px; height: 60px; border-radius: 14px;
  animation: splashPulse 1.4s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(79,184,175,.5)); }
}
.splash-txt { font-size: .75rem; font-weight: 800; letter-spacing: .4em; color: var(--muted); }
.splash-bar { width: 180px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.splash-fill {
  width: 40%; height: 100%; background: var(--accent);
  animation: splashSlide 1s ease-in-out infinite;
}
@keyframes splashSlide {
  from { transform: translateX(-180px); }
  to { transform: translateX(220px); }
}

/* ── Login ─────────────────────────────────── */
.login {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 20px;
  background:
    radial-gradient(800px 500px at 80% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px;
  padding: 44px 36px; text-align: center;
  animation: cardIn .7s var(--ease);
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo { width: 56px; height: 56px; border-radius: 13px; margin: 0 auto 18px; }
.login-card h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.login-sub { font-size: .85rem; color: var(--muted); margin-bottom: 28px; }
.login-hint { font-size: .75rem; color: var(--muted); margin-top: 16px; }
.login-back { color: var(--muted); font-size: .85rem; text-decoration: none; transition: color .25s; }
.login-back:hover { color: var(--accent); }
.login-card.shake { animation: shake .45s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-7px); }
  80% { transform: translateX(7px); }
}

/* ── Campos ────────────────────────────────── */
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.field input, .field select, .select {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px;
  color: var(--ink); font-family: var(--font); font-size: .95rem;
  transition: border-color .25s ease, box-shadow .25s ease;
  outline: none;
}
.field input:focus, .field select:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px;
  color: var(--ink); font-family: var(--font); font-size: .9rem; line-height: 1.7;
  resize: vertical; min-height: 140px; outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#loginPin { text-align: center; font-size: 1.6rem; letter-spacing: .5em; }

/* ── Botones ───────────────────────────────── */
.btn {
  display: inline-block; padding: 12px 22px;
  font-size: .85rem; font-weight: 700; letter-spacing: .06em;
  border: 0; border-radius: 10px; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: #0c1413; }
.btn-accent:hover { box-shadow: 0 8px 22px rgba(79,184,175,.35); }
.btn-block { display: block; width: 100%; }
.btn-mini {
  background: var(--bg-3); color: var(--muted); border: 1px solid var(--line);
  font-size: .72rem; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  transition: color .25s, border-color .25s;
}
.btn-mini:hover { color: var(--accent); border-color: var(--accent); }

/* ── Layout app ────────────────────────────── */
.app { display: flex; min-height: 100svh; }

.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100svh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px; border-bottom: 1px solid var(--line);
}
.sidebar-logo { width: 38px; height: 38px; border-radius: 10px; }
.sidebar-brand strong { display: block; letter-spacing: .2em; font-size: .85rem; }
.sidebar-brand small { color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.sidebar-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-foot { padding: 14px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 14px;
  background: none; border: 0; border-radius: 10px;
  color: var(--muted); font-size: .88rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  position: relative;
  transition: background .25s ease, color .25s ease, transform .2s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover { color: var(--ink); background: var(--bg-3); transform: translateX(3px); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 20%;
  width: 3px; height: 60%; border-radius: 3px;
  background: var(--accent);
}
.nav-badge {
  margin-left: auto;
  background: var(--bg-3); color: var(--muted);
  font-size: .7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.nav-item.active .nav-badge { background: var(--accent); color: #0c1413; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(20,24,28,.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1.25rem; font-weight: 800; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: .8rem; color: var(--muted); }
.topbar-user {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #0c1413;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
}
.topbar-burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 4px; padding: 4px; }
.topbar-burger span { width: 20px; height: 2px; background: var(--ink); }

.content { padding: 30px; flex: 1; }

/* ── Vistas con transición ─────────────────── */
.view { display: none; }
.view.active { display: block; animation: viewIn .5s var(--ease); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* entrada escalonada de paneles */
.pop { animation: popIn .6s var(--ease) backwards; }
.pop:nth-child(1) { animation-delay: .05s; }
.pop:nth-child(2) { animation-delay: .12s; }
.pop:nth-child(3) { animation-delay: .19s; }
.pop:nth-child(4) { animation-delay: .26s; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── KPIs ──────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpi {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
  transition: transform .3s var(--ease), border-color .3s ease;
}
.kpi:hover { transform: translateY(-4px); border-color: var(--accent); }
.kpi-label {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.kpi-num { display: block; font-size: 2rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.kpi-foot { display: block; font-size: .75rem; color: var(--muted); margin-top: 8px; }
.kpi-foot.up { color: var(--ok); }
.kpi-foot.down { color: var(--danger); }

/* ── Paneles / dashboard ───────────────────── */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; overflow: hidden;
}
.panel-wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-head h3 { font-size: .95rem; font-weight: 800; letter-spacing: .03em; }

/* gráfico de barras CSS */
.chart {
  display: flex; align-items: flex-end; gap: 14px;
  height: 220px; padding-top: 10px;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%; max-width: 54px;
  background: linear-gradient(180deg, var(--accent), rgba(79,184,175,.35));
  border-radius: 8px 8px 3px 3px;
  height: 0%;
  transition: height 1s var(--ease);
  position: relative;
}
.chart-bar:hover { filter: brightness(1.15); }
.chart-bar .chart-val {
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; font-weight: 700; color: var(--muted); white-space: nowrap;
  opacity: 0; transition: opacity .3s ease;
}
.chart-bar:hover .chart-val { opacity: 1; }
.chart-label { font-size: .7rem; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* listas */
.list { list-style: none; }
.list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: .88rem;
  animation: listIn .4s var(--ease) backwards;
}
.list li:nth-child(1) { animation-delay: .05s; }
.list li:nth-child(2) { animation-delay: .1s; }
.list li:nth-child(3) { animation-delay: .15s; }
.list li:nth-child(4) { animation-delay: .2s; }
.list li:nth-child(5) { animation-delay: .25s; }
@keyframes listIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.list li:last-child { border-bottom: 0; }
.list .when { margin-left: auto; color: var(--muted); font-size: .75rem; flex-shrink: 0; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-3); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .8rem;
}

.pill {
  font-size: .72rem; font-weight: 800;
  background: var(--accent); color: #0c1413;
  padding: 3px 11px; border-radius: 20px;
}

/* badges de estado */
.badge {
  display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .06em;
  padding: 4px 11px; border-radius: 20px;
}
.badge-ok { background: rgba(111,207,142,.15); color: var(--ok); }
.badge-bad { background: rgba(224,98,108,.14); color: var(--danger); }
.badge-plan { background: var(--bg-3); color: var(--muted); }

/* ── Barra superior de cada vista ──────────── */
.view-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.view-bar .btn { margin-left: auto; }
.view-hint { color: var(--muted); font-size: .85rem; }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 14px; flex: 1; max-width: 360px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search input {
  background: none; border: 0; outline: none; width: 100%;
  color: var(--ink); font-family: var(--font); font-size: .9rem;
}
.search-lg { max-width: none; margin-top: 14px; }
.select { max-width: 220px; cursor: pointer; }

/* ── Tabla ─────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: .88rem; vertical-align: middle; }
.table tbody tr {
  transition: background .2s ease;
  animation: listIn .4s var(--ease) backwards;
}
.table tbody tr:nth-child(-n+10) { animation-delay: calc(.04s * var(--row, 0)); }
.table tbody tr:hover { background: var(--bg-3); }
.cell-main { font-weight: 700; }
.cell-sub { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.ta-r { text-align: right; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; opacity: 0; transition: opacity .25s ease; }
.table tr:hover .row-actions { opacity: 1; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s, border-color .2s, transform .2s;
}
.icon-btn svg { width: 14px; height: 14px; fill: currentColor; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 30px 0 14px; font-size: .9rem; }

/* ── Beneficios / convenios (panel) ────────── */
.convenios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.convenio-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
  transition: transform .3s var(--ease), border-color .3s ease, opacity .3s ease;
  animation: popIn .5s var(--ease) backwards;
}
.convenio-card:nth-child(2) { animation-delay: .07s; }
.convenio-card:nth-child(3) { animation-delay: .14s; }
.convenio-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.convenio-card.pausado { opacity: .55; }
.convenio-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
.convenio-card h3 { font-size: 1.05rem; font-weight: 800; }
.convenio-rubro { color: var(--muted); font-size: .8rem; }
.convenio-desc {
  font-size: 1.6rem; font-weight: 900; color: var(--accent);
  letter-spacing: -.01em; margin-bottom: 8px;
}
.convenio-detalle { color: var(--muted); font-size: .8rem; margin-bottom: 10px; }
.convenio-stats { font-size: .75rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-bottom: 4px; }

/* ── Beneficios (perfil del socio) ─────────── */
.beneficio {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.beneficio:last-child { border-bottom: 0; }
.beneficio-info { flex: 1; min-width: 180px; }
.beneficio-info strong { display: block; font-size: 1rem; }
.beneficio-desc {
  font-size: 1.15rem; font-weight: 900; color: var(--accent); white-space: nowrap;
}
.beneficio-accion { display: flex; align-items: center; }
.beneficio-accion .btn { padding: 10px 18px; font-size: .78rem; }
.cupon-box {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--accent-soft); border: 1.5px dashed var(--accent);
  border-radius: 12px; padding: 10px 18px;
  animation: popIn .4s var(--ease);
}
.cupon-codigo {
  font-size: 1.25rem; font-weight: 900; letter-spacing: .18em; color: var(--accent);
}
.cupon-nota { font-size: .68rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ── Validación de cupones (locales) ───────── */
.login-card-validar { max-width: 430px; }
.val-socio {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 14px;
  animation: popIn .4s var(--ease);
}
.val-socio > div { flex: 1; }
.val-socio strong { display: block; }
.val-checks { list-style: none; text-align: left; margin-bottom: 18px; }
.val-checks li {
  padding: 10px 12px; border-radius: 10px; margin-bottom: 6px;
  font-size: .88rem; font-weight: 600;
  animation: listIn .35s var(--ease) backwards;
}
.val-checks li:nth-child(2) { animation-delay: .07s; }
.val-checks li:nth-child(3) { animation-delay: .14s; }
.val-checks li:nth-child(4) { animation-delay: .21s; }
.val-ok { background: rgba(111,207,142,.12); color: var(--ok); }
.val-mal { background: rgba(224,98,108,.12); color: var(--danger); }
#valCanjear { margin-bottom: 10px; }
#valCodigo { text-transform: uppercase; letter-spacing: .15em; font-weight: 700; }

/* ── Check-in ──────────────────────────────── */
.checkin { margin-bottom: 20px; }
.checkin h3 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.checkin-results { list-style: none; margin-top: 6px; }
.checkin-results li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 10px;
  animation: listIn .3s var(--ease) backwards;
}
.checkin-results li:hover { background: var(--bg-3); }
.checkin-results .btn { margin-left: auto; padding: 8px 16px; font-size: .78rem; }

/* ── Modal ─────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 13, 16, .7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 440px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  max-height: 86vh; overflow-y: auto;
  transform: translateY(26px) scale(.97);
  transition: transform .35s var(--ease);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-2);
}
.modal-head h3 { font-size: 1.05rem; font-weight: 800; }
.modal-close {
  background: var(--bg-3); border: 0; color: var(--ink);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  transition: background .25s, transform .25s;
}
.modal-close:hover { background: var(--danger); transform: rotate(90deg); }
.modal-body { padding: 24px; }
.modal-body .field { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }
.btn-quiet { background: var(--bg-3); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.modal-text { color: var(--muted); font-size: .9rem; }
.modal-text strong { color: var(--ink); }
.modal-lg { max-width: 620px; }

/* editor de rutina por días (panel) */
.rutina-bloque {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
  animation: popIn .35s var(--ease);
}
.rutina-bloque-head { display: flex; gap: 10px; margin-bottom: 10px; }
.rb-titulo {
  flex: 1; padding: 10px 12px;
  background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 8px;
  color: var(--ink); font-family: var(--font); font-weight: 700; font-size: .9rem;
  outline: none; transition: border-color .25s ease;
}
.rb-titulo:focus { border-color: var(--accent); }
.rutina-bloque .textarea { min-height: 100px; background: var(--bg-2); }
#rutinaAddDia { display: block; width: 100%; padding: 10px; }

/* ── Toasts ────────────────────────────────── */
.toasts {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 14px 18px;
  font-size: .85rem; font-weight: 600;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  animation: toastIn .45s var(--ease);
  max-width: 320px;
}
.toast.out { animation: toastOut .4s var(--ease) forwards; }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(60px); }
}

/* ── Portal del socio (perfil.html) ────────── */
.btn-google {
  background: #fff; color: #1f2933;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-google:hover { box-shadow: 0 8px 24px rgba(255,255,255,.18); }

.me { min-height: 100svh; display: flex; flex-direction: column; }
.me-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 30px; border-bottom: 1px solid var(--line);
  background: rgba(20,24,28,.85); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.me-top .nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.me-top .nav-logo { width: 34px; height: 34px; border-radius: 9px; }
.me-top .nav-name { font-weight: 800; letter-spacing: .25em; font-size: .85rem; }
.me-main { max-width: 1100px; width: 100%; margin: 0 auto; padding: 30px 20px 60px; }

.me-hero {
  display: flex; align-items: center; gap: 22px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-2) 55%);
}
.me-foto {
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
}
.me-datos h1 { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
.me-sub { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.me-desde { color: var(--muted); font-size: .82rem; }

.kpis-4 { margin-bottom: 20px; }
.kpi-num-sm { font-size: 1.3rem; padding-top: 6px; }

.me-rutina { min-height: 120px; }
.rutina-texto {
  font-family: var(--font); font-size: .92rem; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
  color: var(--ink); margin: 0;
}
.rutina-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rutina-tab {
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
  padding: 8px 14px; border-radius: 20px;
  font-family: var(--font); font-size: .78rem; font-weight: 700;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s var(--ease);
}
.rutina-tab:hover { color: var(--ink); transform: translateY(-2px); }
.rutina-tab.active { background: var(--accent); color: #0c1413; border-color: var(--accent); }
.rutina-dia { display: none; }
.rutina-dia.active { display: block; animation: viewIn .35s var(--ease); }

.link-btn {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-family: var(--font); font-size: .78rem; text-decoration: underline;
  transition: color .25s ease;
}
.link-btn:hover { color: var(--accent); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .convenios-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 200;
    transform: translateX(-100%);
    transition: transform .4s var(--ease);
    box-shadow: 30px 0 60px rgba(0,0,0,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .topbar-burger { display: flex; }
  .content { padding: 20px 16px; }
  .topbar { padding: 14px 16px; }
  .kpis, .kpis-3, .kpis-4 { grid-template-columns: 1fr 1fr; }
  .me-hero { flex-direction: column; text-align: center; }
  .me-sub { justify-content: center; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .convenios-grid { grid-template-columns: 1fr; }
  .beneficio-accion { width: 100%; }
  .row-actions { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
