*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  color: var(--nav-text);
  background: var(--color-bg-default);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.003em;
}

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

/* ── Shell 2 columnas macOS sobrio + Liquid Glass (igual a nucleo-console) ── */
.nav-shell {
  background: var(--color-bg-default);
  color: var(--nav-text);
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  max-width: 100%;
  overflow: hidden;
}

.bo-shell {
  display: grid;
  grid-template-columns: var(--nav-sidebar-width) minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  transition: grid-template-columns 0.2s ease;
}

.bo-shell.is-collapsed {
  grid-template-columns: var(--nav-sidebar-collapsed) minmax(0, 1fr);
}

/* ── Sidebar incrustado a la izquierda ── */
.nav-sidebar {
  position: relative;
  z-index: 25;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bo-surface-sidebar);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.55), 1px 0 3px rgba(30, 40, 110, 0.045);
}

.ent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 4px 14px;
}

.nav-sidebar.is-collapsed .ent-row {
  justify-content: center;
  padding: 14px 0 8px;
}

.ent-avatar {
  display: flex;
  flex: none;
}

.ent-avatar-box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-image: var(--mac-light);
  box-shadow: var(--mac-light-edge);
  object-fit: cover;
}

.ent-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ds-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-switch {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--ds-label2);
  background: rgba(255, 255, 255, 0.5);
  border: 0.5px solid rgba(60, 60, 67, 0.07);
  cursor: pointer;
}

.ent-switch:hover {
  background: #ffffff;
  color: var(--ds-blue);
}

/* ── Selector de sistema (.system-frame) ── */
.nav-sidebar-header {
  padding: 10px 12px 8px;
}

.nav-sidebar.is-collapsed .nav-sidebar-header {
  padding: 6px 8px 8px;
  display: flex;
  justify-content: center;
}

.system-frame {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(60, 60, 67, 0.08);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ds-label2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-sidebar.is-collapsed .system-frame {
  width: auto;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
}

.system-frame:hover,
.system-frame.is-open {
  background: #ffffff;
  border-color: rgba(0, 122, 255, 0.3);
}

.nav-system-badge {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #ffffff;
  background: var(--mac-light),
    linear-gradient(180deg, color-mix(in srgb, var(--badge-color, #007aff) 92%, #ffffff), var(--badge-color, #007aff));
  box-shadow: var(--mac-light-edge);
}

.nav-sidebar-header-text {
  min-width: 0;
  flex: 1;
}

.nav-sidebar-header-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--nav-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-sidebar-header-desc {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--nav-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dropdown de cambio de sistema con backdrop blur */
.system-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 119;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
}

.system-dropdown-menu {
  position: fixed;
  z-index: 120;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid var(--ds-sep-soft);
  background: #ffffff;
  padding: 6px 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.system-dropdown-label {
  margin: 0;
  padding: 6px 12px;
  font-size: 10px;
  color: var(--nav-text-soft);
}

.system-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--nav-text);
  text-align: left;
  cursor: pointer;
}

.system-dropdown-item:hover {
  background: #f1f5f9;
}

.system-dropdown-sep {
  height: 1px;
  margin: 4px 0;
  background: var(--nav-border-soft);
}

/* ── Menu de modulos en sidebar ── */
.nav-sidebar-menu {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 10px;
  gap: 2px;
}

.nav-sidebar.is-collapsed .nav-sidebar-menu {
  align-items: center;
  padding: 4px 0 12px;
  gap: 4px;
}

.nav-sidebar-menu-label {
  margin: 0;
  padding: 8px 8px 6px;
  font-size: 10px;
  font-weight: 400;
  color: var(--nav-text-soft);
}

.nav-sidebar-menu-label:first-child {
  padding-top: 2px;
}

.nav-module-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--ds-label);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-module-item > i,
.nav-module-item > svg {
  color: var(--ds-blue-soft);
  flex: none;
  font-size: 20px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-module-item:hover {
  background: rgba(60, 60, 67, 0.07);
}

.nav-module-item:hover > i,
.nav-module-item:hover > svg {
  color: #3d8bf2;
}

.nav-module-item.is-active {
  background: rgba(60, 60, 67, 0.13);
  color: #000000;
  font-weight: 600;
}

.nav-module-item.is-active > i,
.nav-module-item.is-active > svg {
  color: var(--ds-blue);
}

.nav-sidebar.is-collapsed .nav-module-item {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

.nav-sidebar-utility-btn,
.nav-sidebar-utility-btn > i,
.nav-sidebar-utility-btn > svg {
  color: #7b7b8b;
}

.nav-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
}

.nav-sidebar-version {
  padding: 6px 8px 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--nav-text-soft);
  opacity: 0.55;
}

/* ── Workspace ── */
.workspace {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border-left: 1px solid #ffffff;
}

.workspace-body {
  padding: 24px 24px 48px;
  flex: 1 1 auto;
  min-width: 0;
}

/* ── NavPerfil: pildora flotante Liquid Glass (arriba a la derecha) ── */
.nav-perfil-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px 8px;
}

.nav-perfil {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  backdrop-filter: blur(22px) saturate(220%);
  -webkit-backdrop-filter: blur(22px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, 0.95), 0 4px 13px rgba(30, 40, 110, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nav-perfil-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--ds-label2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.nav-perfil-icon-btn:hover {
  background: rgba(60, 60, 67, 0.08);
  color: var(--ds-label);
}

.nav-perfil-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--ds-sep);
  background: #ffffff;
}

.nav-perfil-search-box input {
  width: 165px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--nav-text);
  outline: none;
}

