/* Recap AI — flat design, ONE accent color, no gradients, 150-300ms motion. */
:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --card: #ffffff;
  --danger-bg: #fef2f2;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans Myanmar", "Myanmar Text", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- top bar ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 880px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-text { font-weight: 700; font-size: 17px; }
.brand-domain { display: block; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.2; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 14px; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- layout ---------- */
.container { max-width: 880px; margin: 0 auto; padding: 20px 16px 40px; }
.hero { text-align: center; padding: 18px 0 20px; }
.hero h1 { font-size: 26px; margin: 0 0 8px; }
.hero-sub { color: var(--muted); margin: 0 auto; max-width: 520px; font-size: 15px; }
.page-head { margin: 6px 0 16px; }
.page-head h2 { margin: 0 0 4px; font-size: 22px; }
.page-sub { margin: 0; color: var(--muted); font-size: 14px; }
.section-head { margin: 26px 0 10px; }
.section-head h3 { margin: 0; font-size: 16px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 36px; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.auth-card { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tab {
  flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background 200ms, color 200ms;
}
.tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(17,24,39,.08); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  transition: border-color 200ms;
}
.field input:focus { outline: none; border-color: var(--accent); }
.fineprint { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; padding: 11px 18px;
  text-decoration: none; transition: background 200ms, border-color 200ms, color 200ms;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled { background: #b6c6f5; cursor: not-allowed; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn-small { padding: 7px 12px; font-size: 13px; }
.btn.loading { opacity: .65; pointer-events: none; }

/* ---------- errors / states ---------- */
.error-box {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #fecaca; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; color: var(--muted); font-size: 14px; background: var(--card);
}
.muted { color: var(--muted); font-size: 13px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tool grid ---------- */
.tool-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: left; font: inherit; color: var(--ink);
  display: flex; flex-direction: column; gap: 8px; min-height: 148px;
  transition: border-color 200ms;
}
button.tool { cursor: pointer; }
button.tool:hover { border-color: var(--accent); }
.tool.soon { opacity: .75; }
.tool svg { width: 26px; height: 26px; color: var(--accent); }
.tool .tool-title { font-weight: 700; font-size: 15px; }
.tool .tool-desc { font-size: 12.5px; color: var(--muted); flex: 1; }
.badge {
  align-self: flex-start; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.badge-live { background: #eaf1fe; color: var(--accent); }
.badge-soon { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* ---------- recent jobs ---------- */
.job-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.job-row .job-name { font-weight: 600; font-size: 14px; word-break: break-all; }
.job-row .job-meta { font-size: 12px; color: var(--muted); }
.job-row .spacer { flex: 1; }
.status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status-done { background: #ecfdf5; color: var(--ok); }
.status-working, .status-queued { background: #eaf1fe; color: var(--accent); }
.status-error { background: var(--danger-bg); color: var(--danger); }
.job-links a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; margin-left: 8px; }

/* ---------- transcribe ---------- */
.back-btn { margin-bottom: 10px; }
.back-btn svg { width: 16px; height: 16px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 2px dashed #c7d2fe; border-radius: var(--radius);
  padding: 30px 16px; cursor: pointer; text-align: center;
  transition: border-color 200ms, background 200ms; margin-bottom: 14px;
}
.dropzone:hover, .dropzone.has-file { border-color: var(--accent); background: #f5f8ff; }
.dropzone svg { width: 30px; height: 30px; color: var(--accent); }
.dz-title { font-weight: 700; font-size: 15px; word-break: break-all; }
.dz-hint { font-size: 12.5px; color: var(--muted); }
.file-info { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 12px; }
.file-info #file-name { font-weight: 600; word-break: break-all; }
.file-size { color: var(--muted); white-space: nowrap; }
.stage-row { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.bar { height: 10px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin: 14px 0 6px; }
.fill { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; transition: width 250ms; }
.pct { color: var(--muted); font-size: 13px; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.result-head h3 { margin: 0; font-size: 16px; }
.transcript-box {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; max-height: 380px; overflow: auto;
  white-space: pre-wrap; word-break: break-word; font-size: 14.5px;
}
.transcript-box .seg { display: block; margin-bottom: 8px; }
.transcript-box .seg-time { color: var(--accent); font-size: 12px; font-weight: 700; margin-right: 8px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- stage 2 inputs ---------- */
.input-area {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  resize: vertical; line-height: 1.6; transition: border-color 200ms;
}
.input-area:focus { outline: none; border-color: var(--accent); }
.select {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  transition: border-color 200ms;
}
.select:focus { outline: none; border-color: var(--accent); }
.count-row { text-align: right; margin: 6px 0 12px; }
.transcript-box .seg-orig { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- media + premium ---------- */
.media-player { width: 100%; border-radius: 10px; background: #000; }
audio.media-player { background: transparent; }
.prem-price { font-size: 22px; font-weight: 700; margin: 4px 0 10px; }
.steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; }
.steps li { margin-bottom: 6px; }
.ok-box {
  background: #ecfdf5; color: var(--ok);
  border: 1px solid #a7f3d0; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.shot-thumb { max-width: 220px; width: 100%; border: 1px solid var(--line); border-radius: 10px; display: block; margin: 8px 0; }
.decide-row { display: flex; gap: 8px; margin-top: 8px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 22px; }
  .card { padding: 16px; }
  .result-actions .btn { flex: 1; }
}

/* BYOK key banner + settings */
.notice { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; background: var(--surface); }
.notice p { margin: 0 0 10px; font-size: 14px; }
.ok-text { color: var(--ok); font-size: 14px; margin: 8px 0; }

/* ---------- dark theme (flat, same accent) ---------- */
:root[data-theme="dark"] {
  --ink: #f3f4f6;
  --muted: #9ca3af;
  --line: #2b3240;
  --bg: #0f1216;
  --card: #171b21;
  --danger-bg: #2a1518;
  --danger: #f87171;
  --ok: #4ade80;
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: #10141a;
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme="dark"] .job-media { background: #000; }

/* ---------- topbar toggles ---------- */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 200ms ease, color 200ms ease;
}
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn {
  height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600;
  transition: background 200ms ease, color 200ms ease;
}

/* Theme button: exactly one icon, chosen by CSS from the theme alone. */
.icon-btn .ic-sun { display: none; }
:root[data-theme="dark"] .icon-btn .ic-sun { display: block; }
:root[data-theme="dark"] .icon-btn .ic-moon { display: none; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
