/*
 * Base Operativa / CRM · Estilos principales
 * Desarrollo propietario de Andrés Calvo Espinosa / OptimeFlow(s)
 * © 2026 Andrés Calvo Espinosa. Todos los derechos reservados.
 * Uso limitado al entorno autorizado conforme al acuerdo de licencia aplicable.
 */

:root {
  --bg: #07111f;
  --bg-2: #111827;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --panel-dark: rgba(12, 18, 32, 0.78);
  --text: #f8fafc;
  --ink: #111827;
  --muted: #8ea3bd;
  --muted-2: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #6d5dfc;
  --accent-2: #00d4ff;
  --accent-3: #ff4ecd;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.32);
  --shadow-soft: 0 14px 42px rgba(2, 6, 23, 0.18);
  --radius: 24px;
  --radius-sm: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="nebula"] {
  --bg: #060b1a;
  --bg-2: #111534;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --panel-dark: rgba(11, 16, 40, 0.78);
  --text: #f8fbff;
  --ink: #101426;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --line: rgba(167, 139, 250, 0.22);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
}

html[data-theme="aurora"] {
  --bg: #021b22;
  --bg-2: #063b3f;
  --panel: rgba(239, 255, 250, 0.84);
  --panel-strong: rgba(250, 255, 252, 0.96);
  --panel-dark: rgba(2, 42, 45, 0.78);
  --text: #f2fffb;
  --ink: #082f2d;
  --muted: #99f6e4;
  --muted-2: #0f766e;
  --line: rgba(45, 212, 191, 0.24);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #14b8a6;
  --accent-2: #a3e635;
  --accent-3: #f472b6;
}

html[data-theme="solar"] {
  --bg: #241304;
  --bg-2: #78350f;
  --panel: rgba(255, 251, 235, 0.86);
  --panel-strong: rgba(255, 253, 244, 0.97);
  --panel-dark: rgba(67, 28, 7, 0.76);
  --text: #fff7ed;
  --ink: #301b05;
  --muted: #fde68a;
  --muted-2: #92400e;
  --line: rgba(251, 191, 36, 0.26);
  --line-strong: rgba(255, 255, 255, 0.3);
  --accent: #f97316;
  --accent-2: #84cc16;
  --accent-3: #facc15;
}

html[data-theme="executive"] {
  --bg: #07111f;
  --bg-2: #0f2a44;
  --panel: rgba(248, 250, 252, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --panel-dark: rgba(15, 23, 42, 0.82);
  --text: #eef6ff;
  --ink: #0f172a;
  --muted: #bfdbfe;
  --muted-2: #475569;
  --line: rgba(96, 165, 250, 0.2);
  --line-strong: rgba(255, 255, 255, 0.24);
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-3: #6366f1;
}

html[data-theme="neon"] {
  --bg: #19051f;
  --bg-2: #3b0764;
  --panel: rgba(255, 245, 252, 0.84);
  --panel-strong: rgba(255, 250, 254, 0.97);
  --panel-dark: rgba(33, 5, 42, 0.8);
  --text: #fff4fd;
  --ink: #2e073f;
  --muted: #f9a8d4;
  --muted-2: #9d174d;
  --line: rgba(244, 114, 182, 0.28);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #ec4899;
  --accent-2: #22d3ee;
  --accent-3: #fb923c;
}

html[data-theme="graphite"] {
  --bg: #070707;
  --bg-2: #1f1b18;
  --panel: rgba(250, 246, 240, 0.86);
  --panel-strong: rgba(255, 252, 247, 0.96);
  --panel-dark: rgba(16, 14, 13, 0.82);
  --text: #f8f4ee;
  --ink: #181411;
  --muted: #d6c6b8;
  --muted-2: #78675c;
  --line: rgba(217, 119, 6, 0.22);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #b45309;
  --accent-2: #eab308;
  --accent-3: #fb7185;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 5%, color-mix(in srgb, var(--accent-2), transparent 62%), transparent 28rem),
    radial-gradient(circle at 86% 8%, color-mix(in srgb, var(--accent-3), transparent 60%), transparent 30rem),
    radial-gradient(circle at 45% 88%, color-mix(in srgb, var(--accent), transparent 68%), transparent 34rem),
    linear-gradient(145deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 0.14rem 0.34rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.08);
}

.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, rgba(5, 10, 24, 0.86), rgba(5, 10, 24, 0.62));
  border-right: 1px solid var(--line-strong);
  backdrop-filter: blur(24px);
  overflow: auto;
}

.brand,
.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand {
  margin-bottom: 22px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #fff;
  font-weight: 950;
  letter-spacing: -0.08em;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,0.96), transparent 13px),
    linear-gradient(135deg, var(--accent), var(--accent-2) 54%, var(--accent-3));
  box-shadow: 0 0 36px color-mix(in srgb, var(--accent), transparent 35%);
}

.brand-mark.big {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  font-size: 24px;
}

.brand strong,
.auth-brand h1 {
  display: block;
  margin: 0;
  letter-spacing: -0.04em;
}

.brand span,
.profile-card small,
.sidebar-footer small,
.auth-brand p,
.muted {
  color: var(--muted);
}

.profile-card,
.sidebar-footer,
.glass-panel {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

.profile-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 20px;
}

.profile-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.overline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--accent-2), white 26%);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 16px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-item span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.nav-item.active span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 38%);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  margin-top: 24px;
}

.theme-orb {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent-3), transparent 42%);
}

.main {
  position: relative;
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar h1,
.panel h2,
.auth-card h1,
.loading-screen h1 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1;
}

.topbar h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.topbar p,
.panel p {
  color: color-mix(in srgb, var(--text), transparent 25%);
}

.top-actions,
.toolbar-actions,
.row-actions,
.project-meta,
.compact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn,
.icon-btn,
.icon-only,
.theme-select {
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.14);
  cursor: pointer;
  transition: 0.2s ease;
}

.btn {
  padding: 11px 15px;
  font-weight: 850;
}

.btn:hover,
.icon-btn:hover,
.icon-only:hover,
.theme-select:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.16);
}

.btn.primary {
  border-color: color-mix(in srgb, var(--accent), white 20%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), white 10%), var(--accent-2));
  color: #fff;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent), transparent 58%);
}

.btn.danger {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, #dc2626, #fb7185);
  color: #fff;
}

.btn.ghost {
  background: rgba(255,255,255,0.08);
}

.btn.small {
  padding: 8px 11px;
  font-size: 13px;
}

.btn.wide {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.icon-btn.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
}

.icon-only {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 26px;
}

.theme-select {
  max-width: 210px;
  padding: 10px 13px;
  appearance: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card,
.panel,
.project-card,
.risk-item,
.timeline-item,
.status-box,
.empty-state,
.theme-card {
  border: 1px solid rgba(255,255,255,0.42);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.kpi-card {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 14px;
  min-height: 132px;
  padding: 18px;
  border-radius: var(--radius);
}

.kpi-card::after,
.panel::after,
.auth-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 78%), transparent 18rem),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent-3), transparent 82%), transparent 16rem);
  opacity: 0.85;
}

.kpi-card > *,
.panel > *,
.auth-card > * {
  position: relative;
  z-index: 1;
}

.kpi-card span,
.kpi-card small,
.panel .overline {
  color: var(--muted-2);
}

.kpi-card strong {
  display: block;
  margin: 5px 0;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 50%);
}

.content-grid {
  display: grid;
  gap: 16px;
}

.two-one {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
}

.stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
}

.table-panel {
  padding: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 22px;
}

.project-stack,
.risk-list,
.timeline {
  display: grid;
  gap: 12px;
}

.project-card {
  display: grid;
  gap: 14px;
  padding: 15px;
  border-radius: 18px;
  box-shadow: none;
}

.project-card strong,
.risk-item strong,
.timeline-item strong {
  display: block;
}

.project-card span,
.risk-item span,
.timeline-item span,
.project-card small,
.risk-item small,
.timeline-item small {
  color: var(--muted-2);
}

.mini-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

.progress-cell {
  display: grid;
  gap: 6px;
}

.progress-cell.compact {
  min-width: 120px;
}

.progress {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent), transparent 88%);
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent), transparent 42%);
}

.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  box-shadow: none;
}

.timeline-item.rich {
  min-height: 116px;
}

.timeline-item i {
  position: absolute;
  top: 19px;
  left: -17px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-2), transparent 76%), 0 0 20px var(--accent-2);
}

.timeline-item p {
  margin: 8px 0 0;
  color: var(--muted-2);
}

.risk-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge.ok {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.13);
}

.badge.warn {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.14);
}

.badge.danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.12);
}

.badge.info {
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.28);
  background: rgba(14, 165, 233, 0.12);
}

.badge.neutral {
  color: #475569;
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(100, 116, 139, 0.1);
}

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-wrap input::placeholder {
  color: color-mix(in srgb, var(--text), transparent 45%);
}

.count-pill {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.1);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  background: var(--panel-strong);
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted-2);
  background: color-mix(in srgb, var(--panel-strong), white 10%);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:hover td {
  background: color-mix(in srgb, var(--accent-2), transparent 95%);
}

.auth-screen,
.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: min(740px, 100%);
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 30px;
}

.auth-brand h1 {
  font-size: clamp(36px, 6vw, 72px);
}

.login-form {
  display: grid;
  gap: 14px;
}

.auth-message {
  margin: 0;
  color: var(--muted);
}

.loader-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.16);
  border-top-color: var(--accent-2);
  animation: spin 1s linear infinite;
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent-2), transparent 52%);
}

.loading-screen {
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(14px);
}

.modal {
  width: min(980px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.modal-head,
.modal-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 22px;
}

.modal-head {
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
}

.modal-head h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 22px;
}

.field {
  display: grid;
  gap: 7px;
  font-weight: 850;
  color: var(--ink);
}

.field.full,
.modal-foot {
  grid-column: 1 / -1;
}

.field b {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  outline: 0;
  padding: 11px 13px;
  transition: 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field select[multiple] {
  min-height: 156px;
}

.field-hint {
  color: var(--muted-2);
  font-weight: 600;
}

.modal-foot {
  justify-content: flex-end;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.65);
  margin: 8px -22px -22px;
}

.status-box {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: none;
}

.status-box.ok {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.14);
}

