/* =========================================================================
   Bugus Orchestrator · estilos del admin
   ========================================================================= */
:root {
  --bo-primary:       #6366f1;
  --bo-primary-dark:  #4f46e5;
  --bo-primary-soft:  rgba(99, 102, 241, 0.15);
  --bo-success:       #22c55e;
  --bo-success-soft:  rgba(34, 197, 94, 0.15);
  --bo-warn:          #fbbf24;
  --bo-warn-soft:     rgba(251, 191, 36, 0.15);
  --bo-info:          #38bdf8;
  --bo-info-soft:     rgba(56, 189, 248, 0.15);
  --bo-danger:        #f87171;
  --bo-danger-soft:   rgba(248, 113, 113, 0.15);
  --bo-lan:           #2dd4bf;
  --bo-lan-soft:      rgba(45, 212, 191, 0.12);
  --bo-text:          #f1f5f9;
  --bo-muted:         #94a3b8;
  --bo-soft-muted:    #64748b;
  --bo-bg:            #141922;
  --bo-content-bg:    #1a2030;
  --bo-card:          #1c2333;
  --bo-card-hover:    #222a3a;
  --bo-border:        #2a3344;
  --bo-border-strong: #3d4a5c;
  --bo-input-bg:      #161d28;
  --bo-input-border:  #3d4a5c;
  --bo-input-text:    #f1f5f9;
  --bo-input-placeholder: #64748b;
  --bo-shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.25);
  --bo-shadow:        0 2px 8px rgba(0, 0, 0, 0.35);
  --bo-shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.45);
  --bo-radius:        12px;
  --bo-radius-sm:     8px;
  --bo-radius-lg:     16px;
  --bo-mono:          ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.dark .bo-page,
.bo-page {
  color: var(--bo-text);
}

/* =========================================================================
   Layout principal
   ========================================================================= */
