/* MOSS ? design system (dark glass por defecto; claro v?a data-theme) */

:root {
  --font: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Fondo s?lido de respaldo si falla casemoss2.webp */
  --bg: #10150F;
  --bg-page: #10150F;
  --bg-image-opacity: 1;
  /* Cajas negras semitransparentes (el blur ya est? en la foto de fondo) */
  --bg-elevated: rgba(0, 0, 0, 0.55);
  --bg-grouped: rgba(0, 0, 0, 0.35);
  --bg-glass: rgba(0, 0, 0, 0.55);
  --bg-glass-soft: rgba(0, 0, 0, 0.4);
  --sidebar-bg: rgba(0, 0, 0, 0.78);
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.68);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.12);
  --separator: rgba(255, 255, 255, 0.16);
  --nav-fg: rgba(255, 255, 255, 0.72);
  --nav-fg-strong: #ffffff;
  --nav-hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-footer-border: rgba(255, 255, 255, 0.1);
  --wash: rgba(255, 255, 255, 0.08);
  --wash-strong: rgba(255, 255, 255, 0.14);
  --wash-soft: rgba(255, 255, 255, 0.04);
  --btn-primary-bg: #ffffff;
  --btn-primary-fg: #10150F;
  --btn-secondary-bg: rgba(255, 255, 255, 0.08);
  --btn-secondary-fg: #ffffff;
  --flash-success-fg: #c8e06a;
  --flash-danger-fg: #ffb4b0;
  /* Paleta marca ? verdes claros para contraste sobre negro */
  --accent: #98B528;
  --accent-hover: #487413;
  --accent-mid: #487413;
  --accent-light: #98B528;
  --accent-deep: #284A0C;
  --accent-soft: rgba(152, 181, 40, 0.2);
  --success: #98B528;
  --success-soft: rgba(152, 181, 40, 0.18);
  --warning: #ff9500;
  --warning-soft: rgba(255, 149, 0, 0.2);
  --danger: #ff6b63;
  --danger-soft: rgba(255, 59, 48, 0.22);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --nav-height: 64px;
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 76px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html[data-theme="claro"] {
  --bg: #f3f5ef;
  --bg-page: #ffffff;
  --bg-image-opacity: 0.15;
  --bg-elevated: rgba(255, 255, 255, 0.86);
  --bg-grouped: rgba(16, 21, 15, 0.055);
  --bg-glass: rgba(255, 255, 255, 0.84);
  --bg-glass-soft: rgba(255, 255, 255, 0.72);
  --sidebar-bg: rgba(255, 255, 255, 0.9);
  --text: #10150F;
  --text-secondary: rgba(16, 21, 15, 0.68);
  --text-tertiary: rgba(16, 21, 15, 0.45);
  --border: rgba(16, 21, 15, 0.12);
  --separator: rgba(16, 21, 15, 0.16);
  --nav-fg: rgba(16, 21, 15, 0.72);
  --nav-fg-strong: #10150F;
  --nav-hover-bg: rgba(16, 21, 15, 0.06);
  --sidebar-border: rgba(16, 21, 15, 0.1);
  --sidebar-footer-border: rgba(16, 21, 15, 0.12);
  --wash: rgba(16, 21, 15, 0.06);
  --wash-strong: rgba(16, 21, 15, 0.1);
  --wash-soft: rgba(16, 21, 15, 0.03);
  --btn-primary-bg: #10150F;
  --btn-primary-fg: #ffffff;
  --btn-secondary-bg: rgba(16, 21, 15, 0.06);
  --btn-secondary-fg: #10150F;
  --flash-success-fg: #3d5a0a;
  --flash-danger-fg: #a3201a;
  --accent-soft: rgba(152, 181, 40, 0.22);
  --success-soft: rgba(152, 181, 40, 0.2);
  --warning-soft: rgba(255, 149, 0, 0.16);
  --danger-soft: rgba(255, 59, 48, 0.12);
  --shadow-sm: 0 1px 3px rgba(16, 21, 15, 0.08);
  --shadow: 0 8px 28px rgba(16, 21, 15, 0.12);
  --shadow-lg: 0 16px 40px rgba(16, 21, 15, 0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Densidad compacta: ver density.css (§1.2). Duplicado aquí para páginas que solo cargan app.css. */
@media (min-width: 900px) and (pointer: fine) {
  html {
    zoom: 0.85;
  }
}
@media print {
  html {
    zoom: 1 !important;
  }
}

body {
  font-family: var(--font);
  background-color: var(--bg-page);
  background-image: none;
  color: var(--text);
  line-height: 1.47;
  min-height: 100dvh;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('../brand/casemoss2.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-image-opacity);
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

img { max-width: 100%; display: block; }

/* Typography ? t?tulos: normal, may?sculas, un poco m?s grandes */
h1 {
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.25;
}
h3 {
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}
.page-header h1 { margin-bottom: 6px; }
.card-header h2 { font-size: 1.25rem; letter-spacing: 0.06em; }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* Layout */
.app-shell {
  display: flex;
  min-height: 100dvh;
  background: transparent;
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  padding: 20px 16px;
  color: var(--nav-fg-strong);
  transition: width var(--transition), padding var(--transition);
}
.app-shell:has(.sidebar--collapsed) {
  --sidebar-width: var(--sidebar-width-collapsed);
}
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 32px 48px;
  max-width: none;
  width: calc(100% - var(--sidebar-width));
  background: transparent;
  transition: margin-left var(--transition), width var(--transition);
}
.main-content--full { max-width: none; margin-left: 0; padding: 0; }

/* Brand (sidebar: blanco en oscuro / verde en claro) */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 24px;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--nav-fg-strong);
  min-width: 0;
}
.brand-text {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.brand-logo--lg {
  width: 72px;
  height: 72px;
}
.brand-logo--sm {
  width: 28px;
  height: 28px;
}
.brand-name {
  font-family: var(--font);
  font-weight: 400;
  font-size: inherit;
  letter-spacing: 0.06em;
  color: var(--nav-fg-strong);
  line-height: 1;
}
.brand-icon {
  width: 36px; height: 36px;
  background: transparent;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  overflow: visible;
}
.brand-icon .brand-logo { width: 100%; height: 100%; }
.brand-badge {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--wash);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Nav ? tipograf?a clara; activo = hover + peso */
.nav-list { list-style: none; flex: 1; overflow-y: auto; overflow-x: hidden; }
.nav-item { margin-bottom: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--nav-fg);
  font-size: 0.9375rem;
  font-weight: 300;
  transition: background var(--transition), color var(--transition), font-weight var(--transition);
}
.nav-link:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-fg-strong);
  opacity: 1;
}
.nav-link.active {
  background: var(--nav-hover-bg);
  color: var(--nav-fg-strong);
  font-weight: 500;
}
.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-link,
.panel-tabs-link,
.mobile-nav a {
  position: relative;
}
.nav-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: auto;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  animation: nav-bubble-pulse 1.4s ease-in-out infinite;
}
.panel-tabs-link .nav-bubble {
  margin-left: 2px;
}
.nav-bubble[hidden] { display: none !important; }
.nav-bubble--mobile {
  position: absolute;
  top: 2px;
  right: 2px;
  margin-left: 0;
  min-width: 16px;
  height: 16px;
  font-size: 0.625rem;
}
@keyframes nav-bubble-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(198, 40, 40, 0); }
}
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 1.25rem;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
  color: inherit;
}
.nav-link .icon,
.nav-link .material-symbols-outlined {
  width: 22px;
  text-align: center;
  opacity: 1;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: inherit;
}
.nav-link.active .icon,
.nav-link.active .material-symbols-outlined {
  opacity: 1;
  color: var(--nav-fg-strong);
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.nav-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.nav-soon {
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--wash);
  color: var(--text-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-footer-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 14px;
}
.sidebar-user-icon,
.sidebar-user .material-symbols-outlined {
  font-size: 2rem !important;
  color: var(--nav-fg-strong);
  opacity: 0.9;
  flex-shrink: 0;
}
.sidebar-user-meta { min-width: 0; }
.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-fg-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.sidebar-footer .nav-link {
  font-weight: 300;
  color: var(--nav-fg);
}
.sidebar-footer .nav-link:hover,
.sidebar-footer .nav-link.active {
  color: var(--nav-fg-strong);
  background: var(--nav-hover-bg);
  font-weight: 500;
}
.sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--wash);
  color: var(--nav-fg-strong);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.sidebar-toggle:hover {
  background: var(--wash-strong);
  opacity: 1;
}
.sidebar-toggle .icon,
.sidebar-toggle .material-symbols-outlined {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  color: inherit;
}

