/* Licitar — shell de la aplicacion y componentes de los modulos de trabajo.
   Prefijo lx- para no chocar con Tailwind ni con los overrides del tema. */

:root {
  --lx-bg: #f3f6f9;
  --lx-surface: #ffffff;
  --lx-surface-2: #f7f9fc;
  --lx-border: #dfe6ee;
  --lx-border-strong: #c9d4e1;
  --lx-text: #0f172a;
  --lx-muted: #5b6b7f;
  --lx-faint: #8a98aa;
  --lx-accent: #0e7490;
  --lx-accent-strong: #0891b2;
  --lx-accent-soft: #e5f6fa;
  --lx-on-accent: #ffffff;
  --lx-danger: #be123c;
  --lx-danger-soft: #fff0f3;
  --lx-warn: #a15c07;
  --lx-warn-soft: #fff6e5;
  --lx-ok: #047857;
  --lx-ok-soft: #e9faf3;
  --lx-info: #1d4ed8;
  --lx-info-soft: #eef3ff;
  --lx-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.05);
  --lx-radius: 14px;
}

[data-theme="dark"] {
  --lx-bg: #020617;
  --lx-surface: #0b1424;
  --lx-surface-2: #0f1a2d;
  --lx-border: rgba(255, 255, 255, 0.09);
  --lx-border-strong: rgba(255, 255, 255, 0.16);
  --lx-text: #e6edf5;
  --lx-muted: #9aabbf;
  --lx-faint: #6e7f94;
  --lx-accent: #67e8f9;
  --lx-accent-strong: #22d3ee;
  --lx-accent-soft: rgba(34, 211, 238, 0.12);
  --lx-on-accent: #04202e;
  --lx-danger: #fda4af;
  --lx-danger-soft: rgba(244, 63, 94, 0.13);
  --lx-warn: #fcd34d;
  --lx-warn-soft: rgba(245, 158, 11, 0.13);
  --lx-ok: #6ee7b7;
  --lx-ok-soft: rgba(16, 185, 129, 0.13);
  --lx-info: #93c5fd;
  --lx-info-soft: rgba(59, 130, 246, 0.14);
  --lx-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---------- Shell ----------
   Barra superior oscura (la misma de la landing) con marca, buscador, empresa y
   usuario; debajo, la barra lateral solo con la navegacion. En escritorio la
   lateral se contrae a iconos (html.lx-nav-collapsed, recordado en el
   navegador); en movil es un cajon que se abre con el mismo boton. */

:root {
  --lx-topbar-h: 3.75rem;
  --lx-side-w: 15rem;
  --lx-side-w-collapsed: 4.25rem;
  --lx-topbar-bg: #020617;
  --lx-topbar-border: #172033;
  --lx-topbar-text: #f1f5f9;
  --lx-topbar-muted: #94a3b8;
  --lx-side-bg: var(--lx-surface);
  --lx-side-border: var(--lx-border);
  --lx-side-text: #334155;
  --lx-side-muted: var(--lx-faint);
  --lx-side-hover: var(--lx-surface-2);
  --lx-side-active: var(--lx-accent-soft);
  --lx-side-active-text: var(--lx-accent);
}
[data-theme="dark"] {
  --lx-side-bg: #030b16;
  --lx-side-text: #cbd5e1;
  --lx-side-hover: rgba(255, 255, 255, 0.05);
}

.lx-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--lx-topbar-h);
  padding: 0 1rem 0 0.6rem;
  background: var(--lx-topbar-bg);
  border-bottom: 1px solid var(--lx-topbar-border);
  color: var(--lx-topbar-text);
}
.lx-topbar-start { display: flex; align-items: center; gap: 0.4rem; flex: 0 0 auto; }
.lx-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--lx-topbar-text); }
.lx-brand svg { width: 1.75rem; height: 1.75rem; color: #67e8f9; }
.lx-brand strong { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.lx-topbar .lx-icon-button:hover { background: rgba(255, 255, 255, 0.08); }

.lx-search { position: relative; flex: 1 1 auto; max-width: 30rem; margin-left: 1rem; }
.lx-search .lx-icon,
.lx-side-search .lx-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.lx-search .lx-icon { color: var(--lx-topbar-muted); }
.lx-search input[type="search"] {
  padding: 0.5rem 0.75rem 0.5rem 2.2rem;
  border: 1px solid #253247 !important;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  font-size: 0.86rem;
}
.lx-search input[type="search"]:focus { border-color: #67e8f9 !important; }
.lx-search input::placeholder { color: var(--lx-topbar-muted); }

.lx-topbar-end { display: flex; align-items: center; gap: 1rem; margin-left: auto; min-width: 0; }
.lx-company { display: grid; justify-items: end; line-height: 1.2; min-width: 0; }
.lx-company-name,
.lx-company-select.lx-company-select {
  max-width: 14rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--lx-topbar-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lx-company-select.lx-company-select {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
  cursor: pointer;
}
.lx-company-select option { color: #0f172a; }
.lx-company-meta { font-size: 0.72rem; color: var(--lx-topbar-muted); white-space: nowrap; }

.lx-user-menu { position: relative; }
.lx-user-menu summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.45rem 0.3rem 0.3rem;
  border: 1px solid #253247;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}
.lx-user-menu summary::-webkit-details-marker { display: none; }
.lx-user-menu summary:hover,
.lx-user-menu[open] summary { border-color: #67e8f9; }
.lx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 4px;
  background: #0e7490;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
}
.lx-user-name { max-width: 12rem; font-size: 0.86rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-caret { width: 1rem; height: 1rem; color: var(--lx-topbar-muted); }
.lx-user-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 17rem;
  padding: 0.9rem;
  border: 1px solid var(--lx-border);
  border-radius: 8px;
  background: var(--lx-surface);
  color: var(--lx-text);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.lx-user-panel-name { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-user-panel-meta { margin-top: 0.15rem; font-size: 0.78rem; color: var(--lx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-user-panel-company { display: none; }
.lx-logout {
  width: 100%;
  margin-top: 0.1rem;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  color: var(--lx-text);
}
.lx-logout:hover { background: var(--lx-surface-2); color: var(--lx-danger); }

.lx-shell {
  display: flex;
  min-height: calc(100vh - var(--lx-topbar-h));
  width: 100%;
  background: var(--lx-bg);
}

.lx-sidebar {
  position: fixed;
  top: var(--lx-topbar-h);
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--lx-side-w);
  max-width: 86vw;
  background: var(--lx-side-bg);
  color: var(--lx-side-text);
  border-right: 1px solid var(--lx-side-border);
  transform: translateX(-100%);
  transition: transform 200ms ease, width 200ms ease;
  overflow-x: hidden;
  overflow-y: auto;
}
.lx-sidebar.is-open { transform: translateX(0); }

.lx-backdrop {
  position: fixed;
  inset: var(--lx-topbar-h) 0 0 0;
  z-index: 35;
  background: rgba(2, 6, 23, 0.45);
}

.lx-main { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.lx-content { min-width: 0; }

.lx-side-search { position: relative; margin: 0.9rem 0.75rem 0; }
.lx-side-search .lx-icon { color: var(--lx-side-muted); }
.lx-side-search input[type="search"] { padding: 0.5rem 0.6rem 0.5rem 2.2rem; font-size: 0.86rem; }

.lx-nav { flex: 1; padding: 0.4rem 0.6rem 1rem; }
.lx-nav-title {
  margin: 1.1rem 0.6rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lx-side-muted);
  white-space: nowrap;
}
.lx-nav ul { display: grid; gap: 2px; }
.lx-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.4rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--lx-side-text);
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.lx-nav-link:hover { background: var(--lx-side-hover); color: var(--lx-text); }
.lx-nav-link.is-active {
  background: var(--lx-side-active);
  color: var(--lx-side-active-text);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--lx-accent-strong);
}
.lx-nav-link .lx-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.lx-nav-count {
  margin-left: auto;
  min-width: 1.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--lx-surface-2);
  border: 1px solid var(--lx-border);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: var(--lx-muted);
  font-variant-numeric: tabular-nums;
}
.lx-nav-link.is-active .lx-nav-count { border-color: transparent; background: var(--lx-surface); color: var(--lx-accent); }
.lx-nav-count.is-urgent { border-color: transparent; background: #e11d48; color: #ffffff; }

.lx-collapse {
  display: none;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0.6rem 0.8rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font-size: 0.84rem;
  color: var(--lx-side-muted);
  white-space: nowrap;
}
.lx-collapse:hover { background: var(--lx-side-hover); color: var(--lx-text); }
.lx-collapse .lx-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; transition: transform 200ms ease; }

@media (min-width: 1024px) {
  .lx-sidebar {
    position: sticky;
    height: calc(100vh - var(--lx-topbar-h));
    transform: none;
    flex: 0 0 auto;
    max-width: none;
  }
  .lx-backdrop { display: none !important; }
  .lx-side-search { display: none; }
  .lx-collapse { display: flex; }

  html.lx-nav-collapsed .lx-sidebar { width: var(--lx-side-w-collapsed); }
  html.lx-nav-collapsed .lx-nav-label { display: none; }
  html.lx-nav-collapsed .lx-nav-title {
    height: 1px;
    margin: 0.7rem 0.6rem;
    overflow: hidden;
    color: transparent;
    background: var(--lx-side-border);
  }
  html.lx-nav-collapsed .lx-nav-link,
  html.lx-nav-collapsed .lx-collapse { justify-content: center; padding-inline: 0; }
  html.lx-nav-collapsed .lx-nav-count {
    position: absolute;
    top: 0.2rem;
    right: 0.35rem;
    min-width: 1.05rem;
    padding: 0 0.25rem;
    font-size: 0.62rem;
    line-height: 1.05rem;
  }
  html.lx-nav-collapsed .lx-collapse .lx-icon { transform: rotate(180deg); }
}

/* Herramientas de la barra superior: tema y notificaciones. */
.lx-topbar-tools { display: flex; align-items: center; gap: 0.25rem; }
.lx-topbar .lx-icon-button { color: var(--lx-topbar-muted); }
.lx-topbar .lx-icon-button:hover { color: var(--lx-topbar-text); }
.lx-theme-toggle .lx-sun { display: none; }
[data-theme="dark"] .lx-theme-toggle .lx-sun { display: inline-block; }
[data-theme="dark"] .lx-theme-toggle .lx-moon { display: none; }
.lx-icon-button .lx-icon.lx-sun, .lx-icon-button .lx-icon.lx-moon { width: 1.2rem; height: 1.2rem; }

.lx-notify { position: relative; }
.lx-notify summary { position: relative; list-style: none; cursor: pointer; }
.lx-notify summary::-webkit-details-marker { display: none; }
.lx-notify[open] summary { background: rgba(255, 255, 255, 0.08); color: var(--lx-topbar-text); }
.lx-notify summary .lx-icon { width: 1.25rem; height: 1.25rem; }
.lx-notify-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  min-width: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.05rem;
  text-align: center;
  box-shadow: 0 0 0 2px var(--lx-topbar-bg);
}
.lx-notify-panel {
  position: absolute;
  right: -0.5rem;
  top: calc(100% + 0.6rem);
  width: min(24rem, calc(100vw - 1.5rem));
  border: 1px solid var(--lx-border);
  border-radius: 8px;
  background: var(--lx-surface);
  color: var(--lx-text);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
.lx-notify-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--lx-border);
  font-size: 0.9rem;
}
.lx-notify-head a { font-size: 0.8rem; font-weight: 600; color: var(--lx-accent); }
.lx-notify-item {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--lx-border);
  border-left: 3px solid var(--lx-accent-strong);
}
.lx-notify-item:hover { background: var(--lx-surface-2); }
.lx-notify-item.is-overdue { border-left-color: var(--lx-danger); }
.lx-notify-item.is-today { border-left-color: #f59e0b; }
.lx-notify-when { font-size: 0.76rem; font-weight: 600; line-height: 1.35; color: var(--lx-text); }
.lx-notify-item.is-overdue .lx-notify-when { color: var(--lx-danger); }
.lx-notify-item.is-today .lx-notify-when { color: var(--lx-warn); }
.lx-notify-when span { font-weight: 400; color: var(--lx-muted); font-variant-numeric: tabular-nums; }
.lx-notify-body { display: grid; gap: 0.15rem; min-width: 0; }
.lx-notify-label { font-size: 0.86rem; font-weight: 600; }
.lx-notify-title { font-size: 0.78rem; color: var(--lx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-notify-empty { padding: 1.1rem 1rem; font-size: 0.84rem; line-height: 1.5; color: var(--lx-muted); border-bottom: 1px solid var(--lx-border); }
.lx-notify-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--lx-text);
}
.lx-notify-foot > span:last-child { margin-left: auto; color: var(--lx-muted); }
.lx-notify-foot:hover { background: var(--lx-surface-2); }

.lx-user-panel-link {
  display: block;
  margin-top: 0.8rem;
  padding: 0.6rem 0.5rem;
  border-top: 1px solid var(--lx-border);
  font-size: 0.86rem;
  color: var(--lx-text);
}
.lx-user-panel-link:hover { color: var(--lx-accent); }

/* En escritorio se contrae con el boton de abajo de la lateral; la hamburguesa
   solo hace falta en pantallas chicas para abrir el cajon. */
@media (min-width: 1024px) {
  .lx-topbar .lx-nav-toggle { display: none; }
  .lx-topbar { padding-left: 1.1rem; }
}

@media (max-width: 900px) {
  .lx-company { display: none; }
  .lx-user-panel-company { display: block; }
}
@media (max-width: 760px) {
  .lx-search { display: none; }
  .lx-user-name, .lx-caret { display: none; }
  .lx-user-menu summary { padding: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-sidebar, .lx-collapse .lx-icon { transition: none; }
}

.lx-icon { width: 1.1rem; height: 1.1rem; display: inline-block; vertical-align: middle; }
.lx-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 6px;
  color: inherit;
}
.lx-icon-button:hover { background: rgba(127, 127, 127, 0.12); }
.lx-icon-button .lx-icon { width: 1.3rem; height: 1.3rem; }

/* ---------- Mensajes ---------- */

.lx-message {
  padding: 0.75rem 1rem;
  border: 1px solid var(--lx-border);
  border-left: 4px solid var(--lx-accent-strong);
  border-radius: 10px;
  background: var(--lx-surface);
  color: var(--lx-text);
  font-size: 0.9rem;
}
.lx-message.is-error { border-left-color: var(--lx-danger); }
.lx-message.is-warning { border-left-color: #f59e0b; }
.lx-message.is-success { border-left-color: #10b981; }

/* ---------- Paginas de modulo ---------- */

.lx-page { color: var(--lx-text); }
.lx-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.lx-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lx-accent);
}
.lx-h1 {
  margin-top: 0.25rem;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--lx-text);
}
.lx-h2 {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--lx-text);
}
.lx-sub { margin-top: 0.35rem; max-width: 46rem; font-size: 0.92rem; line-height: 1.55; color: var(--lx-muted); }
.lx-muted { color: var(--lx-muted); }
.lx-faint { color: var(--lx-faint); }
.lx-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.8rem; }

