.section {
  background: #fff;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.25rem;
}

.view-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 0.75rem;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(0, 86, 142, 0.18);
  border-top-color: rgba(0, 86, 142, 0.85);
  animation: spin 0.9s linear infinite;
}

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

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.section-header h2 {
  margin: 0;
  color: #00568e;
  font-size: 1.35rem;
}

.subsection-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  color: #333;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.5;
}

.muted {
  color: #5c6570;
  font-size: 0.92rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e8f4fc;
  color: #00568e;
}

.badge-soft {
  background: #eef2f7;
  color: #333;
}

.badge-ok {
  background: #e6f4ea;
  color: #1b5e20;
}

.badge-warn {
  background: #fff3e0;
  color: #e65100;
}

.badge-info {
  background: #e8eaf6;
  color: #3949ab;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: #f8fafc;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.stat-label {
  font-size: 0.78rem;
  color: #5c6570;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00568e;
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 10px;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--edith-border, #e5e8ec);
  border-radius: 10px;
  background: var(--edith-surface, #ffffff);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  color: var(--edith-text, #1a2332);
}

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

.table th {
  background: var(--edith-surface-muted, #f8fafc);
  font-weight: 600;
  color: var(--edith-primary, #00568e);
}

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

code.small {
  font-size: 0.78rem;
}

.card-block {
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #fafbfc;
}

.card-block h4 {
  margin: 0 0 0.5rem;
  color: #00568e;
}

.list-plain {
  margin: 0;
  padding-left: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

/* Gana sobre display de .btn; sin esto, [hidden] no oculta (p. ej. "Siguiente" en el último paso del wizard). */
.btn[hidden] {
  display: none !important;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: #00568e;
  color: #fff;
  border-color: #00568e;
}

.btn-primary:hover {
  background: #0066a3;
}

.btn-secondary {
  background: #fff;
  color: #00568e;
  border-color: #00568e;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  background: #fff;
  color: #00568e;
}

/* En modales (fondo claro): ghost debe leerse sin hover */
.app-dialog .btn-ghost {
  background: #fff;
  color: #0c2744;
  border-color: rgba(12, 39, 68, 0.28);
}

.app-dialog .btn-ghost:hover {
  background: #e8eef5;
  color: #0c2744;
  border-color: #0c2744;
}

.app-dialog .btn-secondary {
  background: #fff;
  color: #0c2744;
  border-color: rgba(12, 39, 68, 0.35);
}

.app-dialog .btn-secondary:hover {
  background: #e8eef5;
  border-color: #0c2744;
}

.app-dialog .btn-primary {
  background: #0c2744;
  border-color: #0c2744;
}

.app-dialog .btn-primary:hover {
  background: #0a3a5c;
  border-color: #0a3a5c;
}

/* Acciones en tabla Admin → Usuarios (Material: ámbar edición, rojo eliminar) */
.user-actions-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.user-table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Planos tipo Material Expressive: sólidos, sin sombra ni degradado, píldora muy redondeada */
.btn-edit-user,
.btn-del-user {
  border-width: 0;
  border-color: transparent;
  box-shadow: none;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0.01em;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.btn-edit-user:hover,
.btn-edit-user:active,
.btn-del-user:hover,
.btn-del-user:active {
  box-shadow: none;
}

.btn-edit-user {
  background: #ff9800;
  color: rgba(0, 0, 0, 0.87);
}

.btn-edit-user:hover {
  background: #ffa726;
}

.btn-edit-user:active {
  background: #fb8c00;
}

.btn-edit-user:focus-visible {
  outline: 2px solid #e65100;
  outline-offset: 2px;
}

.btn-del-user {
  background: #e53935;
  color: #fff;
}

.btn-del-user:hover {
  background: #ef5350;
}

.btn-del-user:active {
  background: #c62828;
}

.btn-del-user:focus-visible {
  outline: 2px solid #b71c1c;
  outline-offset: 2px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  max-width: 640px;
}

.form-grid--wide {
  max-width: none;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1100px) {
  .form-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }}

.form-group-span {
  grid-column: 1 / -1;
}

.form-actions {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .form-grid,
  .form-grid--wide {
    grid-template-columns: 1fr;
  }}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-err {
  background: #ffebee;
  color: #b00020;
  border: 1px solid #ffcdd2;
}

.alert-warn {
  background: #fff8e1;
  color: #6d4c00;
  border: 1px solid #ffe082;
}

.hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100dvh;
  padding: 0;
  margin: 0;
  background: #eef1f5;
}

.login-split {
  position: relative;
  display: flex;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
}

.login-theme-toggle {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(12, 39, 68, 0.28);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.login-theme-toggle:hover {
  background: rgba(12, 39, 68, 0.45);
  border-color: rgba(255, 255, 255, 0.55);
}

.login-theme-toggle:active {
  transform: scale(0.96);
}

.login-theme-toggle .edith-theme-icon {
  display: block;
}

.login-split-brand {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(165deg, #062a4a 0%, #0a3a5c 42%, #0c2744 100%);
  color: #fff;
}

.login-split-brand-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  max-width: 24rem;
}

.login-brand-mark {
  width: clamp(6.5rem, 16vw, 8rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.login-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
}

.login-brand-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.login-brand-slogan {
  display: block;
  max-width: 20rem;
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.9;
  letter-spacing: 0.01em;
}

.login-brand-expansion {
  display: block;
  max-width: 20rem;
  font-size: clamp(0.65rem, 1.55vw, 0.78rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  opacity: 0.82;
  letter-spacing: 0.01em;
}

.login-brand-sys {
  margin-top: 0.15rem;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.01em;
  text-transform: none;
  max-width: 18rem;
  line-height: 1.35;
}

.login-split-panel {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: #eef1f5;
}

.login-panel-inner,
.login-panel-card {
  width: 100%;
  max-width: 26rem;
}

/* Contenedor de inputs estilo Insular */
.login-panel-card {
  background: #ffffff;
  border-radius: 24px;
  padding: clamp(1.6rem, 3.5vw, 2.25rem);
  box-shadow: 0 12px 40px rgba(12, 39, 68, 0.1), 0 2px 8px rgba(12, 39, 68, 0.04);
}

.login-panel-heading {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 3.5vw, 1.75rem);
  font-weight: 700;
  color: #0c2744;
}

.login-panel-lead {
  margin: 0 0 1.65rem;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.45;
}

.login-panel-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-field {
  margin-bottom: 1.1rem;
}

.login-field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
}

.login-field-label-row .login-field-label {
  margin: 0;
}

.login-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0c2744;
  margin: 0 0 0.35rem;
}

.login-forgot-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a3a5c;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.login-forgot-link:hover {
  text-decoration: underline;
}

.login-forgot-below {
  margin: 0.55rem 0 0;
  text-align: right;
}

.login-cooldown {
  margin: 0.5rem 0 0;
  text-align: center;
}

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

.login-field-input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  color: #0f172a;
  background: #f4f6f9;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-field-input:focus {
  outline: none;
  border-color: #0a3a5c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 58, 92, 0.12);
}

.login-field-input::placeholder {
  color: #94a3b8;
}

.login-password-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f6f9;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-password-row:focus-within {
  border-color: #0a3a5c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 58, 92, 0.12);
}

.login-field-input--password {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
  background: transparent;
}

.login-field-input--password:focus {
  box-shadow: none;
  background: transparent;
}

.login-password-toggle {
  flex-shrink: 0;
  width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-left: 1px solid #e5e7eb;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.login-password-toggle:hover {
  color: #0c2744;
}

.login-err {
  min-height: 1.25rem;
  color: #b00020;
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.login-submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: #0c2744;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.login-submit:hover {
  background: #0a3a5c;
}

.login-submit:active {
  transform: scale(0.99);
}

.login-foot-link {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.login-foot-link a {
  color: #0a3a5c;
  font-weight: 600;
  text-decoration: none;
}

.login-foot-link a:hover {
  text-decoration: underline;
}

@media (max-width: 840px) {
  .login-split {
    flex-direction: column;
  }

  .login-split-brand {
    flex: 0 0 auto;
    min-height: auto;
    padding: max(2.75rem, calc(env(safe-area-inset-top) + 2.25rem)) 1.25rem 1.35rem;
  }

  .login-split-panel {
    flex: 1 1 auto;
    align-items: flex-start;
    padding: 1.25rem 1rem max(2rem, env(safe-area-inset-bottom));
  }

  .login-panel-card {
    max-width: 100%;
  }

  .login-theme-toggle {
    top: max(0.65rem, env(safe-area-inset-top));
    right: max(0.65rem, env(safe-area-inset-right));
  }
}

.badge-tonal {
  background: rgba(0, 86, 142, 0.1);
  color: #00426d;
  border: 1px solid rgba(0, 86, 142, 0.18);
}

.btn-elevated {
  box-shadow: 0 2px 8px rgba(0, 44, 74, 0.14);
}

.btn-elevated:hover {
  box-shadow: 0 4px 16px rgba(0, 44, 74, 0.2);
}

.m3-surface {
  border-radius: 16px;
  background: linear-gradient(165deg, #ffffff 0%, #f4f7fb 100%);
  border: 1px solid rgba(0, 44, 74, 0.08);
  box-shadow: 0 2px 12px rgba(0, 44, 74, 0.06);
}

.stat-card-expressive {
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(0, 44, 74, 0.07);
  box-shadow: 0 2px 10px rgba(0, 44, 74, 0.05);
  border-radius: 14px;
}

.panel-pad {
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.overview-leader {
  margin: 0.35rem 0 1rem;
}

.overview-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-panel {
  padding: 0.75rem 0.75rem 0.25rem;
  min-height: 260px;
}

.chart-panel canvas {
  max-height: 260px !important;
}

.table-expressive {
  border-radius: 14px;
  border-color: rgba(0, 44, 74, 0.08);
}

.link-inline {
  color: #00568e;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 86, 142, 0.25);
}

.link-inline:hover {
  border-bottom-color: #00568e;
}

.cluster-strip {
  margin-bottom: 1rem;
}

.cluster-strip-title {
  font-weight: 700;
  color: #00568e;
  margin-bottom: 0.5rem;
}

.dc-topo-section {
  margin-bottom: 1.5rem;
}

.dc-topo-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem 1rem;
}

.dc-topo-summary-title {
  font-weight: 700;
  color: #00568e;
  margin-bottom: 0.65rem;
}

.dc-big {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a2330;
}

.log-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-top: 0.35rem;
}

.log-task-select,
.log-type-select {
  min-width: 200px;
  margin-bottom: 0;
}

.log-viewport {
  position: relative;
  margin-top: 0.75rem;
}

.log-viewport .log-live,
.log-viewport .log-grid-out {
  margin-top: 0;
}

.log-viewport:fullscreen,
.log-viewport.log-viewport--fs-fallback {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  margin-top: 0;
  border-radius: 0;
}

.log-viewport.log-viewport--fs-fallback {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
}

.log-viewport:fullscreen .log-live,
.log-viewport:fullscreen .log-grid-out,
.log-viewport.log-viewport--fs-fallback .log-live,
.log-viewport.log-viewport--fs-fallback .log-grid-out {
  flex: 1;
  min-height: 0;
  max-height: none;
  height: auto;
  border-radius: 0;
}

.log-grid-cell:fullscreen,
.log-grid-cell.log-grid-cell--fs-fallback {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 0;
  z-index: 10000;
}

.log-grid-cell.log-grid-cell--fs-fallback {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  overflow: hidden;
}

.log-grid-cell:fullscreen .log-grid-out,
.log-grid-cell.log-grid-cell--fs-fallback .log-grid-out {
  flex: 1;
  min-height: 0;
  max-height: none;
  font-size: 0.82rem;
  line-height: 1.45;
}

.log-grid-shell:fullscreen,
.log-grid-shell.log-grid-shell--fs-fallback {
  background: #eef2f7;
  padding: 1rem;
  overflow: auto;
  box-sizing: border-box;
}

.log-grid-shell.log-grid-shell--fs-fallback {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
}

.log-grid-shell:fullscreen .log-grid,
.log-grid-shell.log-grid-shell--fs-fallback .log-grid {
  min-height: min(100%, 100vh);
}

.log-grid-shell:fullscreen .log-grid-out,
.log-grid-shell.log-grid-shell--fs-fallback .log-grid-out {
  max-height: min(42vh, 480px);
}

body.log-fullscreen-active {
  overflow: hidden;
}

.log-live {
  margin-top: 1rem;
  padding: 1rem;
  min-height: 280px;
  max-height: min(70vh, 720px);
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.log-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.85rem 0 0.35rem;
  padding: 0.2rem;
  background: rgba(0, 44, 74, 0.06);
  border-radius: 999px;
}

.log-tab {
  border: none;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: #5c6570;
}

.log-tab--active {
  background: #fff;
  color: #00568e;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.log-mode-panel.hidden {
  display: none;
}

.hist-dt {
  min-width: 11rem;
}

.hist-limit {
  width: 5.25rem;
}

.log-history-filters {
  align-items: flex-end;
}

.log-hist-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0;
}

.log-hist-ts {
  font-size: 0.72rem;
  margin-right: 0.35rem;
}

.log-hist-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.log-hist-tag--out {
  color: #86efac;
}

.log-hist-tag--err {
  color: #fca5a5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.log-grid-toolbar {
  margin-bottom: 1rem;
}

.log-grid-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.grid-dim-input {
  width: 4.5rem;
}

.log-grid-shell {
  min-height: 200px;
}

.log-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 2), minmax(0, 1fr));
  gap: 0.75rem;
}