/* Sidebar colapsado (solo desktop; mobile lo oculta) */
.sidebar--collapsed {
  padding: 16px 10px;
}
.sidebar--collapsed .brand {
  justify-content: center;
  padding: 8px 0 20px;
}
.sidebar--collapsed .brand-text,
.sidebar--collapsed .nav-label,
.sidebar--collapsed .sidebar-user-meta,
.sidebar--collapsed .nav-bubble {
  display: none;
}
.sidebar--collapsed .nav-link,
.sidebar--collapsed .sidebar-toggle {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}
.sidebar--collapsed .sidebar-user {
  justify-content: center;
  padding: 8px 0 12px;
}
.sidebar--collapsed .nav-link .icon,
.sidebar--collapsed .nav-link .material-symbols-outlined,
.sidebar--collapsed .sidebar-toggle .icon,
.sidebar--collapsed .sidebar-toggle .material-symbols-outlined {
  margin: 0;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.875rem;
}
.flash-success {
  background: var(--success-soft);
  color: var(--flash-success-fg);
  border: 1px solid rgba(152, 181, 40, 0.35);
}
.flash-danger {
  background: var(--danger-soft);
  color: var(--flash-danger-fg);
  border: 1px solid rgba(255, 59, 48, 0.35);
}
.table-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.impersonation-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(152, 181, 40, 0.12);
  border: 1px solid rgba(152, 181, 40, 0.35);
  color: var(--flash-success-fg);
  font-size: 0.875rem;
  font-weight: 500;
}
.impersonation-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
}
.impersonation-banner-text .material-symbols-outlined {
  color: var(--accent);
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Pesta?as de panel ? componente ?nico (Configuraci?n, Men? QR, etc.) */
.panel-tabs,
.mqr-admin-nav,
.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg);
  border-radius: var(--radius);
  border: none;
}
.panel-tabs-link,
.mqr-admin-nav-link,
.settings-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--nav-fg);
  text-decoration: none;
  transition: background var(--transition), color var(--transition), font-weight var(--transition);
}
.panel-tabs-link .material-symbols-outlined,
.mqr-admin-nav-link .material-symbols-outlined,
.settings-nav-link .material-symbols-outlined {
  font-size: 1.125rem;
  color: inherit;
  line-height: 1;
}
.panel-tabs-link:hover,
.mqr-admin-nav-link:hover,
.settings-nav-link:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-fg-strong);
  opacity: 1;
}
.panel-tabs-link.active,
.mqr-admin-nav-link.active,
.settings-nav-link.active {
  background: var(--nav-hover-bg);
  color: var(--nav-fg-strong);
  font-weight: 500;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

/* Cards ? cajas negras transparentes, sin blur CSS */
.card {
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-padded { padding: 20px 24px; }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 20px 24px; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 8px; }
.kpi-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.kpi-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 6px;
  color: var(--success);
}
.kpi-change.negative { color: var(--danger); }
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  background: var(--wash);
  color: var(--nav-fg-strong);
}
.kpi-icon .material-symbols-outlined { font-size: 1.375rem; color: inherit; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-primary:hover { background: var(--accent-light); color: #10150F; opacity: 1; }
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--wash-strong); color: var(--nav-fg-strong); }
.btn-success { background: var(--accent-mid); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
form.is-submitting {
  pointer-events: none;
}
form.is-submitting button[type="submit"],
form.is-submitting button:not([type]),
form.is-submitting input[type="submit"],
form.is-submitting .login-submit {
  opacity: 0.55;
  cursor: wait;
}
.danger-zone .card-header h2 { color: #ffb4b0; }
.btn-ghost { background: transparent; color: var(--accent-light); padding: 8px 12px; }
.btn-ghost:hover { color: var(--nav-fg-strong); opacity: 1; }
.btn-lg { padding: 16px 28px; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 18px 32px; font-size: 1.125rem; width: 100%; }
.btn.is-loading {
  pointer-events: none;
  opacity: 0.9;
}
.btn.is-loading::before {
  content: '';
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.55em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.18em;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.btn-sm { padding: 8px 14px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--wash); color: var(--text-secondary); }
.badge-accent { background: var(--wash); color: var(--text); }
.badge.is-blink,
.badge-warning.is-blink,
.badge-status.is-blink {
  animation: badge-blink 1.1s step-end infinite;
}
@keyframes badge-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.tk-row--action > td {
  background: rgba(255, 193, 7, 0.1);
}
.tk-row--action > td:first-child {
  box-shadow: inset 3px 0 0 #ffc107;
}
.tk-row--action:hover > td {
  background: rgba(255, 193, 7, 0.16);
}

/* Estado empresa / entidad ? siempre blanco, sin verde */
.badge-status {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.badge-status--on { color: #fff; }
.badge-status--pending {
  color: rgba(255, 255, 255, 0.8);
}
.badge-status--off {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
}
.badge-status .badge-status-icon,
.badge-status .material-symbols-outlined {
  font-size: 1rem !important;
  color: inherit;
  line-height: 1;
}

/* Table */
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 0; width: 100%; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.04); }

.case-transfer-datos {
  display: grid;
  gap: 12px;
}
.case-transfer-datos p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.case-transfer-dato {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.case-transfer-valor {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.liq-table { min-width: 820px; }
.liq-table thead th {
  vertical-align: bottom;
}
.liq-table thead .liq-group {
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding-bottom: 4px;
  border-bottom: none;
}
.liq-table thead .liq-group--info {
  color: rgba(255, 255, 255, 0.5);
}
.liq-table thead .liq-group--bill {
  color: rgba(255, 255, 255, 0.85);
}
.liq-table thead .liq-subhead {
  padding-top: 4px;
  white-space: nowrap;
}
.liq-table .liq-cell {
  vertical-align: top;
  white-space: nowrap;
}
.liq-table .liq-main {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.liq-table .liq-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
  white-space: normal;
  max-width: 180px;
  line-height: 1.35;
}
.liq-table .liq-info,
.liq-table .liq-muted {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
}
.liq-table .liq-total,
.liq-total {
  font-weight: 700;
  color: var(--accent);
}
.liq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.moss-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.moss-modal[hidden] { display: none; }
.moss-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.moss-modal-card {
  position: relative;
  width: min(480px, 100%);
  background: #10150F;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.moss-modal-card h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.liq-modal-dl {
  margin: 0;
  display: grid;
  gap: 10px;
}
.liq-modal-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
}
.liq-modal-dl dt {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}
.liq-modal-dl dd { margin: 0; font-weight: 600; }
.liq-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.liq-table tfoot td {
  border-top: 1px solid var(--border);
  border-bottom: none;
  background: rgba(255, 255, 255, 0.03);
}
.liq-table tfoot tr:hover td { background: rgba(255, 255, 255, 0.03); }

.modelo-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-top: 16px;
}
.modelo-extras .modelo-extra {
  flex: 1 1 220px;
  min-width: 0;
}
.modelo-extras .modelo-extra[hidden] { display: none; }
.form-input-suffix {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.form-input-suffix .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
.form-input-suffix-label {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-input-with-action {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.form-input-with-action .form-input {
  flex: 1;
  min-width: 0;
}
.form-input-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.form-input-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.form-input-action:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Ayuda contextual (?) verde ? fieldHelp() */
.field-help {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  vertical-align: middle;
  max-width: 100%;
}
.field-help-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--accent-light);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.field-help-toggle .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.field-help-toggle:hover {
  color: var(--text);
  background: rgba(152, 181, 40, 0.22);
}
.field-help-toggle:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.field-help.is-open .field-help-toggle {
  color: var(--text);
  background: rgba(152, 181, 40, 0.28);
}
.field-help-panel {
  display: none;
  flex: 1 1 100%;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
}
.field-help.is-open .field-help-panel,
.field-help-panel:not([hidden]) {
  display: block;
}
.field-help.is-open {
  flex: 1 1 100%;
}
.form-label .field-help,
.form-check-label .field-help,
.card-header h2 .field-help,
.card-title-with-help .field-help {
  margin-left: 4px;
}
.form-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
}
.form-label .field-help.is-open {
  flex: 1 1 100%;
  margin-left: 0;
}
.form-check-label {
  flex-wrap: wrap;
}
.form-check-label .field-help.is-open {
  flex: 1 1 100%;
  margin-left: 0;
}
.card-header h2,
.card-title-with-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
}
.card-header h2 .field-help.is-open,
.card-title-with-help .field-help.is-open {
  flex: 1 1 100%;
  margin-left: 0;
}

/* Switches ? todos los checkbox del panel interno son toggles (nunca el cuadrado nativo) */
.form-check {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-glass-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.form-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  color: var(--text);
}
input[type="checkbox"].switch,
.form-check input[type="checkbox"],
.app-shell input[type="checkbox"]:not(.no-switch) {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--wash-strong);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  vertical-align: middle;
}
input[type="checkbox"].switch::after,
.form-check input[type="checkbox"]::after,
.app-shell input[type="checkbox"]:not(.no-switch)::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition);
}
input[type="checkbox"].switch:checked,
.form-check input[type="checkbox"]:checked,
.app-shell input[type="checkbox"]:not(.no-switch):checked {
  background: var(--accent-light);
  border-color: var(--accent-light);
}
input[type="checkbox"].switch:checked::after,
.form-check input[type="checkbox"]:checked::after,
.app-shell input[type="checkbox"]:not(.no-switch):checked::after {
  transform: translateX(18px);
}
input[type="checkbox"].switch:focus-visible,
.form-check input[type="checkbox"]:focus-visible,
.app-shell input[type="checkbox"]:not(.no-switch):focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* Chart placeholder */
.chart-area {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 20px 0;
}
.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-mid), var(--accent));
  border-radius: 6px 6px 2px 2px;
  min-height: 8px;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.chart-bar:hover { opacity: 1; }