.bo-page {
  padding: 22px 22px 96px;
  max-width: 1500px;
  margin: 0 auto;
}
.bo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.bo-header-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bo-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bo-text);
}
.bo-title small {
  font-weight: 500;
  color: var(--bo-muted);
  font-size: 0.92rem;
  background: var(--bo-bg);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--bo-border);
}
.bo-tag-line { margin: 0; font-size: 0.92rem; }
.bo-muted { color: var(--bo-muted); font-size: 0.85rem; }
.bo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bo-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.bo-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: 999px;
  font-size: 0.8rem;
  box-shadow: var(--bo-shadow-sm);
}
.bo-meta-chip strong { font-weight: 700; color: var(--bo-text); }
.bo-meta-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bo-soft-muted);
  font-weight: 700;
}
.bo-meta-chip--lan { background: var(--bo-lan-soft); border-color: rgba(13, 148, 136, 0.25); }
.bo-meta-chip--lan strong { color: #0f766e; }
.bo-meta-chip--lan .bo-meta-lbl { color: #0d9488; }

.bo-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--bo-primary), #818cf8);
  color: #fff;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.04em;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* =========================================================================
   Botones
   ========================================================================= */
.bo-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--bo-card);
  color: var(--bo-text) !important;
  border: 1px solid var(--bo-border);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: var(--bo-shadow-sm);
}
.bo-btn:hover {
  background: #f1f5f9;
  border-color: var(--bo-border-strong);
  transform: translateY(-1px);
}
.bo-btn:active { transform: translateY(0); }
.bo-btn--sm { padding: 5px 9px; font-size: 0.78rem; border-radius: 8px; }
.bo-btn--primary { background: var(--bo-primary); color: #fff !important; border-color: var(--bo-primary); }
.bo-btn--primary:hover { background: var(--bo-primary-dark); border-color: var(--bo-primary-dark); }
.bo-btn--success { background: var(--bo-success); color: #fff !important; border-color: var(--bo-success); }
.bo-btn--success:hover { background: #15803d; border-color: #15803d; }
.bo-btn--warn { background: var(--bo-warn); color: #fff !important; border-color: var(--bo-warn); }
.bo-btn--warn:hover { background: #d97706; border-color: #d97706; }
.bo-btn--info { background: var(--bo-info); color: #fff !important; border-color: var(--bo-info); }
.bo-btn--info:hover { background: #0284c7; border-color: #0284c7; }

/* =========================================================================
   Badges, pills, dots
   ========================================================================= */
.bg-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.bg-badge.bg-success   { background: var(--bo-success); }
.bg-badge.bg-secondary { background: #64748b; }
.bg-badge.bg-info      { background: var(--bo-info); }
.bg-badge.bg-warning   { background: var(--bo-warn); }
.bg-badge.bg-danger    { background: var(--bo-danger); }
.bg-badge.bg-dark      { background: #0f172a; }

.bo-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}
.bo-pill--running    { background: var(--bo-success-soft); color: #166534; }
.bo-pill--exited     { background: var(--bo-danger-soft); color: #991b1b; }
.bo-pill--restarting { background: var(--bo-warn-soft); color: #92400e; }
.bo-pill--paused     { background: #e2e8f0; color: #334155; }
.bo-pill--unknown    { background: #e2e8f0; color: #334155; }

.bo-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.bo-dot--running {
  background: var(--bo-success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
  animation: bo-pulse 1.8s ease-in-out infinite;
}
@keyframes bo-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.08); }
}
.bo-dot--stopped     { background: #94a3b8; }
.bo-dot--error       { background: var(--bo-danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .18); }
.bo-dot--creando     { background: var(--bo-info); }
.bo-dot--destruyendo { background: var(--bo-warn); }
.bo-dot--desconocido { background: #cbd5e1; }

/* =========================================================================
   KPIs y totales
   ========================================================================= */
.bo-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.bo-kpi {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--bo-shadow);
  transition: transform .15s ease;
}
.bo-kpi:hover { transform: translateY(-2px); }
.bo-kpi .lbl {
  font-size: 0.7rem;
  color: var(--bo-soft-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}
.bo-kpi .val { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1; }
.bo-kpi--ok   .val { color: var(--bo-success); }
.bo-kpi--warn .val { color: var(--bo-warn); }
.bo-kpi--err  .val { color: var(--bo-danger); }

.bo-totals { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.bo-tot {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  min-width: 110px;
  box-shadow: var(--bo-shadow-sm);
}
.bo-tot .lbl {
  font-size: 0.66rem;
  color: var(--bo-soft-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}
.bo-tot .val { font-size: 1.1rem; font-weight: 800; }
.bo-tot--ok   .val { color: var(--bo-success); }
.bo-tot--warn .val { color: var(--bo-warn); }
.bo-tot--err  .val { color: var(--bo-danger); }

/* =========================================================================
   Secciones
   ========================================================================= */
.bo-section { margin-top: 28px; }
.bo-section h2 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--bo-text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.bo-section h2 small { font-weight: 500; }

.bo-grid { display: grid; gap: 16px; }
.bo-grid--rest   { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.bo-grid--access { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }

/* =========================================================================
   Quick start (dashboard)
   ========================================================================= */
.bo-quickstart { margin-bottom: 6px; }
.bo-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.bo-quick-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  text-decoration: none !important;
  color: var(--bo-text) !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow: var(--bo-shadow);
}
.bo-quick-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--bo-shadow-lg);
  border-color: var(--bo-primary);
}
.bo-quick-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bo-primary-soft);
  flex-shrink: 0;
}
.bo-quick-link--business .bo-quick-icon  { background: var(--bo-warn-soft); }
.bo-quick-link--dozzle .bo-quick-icon    { background: #f1f5f9; }
.bo-quick-link--portainer .bo-quick-icon { background: var(--bo-info-soft); }
.bo-quick-link--orchestrator .bo-quick-icon { background: var(--bo-primary-soft); }
.bo-quick-link--simulator .bo-quick-icon   { background: #e8f5e9; }
.bo-quick-icon--orchestrator::after { content: "🛰"; font-size: 1.2rem; }
.bo-quick-icon--business::after { content: "💼"; font-size: 1.2rem; }
.bo-quick-icon--dozzle::after { content: "📜"; font-size: 1.2rem; }
.bo-quick-icon--portainer::after { content: "🐳"; font-size: 1.2rem; }
.bo-quick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bo-quick-text strong { font-weight: 700; font-size: 0.95rem; }
.bo-quick-text .bo-muted {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bo-quick-foot { margin: 10px 0 0; font-size: 0.8rem; }
.bo-quick-foot code {
  background: var(--bo-lan-soft);
  color: #0f766e;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--bo-mono);
  font-size: 0.78rem;
}

/* =========================================================================
   Cards (instancias)
   ========================================================================= */
.bo-card {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 16px;
  box-shadow: var(--bo-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.bo-card:hover { transform: translateY(-2px); box-shadow: var(--bo-shadow-lg); }
.bo-card--off { opacity: .8; }

.bo-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.bo-card-head-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bo-card-title {
  font-weight: 800;
  color: var(--bo-text);
  text-decoration: none !important;
  font-size: 1.02rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.bo-card-title:hover { color: var(--bo-primary); }
.bo-card-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; }
.bo-card-meta .bo-muted { font-size: 0.78rem; }
.bo-trim {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bo-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  flex-shrink: 0;
}
.bo-card-tag--ok  { background: var(--bo-success-soft); color: #166534; }
.bo-card-tag--off { background: var(--bo-danger-soft); color: #991b1b; }

.bo-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  background: var(--bo-bg);
  padding: 10px 12px;
  border-radius: var(--bo-radius-sm);
}
.bo-card-stats > div { display: flex; flex-direction: column; gap: 2px; }
.bo-card-stats .lbl {
  font-size: 0.62rem;
  color: var(--bo-soft-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
}
.bo-card-stats .val { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }

.bo-card-foot {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--bo-border);
}

.bo-eventos {
  background: var(--bo-warn-soft);
  color: #92400e;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}
.bo-card-err pre {
  background: var(--bo-danger-soft);
  color: #991b1b;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  max-height: 120px;
  overflow: auto;
}
.bo-card-err summary, .bo-card-lan summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bo-muted);
  padding: 4px 0;
  list-style: none;
}
.bo-card-err summary::before, .bo-card-lan summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .15s ease;
}
.bo-card-err[open] summary::before, .bo-card-lan[open] summary::before {
  transform: rotate(90deg);
}
.bo-card-lan-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.bo-empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  background: var(--bo-card);
  border: 2px dashed var(--bo-border-strong);
  border-radius: var(--bo-radius-lg);
}
.bo-empty-icon { font-size: 3rem; margin-bottom: 8px; }
.bo-empty h3 { font-weight: 800; margin: 6px 0; }

/* Coloreado del borde segun estado */
.bo-card--running     { border-left: 4px solid var(--bo-success); }
.bo-card--stopped     { border-left: 4px solid #94a3b8; }
.bo-card--error       { border-left: 4px solid var(--bo-danger); }
.bo-card--creando     { border-left: 4px solid var(--bo-info); }
.bo-card--destruyendo { border-left: 4px solid var(--bo-warn); }

/* =========================================================================
   QR cards (acceso desde movil)
   ========================================================================= */
.bo-qr-section .bo-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.bo-qr-card {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--bo-shadow);
  text-align: center;
}
.bo-qr-card strong { font-weight: 700; font-size: 0.95rem; margin-top: 4px; }
.bo-qr-canvas {
  width: 192px;
  height: 192px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  border: 1px solid var(--bo-border);
}
.bo-qr-canvas canvas,
.bo-qr-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
  border: 1px solid var(--bo-border);
}
.bo-qr-url {
  font-family: var(--bo-mono);
  font-size: 0.74rem;
  color: var(--bo-primary);
  text-decoration: none;
  word-break: break-all;
}
.bo-qr-url:hover { text-decoration: underline; }

/* =========================================================================
   Cards de acceso (URLs por servicio)
   ========================================================================= */
.bo-card--access { padding: 14px 16px; gap: 8px; }
.bo-card--access .bo-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.bo-url {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  padding: 5px 8px;
  background: var(--bo-bg);
  border-radius: 8px;
}
.bo-url--lan { background: var(--bo-lan-soft); }
.bo-url-label {
  font-size: 0.62rem;
  color: var(--bo-soft-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .06em;
}
.bo-url--lan .bo-url-label { color: #0d9488; }
.bo-url a {
  color: var(--bo-primary);
  text-decoration: none;
  word-break: break-all;
  font-family: var(--bo-mono);
  font-size: 0.78rem;
}
.bo-url a:hover { text-decoration: underline; }
.bo-url code {
  background: var(--bo-card);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--bo-text);
  font-family: var(--bo-mono);
  border: 1px solid var(--bo-border);
}
.bo-copy {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--bo-border);
  background: var(--bo-card);
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--bo-muted);
  transition: background .12s ease, color .12s ease;
}
.bo-copy:hover { background: #f1f5f9; color: var(--bo-text); }
.bo-copy--ok { background: var(--bo-success-soft) !important; color: #166534 !important; border-color: #86efac !important; }
.bo-copy--inline {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* =========================================================================
   Tabla generica (credenciales)
   ========================================================================= */
.bo-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  overflow: hidden;
  box-shadow: var(--bo-shadow);
}
.bo-table th, .bo-table td {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--bo-border);
  vertical-align: middle;
}
.bo-table th {
  background: var(--bo-bg);
  color: var(--bo-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: .06em;
  width: 220px;
}
.bo-table tr:last-child td { border-bottom: 0; }
.bo-table code {
  background: var(--bo-bg);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: var(--bo-mono);
  border: 1px solid var(--bo-border);
}
.bo-secret { font-family: var(--bo-mono); }

/* =========================================================================
   Forms (logs/filters)
   ========================================================================= */
.bo-form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  padding: 14px;
  border-radius: var(--bo-radius);
  box-shadow: var(--bo-shadow-sm);
}
.bo-form label { display: flex; flex-direction: column; gap: 5px; }
.bo-form-lbl {
  font-size: 0.7rem;
  color: var(--bo-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .06em;
}
.bo-input {
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--bo-border);
  background: var(--bo-card);
  min-width: 160px;
  font-size: 0.9rem;
}
.bo-input:focus { outline: none; border-color: var(--bo-primary); box-shadow: 0 0 0 3px var(--bo-primary-soft); }
.bo-input--num { min-width: 110px; }

/* =========================================================================
   Logs (consola)
   ========================================================================= */
.bo-logs {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: var(--bo-radius);
  max-height: 70vh;
  overflow: auto;
  font-family: var(--bo-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.bo-pre {
  background: var(--bo-danger-soft);
  color: #991b1b;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-family: var(--bo-mono);
  white-space: pre-wrap;
}
.bo-err { color: var(--bo-danger); }

/* =========================================================================
   Disco bar
   ========================================================================= */
.bo-disk {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  padding: 12px 16px;
  border-radius: var(--bo-radius);
  margin-bottom: 22px;
  box-shadow: var(--bo-shadow);
}
.bo-disk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.bo-disk-row strong { font-size: 0.85rem; }
.bo-disk-bar {
  background: var(--bo-bg);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--bo-border);
}
.bo-disk-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--bo-success), var(--bo-warn));
  transition: width .3s ease;
}

/* =========================================================================
   Changelist header / tabla del admin
   ========================================================================= */
.bo-changelist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.bo-changelist-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

#changelist table.table {
  background: var(--bo-card);
  border-radius: var(--bo-radius);
  overflow: hidden;
  box-shadow: var(--bo-shadow);
}
#changelist table.table thead th {
  background: var(--bo-bg);
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--bo-muted);
  letter-spacing: .05em;
  font-weight: 800;
}
#changelist .row-actions { display: inline-flex; gap: 4px; }
#changelist .row-actions .btn {
  padding: 3px 8px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn.btn-sm.btn-success { background: var(--bo-success); border-color: var(--bo-success); color: #fff; }
.btn.btn-sm.btn-warning { background: var(--bo-warn); border-color: var(--bo-warn); color: #fff; }
.btn.btn-sm.btn-info    { background: var(--bo-info); border-color: var(--bo-info); color: #fff; }
.btn.btn-sm.btn-primary { background: var(--bo-primary); border-color: var(--bo-primary); color: #fff; }
.btn.btn-sm.btn-dark    { background: #0f172a; border-color: #0f172a; color: #fff; }

/* =========================================================================
   Login split-screen
   ========================================================================= */
.bo-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--bo-bg);
}
.bo-login-brand {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.bo-login-brand-inner { max-width: 420px; }
.bo-login-logo { display: flex; gap: 16px; align-items: center; margin-bottom: 28px; }
.bo-login-logo h1 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.bo-login-logo p { margin: 4px 0 0; color: #cbd5e1; font-size: 0.95rem; }
.bo-brand-mark--lg { width: 52px; height: 52px; font-size: 1.4rem; }
.bo-login-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bo-login-features li {
  padding-left: 18px;
  position: relative;
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.45;
}
.bo-login-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
}
.bo-login-stats { display: flex; gap: 16px; }
.bo-login-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 100px;
}
.bo-login-stat .val { display: block; font-size: 1.6rem; font-weight: 800; }
.bo-login-stat .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.bo-login-stat--ok .val { color: #86efac; }
.bo-login-form-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
}
.bo-login-form-top {
  position: absolute;
  top: 16px;
  right: 16px;
}
.bo-login-form-card {
  width: 100%;
  max-width: 400px;
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-lg);
  padding: 32px;
  box-shadow: var(--bo-shadow-lg);
}
.bo-login-form-card h2 { margin: 0 0 6px; font-size: 1.35rem; font-weight: 800; }
.bo-login-error {
  background: var(--bo-danger-soft);
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin: 14px 0;
}
.bo-login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.bo-field { display: flex; flex-direction: column; gap: 6px; }
.bo-field span { font-size: 0.78rem; font-weight: 700; color: var(--bo-muted); text-transform: uppercase; letter-spacing: .04em; }
.bo-field input {
  padding: 10px 12px;
  border: 1px solid var(--bo-border);
  border-radius: 8px;
  font-size: 0.95rem;
}
.bo-field input:focus { outline: none; border-color: var(--bo-primary); box-shadow: 0 0 0 3px var(--bo-primary-soft); }
.bo-btn--block { width: 100%; justify-content: center; }

/* Toolbar dashboard */
.bo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bo-toolbar h2 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.bo-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bo-view-toggle {
  display: inline-flex;
  border: 1px solid var(--bo-border);
  border-radius: 8px;
  overflow: hidden;
}
.bo-view-btn {
  border: 0;
  background: var(--bo-card);
  padding: 7px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--bo-muted);
}
.bo-view-btn.is-active { background: var(--bo-primary-soft); color: var(--bo-primary); font-weight: 700; }
.bo-hidden { display: none !important; }
.bo-refresh-badge {
  font-size: 0.78rem;
  background: var(--bo-primary-soft);
  color: var(--bo-primary);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

/* Service pills en tarjetas */
.bo-service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.bo-svc-pill {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.bo-svc-pill--running { background: var(--bo-success-soft); color: #166534; }
.bo-svc-pill--exited, .bo-svc-pill--missing { background: var(--bo-danger-soft); color: #991b1b; }
.bo-svc-pill--restarting { background: var(--bo-warn-soft); color: #92400e; }
.bo-svc-summary { font-size: 0.72rem; color: var(--bo-muted); margin-left: 4px; }
.bo-card-url {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bo-bg);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
}
.bo-card-url code { font-family: var(--bo-mono); flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* Pills genericos */
.bo-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  text-transform: lowercase;
}
.bo-pill--ok, .bo-pill--running { background: var(--bo-success-soft); color: var(--bo-success); }
.bo-pill--warn, .bo-pill--stopped, .bo-pill--restarting, .bo-pill--no_response { background: var(--bo-warn-soft); color: var(--bo-warn); }
.bo-pill--err, .bo-pill--error, .bo-pill--exited { background: var(--bo-danger-soft); color: var(--bo-danger); }
.bo-pill--info, .bo-pill--creando, .bo-pill--deploying { background: var(--bo-info-soft); color: var(--bo-info); }
.bo-pill--muted, .bo-pill--desconocido, .bo-pill--unknown { background: rgba(148,163,184,0.12); color: var(--bo-muted); }

.bo-card-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bo-card-stats--hero .val--lg { font-size: 1.5rem; font-weight: 800; color: var(--bo-text); }

.bo-access-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.bo-access-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; background: rgba(0,0,0,0.2); border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border);
}
.bo-access-ip {
  font-family: var(--bo-mono); font-size: 0.72rem; font-weight: 700;
  color: var(--bo-lan); min-width: 100px;
}
.bo-access-chip {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px; background: var(--bo-primary-soft);
  color: var(--bo-primary); text-decoration: none !important;
}
.bo-access-chip:hover { background: var(--bo-primary); color: #fff; }
.bo-copy--xs { padding: 2px 6px; font-size: 0.68rem; margin-left: auto; }

.bo-refresh-badge--pulse { animation: bo-pulse 1s ease-in-out infinite; }
@keyframes bo-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.bo-input--sm { min-width: auto; padding: 6px 10px; font-size: 0.82rem; }
.bo-btn--ghost { background: transparent; border: 1px solid var(--bo-border); color: var(--bo-muted); }
.bo-btn--ghost:hover { color: var(--bo-text); border-color: var(--bo-border-strong); }
.bo-btn--lg { padding: 12px 20px; font-size: 1rem; }

.bo-form-hero { margin-bottom: 20px; }
.bo-form-card {
  background: var(--bo-card); border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-lg); padding: 28px; max-width: 520px;
  box-shadow: var(--bo-shadow-lg);
}
.bo-form-card--add { margin: 0 auto; }
.bo-form-grid { display: flex; flex-direction: column; gap: 16px; }
.bo-form-hint { font-size: 0.85rem; color: var(--bo-muted); margin: 16px 0; }
.bo-form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bo-field-err { color: var(--bo-danger); font-size: 0.8rem; }
.bo-field--check { flex-direction: row; align-items: center; gap: 10px; }
.bo-field input[type="text"], .bo-field input[type="number"], .bo-field input[type="email"] {
  padding: 10px 12px; border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border); background: var(--bo-bg); color: var(--bo-text);
}
.bo-field input:focus { outline: none; border-color: var(--bo-primary); box-shadow: 0 0 0 3px var(--bo-primary-soft); }

.bo-card:hover { background: var(--bo-card-hover); }
.bo-kpi { background: var(--bo-card); border-color: var(--bo-border); }
.bo-card-tag--ok { background: var(--bo-success-soft); color: var(--bo-success); }
.bo-card-tag--off { background: var(--bo-danger-soft); color: var(--bo-danger); }
.bo-svc-pill--running { background: var(--bo-success-soft); color: var(--bo-success); }
.bo-svc-pill--exited, .bo-svc-pill--missing { background: var(--bo-danger-soft); color: var(--bo-danger); }
.bo-svc-pill--restarting { background: var(--bo-warn-soft); color: var(--bo-warn); }

/* Breadcrumb */
.bo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--bo-muted);
  margin-bottom: 12px;
}
.bo-breadcrumb a { color: var(--bo-primary); text-decoration: none; }
.bo-breadcrumb a:hover { text-decoration: underline; }

/* Acciones inline changelist */
.bo-row-actions { display: inline-flex; gap: 4px; }
.bo-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--bo-border);
  background: var(--bo-card);
  text-decoration: none !important;
  font-size: 0.75rem;
  color: var(--bo-muted);
}
.bo-icon-btn:hover { background: var(--bo-bg); color: var(--bo-text); }
.bo-icon-btn--ok { border-color: #86efac; color: #166534; }
.bo-icon-btn--warn { border-color: #fcd34d; color: #92400e; }
.bo-icon-btn--info { border-color: #7dd3fc; color: #0369a1; }

.bo-table-wrap { overflow-x: auto; }
.bo-table--compact th, .bo-table--compact td { padding: 8px 12px; font-size: 0.84rem; }
.bo-table--services td { vertical-align: top; }
.bo-table-actions { white-space: nowrap; }

@media (max-width: 900px) {
  .bo-login { grid-template-columns: 1fr; }
  .bo-login-brand { min-height: auto; padding: 32px 24px; }
  .bo-page { padding: 16px 16px 64px; }
}

/* Area principal: oscuro pero un poco mas claro; sidebar sin cambios */
.dark #main {
  background-color: var(--bo-content-bg);
  min-height: 100vh;
}

/* =========================================================================
   Formularios admin (change/add): inputs legibles sobre fondo oscuro
   ========================================================================= */
.dark.change-form #main label,
.dark.change-form #main .block.font-semibold {
  color: var(--bo-text) !important;
}

.dark.change-form #main fieldset.module h2 {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--bo-text) !important;
  border: 1px solid var(--bo-border);
}

.dark.change-form #main .help,
.dark.change-form #main .helptext,
.dark.change-form #main p.help {
  color: var(--bo-muted) !important;
}

.dark.change-form #main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.dark.change-form #main textarea,
.dark.change-form #main select,
.dark.change-form #main .vTextField,
.dark.change-form #main .vLargeTextField,
.dark.change-form #main .vURLField,
.dark.change-form #main .vIntegerField,
.dark.change-form #main .vDateField,
.dark.change-form #main .vTimeField {
  background-color: var(--bo-input-bg) !important;
  border: 1px solid var(--bo-input-border) !important;
  color: var(--bo-input-text) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.dark.change-form #main input::placeholder,
.dark.change-form #main textarea::placeholder {
  color: var(--bo-input-placeholder) !important;
  opacity: 1;
}

.dark.change-form #main input:not([type="checkbox"]):not([type="radio"]):focus,
.dark.change-form #main textarea:focus,
.dark.change-form #main select:focus {
  border-color: var(--bo-primary) !important;
  box-shadow: 0 0 0 3px var(--bo-primary-soft) !important;
  outline: none !important;
}

.dark.change-form #main input[readonly],
.dark.change-form #main textarea[readonly],
.dark.change-form #main .readonly {
  background-color: #121820 !important;
  color: var(--bo-muted) !important;
  border-color: var(--bo-border) !important;
}

.dark.change-form #main input[type="checkbox"],
.dark.change-form #main input[type="radio"] {
  accent-color: var(--bo-primary);
  width: 1rem;
  height: 1rem;
}

.dark.change-form #main .errors input,
.dark.change-form #main .errors textarea,
.dark.change-form #main .errors select,
.dark.change-form #main .group.errors input,
.dark.change-form #main .group.errors textarea,
.dark.change-form #main .group.errors select {
  border-color: var(--bo-danger) !important;
}