.nav-perfil-avatar {
  margin-left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 0;
  background: #e2e8f0;
  color: var(--nav-text);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.profile-menu-panel {
  position: fixed;
  top: 58px;
  right: 16px;
  z-index: 98;
  width: 280px;
  max-width: calc(100vw - 2rem);
  border-radius: 16px;
  border: 1px solid var(--ds-sep-soft);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.profile-menu-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

.profile-menu-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  flex: none;
  background: #e2e8f0;
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-menu-row {
  border-top: 1px solid var(--nav-border-soft);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.profile-menu-list {
  border-top: 1px solid var(--nav-border-soft);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu-btn {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  color: var(--nav-text);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.profile-menu-btn:hover {
  background: var(--nav-surface-hover);
}

.profile-menu-btn.is-danger {
  color: #dc2626;
}

.profile-menu-btn.is-danger:hover {
  background: #fef2f2;
}

/* ── SystemsMenu drawer derecho ── */
.systems-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
}

.systems-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 95;
  width: 290px;
  max-width: 100vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--nav-border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  padding: 16px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.systems-menu-section {
  padding: 8px 16px 6px;
  font-size: 10px;
  color: var(--nav-text-soft);
}

.systems-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 0 8px;
}

.systems-menu-divider {
  height: 1px;
  margin: 10px 0;
  background: var(--nav-border-soft);
}

/* ── ModuleSectionHeader (baldosa azul gradiente + titulo + accion al lado) ── */
.bo-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 28px;
  row-gap: 8px;
  margin-bottom: 14px;
  padding-right: 170px;
}

.bo-section-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bo-section-icon-tile {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: var(--mac-light), var(--ds-blue-grad);
  box-shadow: var(--mac-light-edge);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bo-section-title {
  margin: 0;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--nav-text);
  letter-spacing: -0.015em;
}

.bo-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ── */
.bo-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: filter 0.15s, background-color 0.15s, opacity 0.15s;
}

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

.bo-btn-primary {
  background: var(--ds-blue-grad);
  border-color: rgba(0, 0, 0, 0.05);
  color: #ffffff;
}

.bo-btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
}

.bo-btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  border: 0.5px solid var(--ds-sep);
  box-shadow: var(--ds-ctl-shadow);
  color: var(--nav-text);
}

.bo-btn-secondary:hover:not(:disabled) {
  background: #ffffff;
}

.bo-btn-danger {
  background: var(--bo-danger-600);
  color: #ffffff;
}

.bo-btn-danger:hover:not(:disabled) {
  background: var(--bo-danger-700);
}

.bo-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0.5px solid var(--ds-sep);
  background: #ffffff;
  box-shadow: var(--ds-ctl-shadow);
  color: var(--ds-label2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bo-icon-btn:hover {
  color: var(--ds-label);
}

/* ── Form primitives ── */
.bo-form-wrap {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
}

.bo-form-header {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bo-form-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bo-form-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--bo-text-primary);
}