/* Dashboard bar chart (?ltimos N d?as) */
.dash-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 200px;
  padding: 8px 0 36px;
  overflow-x: auto;
}
.dash-bar-col {
  flex: 1 0 12px;
  min-width: 12px;
  max-width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.dash-bar-track {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dash-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--accent-light, #98B528), var(--accent, #487413));
  border-radius: 4px 4px 2px 2px;
  min-height: 2px;
}
.dash-bar-value {
  font-size: 0.625rem;
  color: var(--text-secondary);
  line-height: 1;
  min-height: 0.7rem;
}
.dash-bar-label {
  font-size: 0.5625rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transform: rotate(-55deg);
  transform-origin: top left;
  margin-top: 6px;
  margin-left: 4px;
  opacity: 0.75;
}

/* Empresa dashboard ? m?dulos compactos + Google Charts */
.dash-modules {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-mod { margin: 0; }
.dash-mod-head {
  padding: 14px 18px;
}
.dash-mod-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}
.dash-mod-body { padding: 14px 18px 18px; }
.kpi-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-card--compact {
  padding: 12px 14px;
}
.kpi-card--compact .kpi-label {
  margin-bottom: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}
.kpi-card--compact .kpi-value {
  font-size: 1.25rem;
  font-weight: 600;
}
.dash-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dash-charts--single { grid-template-columns: 1fr; }
.dash-charts--half { grid-template-columns: minmax(0, 420px); }
.dash-chart-card {
  background: var(--bg-grouped);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px 6px;
  min-width: 0;
}
.dash-chart-card h3 {
  margin: 0 0 4px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.dash-gchart {
  width: 100%;
  height: 220px;
}
.dash-gchart--bar { height: 200px; }
.dash-chart-empty {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  text-align: center;
  padding: 16px;
}
.dash-details {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.dash-details summary {
  cursor: pointer;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  list-style: none;
}
.dash-details summary::-webkit-details-marker { display: none; }
.dash-details summary::before {
  content: '?';
  display: inline-block;
  margin-right: 6px;
  color: var(--accent-light);
  transition: transform var(--transition);
}
.dash-details[open] summary::before { transform: rotate(90deg); }

@media (max-width: 900px) {
  .dash-charts { grid-template-columns: 1fr; }
  .dash-charts--half { grid-template-columns: 1fr; }
  .kpi-grid--compact { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .kpi-grid--compact { grid-template-columns: 1fr; }
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-grouped);
  color: var(--text);
}
.alert-success {
  border-color: rgba(152, 181, 40, 0.45);
  background: var(--success-soft);
  color: var(--flash-success-fg);
}
.alert-danger {
  border-color: rgba(220, 80, 80, 0.45);
  background: var(--danger-soft);
  color: var(--flash-danger-fg);
}
.alert-warning {
  border-color: rgba(232, 184, 74, 0.5);
  background: var(--warning-soft);
  color: var(--warning);
}

.alert-danger .text-sm,
.alert-danger li,
.alert-warning .text-sm,
.alert-success .text-sm {
  color: inherit;
}
.alert-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}
.alert-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.alert-dot.warning { background: var(--warning); }
.alert-dot.danger { background: var(--danger); }
.alert-dot.info { background: var(--accent); }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Event cards */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.event-card-img {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
}
.event-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  pointer-events: none;
}
.event-card-body { padding: 18px 20px; }
.event-card-date {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  margin-bottom: 6px;
}
.event-card-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: 4px; }
.event-card-venue { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 14px; }
.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-card-copy {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.event-card-price { font-weight: 700; font-size: 1.0625rem; }
.event-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.event-pagination-links {
  display: flex;
  gap: 8px;
}
.event-form--readonly {
  pointer-events: none;
  opacity: 0.85;
}
.ticketing-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
  gap: 12px;
  align-items: end;
}
.ticketing-filters--ingresos {
  grid-template-columns: repeat(2, minmax(140px, 160px)) minmax(140px, 0.7fr) minmax(0, 1.2fr) auto;
}
.ingresos-dias {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ingresos-dia {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 10px);
  background: rgba(0, 0, 0, 0.28);
}
@media (max-width: 720px) {
  .ticketing-filters,
  .ticketing-filters--ingresos {
    grid-template-columns: 1fr;
  }
}

