/* VoiceVault — shadcn/ui-inspired design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:         #ffffff;
  --bg-muted:   #fafafa;
  --fg:         #09090b;
  --fg-muted:   #71717a;
  --border:     #e4e4e7;
  --surface:    #f4f4f5;
  --primary:    #18181b;
  --primary-fg: #fafafa;
  --radius:     6px;
  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / .05);
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg-muted);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main.container {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* Auth pages (no nav sibling) — narrow centered card */
body:not(:has(nav)) > main.container {
  max-width: 420px;
  margin-top: 5rem;
}

/* ── Navigation ── */
nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li strong {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  padding: 0 0.25rem;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
}

nav ul li a:hover {
  color: var(--fg);
  background: var(--surface);
}

nav ul li button {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  margin-top: 0;
  transition: color .15s, background .15s;
}

nav ul li button:hover {
  color: var(--fg);
  background: var(--surface);
}

/* ── Article / Card ── */
article {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

/* ── Sections ── */
section { margin-bottom: 0; }

section + section {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

/* ── Typography ── */
h1 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 0 0 0.25rem 0;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 0.625rem 0;
}

h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.25rem 0;
}

p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin: 0 0 0.75rem 0;
}

p:last-child { margin-bottom: 0; }

small {
  font-size: 0.75rem;
  color: var(--fg-muted);
  display: block;
  margin-top: 0.375rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
}

mark {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fde047;
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  display: block;
  font-size: 0.875rem;
  margin: 0.75rem 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: var(--fg-muted); }

/* ── Forms ── */
label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
  margin: 1rem 0 0.3rem;
}

form label:first-child,
label:first-child { margin-top: 0; }

input[type=text],
input[type=password],
input[type=email],
input[type=tel],
input[type=number],
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, textarea:focus {
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgb(0 0 0 / .06);
}

input[readonly] {
  background: var(--surface);
  cursor: text;
}

input::placeholder, textarea::placeholder { color: #a1a1aa; }

textarea { resize: vertical; min-height: 8rem; }

/* ── Buttons ── */
button, a[role=button] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  margin-top: 1rem;
}

/* Primary */
button:not(.secondary),
a[role=button]:not(.secondary):not(.outline) {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

button:not(.secondary):hover,
a[role=button]:not(.secondary):not(.outline):hover {
  background: #3f3f46;
  border-color: #3f3f46;
  color: var(--primary-fg);
  text-decoration: none;
}

/* Secondary */
button.secondary,
a[role=button].secondary {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--border);
}

button.secondary:hover,
a[role=button].secondary:hover {
  background: var(--surface);
  text-decoration: none;
}

/* Outline */
a[role=button].outline {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--border);
}

a[role=button].outline:hover {
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

/* Inline forms (retry, logout in non-nav context) */
form[style*="inline"] { display: inline; }
form[style*="inline"] button { margin-top: 0; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid transparent;
  text-transform: capitalize;
}

.badge-completed  { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.badge-processing { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge-pending    { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-failed     { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ── Invite code highlight box ── */
article > article {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}