.status-box.warn {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.14);
}

.danger-zone {
  border-color: rgba(239, 68, 68, 0.36);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.theme-card {
  text-align: left;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.2s ease;
}

.theme-card:hover,
.theme-card.active {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent), white 20%);
  box-shadow: 0 20px 45px color-mix(in srgb, var(--accent), transparent 72%);
}

.theme-preview {
  height: 78px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.4);
}

.theme-preview i {
  position: absolute;
  width: 42%;
  height: 42%;
  right: 14%;
  top: 18%;
  border-radius: 50%;
  background: rgba(255,255,255,0.44);
  filter: blur(5px);
}

.theme-preview.nebula { background: radial-gradient(circle at 20% 20%, #22d3ee, transparent 28%), linear-gradient(135deg, #130f40, #7c3aed, #f472b6); }
.theme-preview.aurora { background: radial-gradient(circle at 80% 18%, #f472b6, transparent 27%), linear-gradient(135deg, #042f2e, #14b8a6, #a3e635); }
.theme-preview.solar { background: radial-gradient(circle at 15% 20%, #facc15, transparent 25%), linear-gradient(135deg, #7c2d12, #f97316, #84cc16); }
.theme-preview.executive { background: radial-gradient(circle at 70% 12%, #06b6d4, transparent 24%), linear-gradient(135deg, #0f172a, #2563eb, #6366f1); }
.theme-preview.neon { background: radial-gradient(circle at 15% 18%, #22d3ee, transparent 26%), linear-gradient(135deg, #3b0764, #ec4899, #fb923c); }
.theme-preview.graphite { background: radial-gradient(circle at 80% 18%, #eab308, transparent 25%), linear-gradient(135deg, #070707, #292524, #b45309); }

.empty-state {
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted-2);
  box-shadow: none;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(460px, calc(100vw - 44px));
}

.toast {
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  pointer-events: auto;
  animation: toast-in 0.22s ease both;
}

@keyframes toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.ok { background: rgba(4, 120, 87, 0.96); }
.toast.warn { background: rgba(180, 83, 9, 0.96); }
.toast.error { background: rgba(153, 27, 27, 0.96); }

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-one {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .module-toolbar,
  .panel-head,
  .modal-head,
  .modal-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list,
  .kpi-grid,
  .theme-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .toolbar-actions {
    width: 100%;
  }

  .top-actions > *,
  .toolbar-actions > *,
  .theme-select {
    flex: 1;
    max-width: none;
  }

  .risk-item,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 10px;
  }
}

/* Compatibility layer for the vanilla BO app markup */
.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.user-panel,
.theme-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  margin-bottom: 18px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

.user-panel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 16px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
  text-align: left;
}

.nav button:hover,
.nav button.active {
  background: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.nav-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}

.nav button.active .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 38%);
}

.sidebar-action {
  width: 100%;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--line-strong);
  cursor: pointer;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.grid.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
}

.kpi-label,
.kpi-note {
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 800;
}

.kpi-value {
  margin: 10px 0 6px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 950;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.list-item,
.timeline-item,
.risk-item {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(18px);
}

.progress {
  display: grid;
  gap: 6px;
  min-width: 118px;
  height: auto;
  background: transparent;
  overflow: visible;
}

.progress-top {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.progress-bar {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent), transparent 88%);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent), transparent 42%);
}

.badge.bad,
.badge.danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.12);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .grid.kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .grid.kpis,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 18px;
  }
}

/* Hotfix compatibility for the current vanilla app.js markup */
.card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.42);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.card > * {
  position: relative;
  z-index: 1;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 82%), transparent 18rem),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent-3), transparent 86%), transparent 16rem);
}

.actions,
.table-tools,
.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.actions {
  justify-content: flex-end;
}

.table-tools {
  justify-content: space-between;
  margin-bottom: 14px;
}

.input,
.select,
.textarea,
.search-box {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 15px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255,255,255,0.88);
  outline: 0;
}

.theme-panel .select,
.search-box {
  color: var(--text);
  background: rgba(255,255,255,0.10);
}

.search-box::placeholder {
  color: color-mix(in srgb, var(--text), transparent 45%);
}

.input:focus,
.select:focus,
.textarea:focus,
.search-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-actions {
  margin-top: 4px;
}

.setup-screen,
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.setup-card,
.denied-card,
.boot-card {
  position: relative;
  overflow: hidden;
  width: min(760px, 100%);
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.42);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.boot-card {
  text-align: center;
}

.setup-code {
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--accent), white 18%);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.orb {
  width: 72px;
  height: 72px;
  border-radius: 26px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,0.96), transparent 14px),
    linear-gradient(135deg, var(--accent), var(--accent-2) 54%, var(--accent-3));
  box-shadow: 0 0 44px color-mix(in srgb, var(--accent), transparent 35%);
}

.boot-card .orb {
  margin-inline: auto;
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 22px;
}

.modal-header {
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
}

.modal-header h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.65);
}

.mini-btn {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 11px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.mini-btn.danger {
  color: #b91c1c;
}

.title-cell {
  display: grid;
  gap: 4px;
}

.title-cell small,
.muted {
  color: var(--muted-2);
}

.list-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.62);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

.required-star {
  color: var(--danger);
}

@media (max-width: 760px) {
  .actions,
  .table-tools,
  .auth-actions,
  .modal-header,
  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Hotfix de compatibilidad para la versión vanilla renderizada por js/app.js */
.card,
.setup-card,
.denied-card,
.boot-card,
.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.42);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  border-radius: var(--radius);
  padding: 20px;
}

.auth-card,
.setup-card,
.denied-card,
.boot-card {
  width: min(760px, 100%);
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: 30px;
  border-radius: 30px;
}

.auth-form,
.auth-actions {
  display: grid;
  gap: 14px;
}

.auth-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.boot-screen,
.setup-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card,
.setup-card,
.denied-card {
  display: grid;
  gap: 14px;
  text-align: left;
}

.boot-card {
  text-align: center;
}

.orb {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.95), transparent 17%), linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 44px color-mix(in srgb, var(--accent-2), transparent 48%);
}

.boot-card .orb,
.auth-card .orb {
  margin: 0 auto;
}

.eyebrow {
  color: color-mix(in srgb, var(--accent-2), white 20%);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.input,
.select,
.textarea,
.search-box {
  width: 100%;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.82);
  outline: 0;
  padding: 11px 13px;
  transition: 0.18s ease;
}

.input:focus,
.select:focus,
.textarea:focus,
.search-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

.actions,
.table-tools,
.row-actions,
.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.actions,
.table-tools {
  justify-content: flex-end;
}

.table-tools {
  justify-content: space-between;
  margin-bottom: 14px;
}

.title-cell {
  display: grid;
  gap: 4px;
}

.title-cell small {
  color: var(--muted-2);
}

.mini-btn {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.mini-btn.danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
}

.modal-header,
.modal-footer {
  justify-content: space-between;
  padding: 20px 22px;
}

.modal-header {
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.65);
}

.required-star {
  color: var(--danger);
}

.setup-code {
  max-width: 100%;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  color: #e5e7eb;
  background: rgba(15,23,42,0.92);
}

@media (max-width: 720px) {
  .auth-actions {
    grid-template-columns: 1fr;
  }
}

/* Hotfix v0.5 · clases usadas por la versión vanilla password-auth */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: color-mix(in srgb, var(--accent-2), white 24%);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.orb {
  position: absolute;
  width: 220px;
  height: 220px;
  top: -70px;
  right: -55px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2), white 12%), color-mix(in srgb, var(--accent-3), transparent 64%) 48%, transparent 70%);
  filter: blur(1px);
  opacity: 0.72;
}

.card,
.setup-card,
.denied-card,
.boot-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.42);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  border-radius: var(--radius);
}

.card {
  padding: 20px;
}

.card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.setup-screen,
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.setup-card,
.denied-card,
.boot-card {
  width: min(760px, 100%);
  padding: 28px;
}

.boot-card {
  text-align: center;
}

.boot-card h1,
.setup-card h1,
.denied-card h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.setup-code {
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.auth-form,
.auth-actions {
  display: grid;
  gap: 14px;
}

.auth-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.input,
.select,
.textarea,
.search-box {
  width: 100%;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  outline: 0;
  padding: 11px 13px;
  transition: 0.18s ease;
}

.input:focus,
.select:focus,
.textarea:focus,
.search-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.title-cell {
  display: grid;
  gap: 3px;
}

.title-cell small {
  color: var(--muted-2);
}

.code {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 850;
}

.mini-btn {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 11px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  cursor: pointer;
  font-weight: 850;
}

.mini-btn.danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 22px;
}

.modal-header {
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
}

.modal-header h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.045em;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.65);
}

.required-star {
  color: var(--danger);
}

.select option {
  color: #111827;
}

@media (max-width: 720px) {
  .auth-actions,
  .table-tools {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

/* v0.4.1 runtime compatibility layer */
.card,
.setup-card,
.denied-card,
.boot-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.42);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.setup-card,
.denied-card,
.boot-card {
  width: min(760px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
}

.boot-screen,
.setup-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--accent-2), white 26%);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.orb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 22%, #fff, transparent 18px), linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 42px color-mix(in srgb, var(--accent), transparent 45%);
}

.auth-form,
.auth-actions {
  display: grid;
  gap: 14px;
}

.auth-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  outline: 0;
  padding: 11px 13px;
  transition: 0.18s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

.actions,
.table-tools,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-tools {
  justify-content: space-between;
  margin-bottom: 16px;
}

.search-box {
  width: min(520px, 100%);
  color: var(--ink);
}

.title-cell {
  display: grid;
  gap: 3px;
}

.title-cell small {
  color: var(--muted-2);
}

.code {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 850;
}

.mini-btn {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.mini-btn.danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 22px;
}

.modal-header {
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
}

.modal-header h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.65);
}

.required-star {
  color: var(--danger);
}

.setup-warning {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.18);
  color: var(--text);
}

.setup-code {
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
}

@media (max-width: 720px) {
  .auth-actions {
    grid-template-columns: 1fr;
  }
}


/* v0.5 · filtros pro y formularios pulidos */
.table-card {
  overflow: visible;
}

.filter-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 86%), transparent 16rem),
    rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
}