/* Ticket selector */
.ticket-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.ticket-type-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: rgba(0, 0, 0, 0.25);
}
.ticket-type-info { flex: 1; min-width: 0; }
.ticket-type-info h3 { margin-bottom: 4px; }
.ticket-type-price { font-weight: 700; font-size: 1.125rem; margin-top: 4px; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 16px;
}
.qty-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.qty-btn:hover { background: rgba(255, 255, 255, 0.16); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-value { font-size: 1.25rem; font-weight: 600; min-width: 24px; text-align: center; }
.low-stock { font-size: 0.75rem; color: var(--warning); font-weight: 600; margin-top: 4px; }

/* Product carousel */
.product-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-card {
  flex: 0 0 200px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  scroll-snap-align: start;
}
.product-card.sold-out { opacity: 0.5; }
.product-card-img { height: 120px; background-size: cover; background-position: center; }
.product-card-body { padding: 14px; }
.product-card-name { font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; }
.product-card-price { font-weight: 700; color: var(--accent); }
.product-card .qty-control { margin-top: 12px; justify-content: center; gap: 12px; }
.product-card .qty-btn { width: 32px; height: 32px; font-size: 1rem; }

/* Checkout */
.order-summary { margin-bottom: 24px; }
.order-line {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.order-line.total {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.125rem;
  padding-top: 16px;
}
.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.payment-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.payment-option input { margin-top: 3px; accent-color: var(--accent); }
.payment-warning {
  background: var(--warning-soft);
  border: 1px solid rgba(255,149,0,0.3);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: #9a6700;
  display: none;
  align-items: flex-start;
  gap: 8px;
}
.payment-warning.visible { display: flex; }
.payment-warning .material-symbols-outlined { flex-shrink: 0; margin-top: 1px; }

/* Digital ticket */
.ticket-page {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg-elevated);
}
.ticket-qr {
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent) 100%);
  padding: 40px 24px 32px;
  text-align: center;
  color: white;
}
.ticket-qr-box {
  width: 200px; height: 200px;
  background: white;
  border-radius: var(--radius-lg);
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ticket-qr-box img {
  width: 168px;
  height: 168px;
  object-fit: contain;
}
.qr-placeholder {
  width: 160px; height: 160px;
  background: repeating-conic-gradient(#1c1c1e 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}
.ticket-body { padding: 24px; }
.ticket-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 600;
}
.ticket-status.valid { background: var(--success-soft); color: var(--success); }
.ticket-status.burned { background: var(--danger-soft); color: var(--danger); }
.ticket-product-list { list-style: none; }
.ticket-product-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

/* Consulta de reserva (p?blico) */
.ticket-lookup-cta {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.ticket-lookup-cta-text {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.ticket-lookup-cta-link {
  color: var(--accent-light);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ticket-lookup-cta-link:hover {
  color: var(--text);
}
.consulta-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.consulta-result-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.consulta-result-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: inherit;
}
.consulta-result-qr {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.consulta-result-qr img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}
.consulta-result-info {
  flex: 1;
  min-width: 0;
}
.consulta-result-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}
.consulta-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.consulta-result-chevron {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

/* Scanner / validation */
.scanner-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}
.scanner-viewfinder {
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.scanner-viewfinder.scanning {
  border-color: var(--accent);
}
.scanner-viewfinder.is-live {
  border-color: var(--accent);
}
.qr-video,
.qr-reader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
}
.qr-video.is-on,
.qr-reader.is-on {
  display: block;
}
.qr-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: 0 !important;
}
.scanner-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  text-align: center;
}
.scanner-viewfinder.is-live .scanner-overlay {
  pointer-events: none;
}
.scanner-viewfinder.is-live .scanner-overlay .btn {
  display: none;
}
.scanner-hint {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.85;
  max-width: 16rem;
}
.scanner-frame {
  width: 220px; height: 220px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  position: relative;
}
.scanner-frame::before, .scanner-frame::after {
  content: '';
  position: absolute;
  width: 28px; height: 28px;
  border: 3px solid var(--accent);
}
.scanner-frame::before { top: -3px; left: -3px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.scanner-frame::after { bottom: -3px; right: -3px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }
.scanner-viewfinder.hidden { display: none; }
.scan-result { display: none; }
.scan-result.visible { display: block; }
.scan-result-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.scan-section {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.scan-section h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.scan-section.pending { border-left: 4px solid var(--warning); }
.scan-section.done { border-left: 4px solid var(--success); }
.product-deliver {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.product-deliver:last-child { border-bottom: none; }

/* Stock matrix */
.matrix-wrap { overflow-x: auto; }
.matrix-table th, .matrix-table td { text-align: center; min-width: 100px; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; min-width: 200px; }
.matrix-input {
  width: 70px;
  padding: 8px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
}

/* Client mobile shell */
.client-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Reserva: banner del evento como fondo desenfocado sobre negro */
body.client-reserve {
  background-color: #000;
  background-image: none;
}
.client-page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000;
}
.client-page-bg-img {
  position: absolute;
  inset: -48px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  filter: blur(56px);
  transform: scale(1.15);
  will-change: transform;
}
.event-reserve-cover {
  height: 180px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.client-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.client-header h1 { font-size: 1.125rem; font-weight: 600; flex: 1; color: var(--text); }
.client-header .brand-logo { flex-shrink: 0; }
.client-header .material-symbols-outlined { color: var(--text); }
.client-body { padding: 20px; padding-bottom: calc(100px + var(--safe-bottom)); }
.client-footer {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 16px 20px calc(16px + var(--safe-bottom));
  background: rgba(0, 0, 0, 0.88);
  border-top: 1px solid var(--border);
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.search-bar .material-symbols-outlined { color: var(--text); opacity: 0.7; flex-shrink: 0; }
.search-bar input {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 1rem;
  flex: 1;
  outline: none;
  color: var(--text);
}
.search-bar input::placeholder { color: var(--text-tertiary); }

/* Upsell banner */
.upsell-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.upsell-banner h2 { color: white; font-size: 1.125rem; margin-bottom: 6px; }
.upsell-banner p { opacity: 0.9; font-size: 0.875rem; }

/* Coming soon */
.coming-soon-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px;
}
.coming-soon-icon {
  width: 80px; height: 80px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  margin-bottom: 24px;
}
.coming-soon-icon .material-symbols-outlined { font-size: 2.5rem; color: inherit; }

/* Landing */
.landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, #f4f6f1 0%, #e4eadc 100%);
}
.landing-hero { text-align: center; max-width: 520px; margin-bottom: 48px; }
.landing-hero .brand-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
}
.landing-hero .brand-name--hero {
  display: block;
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.landing-hero h1 { font-size: 2.5rem; margin-bottom: 12px; font-weight: 400; }
.landing-hero p { color: var(--text-secondary); font-size: 1.125rem; }
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 800px;
  width: 100%;
}
.landing-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  color: var(--text);
}
.landing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.landing-card-icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.landing-card-icon .material-symbols-outlined { font-size: 1.75rem; color: inherit; }
.landing-card h3 { margin-bottom: 8px; }
.landing-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 18px; }

