/* ==========================================================================
   Qentra App · sistema de diseño
   Tokens heredados de la web comercial (qentra.es). CSS normal, sin framework.
   Índice: 1 Tokens · 2 Base · 3 Layout · 4 Componentes · 5 Tablas · 6 Formularios
           7 Utilidades · 8 Pantallas específicas · 9 Público (registro móvil) · 10 Proyección
   ========================================================================== */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-wght.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 1 · Tokens ---------------------------------------------------------------- */
:root {
  --blue: #1e4ed8;
  --blue-600: #1a44c0;
  --blue-700: #163a9f;
  --blue-50: #eef3fd;
  --blue-100: #e8eefc;
  --green: #19c37d;
  --green-600: #0b7d4f;
  --green-50: #e3f8ef;
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #5b6474;
  --muted-2: #677080;
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --bg-app: #f6f8fb;
  --bg-tint: #eef3fd;
  --line: #e5eaf0;
  --line-2: #d8dfe8;
  --red: #e5484d;
  --red-600: #c9353a;
  --red-50: #fdeaea;
  --amber: #f59e0b;
  --amber-700: #b45309;
  --amber-50: #fef3e2;
  --night: #111827;

  --grad: linear-gradient(135deg, #1e4ed8, #19c37d);
  --grad-soft: linear-gradient(135deg, rgba(30, 78, 216, 0.1), rgba(25, 195, 125, 0.1));

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 4px 8px rgba(16, 24, 40, 0.04), 0 24px 64px rgba(16, 24, 40, 0.14);

  --sidebar-w: 256px;
  --topbar-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 3px rgba(30, 78, 216, 0.28);
}

/* 2 · Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.125rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }
.icon { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 200; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.tabular { font-variant-numeric: tabular-nums; }

/* 3 · Layout ---------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
}
.sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .sidebar.is-open { box-shadow: none; }
  .main { margin-left: var(--sidebar-w); }
}
.sidebar__backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(17, 24, 39, 0.45); }
@media (min-width: 1024px) { .sidebar__backdrop { display: none; } }

.sidebar__brand { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; height: var(--topbar-h); padding: 0 1.1rem; border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none !important; }
.logo-anim { display: block; max-width: 100%; height: auto; overflow: visible; }
.qr-empty .qr-empty__logo { width: min(300px, 72%); height: auto; margin-bottom: 0.75rem; color: var(--ink); }
.logo__word { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.logo__tag { font-size: 0.6875rem; font-weight: 700; color: var(--blue); background: var(--blue-100); padding: 0.1rem 0.45rem; border-radius: 999px; letter-spacing: 0; }

.org-card { margin: 0.9rem 0.9rem 0.25rem; padding: 0.7rem 0.75rem; display: flex; align-items: center; gap: 0.65rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); }
.org-card__logo { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.8125rem; flex-shrink: 0; overflow: hidden; }
.org-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.org-card__name { font-weight: 700; font-size: 0.8125rem; line-height: 1.25; }
.org-card__meta { font-size: 0.75rem; color: var(--muted); }

.nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.75rem 1rem; }
.nav__group { margin-top: 1rem; }
.nav__title { padding: 0 0.6rem 0.35rem; font-size: 0.6875rem; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.07em; }
.nav__link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: var(--ink-2); font-weight: 500; font-size: 0.875rem;
  text-decoration: none !important;
  transition: background-color 0.15s, color 0.15s;
}
.nav__link .icon { color: var(--muted-2); }
.nav__link:hover { background: var(--bg-soft); color: var(--ink); }
.nav__link.is-active { background: var(--blue-100); color: var(--blue); font-weight: 650; }
.nav__link.is-active .icon { color: var(--blue); }
.nav__count { margin-left: auto; min-width: 22px; padding: 0 0.4rem; height: 20px; border-radius: 999px; background: var(--amber-50); color: var(--amber-700); font-size: 0.6875rem; font-weight: 700; display: inline-grid; place-items: center; }
.nav__count--blue { background: var(--blue-100); color: var(--blue); }

.sidebar__user { border-top: 1px solid var(--line); padding: 0.75rem; display: flex; align-items: center; gap: 0.6rem; }
.sidebar__user .who { flex: 1; min-width: 0; }
.sidebar__user .who strong { display: block; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user .who span { font-size: 0.75rem; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__burger { display: inline-grid; }
/* En escritorio el título ya está en la cabecera de cada página: la barra solo existe en móvil/tablet (menú). */
@media (min-width: 1024px) { .topbar, .btn.topbar__burger { display: none; } }
.topbar__crumbs { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.topbar__crumbs a { color: var(--muted); }
.topbar__crumbs strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.support-banner { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem clamp(1rem, 3vw, 2rem); background: #fff7e6; border-bottom: 1px solid #fde4b8; color: var(--amber-700); font-size: 0.8125rem; font-weight: 600; }

.content { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head__title { min-width: 0; }
.page-head__kicker { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.35rem; }
.page-head__sub { margin-top: 0.35rem; color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* 4 · Componentes ---------------------------------------------------------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  height: var(--h); padding: 0 1rem;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.875rem; line-height: 1;
  white-space: nowrap; cursor: pointer; text-decoration: none !important;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s, color 0.15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
.btn--sm { --h: 32px; padding: 0 0.7rem; font-size: 0.8125rem; border-radius: 8px; }
.btn--lg { --h: 48px; padding: 0 1.35rem; font-size: 0.9688rem; border-radius: 12px; }
.btn--xl { --h: 56px; padding: 0 1.6rem; font-size: 1.0625rem; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--icon { width: var(--h); padding: 0; }
.btn--primary { color: #fff; background: var(--blue); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 4px 12px rgba(30, 78, 216, 0.25); }
.btn--primary:hover:not(:disabled) { background: var(--blue-600); }
.btn--success { color: #fff; background: var(--green-600); box-shadow: 0 4px 12px rgba(11, 125, 79, 0.22); }
.btn--success:hover:not(:disabled) { background: #096a43; }
.btn--danger { color: #fff; background: var(--red-600); }
.btn--danger:hover:not(:disabled) { background: #b32d32; }
.btn--ghost { color: var(--ink); background: #fff; border-color: var(--line-2); box-shadow: var(--shadow-xs); }
.btn--ghost:hover:not(:disabled) { border-color: #b9c4d3; background: #fbfcfe; }
.btn--subtle { color: var(--ink-2); background: transparent; }
.btn--subtle:hover:not(:disabled) { background: var(--bg-soft); }
.btn--soft { color: var(--blue); background: var(--blue-100); }
.btn--soft:hover:not(:disabled) { background: #dce6fb; }
.btn--danger-ghost { color: var(--red-600); background: #fff; border-color: #f3c7c8; }
.btn--danger-ghost:hover:not(:disabled) { background: var(--red-50); }
.btn .spinner { width: 14px; height: 14px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card--pad { padding: clamp(1rem, 2.4vw, 1.5rem); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card__head h2, .card__head h3 { font-size: 0.9688rem; }
.card__head p { font-size: 0.8125rem; color: var(--muted); margin-top: 0.1rem; }
.card__body { padding: 1.25rem; }
.card__foot { padding: 0.85rem 1.25rem; border-top: 1px solid var(--line); background: #fbfcfe; border-radius: 0 0 var(--r-lg) var(--r-lg); }

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
  color: var(--ink-2); background: var(--bg-soft); border: 1px solid transparent;
}
.badge--dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: #0a7248; background: var(--green-50); }
.badge--wait { color: var(--amber-700); background: var(--amber-50); }
.badge--bad { color: #a8232a; background: var(--red-50); }
.badge--live { color: var(--blue); background: var(--blue-100); }
.badge--neutral { color: var(--ink-2); background: #eef1f5; }
.badge--outline { background: #fff; border-color: var(--line-2); }
.badge--pulse::before { animation: pulseDot 1.8s ease-out infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 6px transparent; } }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.75rem; font-weight: 700; color: var(--blue); background: var(--blue-100); flex-shrink: 0; }
.avatar--sm { width: 26px; height: 26px; font-size: 0.6875rem; }
.avatar--lg { width: 44px; height: 44px; font-size: 0.9375rem; }
.avatar--green { color: var(--green-600); background: var(--green-50); }

.icon-tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--blue); background: var(--grad-soft); border: 1px solid rgba(30, 78, 216, 0.12); flex-shrink: 0; }
.icon-tile--green { color: var(--green-600); background: var(--green-50); border-color: rgba(11, 125, 79, 0.15); }
.icon-tile--amber { color: var(--amber-700); background: var(--amber-50); border-color: rgba(180, 83, 9, 0.15); }
.icon-tile--red { color: var(--red-600); background: var(--red-50); border-color: rgba(201, 53, 58, 0.15); }

/* KPIs */
.kpis { display: grid; gap: 0.85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis--3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi { position: relative; display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.kpi__label { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.kpi__value { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi__value small { font-size: 0.9375rem; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.kpi__hint { font-size: 0.75rem; color: var(--muted-2); margin-top: 0.15rem; }
.kpi--ok .kpi__value { color: var(--green-600); }
.kpi--wait .kpi__value { color: var(--amber-700); }
.kpi--bad .kpi__value { color: var(--red-600); }
.kpi.is-bump .kpi__value { animation: bump 0.6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* Barras de progreso */
.progress { height: 8px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width 0.6s var(--ease); }
.progress--blue > span { background: var(--blue); }
.progress--amber > span { background: var(--amber); }
.progress--thin { height: 5px; }

/* Alertas */
.alert { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: var(--r-md); border: 1px solid; font-size: 0.875rem; }
.alert .icon { margin-top: 1px; }
.alert strong { font-weight: 700; }
.alert--info { color: #1c3d9c; background: var(--blue-50); border-color: #cfdcfa; }
.alert--ok { color: #0a6640; background: #ecfaf3; border-color: #bfeed8; }
.alert--warn { color: #8a4a06; background: #fff8eb; border-color: #fbe0b0; }
.alert--bad { color: #a12a2e; background: #fef1f1; border-color: #f6caca; }

/* Estados vacíos */
.empty { display: grid; justify-items: center; text-align: center; gap: 0.6rem; padding: clamp(2rem, 6vw, 3.5rem) 1.5rem; }
.empty__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--blue); background: var(--grad-soft); border: 1px solid rgba(30, 78, 216, 0.12); margin-bottom: 0.25rem; }
.empty h3 { font-size: 1rem; }
.empty p { color: var(--muted); max-width: 420px; font-size: 0.875rem; }
.empty .btn { margin-top: 0.5rem; }

/* Carga */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, #eef1f5 25%, #f6f8fa 37%, #eef1f5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loading-veil { position: relative; }
.loading-veil[data-loading]::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.55); border-radius: inherit; }
.wire-loading-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300; background: var(--grad); animation: loadbar 1.2s ease-in-out infinite; transform-origin: left; }
@keyframes loadbar { 0% { transform: scaleX(0); } 60% { transform: scaleX(0.8); } 100% { transform: scaleX(1); opacity: 0; } }

/* Pestañas */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.7rem 0.9rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 600; font-size: 0.875rem; white-space: nowrap; cursor: pointer; text-decoration: none !important; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.tab .badge { font-size: 0.6875rem; padding: 0 0.45rem; }

/* Menú desplegable */
.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 220px; padding: 0.35rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); }
.dropdown__menu--up { top: auto; bottom: calc(100% + 6px); }
.dropdown__item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.55rem 0.65rem; border: 0; background: none; border-radius: 8px; color: var(--ink-2); font-size: 0.875rem; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none !important; }
.dropdown__item:hover { background: var(--bg-soft); color: var(--ink); }
.dropdown__item--danger { color: var(--red-600); }
.dropdown__sep { height: 1px; margin: 0.3rem 0; background: var(--line); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.5); backdrop-filter: blur(2px); }
.modal__panel { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 2rem); overflow-y: auto; background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: modalIn 0.25s var(--ease); }
.modal__panel--lg { max-width: 780px; }
.modal__panel--sm { max-width: 440px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.4rem 0.25rem; }
.modal__head p { color: var(--muted); font-size: 0.875rem; margin-top: 0.25rem; }
.modal__body { padding: 1rem 1.4rem; }
.modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding: 0.9rem 1.4rem 1.25rem; position: sticky; bottom: 0; background: #fff; border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* Toasts */
.toasts { position: fixed; z-index: 400; right: 1rem; bottom: 1rem; left: 1rem; display: grid; gap: 0.5rem; justify-items: end; pointer-events: none; }
@media (min-width: 640px) { .toasts { left: auto; width: 380px; } }
.toast { pointer-events: auto; display: flex; gap: 0.7rem; align-items: flex-start; width: 100%; padding: 0.85rem 1rem; background: var(--night); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 0.875rem; animation: toastIn 0.35s var(--ease); }
.toast .icon { margin-top: 1px; }
.toast--ok .icon { color: #4ade9b; }
.toast--bad .icon { color: #ff8a8e; }
.toast--info .icon { color: #93b4ff; }
.toast button { margin-left: auto; color: #9aa4b5; background: none; border: 0; cursor: pointer; padding: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* Definiciones clave/valor */
.dl { display: grid; gap: 0.75rem 1.25rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.dl dt { font-size: 0.75rem; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.05em; }
.dl dd { margin: 0.15rem 0 0; font-weight: 600; }
.dl--rows { grid-template-columns: 1fr; gap: 0; }
.dl--rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.dl--rows > div:last-child { border-bottom: 0; }
.dl--rows dt { text-transform: none; letter-spacing: 0; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.dl--rows dd { margin: 0; text-align: right; }

/* Línea de tiempo (auditoría) */
.timeline { position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 0.75rem; padding-bottom: 1rem; }
.timeline li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-100); color: var(--blue); }
.timeline__meta { font-size: 0.75rem; color: var(--muted-2); }

/* 5 · Tablas ---------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.toolbar__search { position: relative; flex: 1 1 240px; max-width: 380px; }
.toolbar__search .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.toolbar__search .input { padding-left: 2.3rem; }
.toolbar .select { width: auto; min-width: 150px; flex: 0 1 auto; }
.toolbar__end { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { position: sticky; top: 0; text-align: left; font-size: 0.75rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0.7rem 1rem; background: #fbfcfe; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem; }
.table th button:focus-visible { outline: 2px solid var(--blue); border-radius: 4px; }
.table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color 0.12s; }
.table tbody tr:hover { background: #fafbfd; }
.table tr.is-clickable { cursor: pointer; }
.table .cell-main { font-weight: 650; color: var(--ink); }
.table .cell-main a { color: inherit; }
.table .cell-sub { font-size: 0.8125rem; color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
/* Botones con y sin icono a la misma altura (inline-flex alinea por la línea base del contenido). */
.table .actions > .btn, .table .actions > .dropdown { vertical-align: middle; }
.table--compact td { padding: 0.55rem 0.8rem; }
.table--compact th { padding: 0.55rem 0.8rem; }
.person { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.person > div { min-width: 0; }

/* Tablas → tarjetas en móvil */
@media (max-width: 720px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
  .table--stack td { border: 0; padding: 0.2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table--stack td::before { content: attr(data-label); font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; text-align: left; }
  .table--stack td.cell-first { display: block; text-align: left; padding-bottom: 0.4rem; }
  .table--stack td.cell-first::before { display: none; }
  .table--stack td.actions { justify-content: flex-end; padding-top: 0.5rem; }
  .table--stack td.actions::before { display: none; }
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 1rem; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.pagination__pages { display: flex; gap: 0.25rem; }
.pagination__btn { min-width: 32px; height: 32px; padding: 0 0.55rem; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.pagination__btn:hover:not(:disabled) { border-color: #b9c4d3; }
.pagination__btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination__btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Matriz de asistencia */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.matrix th:first-child { background: #fbfcfe; }
.cellmark { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 0.4rem; border-radius: 7px; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cellmark--present { color: #0a7248; background: var(--green-50); }
.cellmark--late { color: var(--amber-700); background: var(--amber-50); }
.cellmark--absent { color: var(--red-600); background: var(--red-50); }
.cellmark--corrected { color: var(--blue); background: var(--blue-100); }
.cellmark--justified { color: #6d28d9; background: #f1ebfe; }
.cellmark--pending { color: var(--amber-700); background: #fff; border: 1px dashed #f0c27a; }
.cellmark--none { color: var(--muted-2); background: #f3f5f8; }
.legend { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; font-size: 0.75rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* 6 · Formularios ----------------------------------------------------------- */
.form-grid { display: grid; gap: 1rem 1.25rem; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .col-span-2 { grid-column: span 2; } .col-span-full { grid-column: 1 / -1; } }
.field { display: grid; gap: 0.35rem; align-content: start; }
.label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.label .req { color: var(--red-600); margin-left: 0.15rem; }
.help { font-size: 0.75rem; color: var(--muted-2); }
.error { display: flex; gap: 0.3rem; align-items: center; font-size: 0.8125rem; font-weight: 500; color: var(--red-600); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 0.8rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
  font-size: 0.875rem; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 92px; padding: 0.6rem 0.8rem; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23677080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.7rem center; }
.input:hover, .select:hover, .textarea:hover { border-color: #b9c4d3; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(201, 53, 58, 0.12); }
.input:disabled, .select:disabled { background: var(--bg-soft); color: var(--muted); }
.input--lg { height: 52px; font-size: 1.0625rem; border-radius: 12px; padding: 0 1rem; }
.check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.875rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.check small { display: block; color: var(--muted); font-size: 0.8125rem; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.875rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 38px; height: 22px; border-radius: 999px; background: #d4dbe5; position: relative; transition: background-color 0.2s; flex-shrink: 0; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform 0.2s var(--ease); }
.switch input:checked + .switch__track { background: var(--blue); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--focus); }
.fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; }
.fieldset legend { padding: 0 0.4rem; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
.radio-cards { display: grid; gap: 0.6rem; }
@media (min-width: 640px) { .radio-cards--2 { grid-template-columns: 1fr 1fr; } .radio-cards--4 { grid-template-columns: repeat(4, 1fr); } }
.radio-card { position: relative; display: flex; gap: 0.7rem; padding: 0.85rem; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card:hover { border-color: #b9c4d3; }
.radio-card.is-checked, .radio-card:has(input:checked) { border-color: var(--blue); box-shadow: var(--focus); }
.radio-card strong { display: block; font-size: 0.875rem; }
.radio-card span { font-size: 0.8125rem; color: var(--muted); }
.radio-card.is-disabled { opacity: 0.6; cursor: not-allowed; }
.form-section { display: grid; gap: 0.25rem 2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .form-section { grid-template-columns: 260px 1fr; } }
.form-section__intro h3 { font-size: 0.9375rem; }
.form-section__intro p { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }
.dropzone { display: grid; justify-items: center; gap: 0.4rem; padding: 1.5rem; border: 2px dashed var(--line-2); border-radius: var(--r-md); text-align: center; color: var(--muted); background: #fbfcfe; cursor: pointer; }
.dropzone:hover { border-color: var(--blue); color: var(--ink-2); }

/* 7 · Utilidades ------------------------------------------------------------ */
.stack { display: grid; gap: 1rem; align-content: start; }
.stack-lg { display: grid; gap: 1.5rem; align-content: start; }
.stack-sm { display: grid; gap: 0.5rem; align-content: start; }
.row { display: flex; align-items: center; gap: 0.6rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main-side { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); } .grid-side-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); } }
.grid-main-side, .grid-side-main { display: grid; gap: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.xsmall { font-size: 0.75rem; }
.strong { font-weight: 700; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.8125rem; }
.text-ok { color: var(--green-600); }
.text-bad { color: var(--red-600); }
.text-wait { color: var(--amber-700); }
.text-blue { color: var(--blue); }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: initial; } .show-sm-only { display: none; } }
.divider { height: 1px; background: var(--line); margin: 1rem 0; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; }
.link-row:last-child { border-bottom: 0; }
.link-row:hover { background: #fafbfd; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 8 · Pantallas específicas ------------------------------------------------- */

/* Login */
.auth { min-height: 100vh; display: grid; background: var(--bg-soft); }
@media (min-width: 1024px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth__aside { display: none; position: relative; overflow: hidden; padding: 3rem; color: #fff; background: radial-gradient(1200px 600px at 10% -10%, rgba(25, 195, 125, 0.35), transparent 60%), linear-gradient(150deg, #163a9f, #1e4ed8 55%, #127e8e); }
@media (min-width: 1024px) { .auth__aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth__aside h2 { color: #fff; font-size: 2.25rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; max-width: 460px; }
.auth__aside p { color: rgba(255, 255, 255, 0.82); max-width: 440px; margin-top: 1rem; font-size: 1.0625rem; }
.auth__points { display: grid; gap: 0.7rem; margin-top: 2rem; }
.auth__points li { display: flex; gap: 0.6rem; align-items: center; color: rgba(255, 255, 255, 0.92); font-weight: 500; }
.auth__points .icon { color: #7ff0bf; }
.auth__main { display: grid; place-items: center; padding: 2rem 1rem; }
.auth__card { width: 100%; max-width: 420px; }
.auth__card .card { padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow-md); }
.demo-users { display: grid; gap: 0.4rem; margin-top: 1rem; }
.demo-users button { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0.5rem 0.7rem; border: 1px dashed var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; font-size: 0.8125rem; text-align: left; }
.demo-users button:hover { border-color: var(--blue); background: var(--blue-50); }

/* Dashboard */
.session-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; }
.session-row:last-child { border-bottom: 0; }
.session-row:hover { background: #fafbfd; }
.session-row__time { width: 58px; text-align: center; padding: 0.35rem 0; border-radius: 10px; background: var(--bg-soft); font-weight: 800; font-size: 0.9375rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.session-row__time small { display: block; font-size: 0.6875rem; font-weight: 600; color: var(--muted); }
.session-row.is-live .session-row__time { background: var(--green-50); color: var(--green-600); }
.session-row__title { font-weight: 650; }
.session-row__meta { font-size: 0.8125rem; color: var(--muted); }
.feed { max-height: 380px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: 26px 1fr auto; gap: 0.7rem; align-items: center; padding: 0.65rem 1.25rem; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.feed li:last-child { border-bottom: 0; }
.feed li.is-new { animation: feedIn 0.7s var(--ease); background: #f3fcf8; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } }
.feed__ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green-600); }
.feed__ok--wait { background: var(--amber-50); color: var(--amber-700); }
.feed__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__sub { font-size: 0.75rem; color: var(--muted); }
.feed__t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.8125rem; }
.live-dot { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 600; color: var(--green-600); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulseG 1.8s ease-out infinite; }
.live-dot--off { color: var(--muted-2); }
.live-dot--off i { background: var(--muted-2); animation: none; }
@keyframes pulseG { 0% { box-shadow: 0 0 0 0 rgba(25, 195, 125, 0.55); } 100% { box-shadow: 0 0 0 6px rgba(25, 195, 125, 0); } }

/* Pantalla operativa del formador (sesión en directo) */
.op { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .op { grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.25fr); align-items: start; } }
.op__qr { position: sticky; top: 1rem; }
.qr-panel { padding: clamp(1rem, 3vw, 1.5rem); text-align: center; }
.qr-panel__ctrl { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 0.9375rem; }
.qr-frame { position: relative; margin: 1rem auto 0.75rem; width: min(100%, 360px); aspect-ratio: 1; padding: 14px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.qr-frame svg { width: 100%; height: 100%; }
.qr-frame::before { content: ''; position: absolute; inset: -6px; border-radius: 26px; padding: 2px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.85; }
.qr-frame.is-refreshing svg { animation: qrSwap 0.45s var(--ease); }
@keyframes qrSwap { 0% { opacity: 0.2; transform: scale(0.97); } 100% { opacity: 1; transform: none; } }
.qr-empty svg { width: auto; height: auto; }
.qr-empty .btn { white-space: normal; height: auto; min-height: var(--h); padding-block: 0.55rem; max-width: 100%; text-align: center; }
.qr-empty { display: grid; place-items: center; align-content: center; gap: 0.6rem; height: 100%; color: var(--muted); font-size: 0.875rem; padding: 1rem; }
.qr-empty--blocked { color: var(--red-600); text-align: center; }
.qr-empty--blocked span { color: var(--ink-2); }
.qr-timer { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.qr-timer__ring { --p: 100; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--p) * 1%), #e5eaf0 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.qr-url { margin-top: 0.4rem; font-size: 0.75rem; color: var(--muted-2); word-break: break-all; }
.ctrl-list { display: grid; gap: 0.5rem; }
.ctrl { display: grid; grid-template-columns: 38px 1fr auto; gap: 0.75rem; align-items: center; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ctrl.is-open { border-color: rgba(11, 125, 79, 0.45); background: #f6fdf9; box-shadow: 0 0 0 3px rgba(25, 195, 125, 0.12); }
.ctrl.is-closed { background: #fbfcfe; }
.ctrl.is-voided { opacity: 0.6; }
.ctrl__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); }
.ctrl.is-open .ctrl__ico { background: var(--green-50); color: var(--green-600); }
.ctrl.is-closed .ctrl__ico { background: var(--blue-100); color: var(--blue); }
.ctrl__name { font-weight: 650; font-size: 0.875rem; }
.ctrl__meta { font-size: 0.75rem; color: var(--muted); }
.ctrl__count { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.ctrl .progress { grid-column: 2 / -1; }
.people { display: grid; gap: 0.35rem; max-height: 520px; overflow-y: auto; }
.people li { display: grid; grid-template-columns: 30px 1fr auto; gap: 0.6rem; align-items: center; padding: 0.45rem 0.6rem; border-radius: 10px; font-size: 0.875rem; }
.people li:hover { background: var(--bg-soft); }
.people .who { min-width: 0; }
.people .who strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people .who span { font-size: 0.75rem; color: var(--muted); }
.op-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Configuración de verticales */
.vertical-card { display: grid; gap: 0.75rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.vertical-card.is-enabled { border-color: rgba(30, 78, 216, 0.35); box-shadow: 0 0 0 3px rgba(30, 78, 216, 0.08); }

/* 9 · Público: flujo de registro móvil -------------------------------------- */
.pub { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, #eef3fd 0, #f6f8fb 220px); }
.pub__top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.15rem; }
.pub__org { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.pub__org img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.pub__org strong { font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub__main { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 0.5rem 1.15rem 1.5rem; display: flex; flex-direction: column; }
.pub__card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md); padding: 1.4rem 1.25rem; }
.pub__ctx { display: grid; gap: 0.15rem; margin-bottom: 1.1rem; }
.pub__ctx .kicker { font-size: 0.75rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; }
.pub__ctx h1 { font-size: 1.375rem; }
.pub__ctx p { color: var(--muted); font-size: 0.9375rem; }
.pub__chip { display: inline-flex; align-items: center; gap: 0.4rem; align-self: start; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--green-50); color: var(--green-600); font-size: 0.8125rem; font-weight: 700; }
.pub__foot { padding: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-2); }
.pub__foot a { color: var(--muted); }
.pub .field .label { font-size: 0.875rem; }
.pub-result { text-align: center; display: grid; justify-items: center; gap: 0.5rem; padding: 0.5rem 0 0.25rem; }
.pub-result__badge { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--green-600); box-shadow: 0 0 0 10px var(--green-50), 0 14px 40px rgba(11, 125, 79, 0.35); margin: 0.75rem 0 1rem; animation: pop 0.5s var(--ease); }
.pub-result__badge--wait { background: var(--amber); box-shadow: 0 0 0 10px var(--amber-50), 0 14px 40px rgba(245, 158, 11, 0.35); }
.pub-result__badge--bad { background: var(--red-600); box-shadow: 0 0 0 10px var(--red-50), 0 14px 40px rgba(201, 53, 58, 0.3); }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
.pub-result h1 { font-size: 1.5rem; }
.pub-result .who { font-size: 1.0625rem; font-weight: 600; color: var(--ink-2); }
.pub-data { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1rem; }
.pub-data div { padding: 0.7rem 0.4rem; border-radius: 12px; background: var(--bg-soft); }
.pub-data dt { font-size: 0.6875rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.pub-data dd { margin: 0.15rem 0 0; font-weight: 800; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pub-me { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem; border: 1px solid rgba(30, 78, 216, 0.25); border-radius: 14px; background: var(--blue-50); margin-bottom: 1rem; }
.pub-me strong { display: block; }
.pub-me span { font-size: 0.8125rem; color: var(--muted); }

/* 10 · Proyección del QR ----------------------------------------------------- */
.projector { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(1000px 600px at 50% -20%, rgba(30, 78, 216, 0.12), transparent 60%), #fff; }
.projector__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 2rem; }
.projector__body { display: grid; gap: 2rem; align-items: center; justify-items: center; padding: 1rem 2rem 2rem; }
@media (min-width: 1100px) { .projector__body { grid-template-columns: auto minmax(0, 520px); justify-content: center; gap: 4rem; } }
.projector .qr-frame { width: min(78vh, 86vw); max-width: 680px; margin: 0; padding: 22px; border-radius: 30px; }
.projector__info h1 { font-size: clamp(1.75rem, 3.4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
.projector__info .ctrl-name { margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem; border-radius: 999px; background: var(--green-50); color: var(--green-600); font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.375rem); }
.projector__steps { display: grid; gap: 0.9rem; margin-top: 2rem; font-size: clamp(1rem, 1.4vw, 1.25rem); color: var(--ink-2); }
.projector__steps li { display: flex; align-items: center; gap: 0.85rem; }
.projector__steps b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-100); color: var(--blue); font-size: 1rem; flex-shrink: 0; }
.projector__count { margin-top: 2rem; font-size: clamp(1rem, 1.4vw, 1.25rem); color: var(--muted); }
.projector__count strong { font-size: clamp(2rem, 3.5vw, 3.25rem); color: var(--green-600); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.projector__foot { padding: 1rem 2rem 1.5rem; text-align: center; color: var(--muted-2); font-size: 0.875rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media print {
  .sidebar, .topbar, .page-head__actions, .toasts { display: none !important; }
  .main { margin: 0 !important; }
  body { background: #fff; }
}

/* Confirmación global (sustituye a confirm() del navegador); por encima de cualquier otro modal */
.modal--confirm { z-index: 300; }
.confirm { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1.4rem 1.4rem 0.4rem; }
.confirm h2 { font-size: 1.0625rem; }
.confirm p { margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; white-space: pre-line; }
.confirm__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50, #eef3fd); color: var(--blue); }
.confirm__icon--danger { background: var(--red-50); color: var(--red-600); }

/* Editor de controles de una jornada (columnas fijas: no se descuadra al añadir o quitar filas) */
.table .center { text-align: center; }
.controls-editor { table-layout: fixed; min-width: 640px; }
.controls-editor td { padding-inline: 0.45rem; }
.controls-editor th { padding-inline: 0.45rem; }
.controls-editor .input { width: 100%; min-width: 0; padding-inline: 0.55rem; }
.controls-editor__type { display: block; line-height: 1.25; }
.controls-editor .badge { margin-top: 0.2rem; }
.controls-editor__tol { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; }
.checkbox { width: 18px; height: 18px; accent-color: var(--blue); vertical-align: middle; }

/* Desplegable con buscador (x-combobox) */
.combo { position: relative; min-width: 220px; max-width: 320px; }
.combo__btn { width: 100%; text-align: left; cursor: pointer; display: flex; align-items: center; }
.combo__panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: max(100%, 320px); max-width: calc(100vw - 2rem); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 0.4rem; }
.combo__search { max-width: none; margin-bottom: 0.3rem; }
.combo__list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.combo__opt { padding: 0.5rem 0.65rem; border-radius: 8px; font-size: 0.875rem; cursor: pointer; }
.combo__opt.is-active, .combo__opt:hover { background: var(--bg-soft); }
.combo__opt.is-selected { color: var(--blue); font-weight: 650; }
.combo__opt--all { color: var(--muted); }
.combo__empty { padding: 0.6rem; color: var(--muted); font-size: 0.875rem; }
@media (max-width: 640px) { .combo { max-width: none; width: 100%; } }
.form-section--flush { border-top: 0; padding: 0; }
.template-start { border-color: #cfdcfa; background: linear-gradient(180deg, #f7f9ff, #fff); }

/* Color de marca de la organización (Organization::brandStyle): pantallas del alumno y proyección */
.pub--branded .pub__top, .projector--branded .projector__top { box-shadow: inset 0 5px 0 var(--brand); }
.pub--branded .btn--primary, .projector--branded .btn--primary { background: var(--brand-strong, var(--blue)); }
.pub--branded .btn--primary:hover:not(:disabled) { background: var(--brand-strong, var(--blue-700, #1a44c0)); filter: brightness(0.94); }
.projector--branded { background: radial-gradient(1000px 600px at 50% -20%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%), #fff; }
.session-row__kicker { display: flex; align-items: center; gap: 0.3rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.1rem; }
.icon-text { display: flex; gap: 0.35rem; align-items: flex-start; } .icon-text svg { flex: none; margin-top: 0.15em; }
.nowrap { white-space: nowrap; }
.table tr.is-muted td { opacity: 0.55; }
.kpi__date { font-size: 0.78em; white-space: nowrap; }
@media (max-width: 480px) { .kpi__date { font-size: 0.6em; } }

/* 11 · Compra de bonos (ADR-0017) · estilo de /tarifas/ de la web ------------ */
.shop-hero { position: relative; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--r-xl); background: radial-gradient(700px 360px at 10% 0%, rgba(30, 78, 216, 0.1), transparent 60%), radial-gradient(600px 360px at 95% 20%, rgba(25, 195, 125, 0.1), transparent 60%), linear-gradient(180deg, #f7f9fc, #fff 70%); border: 1px solid var(--line); }
.shop-hero__head { max-width: 46rem; margin: 0 auto 1.5rem; text-align: center; }
.shop-hero__kicker { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; }
.shop-hero h1 { margin-top: 0.5rem; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.12; letter-spacing: -0.03em; color: var(--night); }
.shop-hero__lead { margin-top: 0.75rem; color: var(--muted); font-size: 1rem; text-wrap: pretty; }
.shop-hero__balance { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4rem 0.75rem; margin-top: 1rem; padding: 0.5rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); }
.shop-hero__balance span { display: inline-flex; align-items: center; gap: 0.35rem; }
.shop-assoc { display: flex; align-items: center; gap: 0.85rem; max-width: 40rem; margin: 0 auto 1.5rem; padding: 0.8rem 1rem; border-radius: var(--r-md); background: #effaf5; border: 1px dashed rgba(11, 125, 79, 0.4); color: #0a5e3b; }
.shop-assoc strong { color: #0a7248; }
.bill-switch { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 2.25rem; padding: 0.3rem; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.bill-switch button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem clamp(0.8rem, 3vw, 1.3rem); border: 0; border-radius: 999px; background: none; font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; transition: background-color 0.25s var(--ease), color 0.25s var(--ease); }
.bill-switch button:hover { color: var(--ink); }
.bill-switch button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.bill-switch button.is-on { background: var(--night); color: #fff; box-shadow: 0 6px 16px rgba(17, 24, 39, 0.22); }
.bill-switch__save { padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--green-50); color: #0a7248; font-size: 0.75rem; font-weight: 700; }
.bill-switch button.is-on .bill-switch__save { background: var(--green); color: #fff; }
.plans { display: grid; gap: 1.25rem; align-items: stretch; }
@media (min-width: 1100px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) and (max-width: 1099px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; padding: clamp(1.25rem, 2.5vw, 1.75rem); border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.plan--featured { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: 0 4px 8px rgba(16, 24, 40, 0.04), 0 24px 56px rgba(30, 78, 216, 0.16); }
@media (min-width: 1100px) { .plan--featured { transform: translateY(-0.6rem); } }
.plan__badge { position: absolute; top: 0; left: 50%; translate: -50% -50%; padding: 0.3rem 0.9rem; border-radius: 999px; background: var(--grad); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.plan__name { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; color: var(--night); }
.plan__name span { color: var(--green-600); }
.plan__tagline { margin-top: 0.4rem; min-height: 3em; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.tier { display: flex; flex-direction: column; flex: 1; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.tier__mode { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.8125rem; color: var(--muted); }
.tier__mode strong { color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; }
.tier__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-top: 0.75rem; }
.tier__price strong { font-size: clamp(2.4rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--night); }
.tier__price del { color: var(--muted-2); font-size: 1.1rem; font-weight: 600; }
.tier__price small { color: var(--muted); font-size: 0.8125rem; }
.tier__students { margin-top: 0.5rem; font-weight: 700; color: var(--ink-2); }
.tier__students small { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.unit { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; margin-top: 1rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--bg-tint); color: var(--blue); }
.unit p { color: var(--ink-2); font-size: 0.9375rem; }
.unit strong { color: var(--blue); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.unit__save, .unit__base { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.unit__save { background: var(--green); color: #fff; }
.unit__base { background: #fff; color: var(--muted); }
.tier__terms { display: grid; gap: 0.5rem; margin: 1.1rem 0 1.4rem; padding: 0; list-style: none; font-size: 0.9375rem; color: var(--ink-2); }
.tier__terms li { display: flex; align-items: center; gap: 0.55rem; }
.tier__terms svg { color: var(--muted-2); flex-shrink: 0; }
.tier .btn { margin-top: auto; }
.shop-note { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted); text-align: center; }
.shop-info { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 900px) { .shop-info { grid-template-columns: repeat(3, 1fr); } }
.shop-info > div { display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); }
.shop-info strong { color: var(--ink); }
.checkout { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1024px) { .checkout { grid-template-columns: minmax(0, 1fr) 360px; } .checkout__summary { position: sticky; top: calc(var(--topbar-h) + 1rem); } }
.checkout__kicker { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); }
.checkout__plan { margin: 0.3rem 0 1rem; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--night); }
.checkout__plan span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.checkout__lines { display: grid; gap: 0.6rem; margin: 0 0 0.75rem; padding: 0; list-style: none; font-size: 0.9375rem; }
.checkout__lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.checkout__lines li span { color: var(--muted); }
.checkout__lines li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.checkout__lines li.is-discount strong, .checkout__lines li.is-discount span { color: #0a7248; }
.checkout__lines li.is-total { margin-top: 0.4rem; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 1.15rem; }
.checkout__lines li.is-total span { color: var(--ink); font-weight: 700; }
.checkout__lines li.is-total small { font-weight: 500; color: var(--muted); font-size: 0.8125rem; }
.checkout__lines li.is-total strong { font-size: 1.5rem; font-weight: 800; color: var(--night); }
.checkout__summary .btn { margin-top: 1rem; }
.checkout__secure, .checkout__env { display: flex; align-items: flex-start; gap: 0.4rem; margin-top: 0.75rem; font-size: 0.8125rem; color: var(--muted); }
.checkout__env { padding: 0.5rem 0.65rem; border-radius: var(--r-sm); background: var(--amber-50); color: var(--amber-700); }
.pay-result { max-width: 36rem; margin: clamp(1rem, 5vw, 3rem) auto; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); text-align: center; }
.pay-result__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; margin-bottom: 1rem; }
.pay-result__icon.is-ok { background: var(--green-50); color: #0a7248; }
.pay-result__icon.is-bad { background: var(--red-50); color: var(--red-600); }
.pay-result__icon.is-wait { background: var(--amber-50); color: var(--amber-700); }
.pay-result h1 { font-size: 1.6rem; letter-spacing: -0.02em; color: var(--night); }
.pay-result__lead { margin: 0.6rem 0 1.2rem; color: var(--ink-2); text-wrap: pretty; }
.pay-result__facts { display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 1rem; list-style: none; border-radius: var(--r-md); background: var(--bg-app); text-align: left; font-size: 0.9375rem; }
.pay-result__facts li { display: flex; justify-content: space-between; gap: 1rem; }
.pay-result__facts span { color: var(--muted); }
.pay-result .row { margin-top: 1.25rem; flex-wrap: wrap; }
.row--center { justify-content: center; }
.spinner--lg { width: 30px; height: 30px; border-width: 3px; }
.pay-redirect { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--bg-soft); }
.pay-redirect__card { width: min(100%, 26rem); padding: 2rem; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); text-align: center; }
.pay-redirect__card h1 { margin: 1rem 0 0.5rem; font-size: 1.3rem; color: var(--night); }
.pay-redirect__card p { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.25rem; }
.pay-sim h1 { font-size: 2.4rem; margin-top: 0.5rem; }
.pay-sim__tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--amber-50); color: var(--amber-700); font-size: 0.8125rem; font-weight: 700; }

/* 12 · Activación de la prueba desde la web (ADR-0018) ----------------------- */
.activate-facts { display: grid; gap: 0.45rem; margin: 0; padding: 0.85rem 1rem; list-style: none; border-radius: var(--r-md); background: var(--bg-app); border: 1px solid var(--line); font-size: 0.9rem; }
.activate-facts li { display: flex; justify-content: space-between; gap: 1rem; }
.activate-facts span { color: var(--muted); }
.activate-facts strong { text-align: right; overflow-wrap: anywhere; }

/* 13 · Notificaciones y panel de negocio (ADR-0019) ------------------------------ */
.link-btn { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.bell__button { position: relative; }
.bell__count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.6875rem; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid #fff; box-sizing: content-box; }
.bell__menu { width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 90px)); overflow-y: auto; padding: 0.35rem; }
.bell__head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.5rem 0.6rem 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; font-size: 0.9rem; color: var(--ink); }
.bell__empty { padding: 1.25rem 0.75rem; text-align: center; color: var(--muted); font-size: 0.875rem; }
.bell__all { display: block; padding: 0.6rem; margin-top: 0.25rem; border-top: 1px solid var(--line); text-align: center; font-size: 0.8125rem; font-weight: 600; }
.notif { display: flex; align-items: flex-start; gap: 0.7rem; width: 100%; padding: 0.6rem; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--ink-2); position: relative; }
.notif:hover { background: var(--bg-app); }
.notif.is-unread::after { content: ''; position: absolute; top: 0.95rem; right: 0.6rem; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.notif__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; }
.notif__icon--ok { background: var(--green-50); color: #0a7248; }
.notif__icon--bad { background: var(--red-50); color: var(--red-600); }
.notif__icon--wait { background: var(--amber-50); color: var(--amber-700); }
.notif__icon--live { background: var(--blue-50); color: var(--blue); }
.notif__icon--neutral { background: #eef1f5; color: var(--ink-2); }
.notif__text { display: grid; gap: 0.15rem; min-width: 0; flex: 1; padding: 0 1rem 0 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.notif__title { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.notif.is-unread .notif__title { font-weight: 700; }
.notif__body { font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.notif__time { font-size: 0.75rem; color: var(--muted-2); }
.notif-list { margin: 0; padding: 0.25rem 0.5rem; list-style: none; }
.notif--row { cursor: default; align-items: center; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0.85rem 0.5rem; }
.notif--row:last-child { border-bottom: 0; }
.notif--row.is-unread { background: #f7f9ff; }
.notif--row.is-unread::after { top: 50%; right: auto; left: -0.1rem; transform: translateY(-50%); }
.chart { margin: 0; position: relative; }
.chart__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--ink-2); }
.chart__legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart__swatch { width: 10px; height: 10px; border-radius: 3px; }
.chart__plot { position: relative; }
.chart__plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: #edf0f4; stroke-width: 1; }
.chart__axis { stroke: var(--line-2); stroke-width: 1; }
.chart__tick { font-size: 11px; fill: var(--muted); font-family: inherit; }
.chart__hit { cursor: default; outline: none; }
.chart__hit:hover { fill: rgba(30, 78, 216, 0.05); }
.chart__tip { position: absolute; top: 0; transform: translateX(-50%); z-index: 5; display: grid; gap: 0.2rem; min-width: 150px; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--night); color: #e7ebf2; font-size: 0.75rem; box-shadow: var(--shadow-md); pointer-events: none; white-space: nowrap; }
.chart__tip strong { color: #fff; font-size: 0.8125rem; text-transform: capitalize; }
.chart__tip > span { display: flex; align-items: center; gap: 0.4rem; }
.chart__tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart__tip b { margin-left: auto; padding-left: 0.75rem; color: #fff; font-variant-numeric: tabular-nums; }
.chart__tip-total { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 0.25rem; margin-top: 0.1rem; }
@media (min-width: 1200px) { .kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.chart__tip.is-right { transform: translateX(calc(-100% - 12px)); }
.chart__tip.is-left { transform: translateX(12px); }
.sidebar__bell { margin-left: auto; display: none; }
@media (min-width: 1024px) { .sidebar__bell { display: block; } }
.bell--left .bell__menu { right: auto; left: 0; }
.bell__button { overflow: visible; }
.bell .bell__count { top: -7px; right: -9px; min-width: 14px; height: 16px; padding: 0 4px; font-size: 0.625rem; line-height: 16px; }
