/* SovereignStack — shell E2E; sin estilos inline (CSP style-src 'self'). */

:root {
  --bg0: #0a0a0a;
  --bg1: #141414;
  --text: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.72);

  --emerald: #00e676;
  --emerald2: #00c853;

  --amber: #f59e0b;
  --amber2: #fb923c;

  --glass: rgba(255, 255, 255, 0.06);
  --glass2: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(31, 31, 31, 1);
  --border-emerald: rgba(0, 230, 118, 0.35);
  --process-accent: #00e676;
  --process-accent-glow: rgba(0, 230, 118, 0.35);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  letter-spacing: 0.01em;
}

.app-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 36px;
  line-height: 1.55;
}

.app-shell.high-risk-mode {
  --emerald: #ff8c00;
  --emerald2: #8b0000;
  --border-emerald: rgba(255, 140, 0, 0.45);
  --process-accent: #d31f45;
  --process-accent-glow: rgba(211, 31, 69, 0.42);
}

.workbench {
  background: #111;
  border: 1px solid rgba(31, 31, 31, 1);
  border-radius: 20px;
  padding: 22px 18px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  overflow: visible;
}

.workbench-head {
  margin-bottom: 18px;
}

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

.workbench-head-row h1 {
  flex: 1 1 220px;
  margin: 0;
}

.locale-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 0;
  flex: 0 0 auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.locale-bar-label {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.locale-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}

.locale-select:focus-visible {
  outline: 2px solid var(--border-emerald);
  outline-offset: 2px;
}

/* Centro de Documentacion: solo suite oficial 01–03; estilo sobrio (i18n: data-i18n-* reservados). */
.docs-center {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.docs-center-title {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.88);
}

.docs-center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.docs-doc-btn {
  margin: 0;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 580;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 14, 0.85);
  color: rgba(228, 231, 236, 0.94);
  cursor: pointer;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease;
}

button.docs-doc-btn:hover {
  border-color: rgba(0, 230, 118, 0.35);
  background: rgba(0, 230, 118, 0.07);
  color: rgba(236, 253, 245, 0.98);
}

button.docs-doc-btn:focus-visible {
  outline: 1px solid rgba(0, 230, 118, 0.45);
  outline-offset: 2px;
}

.app-shell.high-risk-mode .docs-center {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(127, 29, 29, 0.08);
}

.app-shell.high-risk-mode .docs-center-title {
  color: rgba(254, 243, 199, 0.9);
}

.app-shell.high-risk-mode button.docs-doc-btn {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 247, 237, 0.94);
}

.app-shell.high-risk-mode button.docs-doc-btn:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.09);
}

.workbench-head .app-meta {
  margin: 10px 0 0;
}

.sovereignty-status {
  margin-top: 12px;
  border: 1px solid rgba(0, 230, 118, 0.26);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.1), rgba(12, 18, 14, 0.92));
  border-radius: 12px;
  padding: 10px 12px;
}

.sovereignty-status-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(167, 243, 208, 0.98);
  font-size: 0.86rem;
}

.sovereignty-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--emerald);
  border: 1px solid rgba(0, 230, 118, 0.5);
  background: rgba(0, 230, 118, 0.14);
}

.sovereignty-status p {
  margin: 6px 0 0;
  color: rgba(209, 250, 229, 0.92);
  font-size: 0.86rem;
  line-height: 1.4;
}

.technical-shield-status {
  margin-top: 10px;
  border: 1px solid rgba(120, 138, 163, 0.28);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(12, 14, 18, 0.92));
  border-radius: 12px;
  padding: 10px 12px;
}

.technical-shield-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.86rem;
}

.technical-shield-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.technical-shield-list li {
  display: grid;
  gap: 2px;
  font-size: 0.8rem;
  color: rgba(203, 213, 225, 0.88);
}

.technical-shield-list li strong {
  font-weight: 740;
}

.technical-shield-list li span {
  color: rgba(148, 163, 184, 0.9);
}

.technical-shield-list li.ok strong {
  color: rgba(167, 243, 208, 0.96);
}

