:root {
  --ink: #18242f;
  --muted: #667482;
  --surface: #ffffff;
  --page: #f4f7f8;
  --primary: #0c6d62;
  --primary-dark: #075148;
  --border: #dbe4e7;
  --focus: #f2a900;
}

* { box-sizing: border-box; }
body { background: var(--page); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; margin: 0; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button-secondary, .button-danger { border: 0; border-radius: .5rem; cursor: pointer; display: inline-block; font-weight: 700; padding: .7rem 1rem; }
button { background: var(--primary); color: #fff; }
button:hover { background: var(--primary-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.shell { margin: 0 auto; max-width: 1180px; padding-left: 1.25rem; padding-right: 1.25rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-content { align-items: center; display: flex; justify-content: space-between; min-height: 4.5rem; }
.brand { color: var(--ink); font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.header-actions, .header-actions nav { align-items: center; display: flex; gap: 1rem; }
.header-actions select { background: var(--surface); border: 1px solid var(--border); border-radius: .35rem; color: var(--ink); padding: .35rem; }
.link-button { background: transparent; color: var(--primary); padding: 0; }
.link-button:hover { background: transparent; text-decoration: underline; }
.skip-link { background: var(--ink); color: #fff; left: 1rem; padding: .6rem .9rem; position: absolute; top: -4rem; z-index: 10; }
.skip-link:focus { top: 1rem; }
.language-submit { padding: .35rem .6rem; }
.page-content { padding-bottom: 3rem; padding-top: 2.5rem; }
.page-heading { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 2rem; }
.page-heading h1, .auth-card h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 .75rem; }
.page-heading p { color: var(--muted); margin: 0; max-width: 42rem; }
.eyebrow { color: var(--primary) !important; font-size: .8rem; font-weight: 800; letter-spacing: .08em; margin-bottom: .5rem !important; text-transform: uppercase; }
.button-secondary { background: #dcefed; color: #075148; white-space: nowrap; }
.button-danger { background: #a51d2d; color: #fff; white-space: nowrap; }
.button-danger:hover { background: #7f1421; text-decoration: none; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-card, .panel, .auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; box-shadow: 0 4px 16px rgba(24, 36, 47, .04); }
.metric-card { padding: 1.25rem; }
.metric-card p, .metric-card span { color: var(--muted); display: block; font-size: .9rem; margin: 0; }
.metric-card strong { display: block; font-size: 1.55rem; letter-spacing: -.03em; margin: .4rem 0; }
.panel { margin-top: 1.5rem; padding: 1.5rem; }
.empty-state h2 { margin-top: 0; }
.empty-state p { color: var(--muted); margin-bottom: 0; }
.auth-card { margin: 4rem auto; max-width: 30rem; padding: 2rem; }
.auth-card > p:not(.eyebrow) { color: var(--muted); }
.stacked-form, .settings-form { margin-top: 1.5rem; }
.form-grid { display: grid; gap: 1.1rem 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-field { display: flex; flex-direction: column; gap: .35rem; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { font-weight: 700; }
.form-field input, .form-field textarea { border: 1px solid #b9c7cc; border-radius: .4rem; padding: .65rem .7rem; width: 100%; }
.help-text { color: var(--muted); font-size: .85rem; margin: 0; }
.field-error, .form-errors { color: #a51d2d; margin: 0; }
.form-actions { margin-top: 1.5rem; }
.message { border-radius: .45rem; margin-bottom: 1rem; padding: .8rem 1rem; }
.message-success { background: #dcefed; color: #075148; }
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
table { border-collapse: collapse; max-width: 100%; width: 100%; }
th, td { border-bottom: 1px solid var(--border); padding: .7rem; text-align: left; vertical-align: top; }

@media (max-width: 850px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .header-content, .header-actions, .page-heading { align-items: flex-start; flex-direction: column; }
  .header-content { padding-bottom: 1rem; padding-top: 1rem; }
  .header-actions { gap: .7rem; }
  .header-actions nav { flex-wrap: wrap; }
  .card-grid, .form-grid { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .panel { overflow-x: auto; }
}