.filter-main-row,
.quick-filter-row,
.filter-menu-row,
.active-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-main-row {
  justify-content: space-between;
}

.filter-search {
  min-width: min(420px, 100%);
  flex: 1 1 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 17px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.filter-search span {
  color: var(--muted-2);
  font-weight: 950;
}

.filter-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.filter-search input::placeholder {
  color: color-mix(in srgb, var(--muted-2), transparent 12%);
}

.filter-menu {
  position: relative;
}

.filter-menu summary {
  list-style: none;
  user-select: none;
  cursor: pointer;
  padding: 11px 13px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.filter-menu summary::after {
  content: " ▾";
  color: var(--muted-2);
}

.filter-menu[open] summary {
  border-color: color-mix(in srgb, var(--accent), white 15%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 84%);
}

.filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: min(320px, calc(100vw - 48px));
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 18px;
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(24px);
}

.filter-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-panel-head button {
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  font-size: 12px;
  font-weight: 900;
}

.filter-options {
  display: grid;
  gap: 6px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.filter-option:hover {
  background: color-mix(in srgb, var(--accent-2), transparent 90%);
}

.filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.quick-filter-row {
  justify-content: space-between;
}

.filter-chip-btn,
.active-filter {
  cursor: pointer;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--ink);
  background: rgba(255,255,255,0.68);
  font-size: 12px;
  font-weight: 950;
  transition: 0.18s ease;
}

.filter-chip-btn:hover,
.active-filter:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent), white 18%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent), transparent 80%);
}

.filter-chip-btn.ghost {
  color: var(--muted-2);
  background: rgba(255,255,255,0.42);
}

.filter-count {
  margin-left: auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(255,255,255,0.4);
  font-size: 12px;
  font-weight: 900;
}

.active-filter-row {
  margin: -4px 0 16px;
}

.active-filter {
  color: color-mix(in srgb, var(--accent), black 12%);
  background: color-mix(in srgb, var(--accent), white 88%);
}

@media (max-width: 760px) {
  .filter-toolbar,
  .filter-main-row,
  .quick-filter-row,
  .filter-menu-row {
    align-items: stretch;
  }

  .filter-main-row,
  .quick-filter-row,
  .filter-menu-row {
    flex-direction: column;
  }

  .filter-search,
  .filter-menu,
  .filter-menu summary,
  .filter-chip-btn,
  .filter-count {
    width: 100%;
  }

  .filter-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .filter-count {
    margin-left: 0;
    text-align: center;
  }
}

/* v0.5.0 · Buscador pro y filtros combinables */
.filter-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.40);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 82%), transparent 20rem),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent-3), transparent 86%), transparent 18rem),
    color-mix(in srgb, var(--panel-strong), transparent 8%);
  color: var(--ink);
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(24px);
}

.filter-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(120deg, black, transparent 72%);
}

.filter-panel > * {
  position: relative;
  z-index: 1;
}

.filter-panel-head,
.filter-search-row,
.filter-summary,
.filter-actions,
.filter-groups,
.chip-row,
.filter-group-title {
  display: flex;
  gap: 12px;
}

.filter-panel-head {
  justify-content: space-between;
  align-items: flex-start;
}

.filter-panel h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.filter-panel p {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 14px;
}

.filter-summary,
.filter-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.count-pill.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent), white 18%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent), transparent 68%);
}

.filter-search-row {
  align-items: end;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.38);
}

.filter-search {
  display: grid;
  gap: 7px;
  flex: 1 1 360px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.filter-search .search-box {
  width: 100%;
  color: var(--ink);
  background: rgba(255,255,255,0.82);
}

.filter-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.filter-group {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.36);
}

.filter-group-title {
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink);
  font-weight: 950;
}

.filter-group-title small {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
}

.chip-row {
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transition: 0.18s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent), white 24%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent), transparent 82%);
}

.filter-chip.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent), white 18%);
  background:
    radial-gradient(circle at 20% 0, rgba(255,255,255,0.44), transparent 42%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent), transparent 68%);
}

@media (max-width: 1180px) {
  .filter-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .filter-panel-head,
  .filter-search-row,
  .filter-summary,
  .filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions .mini-btn,
  .filter-summary .count-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* v0.5.2 · estabilidad UI: filtros flotantes, búsqueda sin salto y tema en topbar */
.card.table-card {
  overflow: visible !important;
}

.topbar-actions {
  align-items: center;
  justify-content: flex-end;
}

.theme-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 72%), transparent 7rem),
    rgba(255,255,255,0.10);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.14);
  backdrop-filter: blur(18px);
  white-space: nowrap;
}

.theme-action span {
  color: color-mix(in srgb, var(--text), transparent 12%);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-action-select {
  min-width: 168px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,0.10);
  outline: 0;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 850;
}

.theme-action-select option {
  color: #111827;
}

.bo-filter-toolbar {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  overflow: visible;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 22px;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 84%), transparent 18rem),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent-3), transparent 88%), transparent 16rem),
    rgba(255,255,255,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  backdrop-filter: blur(18px);
}

.bo-filter-top,
.bo-filter-bottom,
.bo-filter-dropdown-row,
.bo-filter-presets {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bo-filter-top,
.bo-filter-bottom {
  justify-content: space-between;
}

.bo-filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 390px;
  min-width: min(390px, 100%);
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 17px;
  color: var(--ink);
  background: rgba(255,255,255,0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58);
}

.bo-filter-search-icon {
  color: var(--muted-2);
  font-weight: 950;
}

.bo-filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.bo-filter-search input::placeholder {
  color: color-mix(in srgb, var(--muted-2), transparent 15%);
}

.bo-filter-dropdown-row {
  position: relative;
  overflow: visible;
  justify-content: flex-end;
}

.bo-filter-dropdown {
  position: relative;
  display: inline-flex;
  min-width: 0;
  overflow: visible;
}

.bo-filter-summary {
  list-style: none;
  user-select: none;
  cursor: pointer;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  white-space: nowrap;
}

.bo-filter-summary::-webkit-details-marker {
  display: none;
}

.bo-filter-summary::after {
  content: " ▾";
  color: var(--muted-2);
}

.bo-filter-dropdown[open] {
  z-index: 1000;
}

.bo-filter-dropdown[open] .bo-filter-summary {
  border-color: color-mix(in srgb, var(--accent), white 15%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 84%), 0 14px 36px rgba(15,23,42,0.12);
}

.bo-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1001;
  width: min(330px, calc(100vw - 56px));
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 18px;
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(24px);
}

.bo-filter-dropdown:last-child .bo-filter-popover,
.bo-filter-dropdown:nth-last-child(2) .bo-filter-popover {
  right: 0;
  left: auto;
}

.bo-filter-popover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.bo-filter-popover-head button {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  font-size: 12px;
  font-weight: 950;
}

.bo-filter-options {
  display: grid;
  gap: 6px;
}

.bo-filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.bo-filter-option:hover {
  background: color-mix(in srgb, var(--accent-2), transparent 90%);
}

.bo-filter-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.bo-filter-chip-btn,
.bo-filter-count {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--ink);
  background: rgba(255,255,255,0.68);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.bo-filter-chip-btn {
  cursor: pointer;
  transition: 0.18s ease;
}

.bo-filter-chip-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent), white 18%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent), transparent 80%);
}

.bo-filter-chip-btn.ghost {
  color: var(--muted-2);
  background: rgba(255,255,255,0.42);
}

.bo-filter-count {
  margin-left: auto;
  color: var(--muted-2);
  background: rgba(255,255,255,0.42);
}

.active-filter-row {
  position: relative;
  z-index: 15;
}

.active-filter {
  cursor: pointer;
}

@media (max-width: 980px) {
  .topbar-actions {
    justify-content: flex-start;
  }

  .theme-action,
  .theme-action-select {
    width: 100%;
  }

  .theme-action {
    justify-content: space-between;
  }

  .bo-filter-top,
  .bo-filter-bottom,
  .bo-filter-dropdown-row,
  .bo-filter-presets {
    align-items: stretch;
    flex-direction: column;
  }

  .bo-filter-search,
  .bo-filter-dropdown,
  .bo-filter-summary,
  .bo-filter-chip-btn,
  .bo-filter-count {
    width: 100%;
  }

  .bo-filter-count {
    margin-left: 0;
    text-align: center;
  }

  .bo-filter-popover,
  .bo-filter-dropdown:last-child .bo-filter-popover,
  .bo-filter-dropdown:nth-last-child(2) .bo-filter-popover {
    right: auto;
    left: 0;
    width: min(100%, calc(100vw - 56px));
  }
}

/* v0.6.0 · usuario centrado en cabecera y Banco de Actas */
.page-user-panel {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 18px;
}

.page-user-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: min(760px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-2), transparent 72%), transparent 10rem),
    rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(22px);
}

.page-user-chip strong {
  max-width: min(48vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 950;
}

.page-user-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok), transparent 78%), 0 0 20px var(--ok);
}

.page-user-chip .pill-row {
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  .page-user-chip {
    width: 100%;
    align-items: flex-start;
    border-radius: 22px;
    flex-direction: column;
  }

  .page-user-chip strong {
    max-width: 100%;
  }

  .page-user-chip .pill-row {
    flex-wrap: wrap;
  }
}


