/* VaadagaiPro design system v1 — 2026-04-29
   Steel-blue + amber. Vanilla CSS, no Tailwind dependency. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --steel-950:#0E1822; --steel-800:#1F2D3D; --steel-700:#2A3A4D;
  --steel-500:#5B6776; --steel-300:#A6B0BC; --steel-200:#D9DEE5;
  --steel-100:#EEF1F5; --paper:#F7F5F0; --surface:#FFFFFF;

  --accent:#C9711B; --accent-deep:#A55A12; --accent-ink:#FFFFFF;
  --amber:#E0A951; --amber-soft:#F1D2A0;

  --success:#1F7A4F; --warning:#B5651D; --danger:#9C2B2B; --info:#2B5C9C;

  --bg: var(--paper);
  --bg-alt: var(--steel-100);
  --bg-card: var(--surface);
  --text: var(--steel-950);
  --text-muted: var(--steel-500);
  --border: var(--steel-200);

  --r-sm:6px; --r-md:10px; --r-lg:14px;
  --shadow-card: 0 1px 2px rgba(14,24,34,.06);
  --shadow-modal: 0 12px 32px rgba(14,24,34,.18);
  --motion: 150ms cubic-bezier(.2,.8,.2,1);

  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  --paper:#0E1822; --surface:#16212E;
  --steel-100:#1B2735; --steel-200:#243140;
  --steel-500:#8C97A5; --steel-700:#C7CED7; --steel-950:#F1F3F6;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4);
  --shadow-modal: 0 12px 32px rgba(0,0,0,.55);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); }
h3 { font-size: 1.25rem; }
.eyebrow { font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-500); }
.tnum, .num { font-feature-settings: 'tnum' 1, 'lnum' 1; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

a { color: var(--accent); text-decoration: none; transition: color var(--motion); }
a:hover { color: var(--accent-deep); }

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

*:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px;
  font-family: var(--font-sans); border: 1px solid transparent; cursor: pointer;
  transition: background var(--motion), color var(--motion), border-color var(--motion), transform var(--motion);
  text-decoration: none; line-height: 1; white-space: nowrap; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--steel-950); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-deep); color: var(--accent-ink); }

.btn-secondary { background: var(--surface); color: var(--steel-950); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--steel-500); }

.btn-ghost { background: transparent; color: var(--steel-700); }
.btn-ghost:hover { background: var(--steel-100); color: var(--steel-950); }

.btn-danger { background: var(--danger); color: var(--paper); }
.btn-danger:hover { filter: brightness(0.85); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* Inputs */
.input, .select, textarea.input {
  width: 100%; padding: 10px 14px; font-family: var(--font-sans); font-size: 14px;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  outline: none; transition: border-color var(--motion), box-shadow var(--motion);
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--steel-700);
  box-shadow: 0 0 0 3px rgba(201,113,27,.12);
}
.input::placeholder { color: var(--steel-300); }
.input[readonly], .input[disabled] { background: var(--steel-100); color: var(--steel-500); }

.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--steel-500) 50%), linear-gradient(135deg, var(--steel-500) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.label { display: block; font-size: 13px; font-weight: 500; color: var(--steel-700); margin-bottom: 6px; }
.help { font-size: 12px; color: var(--steel-500); margin-top: 4px; }
.error-text { font-size: 12px; color: var(--danger); margin-top: 4px; }
.field { margin-bottom: 16px; }

.check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; clip: rect(0,0,0,0); }
.toggle .track { position: absolute; inset: 0; background: var(--steel-200); border-radius: 12px; cursor: pointer; transition: background var(--motion); }
.toggle .track::before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: var(--surface); border-radius: 50%; transition: transform var(--motion); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::before { transform: translateX(16px); }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-card); }
.card-pad-lg { padding: 32px; }
.card-flat { box-shadow: none; }

.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-card); }
.stat-card .stat-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-500); margin-bottom: 8px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--text); font-feature-settings: 'tnum' 1, 'lnum' 1; line-height: 1.1; }
.stat-card .stat-delta { font-size: 12px; margin-top: 6px; font-feature-settings: 'tnum' 1; }
.stat-card .stat-delta.up { color: var(--success); }
.stat-card .stat-delta.down { color: var(--danger); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 10px 14px; font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-500); border-bottom: 1px solid var(--border); background: var(--bg); }
.data-table td { padding: 12px 14px; color: var(--text); border-bottom: 1px solid var(--border); height: 44px; vertical-align: middle; font-feature-settings: 'tnum' 1; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--steel-100); }
.data-table .num { text-align: right; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.badge-success { background: rgba(31,122,79,.12); color: var(--success); }
.badge-warning { background: rgba(181,101,29,.12); color: var(--warning); }
.badge-danger  { background: rgba(156,43,43,.12); color: var(--danger); }
.badge-info    { background: rgba(43,92,156,.12); color: var(--info); }
.badge-neutral { background: var(--steel-100); color: var(--steel-700); }
.badge-amber   { background: rgba(224,169,81,.18); color: var(--accent-deep); }

.hr { height: 1px; background: var(--border); border: none; margin: 24px 0; }

/* Top nav */
.vp-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.vp-nav-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.vp-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.vp-brand img { width: 28px; height: 28px; border-radius: 6px; }
.vp-nav-links { display: none; gap: 28px; }
@media (min-width: 768px) { .vp-nav-links { display: flex; } }
.vp-nav-link { font-size: 14px; color: var(--steel-500); font-weight: 500; }
.vp-nav-link:hover { color: var(--steel-950); }
.vp-nav-cta { display: flex; gap: 12px; align-items: center; }

/* Footer */
.vp-foot { border-top: 1px solid var(--border); padding: 32px 24px; color: var(--steel-500); font-size: 13px; }
.vp-foot-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vp-foot a { color: var(--steel-500); }
.vp-foot a:hover { color: var(--steel-950); }

/* Modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(14,24,34,.4); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-modal); max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px 12px; }
.modal-body { padding: 12px 24px; }
.modal-foot { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--border); }

/* Toast */
.toast-stack { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--steel-950); color: var(--paper); padding: 12px 18px; border-radius: var(--r-sm); font-size: 14px; box-shadow: var(--shadow-modal); pointer-events: auto; opacity: 0; transform: translateY(8px); transition: opacity var(--motion), transform var(--motion); }
.toast.in { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.danger { background: var(--danger); }

/* Empty state */
.empty { text-align: center; padding: 48px 16px; color: var(--steel-500); }
.empty .empty-icon { font-size: 32px; color: var(--steel-300); margin-bottom: 12px; }

/* Dark mode toggle */
.vp-dark-toggle { position: fixed; bottom: 20px; right: 20px; z-index: 60; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-card); transition: transform var(--motion); font-size: 16px; color: var(--steel-700); }
.vp-dark-toggle:hover { transform: scale(1.06); }

kbd { font-family: var(--font-mono); font-size: 11px; background: var(--steel-100); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; color: var(--steel-700); }

.skip-link { position: absolute; top: -9999px; left: 16px; z-index: 9999; padding: 12px 24px; background: var(--steel-950); color: var(--paper); font-weight: 600; border-radius: var(--r-sm); text-decoration: none; font-size: 14px; transition: top var(--motion); }
.skip-link:focus { top: 16px; }

.is-hidden { display: none !important; }
