/* ── reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0b1d35;
  --surface:     #1e293b;
  --surface-2:   #263548;
  --border:      rgba(255, 255, 255, 0.08);
  --accent:      #22c55e;
  --accent-dark: #16a34a;
  --accent-tint: rgba(34, 197, 94, 0.12);
  --green:       #22c55e;
  --red:         #ef4444;
  --amber:       #f59e0b;
  --text:        #f8fafc;
  --muted:       rgba(255, 255, 255, 0.55);
  --radius:      10px;
  --font-head:   'Outfit', -apple-system, sans-serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bot:    env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── layout ───────────────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── client branding band ─────────────────────────────────────────────────── */
/* Not sticky — visible on load, scrolls away */
.client-band {
  background: var(--bg);
  border-bottom: 2px solid var(--accent);
  padding: calc(var(--safe-top) + 20px) 20px 20px;
}

.client-band-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 600px;
}

/* Logo placeholder — first letter(s) in a rounded square */
.client-logo-space {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: #0b1d35;
  letter-spacing: -0.02em;
}

.client-band-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.client-band-tagline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
}

/* ── sticky app header ────────────────────────────────────────────────────── */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 10px;
}

/* GotFound wordmark — Outfit 800, white, matches live site */
.logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

/* Green dot before the wordmark — mirrors gotfound.co.uk nav */
.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}

.biz-name {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── tabs ─────────────────────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  padding: 0 16px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 0;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab { display: none; padding: 16px 16px calc(var(--safe-bot) + 32px); }
.tab.active { display: block; }

/* ── cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

/* ── form ─────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.field input::placeholder { color: var(--muted); }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0b1d35;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
}

.btn-primary:active  { background: var(--accent-dark); transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-group {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 11px 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:active { opacity: 0.8; }
.btn-green  { background: var(--accent);     color: #0b1d35; }
.btn-amber  { background: var(--amber);      color: #0b1d35; }
.btn-ghost  { background: var(--surface-2);  color: var(--text); }

/* ── status message ───────────────────────────────────────────────────────── */
.status-msg {
  margin-top: 12px;
  font-size: 0.875rem;
  min-height: 1.4em;
  text-align: center;
  font-weight: 500;
}
.status-msg.ok     { color: var(--green); }
.status-msg.error  { color: var(--red); }
.status-msg.queued { color: var(--amber); }

/* ── recent list ──────────────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}

.recent-list { list-style: none; }

.recent-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.recent-list li:last-child { border-bottom: none; }
.recent-list li.empty { color: var(--muted); font-size: 0.9rem; }

.recent-name  { font-weight: 500; color: var(--text); }
.recent-stage {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--muted);
}

/* ── review cards ─────────────────────────────────────────────────────────── */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.reviewer-name { font-weight: 600; font-size: 1rem; color: var(--text); }

.stars {
  color: var(--amber);
  font-size: 1rem;
  letter-spacing: 1px;
}

.review-text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
  font-style: italic;
}

.draft-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 7px;
}

.draft-text {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 10px 12px;
  resize: vertical;
  min-height: 80px;
}
.draft-text:focus { outline: none; border-color: var(--accent); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  font-size: 0.95rem;
}

/* ── offline banner ───────────────────────────────────────────────────────── */
#offline-banner {
  display: none;
  background: var(--amber);
  color: #0b1d35;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 7px;
}
body.offline #offline-banner { display: block; }