.dark.change-form #main .errorlist,
.dark.change-form #main ul.errorlist {
  color: var(--bo-danger) !important;
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.82rem;
}

/* Inlines tabulares */
.dark.change-form #main .inline-group table {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-sm);
}

.dark.change-form #main .inline-group thead th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--bo-muted);
  border-bottom: 1px solid var(--bo-border);
}

.dark.change-form #main .inline-group tbody td {
  border-bottom: 1px solid var(--bo-border);
  vertical-align: middle;
}

/* filter_horizontal / selector */
.dark.change-form #main .selector select,
.dark.change-form #main .selector-available select,
.dark.change-form #main .selector-chosen select {
  min-height: 12rem;
  background-color: var(--bo-input-bg) !important;
  color: var(--bo-input-text) !important;
}

.dark.change-form #main .selector h2 {
  background: rgba(255, 255, 255, 0.04);
  color: var(--bo-text);
  border: 1px solid var(--bo-border);
  border-radius: 6px;
}

.dark.change-form #main .selector .selector-filter input {
  background-color: var(--bo-input-bg) !important;
  color: var(--bo-input-text) !important;
}

/* Select2 (autocomplete FK) */
.dark.change-form #main .select2-container--admin-autocomplete .select2-selection--single,
.dark.change-form #main .select2-container--admin-autocomplete .select2-selection--multiple {
  background-color: var(--bo-input-bg) !important;
  border-color: var(--bo-input-border) !important;
  color: var(--bo-input-text) !important;
  min-height: 2.375rem;
  border-radius: 8px !important;
}