/* v0.7.0 · cabecera alineada, ordenar, columnas anchas y multiselección */
.topbar-with-user { align-items: flex-start; }
.topbar-copy { min-width: min(460px, 100%); }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; min-width: min(760px, 100%); }
.topbar-with-user .page-user-chip { margin: 0; min-height: 46px; flex: 0 1 auto; }
.page-user-panel { display: contents; margin: 0; }
.module-tools { align-items: center; }
.module-tools-left, .bo-filter-primary-controls { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.module-tools-left .search-box { flex: 1 1 320px; min-width: min(320px, 100%); }
.bo-filter-primary-controls .bo-filter-search { flex: 1 1 390px; min-width: min(390px, 100%); }
.bo-sort-control { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 8px 6px 12px; border: 1px solid rgba(100, 116, 139, 0.22); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,0.72); box-shadow: 0 10px 24px rgba(15,23,42,0.08); white-space: nowrap; }
.bo-sort-control span { color: var(--muted-2); font-size: 12px; font-weight: 950; letter-spacing: 0.04em; text-transform: uppercase; }
.bo-sort-control select { min-width: 210px; border: 1px solid rgba(100, 116, 139, 0.2); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,0.86); outline: 0; padding: 8px 10px; cursor: pointer; font-weight: 850; }
.bo-filter-sort { flex: 0 0 auto; }
.bo-table-cell.bo-col-xl { min-width: 360px; width: 360px; max-width: 460px; }
.bo-table-cell.bo-cell-text, .bo-table-cell.bo-col-xl { line-height: 1.35; }
.bo-table-cell.bo-col-xl .title-cell strong, .bo-table-cell.bo-col-xl { overflow-wrap: anywhere; }
.multi-select-dropdown { position: relative; overflow: visible; }
.multi-select-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; width: 100%; padding: 11px 13px; border: 1px solid rgba(100, 116, 139, 0.24); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,0.82); cursor: pointer; font-weight: 850; }
.multi-select-summary::-webkit-details-marker { display: none; }
.multi-select-summary::after { content: "▾"; color: var(--muted-2); margin-left: 10px; }
.multi-select-dropdown[open] .multi-select-summary { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%); }
.multi-select-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 2000; width: min(360px, calc(100vw - 56px)); max-height: 320px; overflow: auto; padding: 12px; border: 1px solid rgba(100, 116, 139, 0.24); border-radius: 18px; color: var(--ink); background: var(--panel-strong); box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24); backdrop-filter: blur(24px); }
.multi-select-options { display: grid; gap: 6px; }
.multi-select-option { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 12px; font-size: 13px; font-weight: 800; cursor: pointer; }
.multi-select-option:hover { background: color-mix(in srgb, var(--accent-2), transparent 90%); }
.multi-select-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--accent); }
@media (max-width: 1180px) { .topbar-with-user, .topbar-right { align-items: flex-start; flex-direction: column; } .topbar-right, .topbar-actions, .topbar-with-user .page-user-chip { width: 100%; } .topbar-actions { justify-content: flex-start; } }
@media (max-width: 760px) { .module-tools-left, .bo-filter-primary-controls { flex-direction: column; align-items: stretch; width: 100%; } .bo-sort-control, .bo-sort-control select, .module-tools-left .search-box, .bo-filter-primary-controls .bo-filter-search { width: 100%; min-width: 0; } .bo-table-cell.bo-col-xl { min-width: 280px; width: 280px; } }


/* v0.7.1 · ajustes finales de cabecera, ordenar, columnas anchas y multiselección */
.topbar-unified {
  align-items: flex-start;
}

.topbar-title-block {
  min-width: min(460px, 100%);
}

.topbar-unified .topbar-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 74px;
}

.topbar-user-chip {
  margin: 0;
  min-height: 46px;
  flex: 0 1 auto;
  align-self: center;
}

.table-search-sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.table-search-sort-row .search-box {
  flex: 1 1 340px;
  min-width: min(340px, 100%);
}

.bo-filter-top {
  align-items: center;
}

.bo-filter-top .bo-filter-search {
  flex: 1 1 380px;
}

.sort-control,
.bo-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  white-space: nowrap;
}

.sort-control span,
.bo-sort-control span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sort-select,
.bo-sort-select,
.bo-sort-control select {
  min-width: 220px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.86);
  outline: 0;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 850;
}

.bo-table-cell.bo-col-xl,
.bo-table-cell.col-title,
.bo-table-cell.col-comments {
  min-width: 360px;
  width: 360px;
  max-width: 480px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-table-cell.bo-col-lg,
.bo-table-cell.col-risk,
.bo-table-cell.col-mitigation_plan {
  min-width: 300px;
  width: 300px;
  max-width: 440px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-cell-people,
.multi-value-list {
  min-width: 160px;
}

.multi-value-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.multi-value-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted-2);
  border: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(100, 116, 139, 0.08);
}

.multi-select-field,
.multi-select-dropdown {
  position: relative;
  overflow: visible;
}

.multi-select-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.82);
  cursor: pointer;
  font-weight: 850;
}

.multi-select-summary::-webkit-details-marker {
  display: none;
}

.multi-select-summary::after {
  content: "▾";
  color: var(--muted-2);
  margin-left: 10px;
}

.multi-select-field[open] .multi-select-summary,
.multi-select-dropdown[open] .multi-select-summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 82%);
}

.multi-select-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 2000;
  width: min(380px, calc(100vw - 56px));
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 18px;
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(24px);
}

.multi-select-options {
  display: grid;
  gap: 6px;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.multi-select-option:hover {
  background: color-mix(in srgb, var(--accent-2), transparent 90%);
}

.multi-select-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

@media (max-width: 1180px) {
  .topbar-unified {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-unified .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0;
  }

  .topbar-user-chip {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .table-search-sort-row,
  .bo-filter-top {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .sort-control,
  .bo-sort-control,
  .sort-select,
  .bo-sort-select,
  .table-search-sort-row .search-box,
  .bo-filter-top .bo-filter-search {
    width: 100%;
    min-width: 0;
  }

  .bo-table-cell.bo-col-xl,
  .bo-table-cell.col-title,
  .bo-table-cell.col-comments {
    min-width: 280px;
    width: 280px;
  }
}


/* v0.7.2 · ajuste final de cabecera y anchuras de tabla */
.topbar-with-user {
  align-items: flex-start;
}

.topbar-right {
  min-width: 0 !important;
  max-width: 100%;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

.topbar-right .topbar-actions {
  align-items: center !important;
  flex-wrap: nowrap;
  padding-top: 0 !important;
}

.topbar-user-chip {
  align-self: center;
  max-width: 340px;
}

.topbar-user-chip strong {
  max-width: 190px;
}

.bo-table-cell.bo-col-xl,
th.col-title,
td.col-title,
th.col-comments,
td.col-comments {
  min-width: 360px !important;
  width: 360px !important;
  max-width: 500px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-table-cell.bo-col-lg,
th.col-risk,
td.col-risk,
th.col-mitigation_plan,
td.col-mitigation_plan {
  min-width: 300px !important;
  width: 300px !important;
  max-width: 460px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-cell-people,
.bo-table-cell.col-multiple {
  min-width: 180px;
}

@media (max-width: 1180px) {
  .topbar-right {
    flex-wrap: wrap !important;
    justify-content: flex-start;
  }

  .topbar-right .topbar-actions {
    flex-wrap: wrap;
  }

  .topbar-user-chip {
    max-width: 100%;
  }
}

/* v0.8.0 · columnas anchas en Riesgos/Presupuestos y sincronización visual de presupuestos */
.bo-table-risks .col-project_id,
.bo-table-risks .col-task_id,
.bo-table-budgets .col-project_id,
.bo-table-budgets .col-area,
.bo-table-budgets .col-client_type,
.bo-table-budgets .col-concept {
  min-width: 380px !important;
  width: 380px !important;
  max-width: 560px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-table-budgets .col-concept .title-cell strong {
  line-height: 1.28;
}

@media (max-width: 760px) {
  .bo-table-risks .col-project_id,
  .bo-table-risks .col-task_id,
  .bo-table-budgets .col-project_id,
  .bo-table-budgets .col-area,
  .bo-table-budgets .col-client_type,
  .bo-table-budgets .col-concept {
    min-width: 290px !important;
    width: 290px !important;
  }
}


/* v0.9.0 · paginación, ajustes y pulido modal */
.nav .settings-menu {
  margin-top: 4px;
}

.nav .settings-menu > summary {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 16px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
  list-style: none;
}

.nav .settings-menu > summary::-webkit-details-marker {
  display: none;
}

.nav .settings-menu > summary::after {
  content: "▾";
  margin-left: auto;
  color: color-mix(in srgb, var(--text), transparent 35%);
  transition: transform 0.18s ease;
}

.nav .settings-menu[open] > summary::after {
  transform: rotate(180deg);
}

.nav .settings-menu > summary:hover,
.nav .settings-menu[open] > summary {
  background: rgba(255,255,255,0.12);
}

.settings-menu-panel {
  display: grid;
  gap: 6px;
  padding: 6px 0 0 14px;
}

.settings-menu-panel button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: rgba(255,255,255,0.055);
  cursor: pointer;
  transition: 0.2s ease;
}

.settings-menu-panel button:hover,
.settings-menu-panel button.active {
  background: rgba(255,255,255,0.14);
  transform: translateX(3px);
}

.settings-menu-panel button.active .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 38%);
}

.bo-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}

.bo-page-size {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.bo-page-size span,
.bo-page-counter {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bo-page-size select {
  min-width: 64px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.88);
  outline: 0;
  padding: 8px 9px;
  cursor: pointer;
  font-weight: 900;
}

.bo-page-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.86);
  cursor: pointer;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  transition: 0.18s ease;
}

.bo-page-arrow:not(:disabled):hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent-2), white 72%);
}

.bo-page-arrow:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.bo-page-counter {
  padding: 0 5px;
  white-space: nowrap;
}

.modal-footer .modal-cancel-btn,
.modal-footer .btn.danger.modal-cancel-btn {
  border-color: rgba(239, 68, 68, 0.58);
  background: linear-gradient(135deg, #dc2626, #fb7185);
  color: #fff;
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.22);
}

.modal-footer .modal-cancel-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

@media (max-width: 1180px) {
  .bo-pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .bo-pagination,
  .bo-page-size,
  .bo-page-size select,
  .bo-page-counter {
    width: 100%;
  }

  .bo-page-arrow {
    flex: 1 1 0;
  }

  .settings-menu-panel {
    padding-left: 0;
  }
}


/* v0.9.0 · paginación compacta, ajustes agrupados y botones de modal */
.sidebar-settings {
  display: grid;
  gap: 8px;
}

.sidebar-settings summary {
  list-style: none;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 16px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.sidebar-settings summary::-webkit-details-marker {
  display: none;
}

.sidebar-settings summary:hover,
.sidebar-settings[open] summary {
  background: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.sidebar-settings[open] summary .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 38%);
}

.sidebar-settings-menu {
  display: grid;
  gap: 6px;
  padding: 2px 0 4px 44px;
}

