/* ============================================================
   Pari Pulse — Admin
   Trimmed, standalone copy of the shared design tokens/classes
   from public/style.css — this app deliberately does NOT link
   back to public/style.css (that would recreate the coupling
   this app exists to remove). Keep visual tokens in sync by hand
   if the brand palette ever changes.
   ============================================================ */

:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --ink: #22282A;
  --ink-soft: #5B6360;
  --hairline: #DDD8CC;

  --brand: #2B5F5C;
  --brand-dark: #1E4341;
  --urgent: #C44536;
  --positive-soft: #F3E3CC;

  --radius: 10px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--brand-dark);
}

.wordmark-icon {
  height: 30px;
  width: auto;
  display: block;
}

.wordmark-text {
  line-height: 1;
}

.signed-in-as {
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- Layout ---------- */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  padding: 40px;
}

.card--narrow {
  max-width: 440px;
  margin: 40px auto;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--brand-dark);
}

.lede {
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 4px;
  color: var(--brand-dark);
}

.panel-sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

/* ---------- Form elements ---------- */

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 18px 0 6px;
  color: var(--ink);
}

.field-label:first-child { margin-top: 0; }

.text-input {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

.text-input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  background: var(--surface);
}

.hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 6px 0 0;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 22px;
}

.btn--primary {
  background: var(--brand);
  color: white;
}

.btn--primary:hover { background: var(--brand-dark); }

.btn--secondary {
  background: var(--positive-soft);
  color: var(--brand-dark);
}

.btn--full { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.error-text {
  color: var(--urgent);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ---------- Message usage table ---------- */

.table-scroll {
  overflow-x: auto;
  margin-top: 16px;
}

.admin-usage-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-usage-table th,
.admin-usage-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.admin-usage-table th {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.8rem;
}

.admin-usage-table tfoot td {
  font-weight: 600;
  border-bottom: none;
  border-top: 1px solid var(--hairline);
}