.lx-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.lx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.4rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--lx-border-strong);
  border-radius: 10px;
  background: var(--lx-surface);
  color: var(--lx-text);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}
.lx-btn:hover { background: var(--lx-surface-2); border-color: var(--lx-accent-strong); }
.lx-btn-primary {
  border-color: var(--lx-accent-strong);
  background: var(--lx-accent-strong);
  color: var(--lx-on-accent);
}
.lx-btn-primary:hover { background: var(--lx-accent); color: var(--lx-on-accent); }
[data-theme="dark"] .lx-btn-primary:hover { background: #67e8f9; }
.lx-btn .lx-icon { width: 1rem; height: 1rem; }

.lx-card {
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface);
  box-shadow: var(--lx-shadow);
}
.lx-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--lx-border);
}
.lx-card-body { padding: 1rem 1.15rem; }

.lx-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 900px) { .lx-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lx-kpi {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface);
}
.lx-kpi-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lx-muted); }
.lx-kpi-value { margin-top: 0.4rem; font-size: 1.65rem; font-weight: 650; letter-spacing: -0.02em; color: var(--lx-text); font-variant-numeric: tabular-nums; }
.lx-kpi-note { margin-top: 0.15rem; font-size: 0.78rem; color: var(--lx-faint); }
.lx-kpi.is-danger { border-color: color-mix(in srgb, var(--lx-danger) 35%, var(--lx-border)); background: var(--lx-danger-soft); }
.lx-kpi.is-danger .lx-kpi-value, .lx-kpi.is-danger .lx-kpi-label { color: var(--lx-danger); }
.lx-kpi.is-warn { border-color: color-mix(in srgb, var(--lx-warn) 35%, var(--lx-border)); background: var(--lx-warn-soft); }
.lx-kpi.is-warn .lx-kpi-value, .lx-kpi.is-warn .lx-kpi-label { color: var(--lx-warn); }