/* Revenue split */
.revenue-bars { display: flex; flex-direction: column; gap: 16px; }
.revenue-bar-item { }
.revenue-bar-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.875rem; }
.revenue-bar-track { height: 8px; background: rgba(255, 255, 255, 0.12); border-radius: 4px; overflow: hidden; }
.revenue-bar-fill { height: 100%; border-radius: 4px; background: var(--accent-light); }
.revenue-bar-fill.secondary { background: var(--accent-mid); }

/* Model selector ? radio oculto; la tarjeta indica selecci?n */
.model-grid {
  display: grid;
  gap: 12px;
}
.model-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .model-grid--2 { grid-template-columns: 1fr; }
}
.model-option {
  display: block;
  position: relative;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--bg-grouped);
}
.model-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}
.model-option.selected,
.model-option:has(input:checked) {
  border-color: var(--accent-light);
  background: var(--accent-soft);
}
.model-option h4 { margin-bottom: 4px; color: var(--text); }
.model-option p { font-size: 0.8125rem; color: var(--text-secondary); margin: 0; }
.theme-preview {
  display: flex;
  gap: 8px;
  align-items: stretch;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.theme-preview-bar { width: 22%; flex-shrink: 0; }
.theme-preview-card { flex: 1; margin: 10px; border-radius: 8px; }
.theme-preview--dark { background: #10150F; }
.theme-preview--dark .theme-preview-bar { background: rgba(0, 0, 0, 0.78); }
.theme-preview--dark .theme-preview-card { background: rgba(0, 0, 0, 0.55); }
.theme-preview--light { background: #ffffff; }
.theme-preview--light .theme-preview-bar {
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(16, 21, 15, 0.08);
}
.theme-preview--light .theme-preview-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(16, 21, 15, 0.08);
}

/* Occupancy bar */
.occupancy-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.occupancy-fill {
  height: 100%;
  background: var(--accent-light);
  border-radius: 3px;
}

/* CTA hero button */
.cta-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  color: white;
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 28px;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}
.cta-hero:hover { transform: scale(1.01); box-shadow: var(--shadow-lg); color: white; opacity: 1; }
.cta-hero-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cta-hero-icon .material-symbols-outlined { font-size: 1.5rem; color: white; }
.cta-hero-text { flex: 1; text-align: left; }
.cta-hero-text h2 { color: white; font-size: 1.25rem; }
.cta-hero-text p { opacity: 0.85; font-size: 0.875rem; }
.cta-hero > .material-symbols-outlined { margin-left: auto; opacity: 0.9; flex-shrink: 0; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; width: 100%; padding: 20px 16px 40px; }
  .grid-2, .grid-3, .form-row { grid-template-columns: 1fr; }
  .modelo-extras .modelo-extra { flex-basis: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* Mobile bottom nav for company scanner */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--sidebar-border);
  padding: 8px 0 calc(8px + var(--safe-bottom));
  z-index: 100;
}
.mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  max-width: 480px;
  margin: 0 auto;
}
.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.625rem;
  font-weight: 300;
  color: var(--nav-fg);
  padding: 6px 12px;
}
.mobile-nav a.active {
  color: var(--nav-fg-strong);
  font-weight: 500;
  background: var(--nav-hover-bg);
  border-radius: 10px;
}
.mobile-nav .material-symbols-outlined { color: inherit; }
.mobile-nav .icon,
.mobile-nav .material-symbols-outlined { font-size: 1.375rem; }