.bo-form-card {
  border-radius: 12px;
  border: 1px solid var(--ds-sep-soft);
  background: var(--bo-surface-card);
  box-shadow: var(--ds-card-shadow);
  padding: 16px;
}

.bo-form-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
}

.bo-form-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid var(--bo-border-form-aside);
  background: var(--bo-surface-form-aside);
  padding: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  color: var(--nav-text-muted);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 8px;
  border: 0.5px solid rgba(60, 60, 67, 0.22);
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  color: var(--bo-text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input,
.form-select {
  height: 36px;
  padding: 0 12px;
}

.form-textarea {
  min-height: 92px;
  resize: vertical;
  padding: 8px 12px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--bo-focus);
  box-shadow: var(--ds-focus);
}

/* ── DataTable Card (macOS sobrio) ── */
.bo-table-card {
  border-radius: 12px;
  border: 1px solid var(--ds-sep-soft);
  background: #ffffff;
  box-shadow: var(--ds-card-shadow);
  overflow: hidden;
}

.bo-table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ds-sep-soft);
}

.bo-table-search {
  height: 34px;
  width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: 0.5px solid rgba(60, 60, 67, 0.22);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 10px;
  color: var(--ds-label3);
}

.bo-table-search:focus-within {
  border-color: var(--bo-focus);
  box-shadow: var(--ds-focus);
}

.bo-table-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--nav-text);
  outline: none;
}

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

.bo-table {
  width: 100%;
  border-collapse: collapse;
}

.bo-table th {
  font-size: 11px;
  font-weight: 500;
  color: var(--ds-label2);
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--ds-sep-soft);
  background: rgba(246, 246, 248, 0.85);
}

.bo-table td {
  font-size: 12.5px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.06);
}

.bo-table tbody tr:hover td {
  background: rgba(0, 122, 255, 0.04);
}

.bo-table th.is-sticky-right,
.bo-table td.is-sticky-right {
  position: sticky;
  right: 0;
  background: #ffffff;
}

.bo-table th.is-sticky-right {
  z-index: 2;
  background: rgba(246, 246, 248, 0.95);
}

.bo-table td.is-sticky-right {
  z-index: 1;
}

.bo-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--ds-label2);
  border-top: 1px solid var(--ds-sep-soft);
}

/* ── Badges & ActionBtns ── */
.bo-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 0;
}

.bo-badge-active {
  background: var(--bo-success-bg);
  color: var(--bo-success-text);
}

.bo-badge-inactive {
  background: var(--bo-inactive-bg);
  color: var(--bo-inactive-text);
}

.bo-badge-deleted {
  background: var(--bo-error-bg);
  color: var(--bo-error-text);
}

.bo-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ds-label2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bo-action-btn.is-edit:hover,
.bo-action-btn.is-view:hover,
.bo-action-btn.is-restore:hover {
  background: rgba(0, 122, 255, 0.1);
  color: var(--ds-blue);
}

.bo-action-btn.is-delete:hover {
  background: var(--bo-error-bg);
  color: var(--bo-danger-600);
}

/* ── Modals & ConfirmDialog ── */
.bo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
}

.modal-config-panel {
  position: fixed;
  left: 50%;
  top: 68px;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 120;
  width: calc(100% - 32px);
  max-width: 1050px;
  border-radius: 16px;
  border: 1px solid var(--ds-sep-soft);
  background: var(--bo-surface-page);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.bo-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bo-confirm-card {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  border: 1px solid var(--ds-sep-soft);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* ── Login screen (exacto a nucleo-project/nucleo-console/ui/src/pages/Login.tsx) ── */
.bo-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  padding: 20px;
}

.bo-login-card {
  width: 100%;
  max-width: 448px;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
}

.bo-login-logo {
  margin-bottom: 32px;
}

.bo-login-logo img {
  height: 40px;
  display: block;
}

.bo-login-title {
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 400;
  color: #4b5563;
  letter-spacing: -0.01em;
}

.bo-login-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 12.5px;
}

.bo-login-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bo-login-field {
  position: relative;
}