.lx-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface-2);
  color: var(--lx-muted);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}
.lx-badge-danger { border-color: transparent; background: var(--lx-danger-soft); color: var(--lx-danger); }
.lx-badge-warn { border-color: transparent; background: var(--lx-warn-soft); color: var(--lx-warn); }
.lx-badge-ok { border-color: transparent; background: var(--lx-ok-soft); color: var(--lx-ok); }
.lx-badge-info { border-color: transparent; background: var(--lx-info-soft); color: var(--lx-info); }
.lx-badge-accent { border-color: transparent; background: var(--lx-accent-soft); color: var(--lx-accent); }

/* Filtros */
.lx-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface);
  margin-bottom: 1rem;
}
.lx-field { display: grid; gap: 0.3rem; min-width: 10rem; flex: 1 1 10rem; }
.lx-field-label { font-size: 0.72rem; font-weight: 650; color: var(--lx-muted); }
.lx-filters select, .lx-filters input:not([type="checkbox"]) { padding: 0.45rem 0.6rem; font-size: 0.86rem; }
.lx-check { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; color: var(--lx-text); padding-bottom: 0.5rem; }

.lx-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--lx-border);
  border-radius: 11px;
  background: var(--lx-surface-2);
}
.lx-seg a {
  padding: 0.38rem 0.8rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--lx-muted);
}
.lx-seg a.is-active { background: var(--lx-surface); color: var(--lx-text); box-shadow: var(--lx-shadow); }