@media (max-width: 900px) {
  .mobile-nav { display: block; }
  .main-content.has-mobile-nav { padding-bottom: 80px; }
}

/* Segmented control */
.segmented {
  display: inline-flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
}
.segmented button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.segmented button.active {
  background: #fff;
  color: #10150F;
  box-shadow: var(--shadow-sm);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

.module-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.module-icon .material-symbols-outlined { color: inherit; }

/* Back link ? accionable ? verde */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-light);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--nav-fg-strong); opacity: 1; }

/* Progress steps */
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.step.done { background: var(--accent); }
.step.active { background: var(--accent); opacity: 0.6; }

/* ?? Gu?a / instructivo ?? */
.help-guide {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.help-toc .card-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.help-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.help-toc-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--wash-soft);
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.help-toc-list a:hover {
  background: rgba(152, 181, 40, 0.14);
  color: var(--text);
  opacity: 1;
}
.help-toc-list a.is-active {
  background: rgba(152, 181, 40, 0.18);
  border-color: rgba(152, 181, 40, 0.35);
}
.help-empty {
  margin: 0;
  padding: 8px 4px 0;
  font-size: 0.9375rem;
}
.help-toc-list a .material-symbols-outlined {
  color: var(--accent-light);
  margin-left: auto;
  flex-shrink: 0;
}
.help-toc-num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  min-width: 1.75rem;
}
.help-toc-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.help-toc-body strong {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9375rem;
}
.help-toc-body .text-secondary {
  font-size: 0.8125rem;
}