.bo-login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: inline-flex;
}

.bo-login-input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 44px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bo-login-input::placeholder {
  color: #9ca3af;
}

.bo-login-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #ffffff;
}

.bo-login-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
}

.bo-login-eye:hover {
  color: #4b5563;
}

.bo-login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  gap: 12px;
}

.bo-login-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bo-login-forgot {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  color: #6b7280;
  text-decoration: underline;
  cursor: pointer;
}

.bo-login-forgot:hover {
  color: #374151;
}

.bo-login-lang {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.bo-login-lang:hover {
  color: #4b5563;
}

.bo-login-submit {
  background: #2563eb;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.bo-login-submit:hover:not(:disabled) {
  background: #1d4ed8;
}

.bo-login-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── EmptyState ── */
.bo-empty-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}

.bo-empty-circle {
  width: 72px;
  height: 72px;
  border-radius: 9999px;
  background: rgba(60, 60, 67, 0.06);
  color: var(--ds-label2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Scrollbars ── */
.nav-sidebar::-webkit-scrollbar,
.workspace::-webkit-scrollbar,
.systems-menu-panel::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.nav-sidebar::-webkit-scrollbar-thumb,
.workspace::-webkit-scrollbar-thumb,
.systems-menu-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border-radius: 999px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bo-shell,
  .bo-shell.is-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 264px;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.2s ease;
    z-index: 100;
  }

  .nav-shell.mobile-nav-open .nav-sidebar {
    transform: translate3d(0, 0, 0);
  }

  .bo-section-header {
    padding-right: 0;
  }

  .bo-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Toast stack & Interactive helpers ── */
.bo-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.bo-toast {
  pointer-events: auto;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background: #1d1d1f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bo-toast.is-success {
  background: #0f766e;
}

.bo-toast.is-error {
  background: #dc2626;
}

.bo-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}

.bo-badge-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.bo-ai-thread {
  min-height: 260px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 4px;
}

.bo-ai-msg {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 82%;
}

.bo-ai-msg.is-user {
  align-self: flex-end;
  background: var(--ds-blue-grad);
  color: #ffffff;
}

.bo-ai-msg.is-assistant {
  align-self: flex-start;
  background: #f2f2f7;
  color: var(--ds-label);
}

/* ── Categorys Tree + Workspace (nucleo.3 / nucleo-console) ── */
.cat-split-grid {
  display: grid;
  grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.cat-tree-body {
  padding: 8px;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

.cat-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--nav-text);
  transition: background-color 0.14s ease;
}

.cat-tree-row:hover {
  background: rgba(60, 60, 67, 0.06);
}

.cat-tree-row.is-selected {
  background: rgba(0, 122, 255, 0.1);
}

.cat-tree-row.is-drag-over {
  box-shadow: inset 0 0 0 2px var(--ds-blue);
}

.cat-tree-row.is-inactive .cat-node-name {
  text-decoration: line-through;
  color: var(--nav-text-soft);
}

.cat-drag-handle {
  color: #c5cbd6;
  font-size: 11px;
  cursor: grab;
  user-select: none;
}

.cat-collapse-btn {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--nav-text-soft);
  font-size: 11px;
  cursor: pointer;
}

.cat-collapse-btn:hover {
  background: rgba(60, 60, 67, 0.08);
}

.cat-child-count {
  font-size: 10px;
  font-weight: 600;
}

.cat-collapse-spacer {
  display: inline-block;
  width: 20px;
  flex: none;
}

.cat-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.cat-node-icon {
  color: var(--ds-blue-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 18px;
}

.cat-node-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-portada-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
}

.cat-node-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.cat-tree-row:hover .cat-node-actions,
.cat-tree-row.is-selected .cat-node-actions {
  opacity: 1;
}

.cat-node-actions .bo-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.cat-ws-block {
  border: 1px solid var(--ds-sep-soft);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.cat-ws-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(246, 246, 248, 0.85);
  border-bottom: 1px solid var(--ds-sep-soft);
  font-size: 13px;
}

.cat-ws-pub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.05);
}

.cat-ws-pub-row:last-child {
  border-bottom: 0;
}

@media (max-width: 960px) {
  .cat-split-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
