/* ================================================
   Scanner Page Styles
   Uses same design tokens as theme.css
   ================================================ */

.scanner-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px 100px;
}

.scanner-container {
  width: 100%;
  max-width: 760px;
}

/* ─── Input Section ─────────────────────────────────── */

.scan-input-section {
  background: var(--bg-2);
  border: 1px solid rgba(191,255,96,0.1);
  border-radius: 12px;
  padding: 40px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
}

.scanner-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.scanner-sub {
  font-size: 15px;
  color: var(--fg-dim);
  margin-bottom: 28px;
}

/* Tabs */
.input-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
}

.tab-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-dim);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active {
  background: var(--lime);
  color: #080808;
}

.tab-btn:not(.active):hover {
  color: var(--fg);
}

/* Input fields */
.tab-content { display: none; }
.tab-content.active { display: block; }

.input-wrapper { margin-bottom: 12px; }

.input-wrapper input,
.input-wrapper textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.15s;
}

.input-wrapper input {
  padding: 14px 16px;
}

.input-wrapper textarea {
  padding: 14px 16px;
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 13px;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
  color: var(--fg-dim);
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: var(--lime);
}

.input-hint {
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 24px;
}

.input-hint code {
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--lime);
}

/* Scan button */
.scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: #080808;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  justify-content: center;
}

.scan-btn:hover:not(:disabled) {
  background: #d4ff80;
  transform: translateY(-1px);
}

.scan-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Progress ─────────────────────────────────────── */

.scan-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  gap: 24px;
}

.progress-spinner {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(191,255,96,0.15);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-label {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--fg);
}

.progress-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

.tool-steps {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.tool-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-dim);
  opacity: 0.3;
  transition: all 0.3s;
}

.tool-step.active {
  opacity: 1;
  color: var(--fg);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-dim);
  transition: background 0.3s;
}

.tool-step.active .step-dot {
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}

/* ─── Results ───────────────────────────────────────── */

.scan-results { }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scan-id-label {
  font-size: 12px;
  color: var(--fg-dim);
  font-family: 'IBM Plex Mono', monospace;
}

.severity-counts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sev {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.secondary-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--fg);
  border-radius: 6px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.secondary-btn:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* Finding cards */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finding-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 20px;
  border-left-width: 3px;
  transition: border-color 0.15s;
}

.finding-card:hover {
  border-color: rgba(255,255,255,0.15);
}

.finding-card.sev-critical { border-left-color: var(--red); }
.finding-card.sev-high     { border-left-color: var(--yellow); }
.finding-card.sev-medium   { border-left-color: #FF8C00; }
.finding-card.sev-low      { border-left-color: var(--green); }
.finding-card.sev-info     { border-left-color: var(--fg-dim); }

.finding-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.sev-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.sev-badge.sev-critical { background: rgba(255,77,77,0.2); color: var(--red); }
.sev-badge.sev-high    { background: rgba(255,216,77,0.2); color: var(--yellow); }
.sev-badge.sev-medium  { background: rgba(255,140,0,0.2); color: #FF8C00; }
.sev-badge.sev-low     { background: rgba(77,255,136,0.15); color: var(--green); }
.sev-badge.sev-info    { background: rgba(136,136,136,0.2); color: var(--fg-dim); }

.finding-tool {
  font-size: 11px;
  color: var(--fg-dim);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.finding-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  width: 100%;
  margin-top: 4px;
}

.finding-desc {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.finding-location {
  display: inline-block;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  background: rgba(255,255,255,0.05);
  color: var(--lime);
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.finding-remediation {
  font-size: 13px;
  color: var(--fg);
  background: rgba(191,255,96,0.06);
  border: 1px solid rgba(191,255,96,0.1);
  border-radius: 6px;
  padding: 12px 14px;
  line-height: 1.6;
}

.finding-remediation strong {
  color: var(--lime);
  font-weight: 600;
}

/* No findings */
.no-findings {
  text-align: center;
  padding: 60px 0;
}

.no-findings h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 16px 0 8px;
  color: var(--fg);
}

.no-findings p {
  font-size: 14px;
  color: var(--fg-dim);
}

/* Utility */
.hidden { display: none !important; }