.dark.change-form #main .select2-container--admin-autocomplete .select2-selection__rendered {
  color: var(--bo-input-text) !important;
}

.dark.change-form #main .select2-dropdown {
  background-color: var(--bo-card) !important;
  border-color: var(--bo-border) !important;
  color: var(--bo-text) !important;
}

.dark.change-form #main .select2-results__option--highlighted {
  background-color: var(--bo-primary-soft) !important;
  color: var(--bo-text) !important;
}

/* Backups */
.bo-card--schedule {
  margin-bottom: 1.25rem;
}

.bo-form--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}

.bo-inline-form {
  display: inline;
}

.bo-table-wrap {
  overflow-x: auto;
}

.bo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bo-table th,
.bo-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--bo-border);
  text-align: left;
}

.bo-table th {
  color: var(--bo-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bo-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.bo-btn--sm {
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
}

.bo-btn--warn {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
}

.bo-btn--warn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.28);
}

.bo-alert {
  padding: 0.65rem 0.9rem;
  border-radius: var(--bo-radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--bo-border);
}

.bo-alert--info {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
}

.bo-form--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.bo-row--err {
  background: rgba(248, 113, 113, 0.06);
}

.bo-error-details summary {
  cursor: pointer;
  color: #fca5a5;
  font-size: 0.85rem;
}

