/* #region Recursos Técnicos — Dashboard App */

/* ── Body override ─────────────────────────────────── */
body.app-page {
  padding-top: 64px;
  background: var(--bg-deep);
}

/* ── App shell layout ──────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
  align-items: start;
}

/* ── Sidebar ───────────────────────────────────────── */
.app-sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: rgba(6, 9, 18, 0.98);
  border-right: 1px solid rgba(0, 212, 255, 0.07);
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.15) transparent;
}

.app-sidebar__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-sidebar__header i {
  color: var(--accent);
  font-size: 0.85rem;
}

.app-sidebar__nav {
  flex: 1;
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 0.85rem 0.6rem 0.3rem;
  margin: 0;
  opacity: 0.6;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.835rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
  position: relative;
  text-decoration: none;
}

.sidebar-item:not(.sidebar-item--soon):hover {
  background: rgba(0, 212, 255, 0.06);
  color: var(--text-primary);
}

.app-sidebar .sidebar-item--active {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
}

.sidebar-item--soon {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-item__icon {
  width: 18px;
  text-align: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.sidebar-item__label {
  flex: 1;
  line-height: 1.3;
}

.sidebar-badge {
  font-size: 0.6rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.app-sidebar__footer {
  padding: 0.75rem 0.6rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-footer-link:hover {
  background: rgba(0, 212, 255, 0.06);
  color: var(--accent);
}

/* ── Main panel area ───────────────────────────────── */
.app-main {
  min-width: 0;
  padding: 2.5rem 2.25rem;
}

.app-panel {
  animation: panelIn 0.2s ease;
}

.app-panel--hidden {
  display: none;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-panel__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-panel__title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.app-panel__subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.app-panel__subtitle a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Quiz wizard ───────────────────────────────────── */
.cmp-wizard {
  max-width: 640px;
}

.cmp-progress-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.cmp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.cmp-steps {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2.25rem;
}

.cmp-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-faint);
  transition: all 0.22s;
}

.cmp-step-dot--active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.cmp-step-dot--done {
  background: var(--accent);
  border-color: var(--accent);
  color: #060912;
}

.cmp-question-stage {
  position: relative;
  min-height: 260px;
}

.cmp-question {
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
}

.cmp-question--visible     { opacity: 1; transform: translateX(0); }
.cmp-question--exit-left   { opacity: 0; transform: translateX(-36px); }
.cmp-question--exit-right  { opacity: 0; transform: translateX(36px); }
.cmp-question--enter-right { opacity: 0; transform: translateX(36px); }
.cmp-question--enter-left  { opacity: 0; transform: translateX(-36px); }

.cmp-question-num {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.cmp-question-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 1.6rem;
}

.cmp-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.cmp-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
}

.cmp-option:hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.35);
  color: var(--text-primary);
  transform: translateX(3px);
}

.cmp-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cmp-option-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 0.85rem;
  transition: all 0.15s;
}

.cmp-option:hover .cmp-option-icon {
  background: var(--accent);
  color: #060912;
}

.cmp-nav-row { display: flex; justify-content: flex-start; }

.cmp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.cmp-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Result ────────────────────────────────────────── */
.cmp-result {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 860px;
}

.cmp-result-header { margin-bottom: 1.75rem; }

.cmp-result-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.cmp-result-eyebrow i { margin-right: 0.35rem; }

.cmp-plan-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.cmp-plan-badge span {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.45rem 1.25rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.cmp-plus {
  color: var(--text-faint);
  font-size: 1.25rem;
  font-weight: 300;
}

.cmp-result-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cmp-result-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.cmp-justification { display: flex; flex-direction: column; gap: 1rem; }

.cmp-just-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.cmp-just-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cmp-just-block p:last-child {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.cmp-addons { display: none; }

.cmp-addons-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cmp-addons-title i { color: var(--accent); }

.cmp-addon-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.cmp-addon-icon {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: rgba(0, 212, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.95rem;
}

.cmp-addon-name { font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; font-size: 0.9rem; }
.cmp-addon-why  { color: var(--text-muted); font-size: 0.84rem; line-height: 1.65; }

.cmp-result-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cta-button--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.cta-button--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.06);
}

/* ── Table panel controls ──────────────────────────── */
.tbl-controls {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.tbl-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.tbl-search-icon {
  position: absolute;
  left: 0.8rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  pointer-events: none;
}

.tbl-search-input {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0.55rem 2.1rem 0.55rem 2.1rem;
  color: var(--text-primary);
  font-size: 0.855rem;
  font-family: inherit;
  width: 250px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.tbl-search-input::placeholder { color: var(--text-faint); }

.tbl-search-input:focus {
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.035);
}

.tbl-search-clear {
  position: absolute;
  right: 0.55rem;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.tbl-search-clear:hover { color: var(--text-muted); }

.tbl-col-toggles {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
}

.tbl-col-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  opacity: 0.7;
  text-decoration: line-through;
}

.tbl-col-toggle:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.15);
}

.tbl-col-toggle--active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  opacity: 1;
  text-decoration: none;
}

.tbl-col-toggle__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* M365 column hide rules */
.m365t-hide-F1 .m365t-table [data-plan="F1"],
.m365t-hide-F3 .m365t-table [data-plan="F3"],
.m365t-hide-BB .m365t-table [data-plan="BB"],
.m365t-hide-BS .m365t-table [data-plan="BS"],
.m365t-hide-BP .m365t-table [data-plan="BP"],
.m365t-hide-E3 .m365t-table [data-plan="E3"],
.m365t-hide-E5 .m365t-table [data-plan="E5"] {
  display: none;
}

/* M365 feature info button */
.m365t-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--accent);
  opacity: 0.45;
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: 0.4rem;
  padding: 0;
  vertical-align: middle;
  transition: opacity 0.2s, color 0.2s;
}

.m365t-info-btn:hover,
.m365t-info-btn--active {
  opacity: 1;
}

.m365t-info-btn--active {
  color: var(--accent);
}

/* M365 feature description row */
.m365t-desc-row {
  overflow: hidden;
}

