/* ─── 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: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 8px 16px;
  border-radius: 8px;
}
.audit-stepper-item:hover { opacity: 0.7; }
.audit-stepper-item.active { opacity: 1; background: rgba(5,150,105,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;
}
.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);
}

/* 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; }
.launch-btn { width: 100%; padding: 14px; font-size: 15px; 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: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.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;
}
.provider-card:hover { border-color: var(--border2); background: var(--surface); box-shadow: var(--shadow-sm); }
.provider-card.selected {
  border-color: var(--accent);
  background: rgba(5,150,105,0.04);
  box-shadow: 0 0 0 2px rgba(5,150,105,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; }
[data-provider="web"] .provider-icon img { max-height: 40px; }
.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); }

.web-checks-banner {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 6px 14px; border-radius: 8px;
  background: rgba(5,150,105,0.06); border: 1px solid rgba(5,150,105,0.15);
  font-family: var(--mono); font-size: 12px; color: var(--accent);
}

/* ─── 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-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 {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}

.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(5,150,105,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(5,150,105,0.08); color: var(--accent); border: 1px solid rgba(5,150,105,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-model-tooltip {
  display: none;
  position: absolute;
  width: 360px;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
  z-index: 10000;
}
.ai-model-tooltip::after {
  content: '';
  position: absolute;
  top: -7px;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid #dee2e6;
  border-top: 1px solid #dee2e6;
}
.ai-model-tooltip-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f3460;
  margin-bottom: 6px;
  font-family: var(--mono);
}
.ai-model-tooltip-body {
  font-size: 11px;
  line-height: 1.6;
  color: #495057;
}

/* ─── COMPLIANCE SECTION ─── */
.compliance-section {
  border-top: 1px solid rgba(5,150,105,0.15);
  padding: 14px 18px; background: rgba(5,150,105,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(5,150,105,0.06); border: 1px solid rgba(5,150,105,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(5,150,105,0.05); }
.audit-type-tab--active {
  background: rgba(5,150,105,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(5,150,105,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: 580px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
}

.progress-icon {
  font-size: 48px;
  margin-bottom: 20px;
  animation: spin 3s linear infinite;
}

.progress-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.progress-step {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  min-height: 18px;
}

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

.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);
}

.progress-domains-grid {
  margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3px 10px; max-width: 520px; width: 100%; text-align: left;
  margin-left: auto; margin-right: auto;
}
.domain-checklist-item {
  color: var(--text3); display: flex; align-items: center; gap: 4px;
  padding: 1px 0; white-space: nowrap; overflow: hidden;
  font-size: 10.5px;
}
.dom-icon { font-size: 10px; min-width: 10px; flex-shrink: 0; }
