/* Shared tokens and components for the inquiry console and the admin dashboard. */
:root {
  --green: #0b6e4f;        /* primary actions; 6.2:1 with white */
  --green-dark: #08533b;
  --green-tint: #e6f2ec;
  --ink: #1f2a37;
  --muted: #5b6660;        /* 6:1 on white */
  --line: #d3dad5;
  --line-strong: #9aa7a0;
  --surface: #f4f6f4;
  --panel: #ffffff;
  --danger: #b42318;       /* 6.6:1 on white */
  --danger-tint: #fdecea;
  --amber: #b45309;        /* text; 5:1 on white */
  --amber-fill: #d97706;   /* bars only */
  --amber-tint: #fff4e0;
  --focus: #1c64f2;

  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: Bahnschrift, "DIN Alternate", "DIN 2014", "Arial Narrow", var(--font-body);

  --radius-s: 4px;
  --radius-m: 8px;

  color-scheme: light;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--green); }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Form controls */
label { font-weight: 600; }
.field { display: grid; gap: 6px; }
.field-hint { color: var(--muted); font-size: 0.87rem; font-weight: 400; }
.field-error { color: var(--danger); font-size: 0.87rem; font-weight: 600; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 9px 11px;
  background: var(--panel);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[readonly] { background: var(--surface); color: var(--muted); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 400; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 7px 16px;
  border: 1px solid transparent; border-radius: var(--radius-s);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.button:disabled { opacity: 0.6; cursor: not-allowed; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-secondary { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.button-secondary:hover:not(:disabled) { border-color: var(--ink); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover:not(:disabled) { background: #8f1c13; }
.button-quiet { background: transparent; color: var(--green); padding-inline: 8px; }
.button-quiet:hover:not(:disabled) { background: var(--green-tint); }
.button-small { min-height: 30px; padding: 3px 10px; font-size: 0.87rem; }

/* Notices */
.notice {
  border: 1px solid; border-left-width: 4px; border-radius: var(--radius-s);
  padding: 10px 14px;
}
.notice-error { background: var(--danger-tint); border-color: var(--danger); color: #7a1a12; }
.notice-success { background: var(--green-tint); border-color: var(--green); color: #0a4a35; }
.notice-warning { background: var(--amber-tint); border-color: var(--amber-fill); color: #6b3205; }
.notice-info { background: var(--panel); border-color: var(--line-strong); }
.notice strong { display: block; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 0.87rem; font-weight: 600; color: var(--muted); background: var(--surface); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
td.empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.numeric { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

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