.technical-shield-list li.warn strong {
  color: rgba(253, 186, 116, 0.96);
}

.workbench-head h1 {
  margin: 0;
}

.app-shell.semaphore-amber {
  animation: amberPulse 1.35s ease-in-out infinite;
}

@keyframes amberPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(245, 158, 11, 0.35),
      0 0 28px rgba(245, 158, 11, 0.22);
  }
}

.app-shell h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 800;
}

.app-meta {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Dropzone */
#videoInput {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.dropzone {
  width: 100%;
  box-sizing: border-box;
  height: clamp(240px, 52vh, 420px);
  border-radius: 18px;
  border: 1px dashed rgba(31, 31, 31, 0.18);
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.dropzone:focus-visible {
  box-shadow:
    0 0 0 3px rgba(0, 230, 118, 0.25),
    0 18px 48px rgba(0, 0, 0, 0.35);
}

.dropzone--active {
  border-color: rgba(0, 230, 118, 0.85);
  box-shadow:
    0 0 0 5px rgba(0, 230, 118, 0.16),
    0 0 36px rgba(0, 230, 118, 0.18),
    0 18px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

button,
select,
details.advanced > summary {
  transition: all 0.3s ease;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dropzone-icons {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  color: var(--emerald2);
  opacity: 0.98;
  filter: drop-shadow(0 0 16px rgba(0, 230, 118, 0.25));
}

.dropzone-icon {
  color: inherit;
}

.dropzone-title {
  font-weight: 850;
  font-size: 1.07rem;
}

/* Controls */
.app-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin: 0;
}

.app-controls label {
  font-size: 0.78rem;
  color: rgba(244, 244, 245, 0.55);
  font-weight: 650;
}

.app-controls select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(20, 20, 20, 0.65);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  height: 40px;
}

.app-controls .app-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  color: rgba(244, 244, 245, 0.55);
  font-weight: 650;
  font-size: 0.78rem;
}

.app-controls .app-checkbox input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--emerald);
}

.incognito-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.info-icon-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 244, 245, 0.82);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.security-tooltip {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 8px);
  right: 0;
  top: auto;
  width: min(360px, 78vw);
  border-radius: 10px;
  border: 1px solid rgba(0, 230, 118, 0.28);
  background: #111;
  color: rgba(244, 244, 245, 0.9);
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.incognito-control:hover .security-tooltip,
.incognito-control:focus-within .security-tooltip,
.incognito-control.is-open .security-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Progress (delgada) */
#progressBar {
  display: block;
  width: 100%;
  height: 3px;
  margin: 0 0 14px;
  border-radius: 0;
  background: rgba(0, 230, 118, 0.12);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.3s ease;
}

#progressBar::-webkit-progress-bar {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

#progressBar::-webkit-progress-value {
  background: linear-gradient(90deg, rgba(0, 230, 118, 0.95), rgba(0, 200, 83, 0.75));
}

#progressBar::-moz-progress-bar {
  background: linear-gradient(90deg, rgba(0, 230, 118, 0.95), rgba(0, 200, 83, 0.75));
}

#status {
  margin-top: 12px;
  min-height: 1.25em;
  color: rgba(248, 250, 252, 0.86);
}

#status.processing-complete {
  color: rgba(134, 239, 172, 0.98);
  font-weight: 650;
}

.forensic-success {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 230, 118, 0.34);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.12), rgba(6, 14, 10, 0.9));
}

.forensic-success-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.forensic-shield {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--emerald);
  border: 1px solid rgba(0, 230, 118, 0.38);
  background: rgba(0, 230, 118, 0.12);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
}

.forensic-success-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.forensic-success-head p {
  margin: 1px 0 0;
  color: rgba(134, 239, 172, 0.98);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.forensic-success-body {
  margin-top: 10px;
}

.forensic-success-body p {
  margin: 4px 0;
  color: rgba(236, 253, 245, 0.94);
  overflow-wrap: anywhere;
}

.stealth-timestamp-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 230, 118, 0.28);
  background: rgba(0, 0, 0, 0.15);
}

