/* bestee brand tokens */
:root {
  --navy: #1A2A4A;
  --prussian: #0E2647;
  --ink: #0C0D10;
  --ink-soft: #5A5D65;
  --silver-pearl: #FAFAF7;
  --paper-soft: #F6EFEA;
  --soft-tint: #E8ECF2;
  --white: #FFFFFF;
}

@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/GeneralSans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-MediumItalic-cyr.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-MediumItalic-lat.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--silver-pearl);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wordmark {
  font-family: 'General Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--navy);
  display: inline-flex;
  align-items: baseline;
}
.wordmark-flower { width: 9px; height: 9px; margin-left: 3px; }

/* auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  background: var(--white); border-radius: 20px; padding: 48px;
  width: 100%; max-width: 420px;
  box-shadow: 0 1px 2px rgba(12,13,16,0.04);
}
.auth-title {
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: 44px; color: var(--navy); margin: 20px 0 8px; letter-spacing: -0.01em;
}
.auth-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }

/* layout */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 48px; border-bottom: 1px solid var(--soft-tint); background: var(--silver-pearl);
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.container { max-width: 880px; margin: 0 auto; padding: 56px 24px 96px; }
.hero { margin-bottom: 40px; }
.display-h {
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: 52px; line-height: 1.08; color: var(--navy); margin-bottom: 16px; letter-spacing: -0.01em;
}
.muted-lead { color: var(--ink-soft); font-size: 16px; max-width: 560px; }
.h2 {
  font-family: 'General Sans', 'Inter', sans-serif; font-weight: 600;
  font-size: 20px; color: var(--navy); margin-bottom: 16px;
}

/* forms */
.card {
  background: var(--white); border-radius: 20px; padding: 36px;
  box-shadow: 0 1px 2px rgba(12,13,16,0.04); margin-bottom: 56px;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.label { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.input {
  border: 1px solid var(--soft-tint); border-radius: 10px; padding: 13px 16px;
  font-size: 15px; font-family: inherit; background: var(--silver-pearl); color: var(--ink);
  outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--navy); background: var(--white); }
.textarea { resize: vertical; min-height: 120px; }
.btn {
  background: var(--navy); color: var(--white); border: none; border-radius: 10px;
  padding: 14px 28px; font-size: 15px; font-family: inherit; font-weight: 500;
  cursor: pointer; transition: background .15s; align-self: flex-start;
}
.btn:hover { background: var(--prussian); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-small { padding: 7px 16px; font-size: 13px; border-radius: 8px; text-decoration: none; display: inline-block; background: var(--navy); color: var(--white); }
.btn-ghost {
  background: none; border: none; color: var(--ink-soft); font-family: inherit;
  font-size: 14px; cursor: pointer; padding: 4px 8px;
}
.btn-ghost:hover { color: var(--navy); }
.btn-danger:hover { color: #B4232C; }
.inline { display: inline; }

/* table */
.history { margin-bottom: 48px; }
.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 16px; overflow: hidden; }
.table th {
  text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); padding: 14px 20px; border-bottom: 1px solid var(--soft-tint);
}
.table td { padding: 14px 20px; border-bottom: 1px solid var(--silver-pearl); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.td-company { font-weight: 500; color: var(--navy); }
.td-date { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.td-action { text-align: right; }

.status { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.status-queued { background: var(--soft-tint); color: var(--ink-soft); }
.status-researching, .status-rendering { background: var(--paper-soft); color: var(--navy); }
.status-done { background: #E4EFE6; color: #1E5B2E; }
.status-error { background: #F9E5E6; color: #B4232C; }

.notice {
  background: var(--soft-tint); border-radius: 10px; padding: 14px 18px;
  font-size: 14px; color: var(--navy); margin-bottom: 18px;
}
.muted { color: var(--ink-soft); }
.err { color: #B4232C; font-size: 13px; }
.hidden { display: none; }

.progress { font-size: 14px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--soft-tint); border-top-color: var(--navy);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .topbar { padding: 16px 20px; }
  .display-h { font-size: 38px; }
  .card, .auth-card { padding: 24px; }
}