.log-grid-cell {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 44, 74, 0.08);
}

.log-grid-cell-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.log-grid-cell-head-idblock {
  flex: 1 1 120px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  align-items: flex-start;
}

.log-grid-cell-id {
  font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00568e;
  min-width: 0;
  max-width: 100%;
}

.log-grid-cell-node {
  font-size: 0.72rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-grid-cell .field-select {
  min-width: 0;
  flex: 1 1 120px;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

.log-grid-out {
  flex: 1;
  min-height: 160px;
  max-height: 320px;
  overflow: auto;
  font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.app-dialog {
  border: none;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  max-width: 38rem;
  width: calc(100vw - 2rem);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.app-dialog--wide {
  max-width: 44rem;
}

.app-dialog h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #0c2744;
}

.app-dialog .field-label {
  color: #0a3a5c;
}

.app-dialog .dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.app-dialog textarea.field-input {
  width: 100%;
  min-height: 9rem;
  font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  resize: vertical;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.qa-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0, 44, 74, 0.08);
  background: linear-gradient(165deg, #ffffff 0%, #f6f8fb 100%);
  box-shadow: 0 2px 10px rgba(0, 44, 74, 0.05);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.qa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 44, 74, 0.1);
  border-color: rgba(0, 86, 142, 0.2);
}

.qa-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.qa-card-icon svg {
  display: block;
}

.qa-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.qa-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1a2330;
}

.qa-card-desc {
  font-size: 0.82rem;
  color: #5c6570;
  line-height: 1.35;
}

.qa-card--blue .qa-card-icon {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}
.qa-card--teal .qa-card-icon {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}
.qa-card--violet .qa-card-icon {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}
.qa-card--amber .qa-card-icon {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}
.qa-card--slate .qa-card-icon {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}
.qa-card--rose .qa-card-icon {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
}
.qa-card--indigo .qa-card-icon {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.field-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  cursor: pointer;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #334155;
  border: 1px solid rgba(0, 44, 74, 0.1);
  background: #fff;
}

.tab-link:hover {
  border-color: rgba(0, 86, 142, 0.25);
  color: #00568e;
}

.tab-link.active {
  background: #00568e;
  color: #fff;
  border-color: #00568e;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.table-dense th,
.table-dense td {
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}

/* Tablas: mantener links con color de enlaces (no morado visited) */
.table a,
.table a:visited {
  color: #00568e;
  text-decoration: none;
}

.table a:hover {
  text-decoration: underline;
}

.field--inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary, #00568e);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  max-height: 90vh;
  overflow: auto;
}