.bo-error-pre {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  max-width: 28rem;
  max-height: 8rem;
  overflow: auto;
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.bo-backup-detail {
  max-width: 20rem;
}

/* Centro de backups — tiempo real */
.bo-backups-hub .bo-kpis--backups {
  margin-bottom: 1rem;
}

.bo-kpi--warn .bo-kpi-val {
  color: #fcd34d;
}

.bo-storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.bo-storage-block {
  padding: 0.75rem;
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.bo-path {
  font-size: 0.78rem;
  word-break: break-all;
  color: #93c5fd;
}

.bo-path--block {
  display: block;
  margin-top: 0.35rem;
  padding: 0.4rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.bo-path-host {
  margin-top: 0.35rem;
}

.bo-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.bo-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--bo-muted);
}

.bo-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.bo-live-card {
  padding: 0.75rem;
  border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border);
  background: rgba(56, 189, 248, 0.08);
}

.bo-live-card--restore {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
}

.bo-live-card-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.bo-live-phase {
  font-weight: 600;
  font-size: 0.9rem;
}

.bo-restore-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bo-restore-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--bo-border);
}

.bo-restore-item--completed {
  background: rgba(34, 197, 94, 0.08);
}

.bo-restore-item--failed {
  background: rgba(248, 113, 113, 0.08);
}

