/*
  Lora design system. One shared token set for the dashboard and account
  pages so every screen reads as one product. Colors anchor on the existing
  brand green; nothing here introduces external fonts or network requests,
  so the app stays fully self-hosted.
*/
:root {
  /* Palette */
  --ink: #14231d;
  --ink-soft: #4b5a53;
  --paper: #f6f4ee;
  --surface: #ffffff;
  --primary: #126a54;
  --primary-deep: #0b4a3b;
  --primary-tint: #e3f0ea;
  --amber: #a8722f;
  --amber-tint: #f5ead9;
  --danger: #a33434;
  --danger-tint: #fbe9e7;
  --line: #dbe3de;
  --line-soft: #ecefe9;

  /* Type */
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-ui: -apple-system, "Segoe UI", system-ui, Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.375rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.125rem;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20, 35, 29, 0.04), 0 8px 24px rgba(20, 35, 29, 0.06);
  --shadow-pop: 0 12px 32px rgba(20, 35, 29, 0.14);

  --focus-ring: 0 0 0 3px rgba(18, 106, 84, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--primary);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: var(--space-3);
}

input, select, textarea, button {
  font-family: inherit;
  font-size: var(--text-base);
}

input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--ink);
  width: 100%;
}

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

textarea {
  min-height: 84px;
  resize: vertical;
  font-family: inherit;
}

button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  background: var(--primary-tint);
  color: var(--primary-deep);
  transition: background 0.15s ease, transform 0.05s ease;
}

button:hover {
  background: #d3e9df;
}

button:active {
  transform: translateY(1px);
}

button.primary, button[type="submit"] {
  background: var(--primary);
  color: #fff;
}

button.primary:hover, button[type="submit"]:hover {
  background: var(--primary-deep);
}

button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

button.danger {
  background: var(--danger-tint);
  color: var(--danger);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 var(--space-2);
}

.muted {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary-deep);
}

.badge.amber {
  background: var(--amber-tint);
  color: var(--amber);
}

.badge.danger {
  background: var(--danger-tint);
  color: var(--danger);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}

.dot.live {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-tint);
}

.dot.on {
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
