/* ═══════════════════════════════════════════════
   ANÁLISE DE CRÉDITO — Premium UI Styles
   ═══════════════════════════════════════════════ */

/* ── Hero Header ─────────────────────────────── */
.ac-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.ac-hero-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.18));
  border: 1.5px solid rgba(99,102,241,0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99,102,241,0.2);
}

.ac-hero-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.ac-hero-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Two-Column Layout ───────────────────────── */
.ac-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .ac-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Form Card ───────────────────────────────── */
.ac-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}

.ac-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
  border-radius: 20px 20px 0 0;
}

.ac-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-card-title svg {
  color: #a5b4fc;
}

/* ── Type selector (card tiles) ──────────────── */
.ac-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.ac-type-option {
  display: none; /* hidden radio */
}

.ac-type-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: center;
}

.ac-type-label:hover {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.06);
}

.ac-type-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.ac-type-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
}

.ac-type-cost {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Selected state — Boa Vista (purple) */
.ac-type-option[value="scpc-boavista"]:checked + .ac-type-label {
  border-color: rgba(99,102,241,0.7);
  background: rgba(99,102,241,0.12);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1), 0 4px 16px rgba(99,102,241,0.15);
}

.ac-type-option[value="scpc-boavista"]:checked + .ac-type-label .ac-type-icon {
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.4);
}

.ac-type-option[value="scpc-boavista"]:checked + .ac-type-label .ac-type-cost {
  color: #a5b4fc;
  font-weight: 600;
}

/* Selected state — Serasa (amber) */
.ac-type-option[value="serasa-premium"]:checked + .ac-type-label {
  border-color: rgba(251,146,60,0.6);
  background: rgba(251,146,60,0.1);
  box-shadow: 0 0 0 4px rgba(251,146,60,0.08), 0 4px 16px rgba(251,146,60,0.12);
}

.ac-type-option[value="serasa-premium"]:checked + .ac-type-label .ac-type-icon {
  background: rgba(251,146,60,0.15);
  border: 1px solid rgba(251,146,60,0.35);
}

.ac-type-option[value="serasa-premium"]:checked + .ac-type-label .ac-type-cost {
  color: #fb923c;
  font-weight: 600;
}

/* ── Document Input ──────────────────────────── */
.ac-input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ac-input-wrap {
  position: relative;
}

.ac-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.ac-input {
  width: 100%;
  background: rgba(6,12,26,0.5);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px 13px 42px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ac-input:focus {
  outline: none;
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}

/* ── Cost summary row ────────────────────────── */
.ac-cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ac-cost-row-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ac-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s;
}

.ac-cost-badge.purple {
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.35);
  color: #a5b4fc;
}

.ac-cost-badge.amber {
  background: rgba(251,146,60,0.12);
  border: 1px solid rgba(251,146,60,0.35);
  color: #fb923c;
}

/* ── Submit Button ───────────────────────────── */
.ac-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
  letter-spacing: 0.01em;
}

.ac-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.45);
}

.ac-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ac-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Error / Info Banner ─────────────────────── */
.ac-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.45;
  border: 1px solid rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
}

.ac-error.visible {
  display: flex;
}

.ac-error.info {
  border-color: rgba(251,146,60,0.3);
  background: rgba(251,146,60,0.08);
  color: #fdba74;
}

/* ── Info Panel (right side) ─────────────────── */
.ac-info-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ac-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.ac-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ac-info-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ac-info-badge.purple {
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(99,102,241,0.35);
}

.ac-info-badge.amber {
  background: rgba(251,146,60,0.15);
  border: 1px solid rgba(251,146,60,0.35);
}

.ac-info-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.ac-info-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ac-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ac-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ac-info-list li::before {
  content: '✓';
  color: #4ade80;
  font-weight: 700;
  font-size: 0.78rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.ac-cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: auto;
}

.ac-cost-pill.purple {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
}

.ac-cost-pill.amber {
  background: rgba(251,146,60,0.12);
  color: #fb923c;
}

/* ── Result card ─────────────────────────────── */
.ac-result-card {
  background: var(--card);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 32px rgba(99,102,241,0.12);
  position: relative;
  overflow: hidden;
  grid-column: 1 / -1;
}

.ac-result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4ade80, #06b6d4, #6366f1);
  border-radius: 20px 20px 0 0;
}

.ac-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ac-result-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.ac-result-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(74,222,128,0.15);
  border: 1.5px solid rgba(74,222,128,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  font-size: 0.9rem;
}

.ac-pdf-frame {
  width: 100%;
  height: 620px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 16px;
  background: #fff;
}

.ac-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ac-btn-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.ac-btn-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99,102,241,0.4);
}

.ac-btn-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ac-btn-close:hover {
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
  background: rgba(239,68,68,0.06);
}

/* ── Spinner inside button ───────────────────── */
.ac-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ac-spin 0.7s linear infinite;
}

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

/* ── Notice tip ──────────────────────────────── */
.ac-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ac-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #67e8f9;
}
