/* Design tokens
   Palette: cool paper background, deep ink text, a muted teal accent
   (money/ledger association, deliberately not the terracotta/acid-green
   defaults). Type: Space Grotesk for headings (some character without
   being loud), IBM Plex Sans for body, IBM Plex Mono for anything
   numeric - GSTIN, amounts, invoice numbers - so data reads as data.
   Signature detail: a double rule under section headers and totals,
   the accountant's own convention for "this number is final." */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #1a2230;
  --ink-soft: #5c6572;
  --ink-faint: #8a919c;
  --accent: #2f6f5e;
  --accent-soft: #e6f0ed;
  --line: #e2e5e9;
  --line-strong: #c9cdd3;
  --danger: #a8431f;
  --danger-soft: #f8ebe6;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(26, 34, 48, 0.06), 0 4px 16px rgba(26, 34, 48, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Signature: double-rule divider, used under page/section headers */
.rule-double {
  border: none;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  height: 3px;
  margin: 6px 0 0 0;
  width: 100%;
}

button, .btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #0e141f; }
.btn-primary:disabled { background: var(--ink-faint); cursor: not-allowed; }

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--ink); }

input, select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
}

.field { margin-bottom: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.error-banner {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
}
.error-banner.visible { display: block; }

.footer-credit {
  text-align: center;
  color: var(--ink-faint);
  font-size: 12.5px;
  padding: 24px 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