.sidebar-settings-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 14px;
  color: color-mix(in srgb, var(--text), transparent 14%);
  background: rgba(255,255,255,0.055);
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.sidebar-settings-menu button:hover,
.sidebar-settings-menu button.active {
  background: rgba(255,255,255,0.14);
  transform: translateX(3px);
}

.sidebar-settings-menu button .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.sidebar-settings-menu button.active .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent), transparent 44%);
}

.bo-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  max-width: 100%;
}

.bo-page-btn,
.bo-page-arrow {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.86);
  cursor: pointer;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  transition: 0.18s ease;
}

.bo-page-btn:not(:disabled):hover,
.bo-page-arrow:not(:disabled):hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent-2), white 72%);
}

.bo-page-btn:disabled,
.bo-page-arrow:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  transform: none;
}

.bo-page-count,
.bo-page-counter,
.bo-page-range {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bo-page-range {
  opacity: 0.78;
}

.modal-footer .modal-cancel-btn,
.modal-footer .btn.danger.modal-cancel-btn {
  border-color: rgba(239, 68, 68, 0.62) !important;
  background: linear-gradient(135deg, #dc2626, #fb7185) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.22);
}

.modal-footer .modal-cancel-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
}

@media (max-width: 760px) {
  .sidebar-settings-menu {
    padding-left: 0;
  }

  .bo-pagination {
    width: 100%;
    flex-wrap: wrap;
  }

  .bo-page-size,
  .bo-page-size select,
  .bo-page-count,
  .bo-page-counter,
  .bo-page-range {
    flex: 1 1 auto;
  }

  .bo-page-btn,
  .bo-page-arrow {
    flex: 0 0 44px;
  }
}

/* v0.9.0b · compatibilidad con clases finales de JS */
.sidebar-settings {
  display: grid;
  gap: 8px;
}

.sidebar-settings-summary {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 16px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
  text-align: left;
  list-style: none;
}

.sidebar-settings-summary::-webkit-details-marker {
  display: none;
}

.sidebar-settings-summary::after {
  content: "▾";
  margin-left: auto;
  color: color-mix(in srgb, var(--text), transparent 32%);
  transition: transform 0.18s ease;
}

.sidebar-settings[open] .sidebar-settings-summary::after {
  transform: rotate(180deg);
}

.sidebar-settings-summary:hover,
.sidebar-settings[open] .sidebar-settings-summary,
.sidebar-settings.active .sidebar-settings-summary {
  background: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.sidebar-settings[open] .sidebar-settings-summary .nav-icon,
.sidebar-settings.active .sidebar-settings-summary .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 38%);
}

.sidebar-settings-menu {
  display: grid;
  gap: 7px;
  margin: 2px 0 4px 44px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}

.sidebar-settings-item {
  width: 100%;
  padding: 9px 11px !important;
  border-radius: 13px !important;
  color: color-mix(in srgb, var(--text), transparent 18%) !important;
  background: rgba(255,255,255,0.06) !important;
  text-align: left;
  font-weight: 850;
  transition: 0.18s ease;
}

.sidebar-settings-item:hover,
.sidebar-settings-item.active {
  color: var(--text) !important;
  background: rgba(255,255,255,0.14) !important;
  transform: none !important;
}

.bo-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
  color: var(--ink);
}

.bo-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  white-space: nowrap;
}

.bo-page-size span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bo-page-size select {
  min-width: 74px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.9);
  outline: 0;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
}

.bo-page-arrow {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  cursor: pointer;
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
  transition: 0.18s ease;
}

.bo-page-arrow:not(:disabled):hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent-2), white 78%);
}

.bo-page-arrow:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.bo-page-counter,
.bo-page-range {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(255,255,255,0.58);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .bo-pagination {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .bo-page-size,
  .bo-page-counter,
  .bo-page-range,
  .bo-page-arrow {
    width: 100%;
    justify-content: center;
  }

  .sidebar-settings-menu {
    margin-left: 24px;
  }
}

/* v0.9.0 · paginación, ajustes y modal cancel visible */
.nav-settings {
  display: grid;
  gap: 8px;
}

.nav-settings-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 16px;
  color: color-mix(in srgb, var(--text), transparent 12%);
  background: transparent;
  cursor: pointer;
  list-style: none;
  transition: 0.2s ease;
  font-weight: 850;
}

.nav-settings-summary::-webkit-details-marker {
  display: none;
}

.nav-settings-summary::after {
  content: "▾";
  margin-left: auto;
  color: color-mix(in srgb, var(--text), transparent 34%);
  font-size: 12px;
  transition: transform 0.18s ease;
}

.nav-settings[open] .nav-settings-summary::after {
  transform: rotate(180deg);
}

.nav-settings-summary:hover,
.nav-settings-summary.active {
  background: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.nav-settings-summary.active .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 38%);
}

.nav-submenu {
  display: grid;
  gap: 6px;
  padding: 4px 0 4px 44px;
}

.nav-subitem {
  width: 100%;
  padding: 9px 12px;
  border-radius: 13px;
  text-align: left;
  color: color-mix(in srgb, var(--text), transparent 18%);
  background: rgba(255,255,255,0.055);
  cursor: pointer;
  font-weight: 800;
  transition: 0.18s ease;
}

.nav-subitem:hover,
.nav-subitem.active {
  color: var(--text);
  background: rgba(255,255,255,0.14);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 18px;
  background: rgba(255,255,255,0.11);
  backdrop-filter: blur(18px);
}

.pagination-left,
.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pagination-size-control select {
  min-width: 76px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255,255,255,0.12);
  padding: 0 10px;
  font-weight: 900;
  outline: none;
}

.pagination-size-control select option {
  color: #111827;
}

.pagination-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255,255,255,0.13);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.12);
  cursor: pointer;
  font-weight: 950;
  transition: 0.18s ease;
}

.pagination-arrow:not(:disabled):hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent), transparent 72%);
}

.pagination-arrow:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.pagination-counter,
.pagination-range {
  color: color-mix(in srgb, var(--text), transparent 10%);
  font-size: 13px;
  font-weight: 850;
}

.pagination-range {
  color: color-mix(in srgb, var(--text), transparent 28%);
  white-space: nowrap;
}

.modal-cancel-btn {
  border-color: rgba(239, 68, 68, 0.64) !important;
  background: linear-gradient(135deg, #dc2626, #fb7185) !important;
  color: #fff !important;
}

.modal-cancel-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
}

@media (max-width: 760px) {
  .pagination-bar,
  .pagination-left {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-bar {
    justify-content: flex-start;
  }

  .pagination-buttons,
  .pagination-size-control {
    width: 100%;
  }

  .pagination-size-control select {
    flex: 1;
  }

  .pagination-range {
    white-space: normal;
  }
}


/* v1.0.1 · paginación legible y cambio de contraseña */
.pagination-bar {
  color: #111827 !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.10);
}

.pagination-size-control,
.pagination-size-control span,
.pagination-counter,
.pagination-range {
  color: #111827 !important;
}

.pagination-size-control select,
.pagination-arrow {
  color: #111827 !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

.pagination-size-control select option {
  color: #111827 !important;
  background: #ffffff !important;
}

.pagination-arrow:not(:disabled):hover {
  color: #111827 !important;
  background: color-mix(in srgb, var(--accent-2), white 78%) !important;
}

.pagination-arrow:disabled {
  color: rgba(17, 24, 39, 0.40) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

.password-modal {
  width: min(720px, 100%);
}

.password-change-copy {
  margin: 22px 22px 0;
  padding: 16px 18px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.86);
}

.password-change-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.password-change-copy p,
.password-modal .modal-subtitle,
.password-modal .field-hint {
  color: var(--muted-2);
  line-height: 1.5;
}

.password-btn {
  min-width: 150px;
  justify-content: center;
  white-space: nowrap;
  color: #0f172a;
  border-color: rgba(14, 165, 233, 0.34);
  background: rgba(240, 249, 255, 0.94);
}

.password-btn:not(:disabled):hover {
  color: #075985;
  background: rgba(224, 242, 254, 0.98);
}

.password-btn:disabled {
  opacity: 0.50;
  cursor: not-allowed;
  filter: grayscale(0.2);
  transform: none !important;
}

.col-password-action {
  min-width: 190px;
}

.status-box.warn {
  margin: 16px 22px 0;
}

@media (max-width: 760px) {
  .password-btn {
    min-width: 0;
    width: 100%;
  }
}

/* v1.1.0 · Dashboard avanzado y Roadmap por tareas */
.dashboard-kpis {
  margin-bottom: 18px;
}

.dashboard-grid-main,
.dashboard-grid-secondary,
.roadmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.dashboard-grid-secondary {
  margin-top: 18px;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-card-head h3,
.roadmap-table-card h3 {
  margin: 0 0 6px;
}

.dashboard-controls {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-controls label {
  min-width: 210px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 850;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-select {
  min-height: 42px;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
}

.dashboard-chart-shell {
  display: grid;
  gap: 16px;
}

.dashboard-chart-title {
  display: grid;
  gap: 4px;
}

.dashboard-chart-title strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.dashboard-chart-title small,
.dashboard-side-card .muted,
.dashboard-card-head .muted {
  color: var(--muted-2);
}

.bo-bar-chart {
  display: grid;
  gap: 11px;
}

.bo-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(180px, 1fr) minmax(64px, auto);
  gap: 12px;
  align-items: center;
}

.bo-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 800;
}

.bo-bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: color-mix(in srgb, var(--accent), transparent 88%);
}

.bo-bar-fill {
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent), transparent 45%);
}

.bo-bar-value {
  color: var(--ink);
  font-weight: 950;
  text-align: right;
}

.dashboard-completion-lists {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.responsible-score-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(15,23,42,0.08);
}

.responsible-score-card h4 {
  margin: 0;
  color: var(--ink);
}

.responsible-score-list {
  display: grid;
  gap: 8px;
}

.responsible-score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}

.responsible-score-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responsible-score-row strong {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.dashboard-table .title-cell small {
  display: block;
  margin-top: 3px;
}

.dashboard-risk-stack {
  margin-top: 6px;
}

.dashboard-risk-item {
  background: rgba(255,255,255,0.66);
}

.compact-empty,
.dashboard-empty-chart {
  padding: 12px;
  min-height: auto;
}

.roadmap-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.roadmap-control-card {
  margin-bottom: 18px;
}

.roadmap-board-card,
.roadmap-table-card {
  min-width: 0;
}

.roadmap-board {
  display: grid;
  gap: 12px;
}

.roadmap-task-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 20px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(15,23,42,0.08);
  border-left: 7px solid var(--accent);
  box-shadow: 0 12px 30px rgba(2,6,23,0.08);
}