.m365t-desc-row .m365t-desc-cell {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  background: rgba(0, 212, 255, 0.04);
  border-left: 3px solid var(--accent);
  color: var(--text-secondary, #b0bec5);
  font-size: 0.82rem;
  line-height: 1.5;
}

.m365t-desc-row.m365t-desc-row--open .m365t-desc-cell {
  max-height: 250px;
  padding: 0.7rem 1rem;
}

.m365t-desc-icon {
  color: var(--accent);
  opacity: 0.7;
  margin-right: 0.3rem;
}

/* ── Table ─────────────────────────────────────────── */
.tbl-wrapper {
  overflow: auto;
  max-height: 68vh;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.15) transparent;
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.cmp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(8, 11, 22, 0.98);
  backdrop-filter: blur(8px);
  padding: 0.8rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  white-space: nowrap;
}

.cmp-table thead th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 3;
  background: rgba(8, 11, 22, 0.98);
  min-width: 210px;
  width: 210px;
}

.cmp-table td.tbl-feature-label {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(6, 9, 18, 0.97);
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.cmp-table td {
  padding: 0.6rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  font-size: 0.83rem;
  transition: background 0.1s;
}

.cmp-table tbody tr:hover td { background: rgba(255, 255, 255, 0.022); }
.cmp-table tbody tr:hover .tbl-feature-label { background: rgba(12, 16, 30, 0.99); }

.cmp-table td.cmp-col--rec {
  background: rgba(0, 212, 255, 0.04);
  border-left:  1px solid rgba(0, 212, 255, 0.09);
  border-right: 1px solid rgba(0, 212, 255, 0.09);
}

.cmp-table th.cmp-th--rec {
  background: rgba(0, 212, 255, 0.07);
  border-left:  1px solid rgba(0, 212, 255, 0.18);
  border-right: 1px solid rgba(0, 212, 255, 0.18);
}

.cmp-table .cmp-cat-row td {
  background: rgba(0, 212, 255, 0.03);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  cursor: pointer;
  user-select: none;
  position: static;
}

.cmp-table .cmp-cat-row:hover td { background: rgba(0, 212, 255, 0.055); }

.cmp-cat-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cmp-cat-chevron {
  color: var(--text-faint);
  font-size: 0.7rem;
  transition: transform 0.2s;
  opacity: 0.6;
}

.cmp-cat-row--collapsed .cmp-cat-chevron { transform: rotate(-90deg); }
.cmp-feature-row--hidden                 { display: none; }

.cmp-check   { color: var(--icon-green); font-size: 0.88rem; }
.cmp-cross   { color: var(--text-faint); opacity: 0.35; font-size: 0.8rem; }
.cmp-partial { color: var(--icon-yellow); font-size: 0.75rem; font-weight: 600; }
.cmp-text    { color: var(--text-muted); font-size: 0.75rem; }

.cmp-table .tbl-no-results {
  text-align: center;
  padding: 3.5rem;
  color: var(--text-faint);
  font-size: 0.875rem;
  position: static;
  background: transparent;
}

.cmp-table-note {
  font-size: 0.76rem;
  color: var(--text-faint);
  line-height: 1.65;
  margin-top: 0.5rem;
}

.cmp-table-note a { color: var(--accent); text-decoration: underline; }

/* #region Diagramas de Arquitectura */

.diag-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.diag-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 99px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.diag-filter-btn:hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
}

.diag-filter-btn--active {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--accent);
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.diag-card {
  background: var(--card-inner);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-card);
}

.diag-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.diag-card__preview {
  background: #0f1629;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.diag-card__preview svg {
  width: 100%;
  height: 100%;
}

.diag-card__body {
  padding: 1rem 1.1rem;
}

.diag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.diag-badge--azure {
  background: rgba(96, 165, 250, 0.12);
  color: var(--color-azure);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.diag-badge--m365 {
  background: rgba(74, 222, 128, 0.1);
  color: var(--color-m365);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.diag-badge--power {
  background: rgba(192, 132, 252, 0.1);
  color: var(--icon-purple);
  border: 1px solid rgba(192, 132, 252, 0.25);
}

.diag-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.diag-card__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Modal */
.diag-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.diag-modal--visible {
  pointer-events: auto;
  opacity: 1;
}

.diag-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 18, 0.88);
  backdrop-filter: blur(4px);
}

.diag-modal__box {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #111827 0%, #1a2234 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: panelIn 0.2s ease;
}

.diag-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.diag-modal__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.35rem 0 0;
}

.diag-modal__desc {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin: 0.35rem 0 0;
  line-height: 1.6;
}

.diag-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.15s;
}

.diag-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.diag-modal__diagram {
  padding: 1.5rem;
}

.diag-modal__diagram svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* #endregion */

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .app-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.07);
  }

  .app-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.6rem;
  }

  .sidebar-section-label { display: none; }
  .sidebar-item { width: auto; }
  .app-sidebar__footer { display: none; }

  .app-main { padding: 1.5rem 1rem; }

  .cmp-result-body { grid-template-columns: 1fr; }
  .cmp-question-text { font-size: 1.15rem; }
  .tbl-search-input { width: 100%; }
  .tbl-controls { flex-direction: column; }
}

/* #endregion */

/* #region Documentación Técnica */

/* ── Variables ─────────────────────────────────────── */
.app-page {
  --dt-bronze: #cd7f32;
  --dt-bronze-bg: rgba(205, 127, 50, 0.10);
  --dt-silver: #94a3b8;
  --dt-silver-bg: rgba(148, 163, 184, 0.10);
  --dt-gold: #fbbf24;
  --dt-gold-bg: rgba(251, 191, 36, 0.10);
  --dt-neutral: var(--accent);
  --dt-neutral-bg: rgba(0, 212, 255, 0.08);
}

/* ── Hero ──────────────────────────────────────────── */
.dt-hero {
  text-align: center;
  padding: 8rem 2rem 3rem;
  position: relative;
}

