/* ─── AUDIT WIZARD ─── */
.audit-wizard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── STEPPER HORIZONTAL ─── */
.audit-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.audit-stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 8px 16px;
  border-radius: 8px;
}
.audit-stepper-item.active { opacity: 1; background: rgba(71,134,245,0.06); }
.audit-stepper-item.completed { opacity: 0.8; }
.audit-stepper-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border2); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.audit-stepper-item.active .audit-stepper-num {
  background: var(--accent); color: #000;
}
.audit-stepper-item.completed .audit-stepper-num {
  background: var(--accent); color: #000;
}
.audit-stepper-label {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  white-space: nowrap;
  transition: color 0.2s;
}
.audit-stepper-item.active .audit-stepper-label { color: var(--accent); }
.audit-stepper-item.completed .audit-stepper-label { color: var(--accent); }
.audit-stepper-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* ─── STEP CONTENT ─── */
.audit-step-content {
  width: 100%;
}

.audit-topbar {
  margin-bottom: 20px;
}
.audit-topbar .form-label { margin-bottom: 6px; }
.audit-topbar .form-input { width: 100%; }

.audit-step {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
  display: none;
}
.audit-step.audit-step--active {
  display: block;
}
[data-step-panel="1"] .audit-step-nav { display: none; }
.audit-step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.step-nav-btn {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 700;
}
.audit-step-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.audit-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.audit-step-title { font-size: 15px; font-weight: 700; }
.audit-step-hint {
  font-size: 12px; color: var(--text3); font-family: var(--mono);
  margin-left: auto;
}
.audit-step-hint.hint-warning {
  color: var(--warn);
  font-weight: 600;
  background: rgba(255, 170, 0, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 170, 0, 0.25);
}

