/* Adapted from the supplied UI-KIT BW / starter-mono.html.
   Inter + JetBrains Mono, OKLCH monochrome tokens, optional turquoise accent.
   Application layout deliberately lives in app.css. */
:root {
  color-scheme: light;
  --radius: 12px;
  --background: oklch(1 0 0);
  --foreground: oklch(.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: var(--foreground);
  --popover: oklch(1 0 0);
  --muted: oklch(.97 0 0);
  --muted-foreground: oklch(.50 0 0);
  --secondary: oklch(.97 0 0);
  --secondary-foreground: oklch(.205 0 0);
  --accent: oklch(.97 0 0);
  --accent-foreground: oklch(.205 0 0);
  --primary: oklch(.205 0 0);
  --primary-foreground: oklch(.985 0 0);
  --border: oklch(.922 0 0);
  --input: oklch(.89 0 0);
  --ring: oklch(.708 0 0);
  --success: oklch(.55 .17 145);
  --warning: oklch(.726 .167 60.6);
  --destructive: oklch(.585 .22 27.3);
  --info: oklch(.58 .15 252);
  --sidebar: oklch(.979 0 0);
  --sidebar-foreground: oklch(.32 0 0);
  --sidebar-accent: oklch(.938 0 0);
  --sidebar-border: oklch(.922 0 0);
  --chart-1: oklch(.205 0 0);
  --chart-3: oklch(.55 0 0);
  --elev: oklch(1 0 0);
  --overlay: rgb(0 0 0 / .38);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .04);
  --shadow-md: 0 8px 24px rgb(0 0 0 / .08);
  --shadow-lg: 0 16px 60px rgb(0 0 0 / .14);
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --t: .15s ease;
}
html[data-mode="dark"] {
  color-scheme: dark;
  --background: oklch(.21 0 0);
  --foreground: oklch(.985 0 0);
  --card: oklch(.25 0 0);
  --popover: oklch(.25 0 0);
  --muted: oklch(.29 0 0);
  --muted-foreground: oklch(.72 0 0);
  --secondary: oklch(.29 0 0);
  --secondary-foreground: oklch(.985 0 0);
  --accent: oklch(.29 0 0);
  --accent-foreground: oklch(.985 0 0);
  --primary: oklch(.922 0 0);
  --primary-foreground: oklch(.205 0 0);
  --border: oklch(1 0 0 / .12);
  --input: oklch(1 0 0 / .18);
  --ring: oklch(.60 0 0);
  --success: oklch(.72 .19 144);
  --warning: oklch(.77 .16 65);
  --destructive: oklch(.70 .19 27);
  --info: oklch(.72 .13 250);
  --sidebar: oklch(.235 0 0);
  --sidebar-foreground: oklch(.84 0 0);
  --sidebar-accent: oklch(.30 0 0);
  --sidebar-border: oklch(1 0 0 / .10);
  --chart-1: oklch(.985 0 0);
  --chart-3: oklch(.65 0 0);
  --elev: oklch(.27 0 0);
  --overlay: rgb(0 0 0 / .60);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .24);
  --shadow-md: 0 8px 24px rgb(0 0 0 / .38);
  --shadow-lg: 0 16px 60px rgb(0 0 0 / .48);
}
html[data-style="color"] {
  --primary: #0b8c7d;
  --primary-foreground: #fff;
  --accent: rgb(46 217 195 / .14);
  --accent-foreground: #08786b;
  --ring: #0b8c7d;
  --chart-1: #0b8c7d;
}
html[data-style="color"][data-mode="dark"] {
  --primary: #2ed9c3;
  --primary-foreground: #122421;
  --accent: rgb(46 217 195 / .12);
  --accent-foreground: #2ed9c3;
  --ring: #2ed9c3;
  --chart-1: #2ed9c3;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--background); color: var(--foreground); font: 400 14px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
svg.icon { display: inline-block; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
::selection { background: color-mix(in oklab, var(--primary) 18%, var(--background)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 13px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); color: var(--foreground);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500;
  line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), opacity var(--t);
}
.btn:hover { background: var(--muted); border-color: color-mix(in oklab, var(--foreground) 20%, var(--border)); }
.btn.primary, .btn-primary { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover, .btn-primary:hover { opacity: .86; }
.btn.secondary, .btn-secondary { border-color: var(--border); background: var(--card); color: var(--foreground); box-shadow: var(--shadow-sm); }
.btn.secondary:hover, .btn-secondary:hover { background: var(--muted); }
.btn.ghost, .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover, .btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn.icon-btn, .icon-btn { width: 34px; height: 34px; padding: 0; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted-foreground); }
.icon-btn:hover { background: var(--accent); color: var(--foreground); }
.btn.sm, .btn-sm { height: 30px; padding-inline: 10px; font-size: 12px; }
.btn.danger { color: var(--destructive); border-color: color-mix(in oklab, var(--destructive) 35%, var(--border)); }
.btn:disabled, .btn[aria-disabled="true"], .icon-btn:disabled { opacity: .45; pointer-events: none; }
.btn:active:not(:disabled) { box-shadow: none; }

.input, .select, .textarea {
  display: block; width: 100%; min-height: 36px; padding: 8px 11px;
  border: 1px solid var(--input); border-radius: 8px;
  background: var(--card); color: var(--foreground); font-family: var(--font-sans);
  font-size: 13px; line-height: 1.4; outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); opacity: .85; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 18%, transparent); }
.input:disabled, .select:disabled, .textarea:disabled { cursor: not-allowed; opacity: .55; background: var(--muted); }
.textarea { min-height: 90px; resize: vertical; }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); color: var(--foreground); font-size: 11px;
  font-weight: 500; line-height: 1.45; white-space: nowrap;
}
.badge.subtle { background: var(--muted); border-color: transparent; color: var(--muted-foreground); }
.badge.pill { border-radius: 999px; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--muted-foreground); }
.status-dot.success, .status-dot.ok, .status-dot.signed { background: var(--success); }
.status-dot.warning, .status-dot.pending { background: var(--warning); }
.status-dot.danger, .status-dot.error { background: var(--destructive); }
.status-dot.info { background: var(--info); }
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