.help-section {
  scroll-margin-top: 24px;
}
.help-section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.help-section-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(152, 181, 40, 0.16);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-section-icon .material-symbols-outlined { color: var(--text); }
.help-section-kicker {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-weight: 600;
}
.help-section-head h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.help-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: rgba(152, 181, 40, 0.1);
  border: 1px solid rgba(152, 181, 40, 0.28);
  color: var(--text);
}
.help-callout .material-symbols-outlined {
  color: var(--accent-light);
  flex-shrink: 0;
  margin-top: 2px;
}
.help-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.help-callout p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.help-callout-action {
  align-items: flex-start;
}
.help-callout-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.help-callout-body p {
  margin-bottom: 12px;
}
.help-callout-body .btn {
  margin-top: 0;
}

.help-phase {
  margin: 8px 0 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.help-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.help-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  position: relative;
  padding-bottom: 18px;
}
.help-step:last-child { padding-bottom: 0; }
.help-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--separator);
}
.help-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.help-step-card {
  background: var(--bg-grouped);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
}
.help-step-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.help-step-icon {
  color: var(--text) !important;
  font-size: 1.35rem !important;
}
.help-step-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.help-step-card > p {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.help-step-card .btn {
  margin-top: 4px;
}
.help-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}
.help-bullets li { margin-bottom: 6px; }
.help-bullets strong { color: var(--text); font-weight: 500; }