.roadmap-task-card.done { border-left-color: var(--ok); }
.roadmap-task-card.progress { border-left-color: var(--info); }
.roadmap-task-card.watch { border-left-color: var(--warn); }
.roadmap-task-card.blocked { border-left-color: var(--danger); }
.roadmap-task-card.cancelled { border-left-color: var(--muted-2); }
.roadmap-task-card.pending { border-left-color: var(--accent); }

.roadmap-task-head,
.roadmap-task-foot,
.roadmap-task-meta,
.roadmap-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.roadmap-task-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.roadmap-task-head small,
.roadmap-task-meta {
  color: var(--muted-2);
  font-weight: 750;
}

.roadmap-mini-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
}

.roadmap-mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.roadmap-visual-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.12);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.roadmap-visual-pill i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.roadmap-visual-pill.done i { background: var(--ok); box-shadow: 0 0 14px var(--ok); }
.roadmap-visual-pill.progress i { background: var(--info); box-shadow: 0 0 14px var(--info); }
.roadmap-visual-pill.watch i { background: var(--warn); box-shadow: 0 0 14px var(--warn); }
.roadmap-visual-pill.blocked i { background: var(--danger); box-shadow: 0 0 14px var(--danger); }
.roadmap-visual-pill.cancelled i { background: var(--muted-2); box-shadow: 0 0 14px var(--muted-2); }
.roadmap-visual-pill.pending i { background: var(--accent); box-shadow: 0 0 14px var(--accent); }

.roadmap-table {
  min-width: 1320px;
}

.roadmap-project-cell {
  min-width: 240px;
}

.roadmap-task-cell {
  min-width: 320px;
}

.roadmap-table-wrap .progress-cell {
  min-width: 140px;
}

@media (max-width: 1180px) {
  .dashboard-grid-main,
  .dashboard-grid-secondary,
  .roadmap-layout {
    grid-template-columns: 1fr;
  }

  .roadmap-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-card-head,
  .dashboard-controls {
    align-items: stretch;
    justify-content: stretch;
  }

  .dashboard-controls label {
    width: 100%;
    min-width: 0;
  }

  .bo-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bo-bar-value {
    text-align: left;
  }

  .roadmap-kpis {
    grid-template-columns: 1fr;
  }
}


/* v1.2.0 · Roadmap, filtros y paginación */
.roadmap-control-card,
.card.roadmap-control-card {
  position: relative;
  z-index: 120;
  overflow: visible !important;
}

.roadmap-control-card .bo-filter-toolbar,
.roadmap-control-card .bo-filter-dropdown-row,
.roadmap-control-card .bo-filter-dropdown {
  z-index: 2500;
  overflow: visible !important;
}

.roadmap-control-card .bo-filter-dropdown[open] {
  z-index: 5000;
}

.roadmap-control-card .bo-filter-popover {
  z-index: 5100;
}

.roadmap-layout,
.roadmap-board-card,
.roadmap-table-card {
  position: relative;
  z-index: 1;
}

.roadmap-table-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.roadmap-table-headline h3 {
  margin-bottom: 4px;
}

.roadmap-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(100,116,139,0.20);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}

.roadmap-pager .pagination-range {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 860px) {
  .roadmap-table-headline {
    flex-direction: column;
    align-items: stretch;
  }

  .roadmap-pager {
    justify-content: space-between;
  }
}


/* v1.3.0 · pulidos de tablas y filtro por proyecto en Tareas */
.bo-table-projects .col-name,
.bo-table-projects .bo-col-project-title {
  min-width: 480px !important;
  width: 480px !important;
  max-width: 640px !important;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.bo-table-tasks .col-project_id,
.bo-table-tasks .bo-col-project-wide {
  min-width: 480px !important;
  width: 480px !important;
  max-width: 640px !important;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.bo-table-tasks th.col-description,
.bo-table-tasks td.col-description,
.bo-table-tasks th.col-comments,
.bo-table-tasks td.col-comments {
  min-width: 360px !important;
  width: 360px !important;
  max-width: 500px !important;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-table-tasks th.col-deliverable,
.bo-table-tasks td.col-deliverable {
  min-width: 150px !important;
  width: 150px !important;
  white-space: nowrap;
}

.bo-table-tasks td.col-deliverable a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent), transparent 66%);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.bo-table-tasks td.col-deliverable a:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 760px) {
  .bo-table-projects .col-name,
  .bo-table-projects .bo-col-project-title,
  .bo-table-tasks .col-project_id,
  .bo-table-tasks .bo-col-project-wide,
  .bo-table-tasks th.col-description,
  .bo-table-tasks td.col-description,
  .bo-table-tasks th.col-comments,
  .bo-table-tasks td.col-comments {
    min-width: 290px !important;
    width: 290px !important;
  }
}


/* v1.4.0 · Botones de enlace unificados y columnas nuevas del índice documental */
.open-link-btn,
.bo-table td.bo-cell-link a.open-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent), transparent 66%);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.open-link-btn:hover,
.bo-table td.bo-cell-link a.open-link-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.bo-table-documents th.col-category,
.bo-table-documents td.col-category,
.bo-table-documents th.col-resource_type,
.bo-table-documents td.col-resource_type {
  min-width: 240px !important;
  width: 240px !important;
  max-width: 320px !important;
  white-space: normal;
}

.bo-table-documents th.col-document_name,
.bo-table-documents td.col-document_name,
.bo-table-documents th.col-purpose,
.bo-table-documents td.col-purpose,
.bo-table-documents th.col-questions,
.bo-table-documents td.col-questions {
  min-width: 320px !important;
  width: 320px !important;
  max-width: 460px !important;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bo-table-documents th.col-link,
.bo-table-documents td.col-link,
.bo-table-meeting_minutes th.col-link,
.bo-table-meeting_minutes td.col-link {
  min-width: 140px !important;
  width: 140px !important;
  white-space: nowrap;
}

/* Dedicación Operativa · v1.5.0 */
.dedication-hero,
.dedication-active-card,
.dedication-panel-card,
.dedication-help-card,
.dedication-summary-card {
  color: var(--ink);
}

.dedication-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 16px;
  overflow: visible;
}

.dedication-hero-copy h3,
.dedication-active-card h3,
.dedication-panel-card h3,
.dedication-summary-card h3,
.dedication-help-card h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.dedication-person-picker {
  width: min(320px, 100%);
  display: grid;
  gap: 7px;
}

.dedication-person-picker label,
.dedication-field span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dedication-active-card {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 16px;
  border-width: 1px;
}

.dedication-active-card.is-active {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ok), white 88%), rgba(255,255,255,0.92));
  border-color: color-mix(in srgb, var(--ok), white 58%);
}

.dedication-active-card.is-warning {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--warn), white 82%), rgba(255,255,255,0.92));
  border-color: color-mix(in srgb, var(--warn), white 45%);
}

.dedication-active-card.is-idle {
  background: rgba(255,255,255,0.78);
}

.dedication-active-main {
  min-width: 0;
  flex: 1;
}

.dedication-active-title,
.dedication-review-title,
.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dedication-active-grid,
.dedication-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dedication-mini-fact {
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.58);
}

.dedication-mini-fact span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dedication-mini-fact strong {
  display: block;
  color: var(--ink);
  line-height: 1.25;
}

.dedication-comment,
.dedication-manual-reason {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.6);
}

.dedication-active-actions {
  width: min(240px, 100%);
  display: grid;
  align-content: center;
  gap: 10px;
}

.dedication-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.dedication-tab {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.11);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.12);
}

.dedication-tab:hover,
.dedication-tab.active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.dedication-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}

.dedication-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dedication-field {
  display: grid;
  gap: 7px;
}

.dedication-field.full,
.dedication-actions.full {
  grid-column: 1 / -1;
}

.dedication-field .input,
.dedication-field select,
.dedication-field input,
.dedication-field textarea,
.dedication-person-picker .input,
.dedication-review-actions textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.86);
  padding: 11px 12px;
  outline: none;
}

.dedication-field textarea,
.dedication-review-actions textarea {
  min-height: 92px;
  resize: vertical;
}

.dedication-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dedication-help-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dedication-help-list div {
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.58);
  color: var(--ink);
}

.dedication-review-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.dedication-review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
}

.dedication-review-main,
.dedication-review-actions {
  min-width: 0;
}

.dedication-review-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dedication-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
}

.dedication-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dedication-summary-list,
.dedication-session-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dedication-summary-row,
.dedication-session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.6);
}

.dedication-session-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
}

.dedication-session-row.is-warning {
  border-color: color-mix(in srgb, var(--warn), white 45%);
  background: color-mix(in srgb, var(--warn), white 84%);
}

@media (max-width: 1180px) {
  .dedication-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dedication-active-grid,
  .dedication-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .dedication-hero,
  .dedication-active-card,
  .dedication-review-card {
    display: grid;
  }

  .dedication-active-actions,
  .dedication-person-picker {
    width: 100%;
  }

  .dedication-layout,
  .dedication-dashboard-grid,
  .dedication-form {
    grid-template-columns: 1fr;
  }

  .dedication-kpis {
    grid-template-columns: 1fr;
  }

  .dedication-active-grid,
  .dedication-review-grid {
    grid-template-columns: 1fr;
  }
}

/* Dedicación Operativa · v1.1.0 */
.dedication-export-card {
  color: var(--ink);
  margin-bottom: 16px;
}

.dedication-export-form {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto;
  align-items: end;
  gap: 14px;
  margin-top: 14px;
}

.dedication-export-actions {
  display: flex;
  align-items: end;
  min-height: 67px;
}

.dedication-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dedication-list-head h3 {
  margin: 0;
}

.dedication-list-head p {
  margin: 4px 0 0;
}

.dedication-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dedication-pager .mini-btn {
  min-width: 34px;
  min-height: 30px;
  border-radius: 999px;
}

.dedication-session-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dedication-session-meta,
.dedication-session-comment {
  display: block;
  line-height: 1.35;
}

