/* Dashboard-specific — analyze panel, result panel, recent list. */

/* ─── analyze panel ──────────────────────────────────────────────── */
.dropzone {
  border: 1.5px dashed var(--border-dashed);
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  background: var(--bg-raised);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  /* taller so the upload window fills the page more */
  min-height: 16vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* recent box — matched height bump so both windows fill the page */
.panel[aria-label="recent analyses"] { min-height: 16vh; }
.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--gold);
  background: var(--bg-elevated);
}
.dropzone.is-busy {
  border-color: var(--gold);
  cursor: wait;
}
.dropzone .ph-upload { font-size: 26px; color: var(--gold); }
.dropzone .dz-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
}
.dropzone .dz-micro {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 5px;
}
.dropzone input[type=file] { display: none; }

.analyze-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.modality-pill {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-inset);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cost-label {
  font-size: 12px;
  color: var(--text-tertiary);
}
.analyze-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analyze-error {
  background: rgba(204, 125, 98, 0.12);
  border: 0.5px solid rgba(204, 125, 98, 0.45);
  color: var(--verdict-ai);
  border-radius: var(--radius-button);
  padding: 10px 12px;
  font-size: 12.5px;
  margin-top: 14px;
  display: none;
  line-height: 1.5;
}
.analyze-error.is-visible { display: block; }

/* U2: large-file warning shown after select when file > 50MB */
.size-warning {
  background: rgba(255, 214, 98, 0.10);
  border: 0.5px solid rgba(255, 214, 98, 0.45);
  color: var(--gold);
  border-radius: var(--radius-button);
  padding: 8px 12px;
  font-size: 12.5px;
  margin-top: 10px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* U1: touch devices get "tap" copy instead of "drop · or browse" */
@media (hover: none) and (pointer: coarse) {
  .dropzone .dz-line[data-default="1"]::before { content: "tap to upload video or audio"; }
  .dropzone .dz-line[data-default="1"] { font-size: 0; }
  .dropzone .dz-line[data-default="1"]::before { font-size: 14px; }
}

/* ─── result panel ───────────────────────────────────────────────── */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.result-id {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.pai-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.pai-num {
  font-size: 34px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.pai-sigma {
  font-size: 14px;
  color: var(--text-secondary);
}
/* centered verdict headline sitting directly above the verdict band */
.verdict-headline {
  text-align: center;
  margin: 4px 0 8px;
  line-height: 1.15;
}
.verdict-headline .pai-line {
  justify-content: center;
  margin-bottom: 2px;
}
.verdict-text {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.1;
}
.verdict-text.real    { color: var(--verdict-real); }
.verdict-text.ai      { color: var(--verdict-ai); }
.verdict-text.abstain { color: var(--verdict-abstain); }

/* tripartite verdict band — widths set per-render from threshold_low/high */
.verdict-band {
  position: relative;
  display: flex;
  height: 13px;
  border-radius: 7px;
  overflow: hidden;
  margin-top: 10px;
}
.verdict-band .zone-real    { background: #FFD662; }
.verdict-band .zone-abstain { background: #FFFDD0; }
.verdict-band .zone-ai      { background: #FF2800; }
.verdict-band .marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 19px;
  background: var(--gold);
  border-radius: 1px;
  transform: translateX(-1px);
}
.band-labels {
  display: flex;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  letter-spacing: .3px;
}

/* per-operator heads */
.heads-section {
  border-top: 0.5px solid var(--bg-inset);
  margin-top: 18px;
  padding-top: 16px;
}
.heads-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 11px;
}
.head-row:last-child { margin-bottom: 0; }
.head-name {
  width: 170px;
  font-size: 13px;
  color: var(--text-primary);
}
.head-bar {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: var(--bg-inset);
  overflow: hidden;
}
.head-bar > i {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
}
.head-score {
  width: 38px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

/* stability footer row */
.stability-row {
  border-top: 0.5px solid var(--bg-inset);
  margin-top: 16px;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.stab-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.stab-sigma {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.route-text {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-tertiary);
}

/* ─── result-grid (per-operator panel + distribution panel side-by-side) ─── */
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  /* stack on narrow viewports */
  .result-grid { grid-template-columns: 1fr; }
}

/* ─── recent list ────────────────────────────────────────────────── */
.recent-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--bg-inset);
  gap: 18px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.recent-row:last-child { border-bottom: none; }
.recent-id {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  flex: 0 0 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-modality {
  font-size: 13px;
  color: var(--text-primary);
  flex: 0 0 56px;
  text-transform: lowercase;
}
.recent-verdict {
  font-size: 13px;
  font-weight: 600;
  flex: 1 1 auto;
  text-align: left;
  min-width: 0;
}
.recent-verdict.real    { color: var(--verdict-real); }
.recent-verdict.ai      { color: var(--verdict-ai); }
.recent-verdict.abstain { color: var(--verdict-abstain); }
.recent-time {
  font-size: 12px;
  color: var(--text-tertiary);
  flex: 0 0 auto;
  margin-left: auto;
}
.recent-empty {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 18px 0;
}

/* hide-until-result */
.is-hidden { display: none !important; }

/* ── guest CTA — replaces the upload panel for unauthenticated visitors ── */
.guest-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: rgba(255, 214, 98, 0.06);
  border: 1px solid rgba(255, 214, 98, 0.32);
  border-radius: 10px;
}
.guest-cta[hidden] { display: none; }
.analyze-bar[hidden] { display: none; }
.dropzone[hidden] { display: none; }
.guest-cta i {
  font-size: 28px;
  color: var(--gold);
  flex-shrink: 0;
}
.guest-cta-copy { flex: 1; min-width: 0; }
.guest-cta-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.guest-cta-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.guest-cta .btn-primary {
  flex-shrink: 0;
}
@media (max-width: 620px) {
  .guest-cta { flex-wrap: wrap; }
  .guest-cta .btn-primary { width: 100%; }
}

/* ── opt-in learned finalizer ("pipe through our classifier") ── */
.finalizer-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 16px; padding: 12px 14px;
  background: var(--bg-inset); border-radius: var(--radius-card, 12px);
  border: 1px solid rgba(255, 214, 98, 0.18);
}
.finalizer-box.is-finalizer { border-color: rgba(204, 125, 98, 0.5); }
.finalizer-note { color: var(--text-secondary); font-size: 13px; flex: 1 1 240px; }
.finalizer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--verdict-ai, #CC7D62); font-weight: 600; font-size: 13px;
}
.finalizer-btn {
  background: var(--gold); color: var(--on-gold);
  border: none; border-radius: var(--radius-button, 8px);
  padding: 8px 14px; font-weight: 600; font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: background .15s ease;
}
.finalizer-btn:hover { background: var(--gold-hover, #FFE48C); }

/* ─── async analysis progress (Phase 2) ──────────────────────────── */
.analyze-progress { margin-top: 14px; }
.analyze-progress[hidden] { display: none; }
.analyze-progress .ap-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 6px;
}
.analyze-progress .ap-stage { font-weight: 500; }
.analyze-progress .ap-pct { font-variant-numeric: tabular-nums; }
.analyze-progress .ap-track {
  height: 8px; border-radius: 999px; background: var(--bg-raised);
  border: 1px solid var(--border-dashed); overflow: hidden;
}
.analyze-progress .ap-fill {
  display: block; height: 100%; width: 0%; border-radius: 999px;
  background: var(--gold); transition: width .35s ease;
}
.analyze-progress .ap-note {
  margin-top: 8px; font-size: 12px; color: var(--text-secondary); opacity: .8;
}