.dt-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.dt-hero h1 span {
  background: linear-gradient(90deg, var(--accent), #42c8f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dt-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Container ─────────────────────────────────────── */
.dt-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ── Tabs ──────────────────────────────────────────── */
.dt-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dt-tabs::-webkit-scrollbar { display: none; }

.dt-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.dt-tab:hover:not([disabled]) {
  color: var(--text-primary);
  border-bottom-color: rgba(0, 212, 255, 0.3);
}

.dt-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.dt-tab[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.dt-tab__badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dt-tab i {
  font-size: 0.85rem;
}

/* ── Tab Groups (submenú desplegable) ──────────────── */
.dt-tab-group {
  position: relative;
}

.dt-tab-group__header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.dt-tab-group__header:hover:not([disabled]) {
  color: var(--text-primary);
}

.dt-tab-group__header--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.dt-tab-group__header[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.dt-tab-group__arrow {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}

.dt-tab-group--open .dt-tab-group__arrow {
  transform: rotate(180deg);
}

.dt-tab-group__menu {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-card);
  min-width: 240px;
  z-index: 10;
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
}

.dt-tab-group--open .dt-tab-group__menu {
  display: block;
}

.dt-tab-group__menu .dt-tab {
  display: flex;
  width: 100%;
  text-align: left;
  border-bottom: none;
  padding: 0.65rem 1.25rem;
  border-radius: 0;
}

.dt-tab-group__menu .dt-tab:hover:not([disabled]) {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: none;
}

.dt-tab-group__menu .dt-tab--active {
  border-bottom: none;
  background: rgba(0, 212, 255, 0.08);
}

/* ── Panels ────────────────────────────────────────── */
.dt-panel {
  animation: fadeUp 0.3s ease both;
}

.dt-panel--hidden {
  display: none;
}

.dt-panel-slot {
  min-height: 200px;
}

.dt-panel-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.dt-panel__header {
  margin-bottom: 2rem;
}

.dt-panel__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.dt-panel__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 700px;
}

/* ── Pipeline flow ─────────────────────────────────── */
.dt-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.dt-pipeline-badge {
  padding: 0.5rem 1.1rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid;
}

.dt-pipeline-badge--bronze { border-color: var(--dt-bronze); color: var(--dt-bronze); background: var(--dt-bronze-bg); }
.dt-pipeline-badge--silver { border-color: var(--dt-silver); color: var(--dt-silver); background: var(--dt-silver-bg); }
.dt-pipeline-badge--gold   { border-color: var(--dt-gold);   color: var(--dt-gold);   background: var(--dt-gold-bg);   }

.dt-pipeline-arrow {
  color: var(--text-faint);
  font-size: 1.1rem;
}

/* ── Sections ──────────────────────────────────────── */
.dt-section {
  margin-bottom: 3rem;
}

.dt-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dt-medal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  border: 2px solid;
}

.dt-medal--bronze  { border-color: var(--dt-bronze);  background: var(--dt-bronze-bg);  }
.dt-medal--silver  { border-color: var(--dt-silver);  background: var(--dt-silver-bg);  }
.dt-medal--gold    { border-color: var(--dt-gold);    background: var(--dt-gold-bg);    }
.dt-medal--neutral { border-color: var(--dt-neutral); background: var(--dt-neutral-bg); }

.dt-section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.dt-section-title--bronze  { color: var(--dt-bronze); }
.dt-section-title--silver  { color: var(--dt-silver); }
.dt-section-title--gold    { color: var(--dt-gold);   }
.dt-section-title--neutral { color: var(--dt-neutral); }

.dt-section-desc {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

/* ── Dividers ──────────────────────────────────────── */
.dt-divider {
  height: 1px;
  border: none;
  margin-bottom: 1.25rem;
}

.dt-divider--bronze  { background: linear-gradient(90deg, var(--dt-bronze), transparent);  }
.dt-divider--silver  { background: linear-gradient(90deg, var(--dt-silver), transparent);  }
.dt-divider--gold    { background: linear-gradient(90deg, var(--dt-gold), transparent);    }
.dt-divider--neutral { background: linear-gradient(90deg, var(--dt-neutral), transparent); }

/* ── Cards grid ────────────────────────────────────── */
.dt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.dt-card {
  background: var(--card-inner);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dt-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.dt-card:hover {
  transform: translateY(-3px);
}

.dt-card--bronze::before { background: linear-gradient(90deg, var(--dt-bronze), transparent); }
.dt-card--bronze:hover   { border-color: rgba(205, 127, 50, 0.45); box-shadow: 0 4px 20px rgba(205, 127, 50, 0.15), 0 0 40px rgba(205, 127, 50, 0.06); }

.dt-card--silver::before { background: linear-gradient(90deg, var(--dt-silver), transparent); }
.dt-card--silver:hover   { border-color: rgba(148, 163, 184, 0.45); box-shadow: 0 4px 20px rgba(148, 163, 184, 0.15), 0 0 40px rgba(148, 163, 184, 0.06); }

.dt-card--gold::before   { background: linear-gradient(90deg, var(--dt-gold), transparent); }
.dt-card--gold:hover     { border-color: rgba(251, 191, 36, 0.45); box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15), 0 0 40px rgba(251, 191, 36, 0.06); }

.dt-card--neutral::before { background: linear-gradient(90deg, var(--dt-neutral), transparent); }
.dt-card--neutral:hover   { border-color: rgba(0, 212, 255, 0.45); box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15), 0 0 40px rgba(0, 212, 255, 0.06); }

.dt-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.dt-card--bronze .dt-card__icon { color: var(--dt-bronze); filter: drop-shadow(0 0 4px rgba(205, 127, 50, 0.3)); }
.dt-card--silver .dt-card__icon { color: var(--dt-silver); filter: drop-shadow(0 0 4px rgba(148, 163, 184, 0.3)); }
.dt-card--gold   .dt-card__icon { color: var(--dt-gold);   filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.3)); }
.dt-card--neutral .dt-card__icon { color: var(--dt-neutral); filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.3)); }
.dt-card:hover .dt-card__icon { transform: scale(1.15); }

.dt-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.dt-card__role {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  margin-bottom: 0.6rem;
  border: 1px solid;
}

.dt-card__role--bronze  { color: var(--dt-bronze);  border-color: var(--dt-bronze);  background: var(--dt-bronze-bg);  }
.dt-card__role--silver  { color: var(--dt-silver);  border-color: var(--dt-silver);  background: var(--dt-silver-bg);  }
.dt-card__role--gold    { color: var(--dt-gold);    border-color: var(--dt-gold);    background: var(--dt-gold-bg);    }
.dt-card__role--neutral { color: var(--dt-neutral); border-color: var(--dt-neutral); background: var(--dt-neutral-bg); }

.dt-card__desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Expandable card details ─────────────────────── */
.dt-card[data-expandable] { cursor: pointer; }
.dt-card__toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.dt-card:hover .dt-card__toggle { opacity: 0.85; }
.dt-card__toggle i {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
}
.dt-card--expanded .dt-card__toggle i { transform: rotate(180deg); }