.dedication-session-comment {
  color: var(--ink) !important;
  opacity: 0.86;
}

.dedication-latest-card {
  min-width: 0;
}

@media (max-width: 860px) {
  .dedication-export-form {
    grid-template-columns: 1fr;
  }

  .dedication-export-actions {
    min-height: 0;
  }

  .dedication-list-head {
    display: grid;
  }
}

/* v1.1.0 · selector de columnas por módulo */
.bo-column-dropdown {
  position: relative;
  display: inline-flex;
  min-width: 0;
  overflow: visible;
}

.bo-column-summary {
  list-style: none;
  user-select: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  white-space: nowrap;
}

.bo-column-summary::-webkit-details-marker {
  display: none;
}

.bo-column-summary::after {
  content: "▾";
  color: var(--muted-2);
  margin-left: 2px;
}

.bo-column-summary span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bo-column-summary strong {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 88%);
  font-size: 11px;
  font-weight: 950;
}

.bo-column-dropdown[open] {
  z-index: 1200;
}

.bo-column-dropdown[open] .bo-column-summary {
  border-color: color-mix(in srgb, var(--accent), white 15%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 84%), 0 14px 36px rgba(15,23,42,0.12);
}

.bo-column-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1201;
  width: min(380px, calc(100vw - 56px));
  max-height: 430px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 18px;
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(24px);
}

.bo-filter-dropdown-row .bo-column-popover {
  right: 0;
  left: auto;
}

.module-tools-left .bo-column-popover {
  left: auto;
  right: 0;
}

.bo-column-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bo-column-popover-head strong,
.bo-column-popover-head small {
  display: block;
}

.bo-column-popover-head small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
}

.bo-column-popover-head button {
  cursor: pointer;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  font-size: 12px;
  font-weight: 950;
}

.bo-column-help {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.35;
}

.bo-column-options {
  display: grid;
  gap: 6px;
}

.bo-column-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.bo-column-option:hover {
  background: color-mix(in srgb, var(--accent-2), transparent 90%);
}

.bo-column-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bo-column-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.module-tools-left .bo-column-dropdown,
.bo-filter-dropdown-row .bo-column-dropdown {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .bo-column-dropdown,
  .bo-column-summary {
    width: 100%;
  }

  .bo-column-popover {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 56px));
  }
}

/* v1.1.0 · compatibilidad con el componente de columnas */
.bo-column-dropdown {
  position: relative;
  display: inline-flex;
  min-width: 0;
  overflow: visible;
  z-index: 900;
}

.bo-column-dropdown[open] {
  z-index: 5200;
}

.bo-column-dropdown[open] .bo-column-summary {
  border-color: color-mix(in srgb, var(--accent), white 15%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 84%), 0 14px 36px rgba(15,23,42,0.12);
}

.bo-filter-toolbar:has(.bo-column-dropdown[open]),
.table-card:has(.bo-column-dropdown[open]) {
  z-index: 5300;
}

@media (max-width: 760px) {
  .bo-column-dropdown {
    width: 100%;
  }
}

/* Dedicación Operativa · bloqueo de persona por usuario · v1.1.0 */
.dedication-locked-person {
  display: grid;
  gap: 4px;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 74%);
  border-radius: 15px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-2), white 88%), rgba(255,255,255,0.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

.dedication-locked-person strong {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.dedication-locked-person span,
.dedication-locked-note {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dedication-locked-person.form-lock {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), white 90%), rgba(255,255,255,0.88));
}

.dedication-field-locked-person {
  min-width: 0;
}

/* v1.0.0 · Logo real, dashboard en flujo y ajustes de contraste */
.brand-mark.brand-logo {
  overflow: hidden;
  padding: 0;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.56);
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent-2), transparent 56%);
}

.brand-mark.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.brand-mark.brand-logo span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 54%, var(--accent-3));
}

.brand-mark.brand-logo span[hidden] {
  display: none;
}

.dashboard-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.dashboard-primary-stack,
.dashboard-secondary-stack {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.dashboard-project-summary-card,
.dashboard-risk-card {
  min-width: 0;
}

.btn.success {
  border-color: color-mix(in srgb, var(--ok), white 20%);
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.25);
}

.btn.success:hover {
  background: linear-gradient(135deg, #047857, #059669);
}

.btn.success:disabled {
  opacity: 0.48;
  color: rgba(255,255,255,0.82);
}

.auth-card .eyebrow,
.dedication-hero .eyebrow,
.dedication-active-card .eyebrow {
  color: var(--ink) !important;
}

.auth-card h1,
.dedication-hero-copy h3,
.dedication-active-card h3 {
  color: var(--ink) !important;
}

@media (max-width: 1100px) {
  .dashboard-flow-layout {
    grid-template-columns: 1fr;
  }
}


/* Legal / compliance layer · v1.1.0 */
.sidebar-legal {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.legal-settings-summary {
  color: rgba(255,255,255,0.9);
}

.legal-submenu {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.legal-subitem {
  font-size: 12.5px;
  line-height: 1.25;
}

.legal-inline-menu {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 10px;
  color: var(--ink);
}

.legal-inline-menu strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.legal-inline-menu > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-inline-menu button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.legal-inline-menu button:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-1px);
}

.authorized-use-notice {
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.authorized-use-notice strong {
  color: var(--ink);
}

.legal-modal {
  width: min(980px, calc(100vw - 28px));
  max-height: min(88vh, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.legal-modal-header h3,
.legal-modal-header .eyebrow,
.legal-document-header h2,
.legal-document h4 {
  color: var(--ink);
}

.legal-modal-body {
  overflow: auto;
  padding: 22px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
}

.legal-document {
  display: grid;
  gap: 18px;
  color: var(--ink);
}

.legal-document-header {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent-2), transparent 72%), transparent 24rem),
    rgba(255,255,255,0.86);
}

.legal-document-header h2 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.legal-document-header p,
.legal-document-header small {
  color: #334155;
}

.legal-doc-section {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.legal-doc-section h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.legal-doc-section p {
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.6;
}

.legal-doc-section p:last-child {
  margin-bottom: 0;
}

.legal-doc-section ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  line-height: 1.6;
}

.legal-note {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.28);
}

.legal-contact-card {
  display: inline-flex;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.legal-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.legal-role-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248,250,252,0.78);
}

.legal-role-grid strong {
  color: var(--ink);
}

.legal-role-grid span {
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.legal-modal-footer {
  background: rgba(248,250,252,0.94);
}

@media (max-width: 760px) {
  .legal-role-grid {
    grid-template-columns: 1fr;
  }

  .legal-modal-body {
    padding: 14px;
  }
}


/* Legal / compliance polish · v1.2.0 */
.legal-modal .icon-btn,
.legal-modal-footer .btn {
  border-color: rgba(239, 68, 68, 0.74) !important;
  background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 40px rgba(185, 28, 28, 0.26) !important;
}

.legal-modal .icon-btn:hover,
.legal-modal-footer .btn:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626) !important;
  color: #ffffff !important;
}

.legal-facts {
  display: grid;
  gap: 10px;
}

.legal-facts div {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.84);
}

.legal-facts strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-facts span {
  color: #334155;
  line-height: 1.45;
}

/* Legal overlay stacking fix · v1.2.1
   Roadmap usa filtros con z-index alto para que sus desplegables se vean sobre la tabla.
   Los paneles legales y modales deben quedar siempre por encima de cualquier filtro activo. */
#modal-root {
  position: relative;
  z-index: 30000 !important;
}

#modal-root .modal-backdrop {
  z-index: 30000 !important;
  isolation: isolate;
}

#modal-root .modal-backdrop.legal-modal-backdrop {
  z-index: 31000 !important;
}

#modal-root .legal-modal-backdrop .legal-modal {
  position: relative;
  z-index: 31001 !important;
}

#modal-root .legal-modal-backdrop .legal-modal-header,
#modal-root .legal-modal-backdrop .legal-modal-body,
#modal-root .legal-modal-backdrop .legal-modal-footer {
  position: relative;
  z-index: 31002;
}

/* v1.4.0 · Botón rápido para duplicar tareas */
.mini-btn.duplicate {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.36);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(209, 250, 229, 0.86));
}

.mini-btn.duplicate:hover {
  color: #064e3b;
  border-color: rgba(16, 185, 129, 0.54);
  transform: translateY(-1px);
}

/* v1.5.0 · Agenda viva, temas, acuerdos y actas */
.agenda-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.agenda-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.agenda-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.11);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.12);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.agenda-tab strong {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  font-size: 12px;
}

.agenda-tab:hover,
.agenda-tab.active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.agenda-intro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.agenda-intro-card h3 {
  margin: 4px 0 8px;
}

.agenda-intro-card p {
  max-width: 820px;
  margin: 0;
  color: var(--muted-2);
  font-weight: 750;
}

.agenda-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--ink);
  font-weight: 950;
}

.agenda-flow span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.10);
}

.agenda-flow i {
  font-style: normal;
  color: var(--muted-2);
}

.agenda-table-card,
.agenda-board-card,
.agenda-side-card,
.agenda-empty-card {
  min-width: 0;
}

.agenda-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.agenda-section-head h3,
.agenda-side-card h3 {
  margin: 0 0 6px;
}

.agenda-section-head .muted,
.agenda-side-card .muted {
  color: var(--muted-2);
}

.agenda-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.agenda-card-tools {
  margin-bottom: 14px;
}

.agenda-card-grid {
  display: grid;
  gap: 14px;
}

.agenda-topic-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.10);
  border-left: 7px solid var(--accent);
  box-shadow: 0 14px 34px rgba(2,6,23,0.08);
}

.agenda-topic-card.is-meeting { border-left-color: var(--info); }
.agenda-topic-card.is-agreed { border-left-color: var(--ok); }
.agenda-topic-card.is-formalize { border-left-color: var(--warn); }
.agenda-topic-card.is-archived { border-left-color: var(--muted-2); opacity: 0.78; }

.agenda-topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.agenda-topic-head small {
  color: var(--muted-2);
  font-weight: 850;
}