.bo-restore-item .bo-error-pre {
  width: 100%;
  margin-top: 0.25rem;
}

/* Backups hub — compacto */
.bo-header--compact {
  margin-bottom: 0.75rem;
}

.bo-header--compact .bo-title {
  font-size: 1.25rem;
  margin: 0;
}

.bo-card--compact {
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
}

.bo-subtitle--sm {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.bo-kpis--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.bo-kpi-inline {
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.bo-kpi-inline--ok { color: #86efac; }
.bo-kpi-inline--info { color: #7dd3fc; }
.bo-kpi-inline--warn { color: #fcd34d; }
.bo-kpi-inline--err { color: #fca5a5; }

.bo-input--xs,
.bo-btn--xs {
  font-size: 0.78rem;
  padding: 0.25rem 0.45rem;
  min-height: 1.75rem;
}

.bo-toolbar-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}

.bo-toolbar-compact__left,
.bo-toolbar-compact__right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.bo-table--compact {
  font-size: 0.78rem;
}

.bo-table--compact th,
.bo-table--compact td {
  padding: 0.3rem 0.45rem;
  vertical-align: middle;
}

.bo-pill--xs {
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
}

.bo-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  vertical-align: middle;
}

.bo-dot--ok { background: #22c55e; }
.bo-dot--info { background: #38bdf8; animation: bo-pulse 1s infinite; }
.bo-dot--warn { background: #fbbf24; animation: bo-pulse 1s infinite; }
.bo-dot--err { background: #f87171; }

@keyframes bo-pulse {
  50% { opacity: 0.4; }
}

.bo-status-line {
  white-space: nowrap;
}

.bo-actions-compact {
  white-space: nowrap;
}

.bo-icon-link {
  background: none;
  border: none;
  color: var(--bo-muted);
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.bo-icon-link:hover {
  color: var(--bo-text);
}

.bo-path-xs {
  font-size: 0.72rem;
  word-break: break-all;
}

.bo-storage-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.bo-field--grow {
  flex: 1;
  min-width: 10rem;
}

.bo-storage-resolved {
  font-size: 0.75rem;
  line-height: 1.4;
}

.bo-hint {
  font-size: 0.72rem;
  margin: 0.35rem 0 0;
}

.bo-live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bo-live-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  border: 1px solid var(--bo-border);
  background: rgba(56, 189, 248, 0.1);
}

.bo-live-chip--restore {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
}

.bo-live-chip--done {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--bo-text, #e2e8f0);
}

.bo-live-chip--done.bo-live-chip--restore {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
}

.bo-cell-detail {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bo-err-xs {
  color: #fca5a5;
  font-size: 0.72rem;
}

.bo-toast {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.bo-toast--ok {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.bo-toast--warn {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.bo-toast--err {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.bo-toast--info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Tarjeta clicable → detalle del restaurante */
.bo-card--clickable {
  cursor: pointer;
}
.bo-card--clickable:focus-visible {
  outline: 2px solid var(--bo-primary);
  outline-offset: 2px;
}
.bo-card--clickable .bo-card-title {
  color: var(--bo-text);
}
.bo-card-foot {
  margin-top: auto;
}

/* Dashboard detalle instancia */
.bo-kpis--detail {
  margin-bottom: 20px;
}
.bo-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.bo-section--wide {
  grid-column: 1 / -1;
}
.bo-actions--stack {
  align-items: center;
}
.bo-alert {
  padding: 12px 16px;
  border-radius: var(--bo-radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.bo-alert--warn {
  background: var(--bo-warn-soft);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
.bo-mesa-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.bo-mesa-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--bo-border);
}
.bo-mesa-chip--libre {
  background: var(--bo-success-soft);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}
.bo-mesa-chip--ocupada {
  background: var(--bo-warn-soft);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
}
.bo-mesa-chip--inactiva {
  background: var(--bo-bg);
  color: var(--bo-muted);
  opacity: 0.65;
}
.bo-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.bo-legend .bo-mesa-chip {
  font-size: 0.7rem;
  padding: 3px 8px;
  min-width: auto;
}
.bo-event-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bo-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.bo-mini-stats .lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--bo-soft-muted);
  font-weight: 700;
}
.bo-mini-stats .val {
  font-size: 1.1rem;
  font-weight: 800;
}
.bo-meta-chip--ok {
  background: var(--bo-success-soft);
  border-color: rgba(34, 197, 94, 0.3);
}
.bo-meta-chip--warn {
  background: var(--bo-warn-soft);
  border-color: rgba(251, 191, 36, 0.3);
}

/* =========================================================================
   Vista detalle restaurante
   ========================================================================= */
.bo-page--detalle {
  max-width: 1280px;
}

.bo-detail-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px;
  margin-bottom: 20px;
  border-radius: var(--bo-radius-lg);
  background: linear-gradient(135deg, #1e2640 0%, #1a2030 55%, #141922 100%);
  border: 1px solid var(--bo-border);
  box-shadow: var(--bo-shadow-lg);
}
.bo-detail-hero-main { flex: 1; min-width: 240px; }
.bo-detail-hero-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.bo-detail-hero-title h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.bo-detail-hero-title p { margin: 4px 0 0; font-size: 0.88rem; }
.bo-detail-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.bo-detail-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.bo-detail-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bo-detail-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.bo-detail-kpi {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bo-detail-kpi .lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bo-soft-muted);
  font-weight: 800;
}
.bo-detail-kpi .val {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.bo-detail-kpi--ok .val { color: #86efac; }
.bo-detail-kpi--warn .val { color: #fde68a; }

.bo-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--bo-bg);
  border-radius: var(--bo-radius);
  border: 1px solid var(--bo-border);
  width: fit-content;
}
.bo-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--bo-muted);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: var(--bo-radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bo-tab:hover { color: var(--bo-text); background: var(--bo-card); }
.bo-tab.is-active {
  background: var(--bo-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.bo-tab-panel { display: none; }
.bo-tab-panel.is-active { display: block; }

.bo-detail-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.bo-detail-card {
  background: var(--bo-card);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 18px 20px;
  box-shadow: var(--bo-shadow-sm);
}
.bo-detail-card--wide { grid-column: 1 / -1; }
.bo-detail-card--err {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.06);
  margin-top: 16px;
}
.bo-detail-card-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.bo-detail-card-title small { font-weight: 500; }
.bo-detail-card-desc {
  margin: -8px 0 16px;
  font-size: 0.85rem;
  color: var(--bo-muted);
}

.bo-mesa-grid--detail { gap: 10px; }
.bo-mesa-chip {
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  border: 2px solid transparent;
  transition: transform 0.12s;
}
.bo-mesa-chip:hover { transform: scale(1.06); }
.bo-mesa-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--bo-muted);
}
.bo-mesa-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bo-mesa-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.bo-mesa-dot--libre { background: #22c55e; }
.bo-mesa-dot--ocupada { background: #fbbf24; }
.bo-mesa-dot--inactiva { background: #64748b; }

/* Eventos — badges con color */
.bo-event-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bo-ev-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border);
  font-size: 0.88rem;
}
.bo-ev-badge-type { font-weight: 800; }
.bo-ev-badge-mesa {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  font-weight: 700;
  font-size: 0.8rem;
}
.bo-ev-badge-time {
  margin-left: auto;
  font-size: 0.78rem;
  opacity: 0.85;
}
.bo-ev-badge-note {
  flex: 1 1 100%;
  font-size: 0.8rem;
  opacity: 0.75;
}
.bo-ev-badge--camarero {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.08));
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}
.bo-ev-badge--cuenta {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.08));
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}
.bo-ev-badge--agua {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.08));
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}
.bo-ev-badge--otro {
  background: var(--bo-bg);
  color: var(--bo-muted);
}

/* Operadores */
.bo-op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.bo-op-card {
  background: var(--bo-bg);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bo-op-card--off { opacity: 0.55; }
.bo-op-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bo-op-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}
.bo-op-name { display: block; font-size: 1rem; }
.bo-op-rol {
  display: block;
  font-size: 0.78rem;
  color: var(--bo-muted);
  font-weight: 600;
}
.bo-op-head .bo-pill { margin-left: auto; flex-shrink: 0; }
.bo-op-pin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bo-card);
  border-radius: var(--bo-radius-sm);
  border: 1px dashed var(--bo-border-strong);
}
.bo-op-pin-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--bo-soft-muted);
  letter-spacing: 0.05em;
}
.bo-pin-code {
  font-family: var(--bo-mono);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: #fde68a;
}
.bo-pin-missing { font-size: 0.78rem; }
.bo-op-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bo-perm-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bo-primary-soft);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Pedidos activos */
.bo-pedido-list { display: flex; flex-direction: column; gap: 8px; }
.bo-pedido-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bo-bg);
  border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border);
}
.bo-pedido-id { font-weight: 800; color: var(--bo-muted); font-size: 0.85rem; }
.bo-pedido-total { font-weight: 800; text-align: right; }