/* Pricing tier info */
.audit-pricing-info {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; margin-top: 18px; margin-bottom: 14px;
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
}
.audit-pricing-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.audit-pricing-content { flex: 1; }
.audit-pricing-title {
  font-size: 13px; font-weight: 700; color: #d97706; margin-bottom: 10px;
}
.audit-pricing-tiers { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.audit-pricing-tier { display: flex; align-items: center; gap: 6px; }
.audit-pricing-tier-badge {
  font-size: 10px; font-weight: 700; font-family: var(--mono);
  padding: 2px 8px; border-radius: 4px;
}
.audit-pricing-tier--small { background: rgba(34,197,94,0.1); color: #16a34a; }
.audit-pricing-tier--medium { background: rgba(71,134,245,0.1); color: #4786F5; }
.audit-pricing-tier--large { background: rgba(245,158,11,0.1); color: #d97706; }
.audit-pricing-tier--xlarge, .audit-pricing-tier--xl { background: rgba(239,68,68,0.1); color: #dc2626; }
.audit-pricing-tier--xxlarge { background: rgba(139,92,246,0.1); color: #7c3aed; }
.audit-pricing-tier-desc { font-size: 12px; color: var(--text2); }
.audit-pricing-note {
  font-size: 11px; color: var(--text3); line-height: 1.5; font-style: italic;
}

/* Authorization confirm */
.auth-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  transition: border-color 0.2s;
}
.auth-confirm:hover { border-color: var(--accent); }
.auth-confirm input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  align-self: flex-start;
}
.auth-required { color: var(--danger); font-weight: 700; }

.audit-launch-bar { margin-top: 20px; text-align: center; }
.launch-btn { width: auto; padding: 12px 40px; font-size: 14px; justify-content: center; }
/* ─── AUDIT ERROR POPUP ─── */
.audit-error-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,0.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.audit-error-overlay.hidden { display: none; }
.audit-error-popup {
  background: var(--surface); border: 1px solid rgba(255,59,92,0.3);
  border-radius: 14px; width: 520px; max-width: 94vw; padding: 28px 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25); text-align: center;
}
.audit-error-icon { font-size: 40px; margin-bottom: 12px; }
.audit-error-title {
  font-size: 16px; font-weight: 800; color: var(--danger); margin-bottom: 12px;
}
.audit-error-detail {
  font-size: 13px; color: var(--text2); line-height: 1.6; text-align: left;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 18px;
  max-height: 200px; overflow-y: auto; word-break: break-word;
  font-family: var(--mono); font-size: 12px;
}
.audit-error-close {
  padding: 10px 28px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); transition: all 0.15s;
}
.audit-error-close:hover { border-color: var(--accent); color: var(--accent); }

/* ─── PROVIDER CARDS ─── */
.provider-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.provider-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  width: 260px;
}
.provider-card:hover { border-color: var(--border2); background: var(--surface); box-shadow: var(--shadow-sm); }
.provider-card.selected {
  border-color: var(--accent);
  background: rgba(71,134,245,0.04);
  box-shadow: 0 0 0 2px rgba(71,134,245,0.15);
}
.provider-icon { font-size: 24px; margin-bottom: 6px; display:flex; align-items:center; justify-content:center; height:44px; }
.provider-icon img { max-height: 44px; max-width: 100%; object-fit: contain; }
[data-provider="aws"] .provider-icon img { transform: scale(1.2, 1.2); }
[data-provider="gcp"] .provider-icon img { transform: scale(3.5, 3.5); }
[data-provider="azure"] .provider-icon img { transform: scale(2.5, 2.4); }
[data-provider="outscale"] .provider-icon img { max-height: 50px; }
.provider-name { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.provider-sub { font-size: 10px; color: var(--text3); font-family: var(--mono); }
.provider-checks { font-size: 12px; color: var(--text3); font-family: var(--mono); margin-top: 8px; }
.provider-card.selected .provider-checks { color: var(--accent); opacity: 0.8; }
.provider-card.selected .provider-name { color: var(--accent); }

.credit-cost-info {
  font-family: var(--mono); font-size: 12px; color: var(--text2);
  margin-bottom: 8px; padding: 5px 12px; border-radius: 6px;
  background: rgba(255,170,0,0.06); border: 1px solid rgba(255,170,0,0.15);
  display: inline-block;
}
.credit-cost-info strong { color: var(--warn); }

/* ─── FORM ELEMENTS ─── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid--single { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text2);
  text-transform: uppercase;
}

.form-label--spaced { margin-bottom: 8px; }

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text2);
  line-height: 1.4;
}
.form-hint code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  word-break: break-all;
}

.form-input, .form-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus,
.form-input:focus-visible, .form-select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(71,134,245,0.1);
  outline: none;
}

.form-input::placeholder { color: var(--text3); }

.form-select { cursor: pointer; appearance: none; }
option { background: var(--surface2); }

.company-readonly {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
}
.company-readonly-name { font-weight: 700; color: var(--text); font-family: var(--mono); }
.company-readonly-detail { color: var(--text3); font-size: 0.85rem; }
.company-no-company {
  padding: 10px 14px; border-radius: 8px;
  background: rgba(255,59,92,0.08); color: var(--danger);
  border: 1px solid rgba(255,59,92,0.2); font-size: 0.85rem;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  user-select: none;
}

.checkbox-pill:hover { border-color: var(--border2); }
.checkbox-pill.checked {
  background: rgba(71,134,245,0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.checkbox-pill input { display: none; }

/* ─── TOGGLE IA / CONFORMITE ─── */
.toggle-container { border: 1px solid var(--border); border-radius: 10px; overflow: visible; }
.toggle-container > :first-child { border-radius: 10px 10px 0 0; }
.toggle-container > :last-child  { border-radius: 0 0 10px 10px; }
.toggle-container > :only-child  { border-radius: 10px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--surface2); cursor: pointer;
}
.toggle-row-left { display: flex; align-items: center; gap: 12px; }
.toggle-switch {
  width: 36px; height: 20px; border-radius: 10px;
  background: var(--accent); position: relative; transition: background 0.2s; flex-shrink: 0;
}
.toggle-knob {
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  position: absolute; top: 2px; left: 18px; transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-label { font-size: 13px; font-weight: 700; }
.toggle-desc { font-size: 11px; color: var(--text2); margin-top: 2px; }
.toggle-status-badge {
  font-family: var(--mono); font-size: 10px; padding: 4px 10px; border-radius: 5px;
  background: rgba(71,134,245,0.08); color: var(--accent); border: 1px solid rgba(71,134,245,0.2);
}
.toggle-admin-lock { font-size: 10px; color: var(--text3); font-weight: 400; margin-left: 6px; }

/* ─── AI MODEL TOGGLE ─── */
.ai-model-center {
  display: flex; justify-content: center;
  padding: 12px 0;
}
.ai-model-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.ai-model-label {
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text3);
  transition: color .2s;
}
.ai-model-label--active {
  color: var(--accent);
}
.ai-model-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--border2);
  border-radius: 10px;
  transition: background .2s;
}
.ai-model-track--claude {
  background: var(--accent);
}
.ai-model-track--mistral {
  background: var(--accent);
}
.ai-model-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: right .2s, left .2s;
}
.ai-model-thumb--left {
  right: auto;
  left: 2px;
}
.ai-model-flag {
  font-size: 14px;
  vertical-align: middle;
}
.ai-model-center {
  position: relative;
  flex-direction: column;
  align-items: center;
}
.ai-model-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--text3);
  color: var(--text3);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}