.dt-card__extra {
  display: none;
  margin-top: 0.75rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--card-inner, #0d1320);
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-top: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  padding: 0.75rem 1.5rem 1.25rem;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.dt-card--expanded .dt-card__extra {
  display: block;
}
.dt-card--expanded {
  z-index: 11;
  overflow: visible;
}
.dt-card__detail-section {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.dt-card__detail-section + .dt-card__detail-section {
  margin-top: 0.6rem;
}
.dt-card__detail-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.dt-card--bronze .dt-card__detail-label,
.dt-card--bronze .dt-card__toggle { color: var(--dt-bronze); }
.dt-card--silver .dt-card__detail-label,
.dt-card--silver .dt-card__toggle { color: var(--dt-silver); }
.dt-card--gold .dt-card__detail-label,
.dt-card--gold .dt-card__toggle { color: var(--dt-gold); }
.dt-card--neutral .dt-card__detail-label,
.dt-card--neutral .dt-card__toggle { color: var(--dt-neutral); }

.dt-card__detail-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.dt-card__detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dt-card__detail-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Pipeline animation ──────────────────────────── */
.dt-pipeline-arrow {
  position: relative;
  overflow: hidden;
}
.dt-pipeline-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: dt-pulse-flow 2.5s ease-in-out infinite;
}
@keyframes dt-pulse-flow {
  0%   { left: -100%; opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.dt-pipeline-badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dt-pipeline-badge:hover {
  transform: scale(1.05);
}
.dt-pipeline-badge--bronze:hover { box-shadow: 0 0 15px rgba(205, 127, 50, 0.25); }
.dt-pipeline-badge--silver:hover { box-shadow: 0 0 15px rgba(148, 163, 184, 0.25); }
.dt-pipeline-badge--gold:hover   { box-shadow: 0 0 15px rgba(251, 191, 36, 0.25); }

/* ── ETL Flow ──────────────────────────────────────── */
.dt-etl-flow {
  background: var(--card-inner);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dt-etl-step {
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.dt-etl-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s;
}

.dt-etl-box:hover { border-color: rgba(0, 212, 255, 0.35); }

.dt-etl-letter {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
}

.dt-etl-word {
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dt-etl-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.dt-etl-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.5;
  align-self: center;
  margin-top: -0.5rem;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .dt-hero {
    padding: 6rem 1.25rem 2rem;
  }
  .dt-container {
    padding: 0 1.25rem 3rem;
  }
  .dt-tabs {
    gap: 0;
    flex-direction: column;
    overflow-x: visible;
  }
  .dt-tab-group__menu {
    position: static;
    box-shadow: none;
    border: none;
    min-width: unset;
    padding: 0 0 0 1rem;
    background: transparent;
  }
  .dt-tab-group__header {
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    width: 100%;
  }
  .dt-tab {
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
  }
  .dt-pipeline {
    flex-direction: column;
    gap: 0.35rem;
  }
  .dt-pipeline-arrow {
    transform: rotate(90deg);
  }
  .dt-cards {
    grid-template-columns: 1fr;
  }
  .dt-etl-flow {
    flex-direction: column;
    align-items: center;
  }
  .dt-etl-arrow {
    transform: rotate(90deg);
    margin: 0;
  }
  .dt-etl-step {
    min-width: auto;
    width: 100%;
    max-width: 280px;
  }
}

/* ── RBAC Ámbitos (CSS-only interactivity) ─────────── */

.rbac-radios { display: none; }

.rbac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}

.rbac-panel {
  background: var(--card-inner);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  padding: 1.75rem;
}

.rbac-panel-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.rbac-detail-panel {
  border: 2px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s;
}

/* Tree nodes */
.rbac-node {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid;
  transition: all 0.15s;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.rbac-node:hover { filter: brightness(1.25); }

.rbac-node .rbac-badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
  font-weight: 600;
}

/* No indentation — flat list */
.rbac-n1, .rbac-n2, .rbac-n3, .rbac-n3b, .rbac-n4, .rbac-n5 { margin-left: 0; }

/* Node colors */
.rbac-c1 { border-color: rgba(168, 85, 247, 0.2); background: rgba(168, 85, 247, 0.03); }
.rbac-c1 .rbac-badge { background: rgba(168, 85, 247, 0.13); color: #a855f7; }

.rbac-c2 { border-color: rgba(99, 102, 241, 0.2); background: rgba(99, 102, 241, 0.03); }
.rbac-c2 .rbac-badge { background: rgba(99, 102, 241, 0.13); color: #6366f1; }

.rbac-c3 { border-color: rgba(59, 130, 246, 0.2); background: rgba(59, 130, 246, 0.03); }
.rbac-c3 .rbac-badge { background: rgba(59, 130, 246, 0.13); color: #3b82f6; }

.rbac-c3b { border-color: rgba(6, 182, 212, 0.2); background: rgba(6, 182, 212, 0.03); }
.rbac-c3b .rbac-badge { background: rgba(6, 182, 212, 0.13); color: #06b6d4; }

.rbac-c4 { border-color: rgba(14, 165, 233, 0.2); background: rgba(14, 165, 233, 0.03); }
.rbac-c4 .rbac-badge { background: rgba(14, 165, 233, 0.13); color: #0ea5e9; }

.rbac-c5 { border-color: rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.03); }
.rbac-c5 .rbac-badge { background: rgba(16, 185, 129, 0.13); color: #10b981; }

.rbac-c6 { border-color: rgba(245, 158, 11, 0.2); background: rgba(245, 158, 11, 0.03); }
.rbac-c6 .rbac-badge { background: rgba(245, 158, 11, 0.13); color: #f59e0b; }

/* Active states (CSS-only via :checked) */
#rbac-s1:checked ~ .rbac-wrap .rbac-node.rbac-c1 { border-color: #a855f7; background: rgba(168, 85, 247, 0.13); color: #a855f7; font-weight: 700; transform: scale(1.02); }
#rbac-s2:checked ~ .rbac-wrap .rbac-node.rbac-c2 { border-color: #6366f1; background: rgba(99, 102, 241, 0.13); color: #6366f1; font-weight: 700; transform: scale(1.02); }
#rbac-s3:checked ~ .rbac-wrap .rbac-node.rbac-c3 { border-color: #3b82f6; background: rgba(59, 130, 246, 0.13); color: #3b82f6; font-weight: 700; transform: scale(1.02); }
#rbac-s3b:checked ~ .rbac-wrap .rbac-node.rbac-c3b { border-color: #06b6d4; background: rgba(6, 182, 212, 0.13); color: #06b6d4; font-weight: 700; transform: scale(1.02); }
#rbac-s4:checked ~ .rbac-wrap .rbac-node.rbac-c4 { border-color: #0ea5e9; background: rgba(14, 165, 233, 0.13); color: #0ea5e9; font-weight: 700; transform: scale(1.02); }
#rbac-s5:checked ~ .rbac-wrap .rbac-node.rbac-c5 { border-color: #10b981; background: rgba(16, 185, 129, 0.13); color: #10b981; font-weight: 700; transform: scale(1.02); }
#rbac-s6:checked ~ .rbac-wrap .rbac-node.rbac-c6 { border-color: #f59e0b; background: rgba(245, 158, 11, 0.13); color: #f59e0b; font-weight: 700; transform: scale(1.02); }

/* Detail panel border color */
#rbac-s1:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(168, 85, 247, 0.33); }
#rbac-s2:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(99, 102, 241, 0.33); }
#rbac-s3:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(59, 130, 246, 0.33); }
#rbac-s3b:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(6, 182, 212, 0.33); }
#rbac-s4:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(14, 165, 233, 0.33); }
#rbac-s5:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(16, 185, 129, 0.33); }
#rbac-s6:checked ~ .rbac-wrap .rbac-detail-panel { border-color: rgba(245, 158, 11, 0.33); }

/* Detail cards show/hide */
.rbac-detail-card { display: none; flex-direction: column; gap: 1rem; }
#rbac-s1:checked ~ .rbac-wrap .rbac-d1 { display: flex; }
#rbac-s2:checked ~ .rbac-wrap .rbac-d2 { display: flex; }
#rbac-s3:checked ~ .rbac-wrap .rbac-d3 { display: flex; }
#rbac-s3b:checked ~ .rbac-wrap .rbac-d3b { display: flex; }
#rbac-s4:checked ~ .rbac-wrap .rbac-d4 { display: flex; }
#rbac-s5:checked ~ .rbac-wrap .rbac-d5 { display: flex; }
#rbac-s6:checked ~ .rbac-wrap .rbac-d6 { display: flex; }

/* Detail content */
.rbac-detail-header { display: flex; align-items: center; gap: 0.85rem; }

.rbac-d-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}

.rbac-d-name { font-size: 1rem; font-weight: 700; }

.rbac-d-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  border-left: 3px solid;
}

.rbac-d-box-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.rbac-d-box-text { font-size: 0.85rem; color: var(--text-primary); line-height: 1.7; }

.rbac-d-example { border-radius: 10px; padding: 1rem; border: 1px dashed; }
.rbac-d-example-label { font-size: 0.7rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.rbac-d-example-text { font-size: 0.85rem; color: var(--text-primary); line-height: 1.6; }

.rbac-d-note {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: #fbbf24;
  border-left: 3px solid rgba(245, 158, 11, 0.35);
}

.rbac-inherit-note {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Per-card detail colors */
.rbac-d1 .rbac-d-icon { background: rgba(168,85,247,0.13); border: 2px solid rgba(168,85,247,0.27); }
.rbac-d1 .rbac-d-name { color: #a855f7; } .rbac-d1 .rbac-d-box { border-color: #a855f7; }
.rbac-d1 .rbac-d-example { background: rgba(168,85,247,0.07); border-color: rgba(168,85,247,0.33); } .rbac-d1 .rbac-d-example-label { color: #a855f7; }

.rbac-d2 .rbac-d-icon { background: rgba(99,102,241,0.13); border: 2px solid rgba(99,102,241,0.27); }
.rbac-d2 .rbac-d-name { color: #6366f1; } .rbac-d2 .rbac-d-box { border-color: #6366f1; }
.rbac-d2 .rbac-d-example { background: rgba(99,102,241,0.07); border-color: rgba(99,102,241,0.33); } .rbac-d2 .rbac-d-example-label { color: #6366f1; }

.rbac-d3 .rbac-d-icon { background: rgba(59,130,246,0.13); border: 2px solid rgba(59,130,246,0.27); }
.rbac-d3 .rbac-d-name { color: #3b82f6; } .rbac-d3 .rbac-d-box { border-color: #3b82f6; }
.rbac-d3 .rbac-d-example { background: rgba(59,130,246,0.07); border-color: rgba(59,130,246,0.33); } .rbac-d3 .rbac-d-example-label { color: #3b82f6; }

.rbac-d3b .rbac-d-icon { background: rgba(6,182,212,0.13); border: 2px solid rgba(6,182,212,0.27); }
.rbac-d3b .rbac-d-name { color: #06b6d4; } .rbac-d3b .rbac-d-box { border-color: #06b6d4; }
.rbac-d3b .rbac-d-example { background: rgba(6,182,212,0.07); border-color: rgba(6,182,212,0.33); } .rbac-d3b .rbac-d-example-label { color: #06b6d4; }

.rbac-d4 .rbac-d-icon { background: rgba(14,165,233,0.13); border: 2px solid rgba(14,165,233,0.27); }
.rbac-d4 .rbac-d-name { color: #0ea5e9; } .rbac-d4 .rbac-d-box { border-color: #0ea5e9; }
.rbac-d4 .rbac-d-example { background: rgba(14,165,233,0.07); border-color: rgba(14,165,233,0.33); } .rbac-d4 .rbac-d-example-label { color: #0ea5e9; }

.rbac-d5 .rbac-d-icon { background: rgba(16,185,129,0.13); border: 2px solid rgba(16,185,129,0.27); }
.rbac-d5 .rbac-d-name { color: #10b981; } .rbac-d5 .rbac-d-box { border-color: #10b981; }
.rbac-d5 .rbac-d-example { background: rgba(16,185,129,0.07); border-color: rgba(16,185,129,0.33); } .rbac-d5 .rbac-d-example-label { color: #10b981; }

.rbac-d6 .rbac-d-icon { background: rgba(245,158,11,0.13); border: 2px solid rgba(245,158,11,0.27); }
.rbac-d6 .rbac-d-name { color: #f59e0b; } .rbac-d6 .rbac-d-box { border-color: #f59e0b; }
.rbac-d6 .rbac-d-example { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.33); } .rbac-d6 .rbac-d-example-label { color: #f59e0b; }

/* Summary cards */
.rbac-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.rbac-sum-item {
  background: var(--card-inner);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  border: 1px solid;
  transition: filter 0.15s;
}

.rbac-sum-item:hover { filter: brightness(1.2); }
.rbac-sum-icon { font-size: 1rem; margin-bottom: 0.25rem; }
.rbac-sum-label { font-size: 0.625rem; font-weight: 700; }
.rbac-sum-scope { font-size: 0.56rem; color: var(--text-faint); margin-top: 0.2rem; }

/* Roles table */
.rbac-roles {
  background: var(--card-inner);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  padding: 1.75rem;
}

.rbac-roles h3 {
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.rbac-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.rbac-table th { text-align: left; padding: 0.65rem 0.85rem; color: var(--text-muted); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.rbac-table td { padding: 0.75rem 0.85rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-primary); vertical-align: top; }
.rbac-table tr:last-child td { border-bottom: none; }
.rbac-check { color: #10b981; }
.rbac-cross { color: #ef4444; }
.rbac-role-name { color: var(--text-primary); font-weight: 500; white-space: nowrap; }

/* RBAC Responsive */
@media (max-width: 768px) {
  .rbac-grid { grid-template-columns: 1fr; }
  .rbac-summary { grid-template-columns: repeat(3, 1fr); }
  .rbac-n1, .rbac-n2, .rbac-n3, .rbac-n3b, .rbac-n4, .rbac-n5 { margin-left: 0; }
  .rbac-table { font-size: 0.7rem; }
  .rbac-table th, .rbac-table td { padding: 0.4rem 0.5rem; }
}

/* ── M365 Comparison Tables (Swiper carousel) ─────── */

.m365t-swiper {
  position: relative;
  margin: 0 2.5rem;
  padding-bottom: 2.5rem;
  overflow: hidden;
}

.m365t-swiper .swiper-wrapper {
  align-items: stretch;
}

.m365t-swiper .swiper-slide {
  height: auto;
  display: flex;
  flex-direction: column;
}

.m365t-swiper .swiper-slide .m365t-table-wrap {
  flex: 1;
}

.m365t-slide-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow-strong);
  margin-bottom: 1.25rem;
  text-align: center;
}

.m365t-slide-title i {
  margin-right: 0.4rem;
}

.m365t-slide-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
  padding-left: 0.25rem;
}

.m365t-slide-subtitle i {
  color: var(--accent);
  margin-right: 0.4rem;
}

.m365t-table-wrap {
  background: rgba(20, 28, 45, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin: 0 auto;
}

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

.m365t-table thead th {
  text-align: center;
  padding: 1rem 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-bottom: 2px solid rgba(0, 212, 255, 0.45);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: rgba(10, 14, 26, 0.98);
  z-index: 2;
}

.m365t-table thead th:last-child {
  border-right: none;
}


.m365t-table thead th:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
}

/* Column tints by plan */
.m365t-table [data-plan="E3"] {
  background: rgba(96, 165, 250, 0.03);
}
.m365t-table [data-plan="E5"] {
  background: rgba(74, 222, 128, 0.03);
}

.m365t-table tbody td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
  vertical-align: middle;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
}

.m365t-table tbody td:last-child {
  border-right: none;
}

/* Zebra striping */
.m365t-table tbody tr:nth-child(even):not(.m365t-subheader) td {
  background-color: rgba(255, 255, 255, 0.025);
}

.m365t-table thead th:first-child,
.m365t-table tbody td:first-child {
  width: 30%;
}

.m365t-table thead th:not(:first-child),
.m365t-table tbody td:not(:first-child) {
  width: 10%;
}

.m365t-table tbody td:first-child {
  text-align: left;
  color: #fff;
  font-weight: 500;
  min-width: 200px;
  width: auto;
  background: rgba(255, 255, 255, 0.03);
}

.m365t-table tbody tr:last-child td {
  border-bottom: none;
}

.m365t-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

/* Sub-headers inside tables */
.m365t-table tbody tr.m365t-subheader td {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: none;
  border-right: none;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25) 0%, rgba(100, 60, 255, 0.2) 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 212, 255, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Status icons */
.m365t-table td.m365t-check,
.m365t-table td.m365t-cross,
.m365t-table td.m365t-warn,
.m365t-table td.m365t-partial {
  font-size: 0.82rem;
  font-weight: 600;
}

.m365t-table td.m365t-check i,
.m365t-table td.m365t-cross i,
.m365t-table td.m365t-warn i {
  font-size: 1.1rem;
}

.m365t-table td.m365t-check {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}
.m365t-table td.m365t-cross {
  color: #f87171;
  background: rgba(248, 113, 113, 0.06);
}
.m365t-table td.m365t-warn {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.m365t-table td.m365t-partial {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
}

/* Note */
.m365t-note {
  background: rgba(251, 191, 36, 0.04);
  border-left: 3px solid rgba(251, 191, 36, 0.4);
  border-radius: 0 6px 6px 0;
  padding: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-faint);
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.m365t-note strong {
  color: #fbbf24;
}

/* Swiper nav customization */
.m365t-swiper .swiper-button-prev,
.m365t-swiper .swiper-button-next {
  color: var(--accent);
  width: 32px;
  height: 32px;
}

.m365t-swiper .swiper-button-prev::after,
.m365t-swiper .swiper-button-next::after {
  font-size: 0.9rem;
  font-weight: 700;
}

.m365t-swiper .swiper-pagination-bullet {
  background: var(--text-faint);
  opacity: 0.5;
}

.m365t-swiper .swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

/* M365 Tables Responsive */
@media (max-width: 768px) {
  .m365t-swiper {
    margin: 0 0.5rem;
    padding-bottom: 2.5rem;
  }
  .m365t-swiper .swiper-button-prev,
  .m365t-swiper .swiper-button-next {
    display: none;
  }
  .m365t-table {
    font-size: 0.72rem;
  }
  .m365t-table thead th,
  .m365t-table tbody td {
    padding: 0.5rem;
  }
  .m365t-table tbody td:first-child {
    min-width: 140px;
  }
}

/* ── Arquitecturas Azure (Load Balancer diagram) ──── */

.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: fadeUp 0.5s ease both;
}

.arch-node:nth-child(1) { animation-delay: 0.1s; }
.arch-node:nth-child(3) { animation-delay: 0.25s; }
.arch-node:nth-child(5) { animation-delay: 0.4s; }
.arch-node:nth-child(7) { animation-delay: 0.55s; }

.arch-box {
  border: 1px solid;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 130px;
}

.arch-box-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: block;
}

.arch-box-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.arch-box-sub {
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-top: 0.2rem;
}

/* Node color variants */
.arch-box--user    { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); color: var(--text-muted); }
.arch-box--frontend { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.06); color: #4fc3f7; }
.arch-box--lb {
  border-color: rgba(0,180,216,0.4);
  background: linear-gradient(135deg, rgba(0,180,216,0.08), rgba(0,119,182,0.12));
  color: #00b4d8;
  min-width: 160px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.1);
}
.arch-box--pool    { border-color: rgba(102,187,106,0.4); background: rgba(102,187,106,0.06); color: #66bb6a; min-width: 200px; }

/* VM cards inside pool */
.arch-vms {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.arch-vm-card {
  background: rgba(16,185,129,0.05);
  border: 1px solid rgba(46,125,50,0.4);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  text-align: center;
  font-size: 0.62rem;
  color: #81c784;
}

.arch-vm-card i {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* Arrows */
.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.5rem;
  gap: 0.25rem;
  animation: fadeUp 0.5s ease 0.15s both;
}

.arch-arrow svg {
  width: 60px;
  height: 20px;
}

.arch-arrow-label {
  font-size: 0.58rem;
  color: var(--text-faint);
  text-align: center;
  white-space: nowrap;
}

/* Health Probe */
.arch-probe {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.arch-probe-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeUp 0.5s ease 0.7s both;
}

.arch-probe-line {
  width: 2px;
  height: 36px;
  background: linear-gradient(to bottom, #f59e0b, transparent);
  animation: archPulse 2s infinite;
}

@keyframes archPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.arch-probe-box {
  border: 1px dashed rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.05);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  text-align: center;
  color: #ffb74d;
  font-size: 0.68rem;
  line-height: 1.5;
}

.arch-probe-box small {
  color: var(--text-faint);
  font-size: 0.6rem;
}

/* Legend */
.arch-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.arch-legend-item {
  background: var(--card-inner);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.arch-legend-tag {
  display: inline-block;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.arch-legend-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.arch-legend-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .arch-diagram {
    justify-content: flex-start;
    padding-bottom: 0.75rem;
  }
  .arch-box { min-width: 100px; padding: 0.75rem; }
  .arch-box--lb { min-width: 130px; }
  .arch-box--pool { min-width: 160px; }
  .arch-legend { grid-template-columns: 1fr; }
}

/* --- Shared Responsibility Matrix --- */

.srm {
  margin-bottom: 2rem;
}

/* Header row */
.srm-head {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.srm-head__layers {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 0.6rem 0.8rem;
  align-self: end;
}
.srm-head__col {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.6rem;
  border-radius: 8px;
}
.srm-head__col--iaas { color: #60a5fa; background: rgba(96,165,250,0.1); }
.srm-head__col--paas { color: #00d4ff; background: rgba(0,212,255,0.08); }
.srm-head__col--saas { color: #a78bfa; background: rgba(167,139,250,0.08); }

/* Rows */
.srm-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.srm-row__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.65rem 0.8rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.015);
}
.srm-row__cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

/* Cell variants */
.srm-cell--you {
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.2);
  color: #93c5fd;
}
.srm-cell--ms {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text-faint);
}
.srm-cell--shared {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  color: #fbbf24;
}

/* Legend */
.srm-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.srm-legend__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.srm-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.srm-legend__dot--you { background: rgba(96,165,250,0.35); border: 1px solid rgba(96,165,250,0.5); }
.srm-legend__dot--shared { background: rgba(251,191,36,0.3); border: 1px solid rgba(251,191,36,0.5); }
.srm-legend__dot--ms { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }

/* Info cards */
.srm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.srm-card {
  background: var(--card-inner, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1.25rem 1.3rem;
  border-top: 2px solid;
}
.srm-card--iaas { border-top-color: #60a5fa; }
.srm-card--paas { border-top-color: #00d4ff; }
.srm-card--saas { border-top-color: #a78bfa; }

.srm-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}
.srm-card__head i { font-size: 1.3rem; }
.srm-card--iaas .srm-card__head i { color: #60a5fa; }
.srm-card--paas .srm-card__head i { color: #00d4ff; }
.srm-card--saas .srm-card__head i { color: #a78bfa; }

.srm-card__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.srm-card--iaas .srm-card__title { color: #60a5fa; }
.srm-card--paas .srm-card__title { color: #00d4ff; }
.srm-card--saas .srm-card__title { color: #a78bfa; }

.srm-card__subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}
.srm-card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.65rem;
}
.srm-card__example {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.srm-card__example strong {
  color: var(--text-secondary);
}

/* SRM responsive */
@media (max-width: 768px) {
  .srm-head, .srm-row { grid-template-columns: 1.2fr repeat(3, 1fr); }
  .srm-row__label { font-size: 0.72rem; }
  .srm-row__cell { font-size: 0.62rem; padding: 0.5rem 0.3rem; }
  .srm-cards { grid-template-columns: 1fr; }
  .srm-legend { flex-direction: column; gap: 0.5rem; }
}

/* --- Interactive Load Balancer --- */

/* View tabs */
.lb-view-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 1.5rem;
}
.lb-vtab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.65rem 1.35rem;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  transition: all 0.2s;
}
.lb-vtab--active { color: var(--accent); border-bottom-color: var(--accent); }
.lb-vtab:hover:not(.lb-vtab--active) { color: var(--text-muted); }

/* Views */
.lb-view { display: none; }
.lb-view--active { display: block; }

/* AZ wrapper */
.lb-az-wrap {
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.25rem;
  position: relative;
  margin-bottom: 1rem;
}
.lb-az-label {
  position: absolute;
  top: -0.55rem;
  left: 1.25rem;
  background: var(--bg-dark, #0a0f1a);
  padding: 0 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* NSG wrapper */
.lb-nsg-wrap {
  border: 1px dashed rgba(229,115,115,0.3);
  border-radius: 10px;
  padding: 1.5rem 1rem 1rem;
  position: relative;
}
.lb-nsg-label {
  position: absolute;
  top: -0.55rem;
  left: 1rem;
  background: var(--bg-dark, #0a0f1a);
  padding: 0 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: rgba(229,115,115,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s;
}
.lb-nsg-label:hover { color: #e57373; }

/* Flow row */
.lb-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1rem 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}

/* Nodes */
.lb-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  position: relative;
}
.lb-node-box {
  border: 1px solid;
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  text-align: center;
  transition: all 0.25s;
  min-width: 135px;
}
.lb-node:hover .lb-node-box { transform: translateY(-3px); }
.lb-node.lb-node--selected .lb-node-box {
  box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(0,212,255,0.15);
}
.lb-node-icon { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.lb-node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}
.lb-node-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Node color variants */
.lb-node--user .lb-node-box { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); color: var(--text-muted); }
.lb-node--nsg .lb-node-box { border-color: rgba(229,115,115,0.35); background: rgba(229,115,115,0.04); color: #e57373; }
.lb-node--fip .lb-node-box { border-color: rgba(100,181,246,0.35); background: rgba(100,181,246,0.04); color: #64b5f6; }
.lb-node--lb .lb-node-box {
  border-color: rgba(0,180,216,0.4);
  background: linear-gradient(135deg, rgba(0,180,216,0.08), rgba(0,119,182,0.12));
  color: #00b4d8;
  min-width: 165px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0 25px rgba(0,180,216,0.1);
}
.lb-node--pool .lb-node-box { border-color: rgba(102,187,106,0.35); background: rgba(102,187,106,0.04); color: #66bb6a; min-width: 175px; }

/* VMs inside pool */
.lb-vms { display: flex; gap: 0.45rem; margin-top: 0.55rem; justify-content: center; }
.lb-vm {
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(46,125,50,0.35);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #a5d6a7;
}

/* Arrows */
.lb-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 0 0.25rem;
}
.lb-arrow-track {
  position: relative;
  width: 72px;
  height: 22px;
  display: flex;
  align-items: center;
}
.lb-arrow-svg { width: 100%; height: 100%; overflow: visible; }
.lb-arrow-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* Animated packets */
.lb-pkt {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  animation: lbTravel 1.8s linear infinite;
}
@keyframes lbTravel {
  0%   { left: 0; opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}
.lb-pkt--blue { background: #4fc3f7; }
.lb-pkt--green { background: #66bb6a; }
.lb-pkt--red { background: #ef9a9a; }
.lb-pkt--lightblue { background: #64b5f6; }

/* Tooltip on hover */
.lb-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-inner, #080f1c);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
}
.lb-node:hover .lb-tooltip,
.lb-rule:hover .lb-tooltip { opacity: 1; }

/* Rules row */
.lb-rules-row {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.lb-rule {
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.lb-rule:hover .lb-rule-box { transform: translateY(-2px); }
.lb-rule.lb-node--selected .lb-rule-box { box-shadow: 0 0 0 2px var(--accent); }
.lb-rule-box {
  border: 1px dashed;
  border-radius: 8px;
  padding: 0.9rem 1.15rem;
  text-align: center;
  transition: all 0.25s;
  min-width: 145px;
}
.lb-rule-icon { font-size: 1.5rem; display: block; margin-bottom: 0.35rem; }
.lb-rule-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

/* Rule color variants */
.lb-rule--nat .lb-rule-box { border-color: rgba(255,183,77,0.35); background: rgba(255,183,77,0.04); color: #ffb74d; }
.lb-rule--lbr .lb-rule-box { border-color: rgba(79,195,247,0.35); background: rgba(79,195,247,0.04); color: #4fc3f7; }
.lb-rule--out .lb-rule-box { border-color: rgba(206,147,216,0.35); background: rgba(206,147,216,0.04); color: #ce93d8; }
.lb-rule--prb .lb-rule-box { border-color: rgba(255,241,118,0.35); background: rgba(255,241,118,0.04); color: #fff176; }

/* Probe pulse */
.lb-probe-pulse { animation: lbProbePulse 2s ease-in-out infinite; }
@keyframes lbProbePulse { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

/* Hint */
.lb-hint {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Config table */
.lb-cfg-intro {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.lb-cfg-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.lb-cfg-table th {
  text-align: left;
  color: var(--text-muted);
  padding: 0.65rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lb-cfg-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.lb-cfg-table td:first-child { color: var(--text-primary, #e2e8f0); }
.lb-cfg-table tr:hover td { background: rgba(255,255,255,0.02); }
.lb-cv.lb-hl { color: var(--accent); }
.lb-cv.lb-hl--green { color: #66bb6a; }
.lb-cv.lb-hl--amber { color: #ffb74d; }

/* Inline detail section */
.lb-detail-section {
  display: none;
  margin-top: 1.75rem;
  animation: lbCardIn 0.3s ease;
}
.lb-detail-section.lb-detail--open { display: block; }
@keyframes lbCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lb-detail-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.lb-detail-section__identity {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.lb-detail-icon { font-size: 1.8rem; display: block; margin-top: 0.1rem; }
.lb-detail-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.lb-detail-badge {
  display: inline-block;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.15);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.lb-detail-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-faint);
  width: 30px;
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.lb-detail-close:hover { border-color: var(--text-muted); color: var(--text-secondary); }

/* Detail grid — 3 cards */
.lb-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.lb-detail-grid__card {
  background: var(--card-inner, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 1.35rem 1.4rem;
}
.lb-detail-grid__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.95rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lb-detail-grid__label i {
  margin-right: 0.35rem;
  opacity: 0.7;
}

/* Content elements inside detail cards */
.lb-slbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  margin-top: 1.1rem;
}
.lb-slbl:first-child { margin-top: 0; }
.lb-dtxt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.lb-ci {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lb-ck {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.lb-cv {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.lb-uci {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
}
.lb-uct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  margin-bottom: 0.3rem;
}
.lb-ucd {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* LB responsive */
@media (max-width: 768px) {
  .lb-flow { justify-content: flex-start; }
  .lb-node-box { min-width: 90px; padding: 0.65rem 0.7rem; }
  .lb-node--lb .lb-node-box { min-width: 110px; }
  .lb-node--pool .lb-node-box { min-width: 120px; }
  .lb-rules-row { gap: 0.5rem; }
  .lb-rule-box { min-width: 100px; padding: 0.55rem 0.7rem; }
  .lb-detail-grid { grid-template-columns: 1fr; }
  .lb-cfg-table { font-size: 0.68rem; }
}

/* #endregion */
