@import url('variables.css');

/* ==========================================================================
   INTERACTIVE AUDIT ENGINE & REPORT STYLING (WHITE THEME)
   ========================================================================== */
.audit-hero {
  padding: 60px 0 40px 0;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 70%), #ffffff;
}

.audit-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xl);
  max-width: 860px;
  margin: 0 auto;
}

.audit-input-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* Scanner Animation Box */
.audit-scanner {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  margin-top: 36px;
  box-shadow: var(--shadow-card);
}

.scanner-radar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid #bfdbfe;
  border-top-color: var(--accent-primary);
  margin: 0 auto 24px auto;
  animation: spinSlow 1.1s linear infinite;
}

.scanner-progress-bar {
  width: 100%;
  max-width: 480px;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  margin: 20px auto;
  overflow: hidden;
}

.scanner-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.scanner-step-log {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-primary);
  min-height: 28px;
}

/* Audit Results Dashboard */
.audit-results {
  display: none;
  margin-top: 50px;
}

.audit-score-summary {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-xl);
}

.score-dial-box {
  text-align: center;
}

.score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e293b 65%, transparent 70%);
  border: 8px solid #38bdf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
}

.score-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
}

.score-max {
  font-size: 0.9rem;
  color: #94a3b8;
}

.score-grade-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
}

.score-info-box h3 {
  color: #ffffff;
  font-size: 1.85rem;
  margin-bottom: 8px;
}

.score-info-box p {
  color: #cbd5e1;
  margin-bottom: 20px;
}

.score-meta-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.score-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 5 Categorical Cards */
.audit-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.audit-cat-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.audit-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.audit-cat-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.audit-cat-score {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.cat-score-good { color: var(--color-success); }
.cat-score-warning { color: var(--color-warning); }
.cat-score-danger { color: var(--color-danger); }

.cat-progress {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  overflow: hidden;
}

.cat-fill {
  height: 100%;
}

.cat-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.cat-bullet {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.bullet-icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Recommendations Accordion */
.recommendations-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}

.rec-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.rec-item:last-child {
  border-bottom: none;
}

.rec-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
}

.rec-badge.high { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.rec-badge.medium { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.rec-badge.pass { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

.rec-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.rec-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Print/PDF Friendly */
@media print {
  header, footer, .topbar, .audit-card, .btn {
    display: none !important;
  }
  .audit-results {
    display: block !important;
  }
}

@media (max-width: 860px) {
  .audit-input-grid {
    grid-template-columns: 1fr;
  }
  .audit-score-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .audit-category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .audit-card {
    padding: 24px 16px;
  }
  .audit-score-summary {
    padding: 24px 16px;
  }
  .score-circle {
    width: 130px;
    height: 130px;
  }
  .score-number {
    font-size: 2.8rem;
  }
  .recommendations-box {
    padding: 24px 16px;
  }
}