.ai-model-info:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(6,214,160,.08);
}
/* ── AI info popup ── */
.ai-info-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.ai-info-overlay.hidden { display: none; }
.ai-info-popup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
}
.ai-info-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text3); line-height: 1;
}
.ai-info-close:hover { color: var(--text); }
.ai-info-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  font-family: var(--mono);
}
.ai-info-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text2);
}

/* ─── COMPLIANCE SECTION ─── */
.compliance-section {
  border-top: 1px solid rgba(71,134,245,0.15);
  padding: 14px 18px; background: rgba(71,134,245,0.03);
  animation: fadeDown 0.2s ease;
}
.compliance-label {
  margin-bottom: 10px; font-size: 11px; color: var(--text2);
  display: flex; align-items: center; gap: 6px;
}
.compliance-hint { font-size: 10px; font-weight: 400; color: var(--text3); }

/* ─── CREDENTIALS ─── */
.creds-title { font-size: 13px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.creds-subtitle { color: var(--text3); font-weight: 400; font-size: 12px; }
.creds-block { grid-column: 1 / -1; }

/* Credentials help button */
.creds-help-bar { margin-bottom: 14px; }
.creds-help-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 14px; cursor: pointer; color: var(--text2);
  font-size: 12px; font-family: var(--sans); transition: all 0.15s;
}
.creds-help-btn:hover { border-color: var(--accent); color: var(--accent); }
.creds-help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; font-style: italic; font-family: Georgia, serif;
  flex-shrink: 0;
}

/* Credentials help modal */
.creds-help-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,0.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.creds-help-overlay.hidden { display: none; }
.creds-help-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; width: 930px; max-width: 94vw;
  max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.creds-help-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.creds-help-modal-title { font-size: 15px; font-weight: 800; }
.creds-help-modal-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--text3); line-height: 1; padding: 4px 8px;
}
.creds-help-modal-close:hover { color: var(--danger); }
.creds-help-modal-body { padding: 22px; }
.creds-help-modal-body h4 {
  font-size: 13px; font-weight: 700; margin: 16px 0 8px; color: var(--text);
}
.creds-help-modal-body h4:first-child { margin-top: 0; }
.creds-help-modal-body p {
  font-size: 13px; color: var(--text2); margin: 0 0 8px; line-height: 1.6;
}
.creds-help-modal-body ol {
  padding-left: 20px; margin: 0 0 12px;
}
.creds-help-modal-body ol li {
  font-size: 13px; color: var(--text2); margin-bottom: 6px; line-height: 1.6;
}
.creds-help-modal-body code {
  background: var(--surface2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; font-size: 12px;
  font-family: var(--mono); color: var(--accent);
}
.creds-help-modal-body pre {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; overflow-x: auto;
  margin: 8px 0 12px; font-size: 12px; line-height: 1.5;
  font-family: var(--mono); color: var(--text);
}
.creds-help-modal-body .help-tip {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 14px; border-radius: 8px; margin-top: 12px;
  background: rgba(71,134,245,0.06); border: 1px solid rgba(71,134,245,0.15);
  font-size: 12px; color: var(--text2); line-height: 1.5;
}
.creds-help-modal-body .help-tip-icon { flex-shrink: 0; font-size: 14px; }

/* ─── AUTH TABS ─── */
.audit-type-tabs {
  display: flex; gap: 0; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); width: fit-content;
}
.audit-type-tab {
  padding: 10px 28px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: none; background: transparent; color: var(--text2);
  transition: all 0.15s ease;
}
.audit-type-tab:hover { background: rgba(71,134,245,0.05); }
.audit-type-tab--active {
  background: rgba(71,134,245,0.12); color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tab {
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text2);
}
.auth-tab--active, .auth-tab.active {
  border-color: var(--accent); background: rgba(71,134,245,0.1); color: var(--accent);
}
.auth-tab--inactive { border-color: var(--border); background: transparent; color: var(--text2); }