.stealth-timestamp-options {
  margin-top: 8px;
  display: flex;
  gap: 14px;
}

.stealth-timestamp-options.is-disabled {
  opacity: 0.5;
}

/* Botones */
button#cancelBtn {
  border-radius: 8px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: transparent;
  color: rgba(244, 244, 245, 0.6);
  padding: 8px 10px;
  cursor: pointer;
}

button#secureLogoutBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald);
  border: 1px solid rgba(0, 230, 118, 0.65);
  color: #0a0a0a;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(0, 230, 118, 0.2),
    0 0 18px rgba(0, 230, 118, 0.22);
}

button#secureLogoutBtn.opsec-unverified {
  background: rgba(126, 136, 150, 0.28);
  border-color: rgba(126, 136, 150, 0.45);
  color: rgba(227, 233, 242, 0.9);
  box-shadow: none;
  filter: saturate(0.7);
}

button#secureLogoutBtn.opsec-verified {
  background: var(--emerald);
  border-color: rgba(0, 230, 118, 0.65);
  color: #0a0a0a;
}

.app-shell.high-risk-mode button#secureLogoutBtn.opsec-verified {
  background: #d31f45;
  border-color: rgba(211, 31, 69, 0.75);
  color: #fff4f6;
  box-shadow:
    0 0 0 1px rgba(211, 31, 69, 0.3),
    0 0 20px rgba(211, 31, 69, 0.32);
}

.secure-verify-badge {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 760;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #f3f7ff;
  opacity: 0;
  transform: translateY(1px) scale(0.96);
  transition: opacity 180ms ease, transform 220ms ease;
}

.secure-verify-badge.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

button#downloadBtn {
  border-radius: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(0, 0, 0, 0.15);
  color: rgba(244, 244, 245, 0.85);
  font-weight: 800;
  cursor: pointer;
}

button#downloadBtn:disabled {
  display: none;
}

/* Settings bar wrapper + footer */
.settings-wrap {
  position: relative;
}

.high-risk-banner {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 140, 0, 0.55);
  background: linear-gradient(180deg, rgba(139, 0, 0, 0.24), rgba(24, 8, 4, 0.95));
  color: rgba(255, 225, 194, 0.96);
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.forensic-stage-tracker {
  margin-top: 12px;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
}

.forensic-stage-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  color: rgba(155, 163, 176, 0.92);
  text-transform: uppercase;
}

.forensic-stage-list {
  display: grid;
  gap: 12px;
}

.forensic-stage-step {
  --stage-progress: 0%;
  position: relative;
  padding: 2px 0;
}

.forensic-stage-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forensic-stage-step-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: rgba(198, 206, 217, 0.9);
  letter-spacing: 0.01em;
}

.forensic-stage-subtitle {
  margin: 2px 0 8px;
  font-size: 0.76rem;
  color: rgba(88, 96, 109, 0.95);
  line-height: 1.35;
}

.forensic-stage-bar {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.forensic-stage-fill {
  display: block;
  width: var(--stage-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--process-accent), color-mix(in srgb, var(--process-accent) 72%, white 28%));
  box-shadow: 0 0 9px var(--process-accent-glow), 0 0 18px color-mix(in srgb, var(--process-accent) 42%, transparent);
  transition: width 360ms ease, box-shadow 260ms ease;
}

.forensic-stage-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: var(--process-accent);
  border: 1px solid color-mix(in srgb, var(--process-accent) 45%, rgba(255, 255, 255, 0.18));
  display: inline-grid;
  place-items: center;
  opacity: 0;
  transform: translateY(1px) scale(0.96);
  transition: opacity 220ms ease, transform 260ms ease;
  backdrop-filter: blur(8px);
}

.forensic-stage-step.is-active .forensic-stage-step-title {
  color: #ffffff;
  font-weight: 780;
}

.forensic-stage-step.is-active .forensic-stage-subtitle {
  color: rgba(128, 136, 150, 0.95);
}

