/* Shared design tokens and components. Page layouts live in css/. */
:root {
  --ink: #203b33;
  --muted: #65746e;
  --green: #176a50;
  --green-dark: #123d30;
  --mint: #eaf3ee;
  --gold: #bca16a;
  --line: #e0e7e2;
  --surface: #fff;
  --canvas: #f5f7f5;
  --red: #ac3535;
  --amber: #805a16;
  --shadow: 0 3px 14px rgb(24 54 42 / 3%);
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.65 "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #50927d; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.025em; }
h1 { font-size: clamp(26px, 2.5vw, 34px); font-weight: 650; margin-bottom: 10px; }
h2 { font-size: 20px; font-weight: 650; margin-bottom: 12px; }
h3 { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
p { margin-bottom: 14px; }
small { font-size: 12px; }
strong { font-weight: 650; }
.muted, .help-text { color: var(--muted); }
.eyebrow { display: block; margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.page-description { color: var(--muted); max-width: 680px; margin-bottom: 0; }
.icon { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--green); color: #fff; font-size: 13px; font-weight: 650; line-height: 1.4; text-decoration: none; cursor: pointer; transition: background .16s, box-shadow .16s; }
.button:hover, button:hover { background: var(--green-dark); color: #fff; box-shadow: 0 3px 8px rgb(24 54 42 / 10%); }
.button.secondary, button.secondary { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: none; }
.button.secondary:hover, button.secondary:hover { background: var(--mint); border-color: #bbd1c4; }
button.danger { background: var(--red); }
button:disabled { cursor: not-allowed; opacity: .6; }
.button .icon { width: 17px; height: 17px; }
.full-width { width: 100%; }
.text-link { display: inline-flex; gap: 7px; align-items: center; font-weight: 600; font-size: 13px; text-decoration: none; }
.text-link .icon { width: 15px; }
.back-link { display: inline-flex; min-height: 40px; align-items: center; font-size: 12px; font-weight: 600; text-decoration: none; margin-bottom: 15px; }
.card { padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.stack { display: grid; gap: 22px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.toolbar > div { min-width: 0; }
.toolbar .button { flex-shrink: 0; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 17px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.section-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--mint); border-radius: 11px; color: var(--green); margin-bottom: 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 9px; border-radius: 6px; background: var(--mint); color: var(--green-dark); font-size: 11px; font-weight: 600; line-height: 1.6; }
.badge.neutral { color: #59685f; background: #f0f3f0; }
.badge.warning { background: #fbf2df; color: var(--amber); }
.badge.error { background: #faecea; color: var(--red); }
.notice { padding: 15px 18px; margin-bottom: 20px; border: 1px solid #cbe0d2; border-radius: 9px; background: #edf6ef; color: var(--green-dark); font-size: 13px; }
.notice.message { display: flex; align-items: flex-start; gap: 10px; }
.notice p { margin: 5px 0 0; }
.notice .icon { width: 18px; margin-top: 2px; }
.notice.warning { background: #fcf7e9; border-color: #eadcb4; color: var(--amber); }
.notice.error, .notice.errors { color: var(--red); background: #fdf1ef; border-color: #efc7c2; }
.notice ul { margin: 0; padding-left: 18px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 52px 24px; background: #fff; border: 1px dashed #cddbd2; border-radius: var(--radius); }
.empty-state .section-icon { width: 54px; height: 54px; }
.empty-state h2, .empty-state h3 { margin-bottom: 8px; }
.empty-state p { max-width: 410px; margin: 0 auto 20px; color: var(--muted); }
.empty-state.compact { border: 0; padding: 32px 18px; background: transparent; }
.form-card { max-width: 760px; }
form p, .field { display: block; margin: 0 0 22px; }
label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; max-width: 100%; min-height: 46px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #cfd9d2; border-radius: 7px; box-shadow: 0 1px 2px rgb(0 0 0 / 2%); }
input::placeholder, textarea::placeholder { color: #8c9791; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid #e2efe7; outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--green); margin: 0 8px 0 0; vertical-align: middle; }
input[type="file"] { padding: 9px; background: #f9fbf9; }
input::file-selector-button { padding: 7px 13px; margin-right: 12px; border: 0; border-radius: 5px; background: var(--mint); color: var(--green-dark); cursor: pointer; }
textarea { min-height: 110px; resize: vertical; }
select { cursor: pointer; }
input:disabled, textarea:disabled, select:disabled { background: #f1f4f2 !important; color: #526258; opacity: 1; }
.helptext, .help-text, form p > small { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
.helptext ul, .help-text ul { padding-left: 18px; margin: 6px 0; }
.errorlist { margin: 7px 0; padding-left: 17px; font-size: 12px; color: var(--red); }
.field-label-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.field-label-row label { margin: 0; }
.field-label-row a { font-size: 12px; text-decoration: none; font-weight: 600; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); }
fieldset { padding: 0; margin: 0 0 25px; border: 0; min-width: 0; }
legend { font-weight: 650; font-size: 17px; margin-bottom: 18px; }
details { border-radius: 9px; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details > :last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; background: #f8faf8; }
th, td { padding: 15px 19px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.table-wrap { overflow-x: auto; padding: 0; }
.table-wrap table { min-width: 580px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.actions .button, .actions button { padding: 8px 12px; font-size: 12px; min-height: 40px; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 20px; padding: 10px 18px; background: #fff; color: var(--green); }
.skip-link:focus { top: 15px; }
[hidden] { display: none !important; }
@media (max-width: 680px) {
  h1 { font-size: 27px; }
  .toolbar { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .card { padding: 20px; }
  .table-wrap { padding: 0; }
  .form-actions .button, .form-actions button { flex: 1; }
  .section-heading { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