.bo-empty-inline {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--bo-muted);
  background: var(--bo-bg);
  border-radius: var(--bo-radius-sm);
  border: 1px dashed var(--bo-border);
}
.bo-empty-inline--ok {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.bo-cred-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bo-cred-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bo-bg);
  border-radius: var(--bo-radius-sm);
}
.bo-cred-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--bo-soft-muted);
  min-width: 72px;
}
.bo-access-chip--panel { border-color: rgba(99, 102, 241, 0.5); color: #c7d2fe; }
.bo-access-chip--admin { border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.bo-access-chip--simulator { border-color: rgba(251, 191, 36, 0.45); color: #fde68a; }
.bo-qr-grid--detail { justify-content: flex-start; }

@media (max-width: 720px) {
  .bo-detail-hero-actions { align-items: stretch; width: 100%; }
  .bo-detail-hero-actions .bo-actions { justify-content: flex-start; }
  .bo-pedido-row { grid-template-columns: 1fr 1fr; }
  .bo-ev-badge-time { margin-left: 0; }
}

.bo-modulos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.bo-modulo-toggle {
  display: block;
  cursor: pointer;
}
.bo-modulo-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bo-modulo-toggle__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border);
  background: var(--bo-bg);
  transition: border-color 0.15s, background 0.15s;
}
.bo-modulo-toggle input:checked + .bo-modulo-toggle__box {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.08);
}
.bo-modulo-toggle__label {
  font-weight: 700;
  font-size: 0.92rem;
}
.bo-modulo-toggle__state {
  font-size: 0.75rem;
  color: var(--bo-soft-muted);
}
.bo-modulo-toggle input:checked + .bo-modulo-toggle__box .bo-modulo-toggle__state {
  color: #86efac;
}