/* ─── PROGRESS ─── */
.progress-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(12px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.progress-overlay.visible { display: flex; }

.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 36px;
  width: 620px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
}

/* ── Header: timer + title ── */
.progress-header {
  margin-bottom: 24px;
  text-align: center;
}
.progress-timer {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.progress-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: -0.2px;
}

/* ── Phase stepper ── */
.progress-phases {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}
.progress-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.55;
  transition: opacity 0.3s, transform 0.3s;
}
.progress-phase.active {
  opacity: 1;
  transform: scale(1.08);
}
.progress-phase.done {
  opacity: 0.85;
}
.progress-phase.done .phase-icon { color: var(--success2); }
.phase-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}
.progress-phase.active .phase-icon {
  border-color: var(--accent);
  background: rgba(71,134,245,0.08);
  animation: phasePulse 2s ease-in-out infinite;
}
.progress-phase.done .phase-icon {
  border-color: var(--success2);
  background: rgba(16,185,129,0.08);
}
.phase-label {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.progress-phase.active .phase-label { color: var(--accent); }
.progress-phase.done .phase-label { color: var(--success2); }

.progress-phase-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  margin-bottom: 18px;
  transition: background 0.3s;
}
.progress-phase-line.done {
  background: var(--success2);
}

@keyframes phasePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(71,134,245,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(71,134,245,0); }
}


/* ── Step text ── */
.progress-step {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
  min-height: 18px;
}

/* ── Bar ── */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-pct {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 10px;
}
.progress-bg-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.progress-bg-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(71,134,245,0.06);
}
.progress-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Confirm parallel audit modal ── */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.confirm-popup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  width: 420px; max-width: 92vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.confirm-icon { font-size: 2rem; margin-bottom: 10px; }
.confirm-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  margin-bottom: 8px;
}
.confirm-msg {
  font-size: 13px; color: var(--text2); line-height: 1.6;
  margin-bottom: 20px;
}
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 120px; }

