/* styles.css — Centry Capital Compliance Document Agent */

/* ─── Scrollbars ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ─── API Status Badge ───────────────────────────────────────── */
.api-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #334155;
  color: #94a3b8;
}
.api-status-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #475569;
}
.api-status-badge.ok { border-color: #059669; color: #10b981; }
.api-status-badge.ok .dot { background: #10b981; }
.api-status-badge.error { border-color: #dc2626; color: #f87171; }
.api-status-badge.error .dot { background: #f87171; }

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #0f172a;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.stat-card:hover { border-color: #F59E0B; background: #1e293b; }
.stat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.stat-value { font-size: 20px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 10px; color: #64748b; margin-top: 2px; }

/* ─── Step Indicators ────────────────────────────────────────── */
.step-indicator {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #334155;
  color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
}
.step-indicator.active {
  border-color: #F59E0B;
  color: #F59E0B;
  background: rgba(245,158,11,0.1);
}
.step-indicator.done {
  border-color: #10b981;
  background: #10b981;
  color: white;
}
.step-label {
  font-size: 12px;
  color: #64748b;
}
.step-connector {
  flex: 1;
  height: 1px;
  background: #1e293b;
  min-width: 20px;
}

/* ─── Type Pills ─────────────────────────────────────────────── */
.type-pill {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}
.type-pill:hover { border-color: #F59E0B; color: #F59E0B; }
.type-pill.selected {
  border-color: #F59E0B;
  background: rgba(245,158,11,0.15);
  color: #F59E0B;
}

/* ─── Policy / Document Items ────────────────────────────────── */
.policy-item {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #1e293b;
  color: #94a3b8;
  transition: all 0.15s;
  cursor: pointer;
}
.policy-item:hover { border-color: #475569; background: #252f3f; }
.policy-item.selected {
  border-color: #F59E0B;
  background: rgba(245,158,11,0.1);
}

/* ─── Category Cards ─────────────────────────────────────────── */
.category-card {
  transition: all 0.15s;
}
.category-card:hover {
  border-color: #F59E0B !important;
}

/* ─── Phase Tabs ─────────────────────────────────────────────── */
.phase-tab {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  border-right: 1px solid #1e293b;
  background: transparent;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.phase-tab:hover { color: #94a3b8; background: rgba(255,255,255,0.03); }
.phase-tab.active { color: #F59E0B; border-bottom: 2px solid #F59E0B; background: rgba(245,158,11,0.05); }

/* ─── Dark Markdown Container ────────────────────────────────── */
.centry-dark {
  background: #0f172a;
  min-height: 420px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}
.centry-dark-inner {
  min-height: 380px;
}
/* Override github markdown for dark theme */
.markdown-body.centry-dark-inner {
  background: transparent !important;
  color: #cbd5e1 !important;
  font-size: 13px;
}
.markdown-body.centry-dark-inner h1,
.markdown-body.centry-dark-inner h2,
.markdown-body.centry-dark-inner h3,
.markdown-body.centry-dark-inner h4 {
  color: #e2e8f0;
  border-color: #1e293b;
}
.markdown-body.centry-dark-inner h2 { color: #F59E0B; }
.markdown-body.centry-dark-inner code {
  background: #1e293b;
  color: #fbbf24;
}
.markdown-body.centry-dark-inner pre {
  background: #1e293b;
  border: 1px solid #334155;
}
.markdown-body.centry-dark-inner table {
  border-color: #1e293b;
  font-size: 12px;
}
.markdown-body.centry-dark-inner table th {
  background: #1e293b;
  color: #94a3b8;
}
.markdown-body.centry-dark-inner table td { border-color: #1e293b; }
.markdown-body.centry-dark-inner table tr:nth-child(2n) { background: #111827; }
.markdown-body.centry-dark-inner blockquote {
  border-left-color: #F59E0B;
  color: #94a3b8;
}
.markdown-body.centry-dark-inner a { color: #fbbf24; }
.markdown-body.centry-dark-inner hr { border-color: #1e293b; }

/* ─── Step Items (generation) ────────────────────────────────── */
.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.step-icon-wrap {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-icon-idle { color: #334155; font-size: 13px; }
.step-spinner {
  width: 14px; height: 14px;
  border: 2px solid #F59E0B;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.step-icon-done { color: #10b981; font-size: 13px; }
.step-item .step-label-text { color: #475569; }
.step-item.active .step-label-text { color: #F59E0B; }
.step-item.complete .step-label-text { color: #10b981; }

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

/* ─── Download Buttons ───────────────────────────────────────── */
.dl-btn {
  padding: 5px 10px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.dl-btn:hover { border-color: #F59E0B; color: #F59E0B; background: rgba(245,158,11,0.08); }

/* ─── Google Drive Save Button ───────────────────────────────── */
.dl-btn-drive {
  padding: 5px 8px;
  border: 1px solid #4285F4;
  border-radius: 6px;
  background: rgba(66,133,244,0.08);
  color: #4285F4;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.dl-btn-drive:hover { background: rgba(66,133,244,0.18); border-color: #4285F4; }
.dl-btn-drive:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Library Modal ──────────────────────────────────────────── */
.library-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.library-modal.hidden { display: none; }
.library-modal-inner {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}
.library-item {
  padding: 12px 14px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 8px;
}
.library-item:hover { border-color: #F59E0B; background: #1e293b; }

/* ─── Provider Tabs ──────────────────────────────────────────── */
.provider-tab {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.provider-tab:hover { color: #94a3b8; background: rgba(255,255,255,0.04); }
.provider-tab.active {
  color: #F59E0B;
  background: rgba(245,158,11,0.12);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .centry-dark { max-height: calc(100vh - 280px); }
}
