/* Fastmo — shared tokens and primitives (landing, account, admin) */
:root {
  --ink: #1b2638;
  --ink-2: #3a4658;
  --muted: #5d6879;
  --line: #d8dfdc;
  --line-2: #e7ece9;
  --paper: #ffffff;
  --wash: #eef3f0;
  --wash-2: #f6f8f7;
  --brand: #0b7a5c;
  --brand-ink: #075a44;
  --brand-tint: #e1f1ea;
  --sticker: #ffd23f;
  --sticker-ink: #3d2e00;
  --danger: #b4321f;
  --danger-tint: #fbe9e5;
  --warn: #9a6200;
  --warn-tint: #fff3d6;
  --focus: #1f6fd1;

  --font: 'Bricolage Grotesque', 'Noto Sans Sinhala', 'Noto Sans Tamil', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --shadow-paper: 0 1px 0 rgba(27, 38, 56, 0.04), 0 18px 40px -18px rgba(27, 38, 56, 0.35);
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.si { font-family: 'Noto Sans Sinhala', var(--font); }
.ta { font-family: 'Noto Sans Tamil', var(--font); }
.mono { font-family: var(--mono); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-md);
  border: 1.5px solid transparent; font-weight: 600; font-size: 16px; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--paper); color: var(--danger); border-color: #e7b8ae; }
.btn-danger:hover { background: var(--danger-tint); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, .select, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--paper); font-size: 16px;
  transition: border-color .15s ease;
}
textarea.input { min-height: 80px; resize: vertical; }
.input:hover, .select:hover { border-color: #b9c4c0; }
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.hint { font-size: 13px; color: var(--muted); }
.form-error { color: var(--danger); font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--wash); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--brand-tint); color: var(--brand-ink); }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.bad { background: var(--danger-tint); color: var(--danger); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-size: 15px;
  z-index: 100; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