.forensic-stage-step.is-active .forensic-stage-fill {
  animation: stagePulse 1.9s ease-in-out infinite;
}

.forensic-stage-step.is-done .forensic-stage-check {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes stagePulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 var(--process-accent-glow));
  }
  50% {
    filter: drop-shadow(0 0 7px var(--process-accent-glow));
  }
}

.opsec-quick-wrap {
  margin-top: 12px;
}

.opsec-quick {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.2));
  overflow: hidden;
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.opsec-quick > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(190, 198, 210, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.opsec-quick > summary::-webkit-details-marker {
  display: none;
}

.opsec-quick[open] > summary {
  color: #fff;
}

.opsec-quick-intro {
  margin: 10px 12px 8px;
  font-size: 0.78rem;
  color: rgba(128, 136, 150, 0.96);
}

.opsec-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 0 12px 12px;
}

.opsec-quick-grid label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.79rem;
  line-height: 1.35;
  color: rgba(206, 214, 224, 0.9);
}

.opsec-quick-grid input[type='checkbox'] {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  accent-color: var(--process-accent);
  flex-shrink: 0;
}

.app-shell.high-risk-mode .opsec-quick {
  border-color: rgba(211, 31, 69, 0.38);
  background: linear-gradient(180deg, rgba(211, 31, 69, 0.08), rgba(0, 0, 0, 0.24));
}

.opsec-quick.is-verified {
  border-color: rgba(0, 230, 118, 0.42);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.1), rgba(0, 0, 0, 0.24));
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.16), 0 0 22px rgba(0, 230, 118, 0.12);
}

.app-shell.high-risk-mode .opsec-quick.is-verified {
  border-color: rgba(211, 31, 69, 0.68);
  background: linear-gradient(180deg, rgba(211, 31, 69, 0.22), rgba(0, 0, 0, 0.28));
  box-shadow: 0 0 0 1px rgba(211, 31, 69, 0.28), 0 0 24px rgba(211, 31, 69, 0.24);
}

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

.action-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 31, 31, 1);
}

.action-footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.action-footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Advanced as ghost in footer */
.action-footer details.advanced {
  margin-left: 0;
  margin-top: 0;
  position: relative;
}

.action-footer details.advanced > summary {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: transparent;
  color: rgba(244, 244, 245, 0.6);
}

/* Only one element should glow (download-ready can transfer glow) */
.action-footer.download-ready #secureLogoutBtn {
  box-shadow: none;
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.35);
}

.action-footer.download-ready #downloadBtn {
  box-shadow:
    0 0 0 1px rgba(0, 230, 118, 0.2),
    0 0 18px rgba(0, 230, 118, 0.22);
  border-color: rgba(0, 230, 118, 0.6);
  background: var(--emerald);
  color: #0a0a0a;
}

.action-footer-right button {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .action-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .action-footer-left,
  .action-footer-right {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .app-controls { gap: 1rem; }
  .action-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .action-footer-left,
  .action-footer-right {
    justify-content: space-between;
  }
}

/* Avanzado (details/summary) */
details.advanced {
  margin-left: 12px;
  margin-top: 0;
}

details.advanced > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(20, 20, 20, 0.4);
  color: rgba(244, 244, 245, 0.78);
  font-weight: 750;
}

details.advanced > summary::-webkit-details-marker {
  display: none;
}

details.advanced[open] > summary {
  border-color: rgba(31, 31, 31, 1);
}

details.advanced #auditExportBtn {
  margin: 0;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(31, 31, 31, 1);
  background: rgba(20, 20, 20, 0.98);
  color: rgba(244, 244, 245, 0.86);
}

details.advanced[open] #auditExportBtn {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 25;
}

details.advanced #auditExportBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Politica de Interfaz Determinista para State-Grade High-Risk */
body.deterministic-ui *,
body.deterministic-ui *::before,
body.deterministic-ui *::after {
  transition: none !important;
}

body.deterministic-ui .app-shell.semaphore-amber,
body.deterministic-ui .forensic-stage-step.is-active .forensic-stage-fill {
  animation: none !important;
}
