/* ───── Reset & base ───── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: #1a1a1a;
  background: #f4f6f8;
  font-size: 15px;
  line-height: 1.5;
}
a { color: #1e3a5f; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
.inline { display: inline; }

/* ───── Top bar ───── */
.topbar {
  background: #1e3a5f;
  color: #fff;
  border-bottom: 1px solid #15293f;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 16px; }
.brand:hover { text-decoration: none; opacity: 0.9; }
.brand-mark {
  background: #fff;
  color: #1e3a5f;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}
.brand-mark.big { width: 64px; height: 64px; font-size: 36px; border-radius: 14px; }
.topnav { flex: 1; display: flex; gap: 20px; }
.topnav a { color: rgba(255,255,255,0.8); font-size: 14px; }
.topnav a:hover { color: #fff; text-decoration: none; }
.user-menu { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; }
.user-email { opacity: 0.85; }
.btn-link {
  background: none; border: none; color: rgba(255,255,255,0.8);
  font-size: 14px; padding: 4px 8px; border-radius: 4px;
}
.btn-link:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ───── Layout ───── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.page-header { margin-bottom: 32px; }
.page-header h1 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 700;
  color: #15293f;
}
.page-sub { margin: 0; color: #64748b; font-size: 15px; }
.header-icon { font-size: 24px; margin-right: 4px; }
.report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ───── Breadcrumb ───── */
.breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb .current { color: #1e3a5f; font-weight: 500; }

/* ───── Categories & cards ───── */
.category { margin-bottom: 40px; }
.category-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 12px;
  font-weight: 600;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.report-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  display: flex;
  gap: 16px;
  transition: all 0.15s;
  color: inherit;
}
.report-card:hover {
  text-decoration: none;
  border-color: #1e3a5f;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
  transform: translateY(-1px);
}
.report-card-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #f0f7ff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-card-body { flex: 1; }
.report-card-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #15293f;
  font-weight: 600;
}
.report-card-body p {
  margin: 0 0 12px;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}
.report-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}
.meta-time { color: #64748b; }

/* ───── Variants page ───── */
.variants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.variant-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}
.variant-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.variant-header h3 { margin: 0; font-size: 16px; color: #15293f; }
.variant-desc { margin: 4px 0 0; font-size: 13px; color: #64748b; }
.variant-meta { font-size: 13px; color: #64748b; margin: 12px 0; }
.variant-meta strong { color: #1a1a1a; font-weight: 500; }
.variant-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #1e3a5f; color: #fff; }
.btn-primary:hover { background: #15293f; }
.btn-secondary {
  background: #fff;
  color: #1e3a5f;
  border-color: #cbd5e1;
}
.btn-secondary:hover { background: #f0f7ff; border-color: #1e3a5f; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ───── Badges ───── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-muted { background: #f1f5f9; color: #475569; }

/* ───── Banners ───── */
.banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.banner.inline { margin: 12px 0 0; }
.banner-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.banner-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ───── Empty state ───── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.empty-state h2 { margin-top: 0; color: #15293f; }
.empty-state p { color: #64748b; margin: 8px 0 24px; }
.error-detail {
  background: #fef2f2; color: #991b1b;
  font-family: 'SF Mono', Menlo, monospace; font-size: 13px;
  padding: 12px 16px; border-radius: 6px; text-align: left;
  margin: 16px auto; max-width: 600px;
}

/* ───── Generating spinner ───── */
.generating-state { text-align: center; padding: 80px 24px; }
.generating-state h2 { margin: 24px 0 8px; color: #15293f; }
.generating-state p { color: #64748b; margin: 4px 0; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #1e3a5f;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Login page ───── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #15293f 100%);
  padding: 24px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-brand .brand-mark { margin: 0 auto 16px; }
.login-brand h1 { margin: 0; font-size: 24px; color: #15293f; }
.login-brand .subtitle { margin: 6px 0 0; color: #64748b; font-size: 14px; }
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.google-btn:hover { background: #f8fafc; border-color: #1e3a5f; text-decoration: none; }
.login-hint { text-align: center; margin: 16px 0 0; color: #64748b; font-size: 13px; }

/* ───── Footer ───── */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: #94a3b8;
}
