*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, textarea, select, a { font: inherit; color: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link { position: fixed; top: 12px; left: 12px; z-index: var(--z-toast); padding: 10px 14px; color: var(--surface); background: var(--fg); border-radius: var(--radius-sm); transform: translateY(-160%); transition: transform 160ms cubic-bezier(.16,1,.3,1); }
.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid var(--accent) !important; outline-offset: 3px !important; }
:where(button, a, input, textarea, select, summary, [tabindex]) { scroll-margin: 80px 0; }

.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; white-space: nowrap; }
.brand-lockup__image { display: block; width: 154px; height: auto; }
.brand-lockup__mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--surface); background: var(--accent); font-size: 15px; font-weight: 800; letter-spacing: -.04em; }
.brand-lockup__name { font-size: 14px; font-weight: 800; letter-spacing: .055em; }
.brand-lockup--center { justify-content: center; }

.button { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--fg); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.button:hover { color: var(--accent); border-color: var(--accent); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .46; cursor: not-allowed; }
.button--primary { color: var(--surface); background: var(--accent); border-color: var(--accent); box-shadow: none; }
.button--primary:hover { color: var(--surface); background: var(--accent-hover); border-color: var(--accent-hover); }
.button--ghost { color: var(--fg-secondary); background: transparent; border-color: transparent; box-shadow: none; }
.button--ghost:hover { color: var(--fg); background: var(--surface-alt); border-color: var(--border); }
.button--approve { color: var(--green); background: var(--green-soft); border-color: color-mix(in oklch, var(--green) 25%, transparent); box-shadow: none; }
.button--pending { color: var(--orange); background: var(--orange-soft); border-color: color-mix(in oklch, var(--orange) 25%, transparent); box-shadow: none; }
.button--reject { color: var(--red); background: var(--red-soft); border-color: color-mix(in oklch, var(--red) 25%, transparent); box-shadow: none; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: var(--fg-secondary); font-size: 11px; font-weight: 700; }
.field > small { color: var(--fg-muted); font-size: 11px; line-height: 1.4; }
.field input, .field textarea, .field select, input[type="search"], input[type="date"] { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--fg); background: var(--input-bg); box-shadow: inset 0 1px 2px oklch(0.2 0.02 278 / .03); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.feedback { min-height: 20px; margin: 0; color: var(--fg-secondary); font-size: 13px; }
.feedback[data-tone="success"] { color: var(--green); font-weight: 700; }
.feedback[data-tone="error"] { color: var(--red); font-weight: 700; }

dialog { width: min(92vw, 560px); padding: 26px; color: var(--fg); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: oklch(0.22 0.02 278 / .56); }
dialog h2 { margin: 0 42px 8px 0; font-size: 23px; line-height: 1.15; letter-spacing: -.03em; }
dialog > p { color: var(--fg-secondary); line-height: 1.55; }
.dialog__content { max-width: 520px; margin: auto; }
.dialog__title { margin: 0 0 8px; }
.dialog__description { margin: 0; color: var(--fg-secondary); }

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

@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText !important; }
  .brand-lockup__mark, .button--primary { forced-color-adjust: none; }
}