.agenda-topic-head h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.agenda-topic-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agenda-topic-description {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.agenda-topic-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.agenda-topic-meta div {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(15,23,42,0.08);
}

.agenda-topic-meta dt {
  margin: 0 0 4px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agenda-topic-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.agenda-note-block {
  display: grid;
  gap: 6px;
  padding: 13px;
  border-radius: 18px;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  border: 1px solid color-mix(in srgb, var(--accent), transparent 70%);
}

.agenda-note-block strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agenda-note-block p {
  margin: 0;
  line-height: 1.5;
}

.agenda-topic-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.agenda-help-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.agenda-help-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(15,23,42,0.08);
}

.agenda-help-list span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 950;
}

.agenda-help-list p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .agenda-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agenda-board-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .agenda-kpis,
  .agenda-topic-meta {
    grid-template-columns: 1fr;
  }

  .agenda-intro-card,
  .agenda-section-head,
  .agenda-topic-head {
    flex-direction: column;
    align-items: stretch;
  }

  .agenda-flow,
  .agenda-topic-badges,
  .agenda-topic-actions {
    justify-content: flex-start;
  }
}

/* v1.5 · Pulido Agenda: dropdown de columnas, enlace documental y contraste */
.agenda-table-card {
  position: relative;
  overflow: visible !important;
  z-index: 1;
}

.agenda-table-card:has(.bo-column-dropdown[open]) {
  z-index: 26000 !important;
}

.agenda-table-card .table-tools,
.agenda-table-card .module-tools,
.agenda-table-card .module-tools-left,
.agenda-table-card .bo-filter-toolbar,
.agenda-table-card .bo-filter-top,
.agenda-table-card .bo-filter-dropdown-row {
  position: relative;
  overflow: visible !important;
  z-index: 120;
}

.agenda-table-card .bo-column-dropdown[open] {
  position: relative;
  z-index: 27000 !important;
}

.agenda-table-card .bo-column-popover {
  z-index: 27001 !important;
}

.agenda-table-card .table-wrap {
  position: relative;
  z-index: 1;
}

.agenda-intro-card .eyebrow {
  color: #111827 !important;
}

.agenda-document-open-btn {
  min-width: 76px;
}

.open-link-btn.is-disabled,
.open-link-btn.is-disabled:hover {
  cursor: not-allowed;
  color: var(--muted-2) !important;
  background: rgba(100, 116, 139, 0.14);
  box-shadow: none;
  transform: none;
}



/* License ownership layer · v1.5 */
.sidebar-license-card {
  margin-top: 14px;
  padding: 14px;
  display: grid;
  gap: 7px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.16);
  color: var(--text);
}

.sidebar-license-card span {
  color: color-mix(in srgb, var(--accent-2), white 20%);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-license-card strong {
  color: var(--text);
  line-height: 1.25;
}

.sidebar-license-card small {
  color: color-mix(in srgb, var(--text), transparent 22%);
  line-height: 1.35;
}

.sidebar-license-card button {
  width: fit-content;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  color: var(--text);
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.sidebar-license-card button:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.product-license-footer {
  margin-top: 28px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(6, 11, 26, 0.58);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  display: grid;
  gap: 12px;
}

.product-license-footer-copy {
  display: grid;
  gap: 6px;
}

.product-license-footer-copy strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.product-license-footer-copy span {
  max-width: 1100px;
  color: color-mix(in srgb, var(--text), transparent 20%);
  font-size: 13px;
  line-height: 1.45;
}

.product-license-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-license-footer-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: color-mix(in srgb, var(--text), transparent 14%);
  font-size: 12px;
  font-weight: 800;
}

.product-license-footer-link {
  justify-self: start;
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent), transparent 64%);
}

.product-license-footer-link:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.software-license-document .legal-document-header {
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent), transparent 68%), transparent 26rem),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent-2), transparent 70%), transparent 24rem),
    rgba(255,255,255,0.9);
}

.license-highlight-section {
  border-color: rgba(124, 58, 237, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.1), transparent 22rem),
    rgba(255,255,255,0.92);
}

@media (max-width: 760px) {
  .product-license-footer {
    padding: 14px;
  }

  .product-license-footer-link {
    width: 100%;
  }

  .product-license-footer-meta {
    display: grid;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   CRM
   ───────────────────────────────────────────────────────────────────────────── */
.crm-kpis {
  margin-bottom: 18px;
}

.crm-main-tabs {
  margin-bottom: 16px;
}

.crm-intro-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.crm-intro-card h3,
.crm-subsection-head h3,
.crm-side-card h3,
.crm-products-gallery-card h3,
.crm-products-table-card h3 {
  margin: 0;
}

.crm-intro-card p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.crm-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.crm-flow span,
.crm-product-meta span,
.crm-mini-meta {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: color-mix(in srgb, var(--text), transparent 14%);
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
}

.crm-flow i {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.crm-section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.crm-subsection-card,
.crm-side-card,
.crm-products-gallery-card,
.crm-products-table-card {
  min-width: 0;
}

.crm-subsection-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.crm-subsection-head p {
  margin: 7px 0 0;
}

.crm-pill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.crm-pill-tab {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: none;
}

.crm-pill-tab strong {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 12px;
}

.crm-pill-tab:hover,
.crm-pill-tab.active {
  border-color: color-mix(in srgb, var(--accent), transparent 40%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 76%), color-mix(in srgb, var(--accent-2), transparent 82%));
  transform: translateY(-1px);
}

.crm-card-stack {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.crm-lead-card,
.crm-product-card {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  padding: 14px;
  min-width: 0;
}

.crm-lead-card-head,
.crm-product-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.crm-lead-card small,
.crm-product-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.crm-lead-card h4,
.crm-product-card h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.crm-lead-card p,
.crm-product-card p {
  color: color-mix(in srgb, var(--text), transparent 18%);
  line-height: 1.5;
  margin: 12px 0 0;
  font-size: 13px;
}

.crm-lead-meta,
.crm-product-meta,
.crm-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.crm-lead-meta a {
  color: var(--accent-2);
  font-weight: 850;
  word-break: break-all;
}

.crm-card-actions {
  justify-content: flex-start;
}

.field-current-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  font-size: 12px;
}

.field-current-file a {
  color: var(--accent-2);
  font-weight: 900;
}

.crm-products-layout {
  display: grid;
  gap: 18px;
}

.crm-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.crm-product-card {
  padding: 0;
  overflow: hidden;
  display: grid;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent), transparent 84%), transparent 18rem),
    rgba(255,255,255,0.07);
}

.crm-product-card.is-published {
  border-color: color-mix(in srgb, var(--accent), transparent 54%);
}

.crm-product-media {
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.32);
  overflow: hidden;
}

.crm-product-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.crm-product-video-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 6px;
  color: color-mix(in srgb, var(--text), transparent 20%);
}

.crm-product-video-placeholder span {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  font-weight: 900;
}

.crm-product-body {
  padding: 14px;
}

.crm-products-table-card .table-tools,
.crm-products-table-card .module-tools,
.crm-subsection-card .table-tools,
.crm-subsection-card .module-tools {
  position: relative;
  z-index: 3;
}

@media (max-width: 1180px) {
  .crm-section-layout {
    grid-template-columns: 1fr;
  }

  .crm-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .crm-intro-card,
  .crm-subsection-head {
    display: grid;
  }

  .crm-flow {
    justify-content: flex-start;
  }

  .crm-products-grid {
    grid-template-columns: 1fr;
  }

  .crm-pill-tab {
    width: 100%;
    justify-content: space-between;
  }
}

/* CRM público · tarjetas de productos publicadas */
.crm-public-state {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  color: var(--muted, #6b7280);
  background: rgba(255,255,255,0.06);
}

.crm-public-state-error {
  color: #b91c1c;
  border-color: rgba(185,28,28,0.28);
  background: rgba(185,28,28,0.08);
}

.crm-public-product-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  background: rgba(255,255,255,0.07);
}

.crm-public-product-media {
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.18);
}

.crm-public-product-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.crm-public-product-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 8px;
}

.crm-public-product-placeholder span {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.24);
}

.crm-public-product-body {
  padding: 0 18px 18px;
}

.crm-public-product-body h3 {
  margin: 0 0 8px;
}

.crm-public-product-body p {
  margin: 0 0 14px;
}

.crm-public-product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  color: var(--accent-2, #2563eb);
  border: 1px solid currentColor;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Pulido CRM v1.6.2 · legibilidad en negro dentro del panel CRM
   ───────────────────────────────────────────────────────────────────────────── */
.crm-page,
.crm-page .topbar,
.crm-page .card,
.crm-page .crm-intro-card,
.crm-page .crm-subsection-card,
.crm-page .crm-side-card,
.crm-page .crm-products-gallery-card,
.crm-page .crm-products-table-card,
.crm-page .crm-lead-card,
.crm-page .crm-product-card {
  color: #000;
}

.crm-page .topbar h1,
.crm-page .topbar h2,
.crm-page .topbar p,
.crm-page .topbar .eyebrow,
.crm-page .eyebrow,
.crm-page h3,
.crm-page h4,
.crm-page p,
.crm-page small,
.crm-page .muted,
.crm-page .empty-state,
.crm-page .crm-intro-card p,
.crm-page .crm-subsection-head p,
.crm-page .crm-lead-card p,
.crm-page .crm-product-card p,
.crm-page .crm-lead-card small,
.crm-page .crm-product-card small,
.crm-page .crm-flow span,
.crm-page .crm-flow i,
.crm-page .crm-product-meta span,
.crm-page .crm-mini-meta,
.crm-page .kpi-label,
.crm-page .kpi-note,
.crm-page .kpi-value {
  color: #000 !important;
}

.crm-page .crm-pill-tab,
.crm-page .agenda-tab.crm-main-tab {
  color: #000;
  border-color: rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.76);
}

.crm-page .crm-pill-tab strong,
.crm-page .agenda-tab.crm-main-tab strong,
.crm-page .crm-flow span,
.crm-page .crm-product-meta span,
.crm-page .crm-mini-meta {
  color: #000 !important;
  border-color: rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.82);
}

.crm-page .crm-pill-tab:hover,
.crm-page .crm-pill-tab.active,
.crm-page .agenda-tab.crm-main-tab:hover,
.crm-page .agenda-tab.crm-main-tab.active {
  color: #000;
  border-color: rgba(0,0,0,0.28);
  background: rgba(255,255,255,0.92);
}

.crm-page .crm-lead-meta a,
.crm-page .field-current-file a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}