/* ── Security DNA ── */
.dna-panel .panel-body { padding: 20px !important; }
.dna-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.dna-bars-section { display: flex; flex-direction: column; gap: 6px; }
.dna-domain-row { display: grid; grid-template-columns: 230px 0.9fr 50px 80px; align-items: center; gap: 8px; }
.dna-domain-label { display: flex; align-items: center; gap: 6px; }
.dna-domain-icon { font-size: 1rem; }
.dna-domain-name { font-size: 0.78rem; font-weight: 600; color: var(--text1); white-space: nowrap; }
.dna-bar-wrap { height: 14px; background: var(--surface2); border-radius: 7px; overflow: hidden; }
.dna-bar-fill { height: 100%; border-radius: 7px; transition: width 0.6s ease; }
.dna-domain-score { font-family: var(--mono); font-size: 0.82rem; font-weight: 800; text-align: right; }
.dna-domain-sevs { display: flex; gap: 3px; font-size: 0.65rem; }
.dna-sev { padding: 1px 4px; border-radius: 3px; font-weight: 700; font-family: var(--mono); }
.dna-sev.sev-critical { background: #fde8e8; color: #b91c1c; }
.dna-sev.sev-high { background: #fff7ed; color: #c2410c; }
.dna-sev.sev-medium { background: #fef9c3; color: #a16207; }
.dna-sev.sev-low { background: #ecfdf5; color: #047857; }
.dna-archetype-section { text-align: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; justify-content: center; }
.dna-archetype-icon { font-size: 2.5rem; margin-bottom: 8px; }
.dna-archetype-name { font-size: 1.1rem; font-weight: 800; color: var(--text1); margin-bottom: 8px; }
.dna-archetype-desc { font-size: 0.78rem; color: var(--text2); line-height: 1.5; }
.dna-path { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.dna-path-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dna-path-label { font-size: 0.72rem; color: var(--text3); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.dna-path-summary { font-size: 0.7rem; color: var(--text3); font-family: var(--mono); }

.dna-path-journey {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--surface2); margin-bottom: 12px;
}
.dna-path-node { display: flex; align-items: center; gap: 8px; }
.dna-path-node-icon { font-size: 1.2rem; }
.dna-path-node-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.dna-path-node-score { font-size: 0.82rem; font-weight: 800; font-family: var(--mono); }
.dna-path-node--target { opacity: 0.7; }
.dna-path-arrow { font-size: 1.1rem; color: var(--accent); font-weight: 700; }

.dna-path-steps-list { display: flex; flex-direction: column; gap: 6px; }
.dna-path-step {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
}
.dna-path-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.dna-path-step-info { flex: 1; min-width: 0; }
.dna-path-step-domain { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.dna-path-step-detail { font-size: 0.72rem; color: var(--text3); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dna-path-step-arrow { color: var(--accent); font-weight: 700; }
.dna-path-step-meta { margin-left: 6px; font-family: var(--mono); font-size: 0.68rem; }
.dna-path-step-time { font-size: 0.7rem; font-family: var(--mono); color: var(--text3); flex-shrink: 0; }
.dna-tags-row { display: flex; gap: 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); justify-content: center; }
.dna-tags-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dna-tags-title { font-size: 0.72rem; font-weight: 700; color: var(--text3); text-transform: uppercase; }
.dna-tag { font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.dna-tag--strength { background: #ecfdf5; color: #047857; }
.dna-tag--weakness { background: #fde8e8; color: #b91c1c; }
.dna-archetype-pct { font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-top: 6px; margin-bottom: 12px; }
.dna-archetype-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text3);
  color: var(--text3); font-size: 0.72rem; font-weight: 700; cursor: pointer;
  margin-left: 6px; vertical-align: middle; transition: all .2s;
  background: transparent; font-family: serif; font-style: italic;
}
.dna-archetype-info-btn:hover { border-color: var(--accent); color: var(--accent); }
.dna-profiles-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s;
}
.dna-profiles-modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  width: 820px; max-width: 94vw; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.dna-profiles-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.dna-profiles-modal-header h3 { font-size: 1rem; font-weight: 800; color: var(--text1); margin: 0; }
.dna-profiles-modal-close {
  background: none; border: none; color: var(--text3); font-size: 1.2rem; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
}
.dna-profiles-modal-close:hover { background: var(--surface2); color: var(--text1); }
.dna-profiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 8px 12px;
}
.dna-profile-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.dna-profile-item:nth-child(2n) { border-right: none; }
.dna-profile-item:nth-last-child(-n+2) { border-bottom: none; }
.dna-profile-icon { font-size: 1.4rem; flex-shrink: 0; width: 32px; text-align: center; }
.dna-profile-info { flex: 1; min-width: 0; }
.dna-profile-name { font-size: 0.84rem; font-weight: 700; color: var(--text1); }
.dna-profile-pct { font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-left: 6px; }
.dna-profile-desc { font-size: 0.72rem; color: var(--text2); line-height: 1.45; margin-top: 3px; }
.dna-profile-item--active { background: rgba(99,102,241,0.06); border-radius: 8px; }
@media (max-width: 900px) {
  .dna-layout { grid-template-columns: 1fr; }
  .dna-domain-row { grid-template-columns: 140px 1fr 45px 60px; }
  .dna-profiles-grid { grid-template-columns: 1fr; }
  .dna-profile-item { border-right: none !important; }
}

/* ─── Batch Autofix ─── */
.batch-toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface2); border-radius: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.batch-toolbar label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text2); cursor: pointer; }
.batch-check { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.batch-fix-btn { padding: 6px 14px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; border: none; cursor: pointer; transition: all 0.15s; }
.batch-fix-btn--primary { background: linear-gradient(135deg, #00ff88, #4786F5); color: #0a0e1a; }
.batch-fix-btn--primary:disabled { background: var(--border); color: var(--text3); cursor: not-allowed; }
.batch-fix-btn--tier1 { background: rgba(139,92,246,0.12); color: #8b5cf6; border: 1px solid rgba(139,92,246,0.3); }
.batch-fix-btn--tier2 { background: rgba(255,170,0,0.1); color: #e09200; border: 1px solid rgba(255,170,0,0.3); }
.batch-tier-info-btn { min-width: 32px; min-height: 32px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-size: 0.7rem; font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: all 0.15s; }
.batch-tier-info-btn:hover { background: var(--surface2); }
.batch-cost-preview { font-size: 0.75rem; font-family: var(--mono); color: var(--text3); margin-left: auto; }
.batch-progress-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; }
.batch-progress-card { background: var(--surface); border-radius: 14px; padding: 28px; min-width: 420px; max-width: 560px; max-height: 80vh; display: flex; flex-direction: column; }
.batch-progress-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.batch-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.batch-progress-bar-fill { height: 100%; background: linear-gradient(90deg, #00a0e0, #00c8ff); transition: width 0.3s; border-radius: 3px; }
.batch-progress-status { font-size: 0.82rem; color: var(--text2); margin-bottom: 12px; font-family: var(--mono); }
.batch-progress-list { flex: 1; overflow-y: auto; max-height: 300px; display: flex; flex-direction: column; gap: 4px; }
.batch-progress-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; font-size: 0.8rem; }
.batch-progress-item--pending { color: var(--text3); }
.batch-progress-item--running { background: rgba(0,200,255,0.06); color: var(--text1); }
.batch-progress-item--success { color: #4786F5; }
.batch-progress-item--failed { color: var(--danger); }
.batch-progress-icon { width: 18px; text-align: center; flex-shrink: 0; }
.batch-summary { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; gap: 16px; align-items: center; }
.batch-summary-stat { font-size: 0.9rem; font-weight: 700; }
.batch-summary-stat--success { color: #4786F5; }
.batch-summary-stat--failed { color: var(--danger); }
.batch-summary-stat--credits { color: var(--accent); font-family: var(--mono); }
.batch-close-btn { margin-left: auto; padding: 8px 20px; background: linear-gradient(135deg, #00ff88, #4786F5); color: #0a0e1a; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; }

/* ─── Form Validation States ─── */
.input-error {
  border-color: var(--danger) !important;
  background: rgba(239,68,68,0.03) !important;
}
.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
  animation: fadeIn 0.2s ease;
}

/* ─── Dark mode overrides ─── */
html[data-theme="dark"] .provider-card { background: var(--surface2); border-color: var(--border); }
html[data-theme="dark"] .provider-card.selected { border-color: var(--accent); }
html[data-theme="dark"] .dna-sev.sev-critical { background: rgba(185,28,28,0.15); }
html[data-theme="dark"] .dna-sev.sev-high { background: rgba(194,65,12,0.15); }
html[data-theme="dark"] .dna-sev.sev-medium { background: rgba(161,98,7,0.15); }
html[data-theme="dark"] .dna-sev.sev-low { background: rgba(4,120,87,0.15); }
html[data-theme="dark"] .dna-tag--strength { background: rgba(4,120,87,0.15); }
html[data-theme="dark"] .dna-tag--weakness { background: rgba(185,28,28,0.15); }

/* ── Scope Selection Step ──────────────────────────────────────────── */

.scope-loading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.2rem;
  color: var(--text2);
  font-size: 0.9rem;
}

.scope-regions-panel {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.scope-regions-panel .form-label { margin-bottom: 0.3rem; }
.scope-regions-panel .form-select { max-width: 280px; }

.scope-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scope-discovery-error {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(233,69,96,0.08);
  border: 1px solid rgba(233,69,96,0.2);
  border-radius: 8px;
  color: var(--danger, #e94560);
  font-size: 0.85rem;
}
.scope-discovery-error.scope-discovery-error--warning {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.25);
  color: var(--warn, #f59e0b);
}
.scope-discovery-hint {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(71,134,245,0.06);
  border: 1px solid rgba(71,134,245,0.15);
  border-radius: 8px;
  color: var(--text2);
  font-size: 0.82rem;
  line-height: 1.5;
}
.scope-discovery-hint code {
  background: rgba(71,134,245,0.1);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-family: var(--mono);
}

.scope-list-container { margin-top: 1rem; }

.scope-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0;
}
.scope-select-all {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text2);
  cursor: pointer;
}
.scope-select-all input { accent-color: var(--accent); }
.scope-summary {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}

.scope-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.scope-group-label {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.scope-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.scope-item:last-child { border-bottom: none; }
.scope-item:hover { background: var(--surface2); }
.scope-item input[type="checkbox"] { accent-color: var(--accent); flex-shrink: 0; }

.scope-item-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}
.scope-item-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}
.scope-item-id {
  font-size: 0.78rem;
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}
.scope-item-type {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  background: var(--surface2);
  border-radius: 4px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.scope-status {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
}
.scope-status--active {
  background: rgba(39,174,96,0.1);
  color: #27ae60;
}
.scope-status--inactive {
  background: rgba(149,165,166,0.1);
  color: #95a5a6;
}

.scope-aws-role {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.scope-aws-role .form-label { margin-bottom: 0.3rem; }
.scope-aws-role .form-input { margin-bottom: 0.3rem; }
.scope-aws-role .form-hint { font-size: 0.78rem; color: var(--text3); }
