:root {
  color-scheme: light;
  --app-bg: #f4f7f9;
  --surface: #ffffff;
  --surface-muted: #f7f9fb;
  --ink: #14212b;
  --ink-soft: #64748b;
  --line: #dce4ec;
  --line-soft: #edf1f5;
  --brand: #1479e8;
  --brand-dark: #14598f;
  --brand-soft: #eaf3fe;
  --success: #16834a;
  --success-soft: #e8f7ef;
  --warning: #a66a0c;
  --warning-soft: #fff3df;
  --danger: #d9363e;
  --danger-soft: #fde8e8;
  --purple: #7651ba;
  --purple-soft: #f2eaff;
  --shadow: 0 2px 8px rgba(15, 23, 42, .055);
  --radius: 8px;
  --control-height: 40px;
  --font-caption: 12px;
  --font-body: 14px;
  --font-label: 13px;
  --font-card-title: 16px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-width: 0; min-height: 100%; }
body { margin: 0; background: var(--app-bg); color: var(--ink); font-size: var(--font-body); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(20, 121, 232, .2); outline-offset: 2px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select,
textarea {
  border-color: var(--line);
  border-radius: 7px;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #8d9bae; }
select:disabled, input:disabled, textarea:disabled { background-color: #f3f6f9; color: #8b98a9; cursor: not-allowed; }

.button {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.button:hover { border-color: #b7cce0; background: #f8fbfe; color: var(--brand-dark); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.button-primary:hover { border-color: #0869cf; background: #0869cf; color: #fff; }
.button-danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.button svg { width: 18px; height: 18px; flex: 0 0 18px; }

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}
.icon-button:hover { border-color: #b7cce0; background: var(--brand-soft); color: var(--brand-dark); }
.icon-button svg { width: 19px; height: 19px; display: block; }

.status-pill {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}
.status-pill.is-danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.is-warning { background: var(--warning-soft); color: var(--warning); }
.status-pill.is-success { background: var(--success-soft); color: var(--success); }
.status-pill.is-purple { background: var(--purple-soft); color: var(--purple); }
.status-pill.is-muted { background: #eef2f6; color: var(--ink-soft); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 13px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.data-table th { background: #f5f7fa; color: var(--ink-soft); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.data-table td { font-size: 13px; }

.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; }
.empty-state { padding: 36px 18px; color: var(--ink-soft); text-align: center; }

@media (max-width: 700px) {
  :root { --font-body: 13px; --control-height: 38px; }
}