.help-mode-block {
  margin: 20px 0 24px;
  padding: 16px 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-grouped);
  border: 1px solid var(--border);
}
.help-mode-block > p {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.help-mode-block .help-bullets {
  margin-bottom: 18px;
}
.help-mode-title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.help-mode-title .material-symbols-outlined {
  color: var(--text);
  font-size: 1.15rem !important;
}
.help-flow-label {
  margin: 20px 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.help-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 4px;
}
.help-flow-box {
  flex: 1 1 110px;
  min-width: 100px;
  max-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.help-flow-box--end {
  background: rgba(152, 181, 40, 0.16);
  border-color: rgba(152, 181, 40, 0.45);
}
.help-flow-box-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.help-flow-box--end .help-flow-box-title {
  color: var(--accent-light);
}
.help-flow-box-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
.help-flow-box--end .help-flow-box-desc {
  color: var(--text-secondary);
}
.help-flow-box-note {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  line-height: 1.3;
  margin-top: 2px;
}
.help-flow-arrow {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
  align-self: center;
}
.help-flow-arrow .material-symbols-outlined {
  color: inherit;
}

@media (max-width: 640px) {
  .help-flow-arrow { display: none; }
  .help-flow-box {
    flex: 1 1 100%;
    max-width: none;
  }
  .help-section-head { gap: 12px; }
  .help-step {
    grid-template-columns: 32px 1fr;
    gap: 10px;
  }
  .help-step-num {
    width: 32px;
    height: 32px;
    font-size: 0.8125rem;
  }
  .help-step:not(:last-child)::before {
    left: 15px;
    top: 34px;
  }
}

/* ?? Plan (Configuraci?n) ?? */
.plan-summary-hero {
  margin-bottom: 4px;
}
.plan-summary-kicker {
  margin: 0 0 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.plan-summary-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.25;
}
.plan-summary-desc {
  margin: 12px 0 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}
.plan-summary-price {
  margin-top: 18px;
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(152, 181, 40, 0.14);
  border: 1px solid rgba(152, 181, 40, 0.35);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.plan-summary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.plan-summary-chip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-grouped);
  border: 1px solid var(--border);
}
.plan-summary-chip--accent {
  background: rgba(152, 181, 40, 0.1);
  border-color: rgba(152, 181, 40, 0.28);
}
.plan-summary-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--wash);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
}
.plan-summary-chip--accent .plan-summary-chip-icon {
  background: rgba(152, 181, 40, 0.18);
}
.plan-summary-chip-icon .material-symbols-outlined {
  color: var(--text);
}
.plan-summary-chip-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.plan-summary-chip-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.plan-summary-chip-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

@media (max-width: 640px) {
  .plan-summary-meta {
    grid-template-columns: 1fr;
  }
  .plan-summary-title {
    font-size: 1.25rem;
  }
}

/* Tema claro: contrastes en componentes con colores hardcodeados */
html[data-theme="claro"] .panel-tabs-link,
html[data-theme="claro"] .mqr-admin-nav-link,
html[data-theme="claro"] .settings-nav-link {
  color: var(--nav-fg-strong);
}
html[data-theme="claro"] .panel-tabs-link .material-symbols-outlined,
html[data-theme="claro"] .mqr-admin-nav-link .material-symbols-outlined,
html[data-theme="claro"] .settings-nav-link .material-symbols-outlined {
  color: inherit;
}
html[data-theme="claro"] .panel-tabs-link:hover,
html[data-theme="claro"] .panel-tabs-link.active,
html[data-theme="claro"] .mqr-admin-nav-link:hover,
html[data-theme="claro"] .mqr-admin-nav-link.active,
html[data-theme="claro"] .settings-nav-link:hover,
html[data-theme="claro"] .settings-nav-link.active {
  color: var(--nav-fg-strong);
  background: var(--nav-hover-bg);
}
html[data-theme="claro"] .badge-neutral,
html[data-theme="claro"] .badge-accent,
html[data-theme="claro"] .badge-status {
  color: var(--text);
}
html[data-theme="claro"] .form-input,
html[data-theme="claro"] .form-select,
html[data-theme="claro"] .form-textarea {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-color: var(--border);
}
html[data-theme="claro"] table th {
  color: var(--text-secondary);
}
html[data-theme="claro"] table td {
  color: var(--text);
}
html[data-theme="claro"] tr:hover td {
  background: var(--wash-soft);
}
html[data-theme="claro"] .revenue-bar-track,
html[data-theme="claro"] .occupancy-bar {
  background: rgba(16, 21, 15, 0.1);
}
html[data-theme="claro"] .plan-summary-chip,
html[data-theme="claro"] .plan-summary-meta {
  border-color: var(--border);
}
html[data-theme="claro"] .plan-summary-chip {
  background: var(--bg-grouped);
}
html[data-theme="claro"] .plan-summary-chip-icon,
html[data-theme="claro"] .plan-summary-chip-icon .material-symbols-outlined,
html[data-theme="claro"] .plan-summary-chip-value,
html[data-theme="claro"] .plan-summary-title {
  color: var(--text);
}
html[data-theme="claro"] .plan-summary-chip-label {
  color: var(--text-tertiary);
}
html[data-theme="claro"] .plan-summary-chip-icon {
  background: var(--wash);
}
html[data-theme="claro"] .impersonation-banner {
  background: rgba(152, 181, 40, 0.18);
  color: var(--text);
  border-color: rgba(152, 181, 40, 0.35);
}