/* Tablas */
.lx-table-wrap { overflow-x: auto; }
.lx-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.lx-table th {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--lx-border);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--lx-muted);
  white-space: nowrap;
  background: var(--lx-surface-2);
}
.lx-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--lx-border); color: var(--lx-text); vertical-align: top; }
.lx-table tr:last-child td { border-bottom: 0; }
.lx-table tbody tr:hover td { background: var(--lx-surface-2); }
.lx-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lx-table tr.is-me td { background: var(--lx-accent-soft); }
.lx-link { color: var(--lx-accent); font-weight: 600; }
.lx-link:hover { text-decoration: underline; }

.lx-bar { height: 6px; border-radius: 999px; background: var(--lx-surface-2); overflow: hidden; min-width: 4rem; }
.lx-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--lx-accent-strong); }

.lx-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--lx-muted);
}
.lx-empty h3 { font-size: 1.05rem; font-weight: 650; color: var(--lx-text); }
.lx-empty p { margin: 0.4rem auto 1rem; max-width: 34rem; font-size: 0.9rem; line-height: 1.55; }

/* ---------- Agenda ---------- */

.lx-agenda-group + .lx-agenda-group { margin-top: 1.25rem; }
.lx-agenda-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lx-muted);
}
.lx-agenda-title.is-danger { color: var(--lx-danger); }
.lx-agenda-title.is-warn { color: var(--lx-warn); }
.lx-day { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); border-top: 1px solid var(--lx-border); }
.lx-day:first-child { border-top: 0; }
.lx-day-date { padding: 0.85rem 0 0.85rem 1rem; }
.lx-day-num { font-size: 1.35rem; font-weight: 650; line-height: 1; color: var(--lx-text); font-variant-numeric: tabular-nums; }
.lx-day-week { margin-top: 0.2rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--lx-faint); }
.lx-day-events { display: grid; }
.lx-event {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 1rem 0.75rem 0.25rem;
  border-left: 3px solid transparent;
}
.lx-event + .lx-event { border-top: 1px dashed var(--lx-border); }
.lx-event.is-critical { border-left-color: var(--lx-accent-strong); }
.lx-event.is-overdue { border-left-color: var(--lx-danger); }
.lx-event.is-today { border-left-color: #f59e0b; }
.lx-event-time { padding-left: 0.6rem; font-size: 0.82rem; font-weight: 600; color: var(--lx-muted); font-variant-numeric: tabular-nums; }
.lx-event-label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 650; color: var(--lx-text); }
.lx-event-title { margin-top: 0.2rem; font-size: 0.86rem; color: var(--lx-text); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lx-event-meta { margin-top: 0.2rem; font-size: 0.78rem; color: var(--lx-muted); }
.lx-event-actions { display: flex; gap: 0.35rem; }
.lx-event-actions a { padding: 0.35rem 0.55rem; border-radius: 8px; font-size: 0.78rem; font-weight: 600; color: var(--lx-accent); }
.lx-event-actions a:hover { background: var(--lx-accent-soft); }
@media (max-width: 640px) {
  .lx-day { grid-template-columns: 1fr; }
  .lx-day-date { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.75rem 1rem 0; }
  .lx-event { grid-template-columns: 3rem minmax(0, 1fr); }
  .lx-event-actions { grid-column: 2; }
}

/* ---------- Calendario mensual ---------- */

.lx-month-wrap { overflow-x: auto; }
.lx-month { min-width: 46rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.lx-month-head {
  padding: 0.5rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lx-muted);
  border-bottom: 1px solid var(--lx-border);
  background: var(--lx-surface-2);
}
.lx-cell {
  min-height: 7.5rem;
  padding: 0.4rem;
  border-right: 1px solid var(--lx-border);
  border-bottom: 1px solid var(--lx-border);
}
.lx-cell:nth-child(7n) { border-right: 0; }
.lx-cell.is-out { background: var(--lx-surface-2); }
.lx-cell.is-out .lx-cell-num { color: var(--lx-faint); }
.lx-cell-num { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 650; color: var(--lx-text); }
.lx-cell.is-today .lx-cell-num { background: var(--lx-accent-strong); color: var(--lx-on-accent); }
.lx-cell-events { display: grid; gap: 3px; margin-top: 0.2rem; }
.lx-cell-event {
  display: block;
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1.3;
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lx-cell-event.is-overdue { background: var(--lx-danger-soft); color: var(--lx-danger); }
.lx-cell-event.is-today { background: var(--lx-warn-soft); color: var(--lx-warn); }
.lx-cell-event.is-soft { background: var(--lx-surface-2); color: var(--lx-muted); }
.lx-cell-more { font-size: 0.7rem; font-weight: 600; color: var(--lx-muted); padding-left: 0.3rem; }

/* ---------- Ficha de competidor ---------- */

.lx-grid-2 { display: grid; gap: 1rem; }
@media (min-width: 1024px) { .lx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lx-rank-list { display: grid; gap: 0.65rem; }
.lx-rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: center; font-size: 0.86rem; }
.lx-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lx-text); }
.lx-rank-row .lx-bar { grid-column: 1 / -1; }
.lx-h2h { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; text-align: center; }
.lx-h2h strong { display: block; font-size: 1.5rem; font-weight: 650; color: var(--lx-text); }
.lx-h2h span { font-size: 0.76rem; color: var(--lx-muted); }

.lx-pagination { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 1.15rem; border-top: 1px solid var(--lx-border); font-size: 0.84rem; color: var(--lx-muted); }
