@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}

:root {
  /* Devaspir brand accent */
  --green: #5dc752;
  --green-ink: #2b8a22;
  --green-wash: rgba(93, 199, 82, 0.12);
  --brand: #2b8a22;
  --brand-hover: #237a1b;
  --brand-fg: #ffffff;
  --brand-ring: rgba(93, 199, 82, 0.3);
  --mine: #e2f3de; /* my chat bubbles */
  --amber-ink: #a86a00;
  --red-ink: #c4314b;
  --gold: #d9a400;
  --silver: #8e99a8;
  --bronze: #b87333;

  /* Surfaces, Teams-style: rail, list pane, canvas, raised */
  --rail: #ebebeb;
  --pane: #f5f5f5;
  --app: #fafafa;
  --bg: #ffffff;
  --sunk: #f0f0f0;
  --fg: #242424;
  --fg-2: #424242;
  --muted: #616161;
  --faint: #8f8f8f;
  --line: #e6e6e6;
  --line-2: #d1d1d1;
  --hover: #ebebeb;
  --select: #e0e0e0;
  --btn: #242424;
  --btn-fg: #ffffff;
  --r: 6px;
  --r-btn: 8px;
  --r-btn-sm: 7px;
  --brand-edge: #23781b;
  --btn-2: #ffffff;
  --btn-2-edge: #dcdcdc;
  --btn-2-hover: #f5f5f5;
  --red-wash: rgba(196, 49, 75, 0.06);
  --red-edge: rgba(196, 49, 75, 0.35);
  --r-lg: 8px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-pop: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.14);
}

:root[data-theme="dark"] {
  --green-ink: #6fd165;
  --green-wash: rgba(93, 199, 82, 0.14);
  --brand: #4caf43;
  --brand-hover: #5dc752;
  --brand-fg: #ffffff;
  --brand-ring: rgba(93, 199, 82, 0.35);
  --mine: #23361f;
  --amber-ink: #e3a43a;
  --red-ink: #f1707b;
  --rail: #0f0f0f;
  --pane: #1c1c1c;
  --app: #141414;
  --bg: #262626;
  --sunk: #1f1f1f;
  --fg: #ffffff;
  --fg-2: #d6d6d6;
  --muted: #adadad;
  --faint: #7a7a7a;
  --line: #2e2e2e;
  --line-2: #3d3d3d;
  --hover: #2b2b2b;
  --select: #333333;
  --btn: #ffffff;
  --btn-fg: #141414;
  --brand-edge: #3e9a36;
  --btn-2: #2e2e2e;
  --btn-2-edge: #3d3d3d;
  --btn-2-hover: #363636;
  --red-wash: rgba(241, 112, 123, 0.1);
  --red-edge: rgba(241, 112, 123, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI", "Inter", system-ui, sans-serif;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
input, select, textarea { user-select: text; }
:where(svg[viewBox="0 0 24 24"]) { width: 16px; height: 16px; flex: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }

/* avatar: photo, or initials on the rep's colour */
.avatar {
  --c: var(--green);
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--c); color: #fff; object-fit: cover;
  font-size: 10.5px; font-weight: 650; letter-spacing: 0;
}
img.avatar { background: var(--sunk); }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; font-size: 19px; }
.avatar.xxl { width: 88px; height: 88px; font-size: 28px; }

/* buttons, Linear-style: rounded, compact, a hairline border and a soft
   lift; the main one in Devaspir green with a light top edge */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: var(--r-btn);
  border: 1px solid var(--brand-edge);
  background: var(--brand); color: var(--brand-fg); font-weight: 550; font-size: 13px; letter-spacing: -0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.06s ease;
  white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: translateY(0.5px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.btn:focus-visible, .icon-btn:focus-visible, .seg button:focus-visible, .chip:focus-visible, .tb:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--app), 0 0 0 4px var(--brand-ring); }
.btn svg { width: 14px; height: 14px; }
/* secondary: a white (or raised dark) surface with a hairline border */
.btn.line, .btn.warn {
  background: var(--btn-2); color: var(--fg); border-color: var(--btn-2-edge);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn.line:hover { background: var(--btn-2-hover); border-color: var(--line-2); }
.btn.go { background: var(--brand); border-color: var(--brand-edge); color: var(--brand-fg); }
.btn.go:hover { background: var(--brand-hover); }
.btn.warn { color: var(--red-ink); }
.btn.warn:hover { background: var(--red-wash); border-color: var(--red-edge); }
.btn.sm { height: 28px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-btn-sm); gap: 5px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; box-shadow: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; }
.link-btn:hover { color: var(--fg); text-decoration-color: currentColor; }

/* ghost icon buttons */
.icon-btn {
  width: 28px; height: 28px; border-radius: var(--r-btn-sm); border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--faint); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.icon-btn svg { width: 15px; height: 15px; }

/* segmented control: a sunk track with a raised, rounded thumb */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-btn); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.seg button {
  border: 0; background: transparent; padding: 4px 11px; border-radius: var(--r-btn-sm); font-size: 12.5px; font-weight: 550; color: var(--muted);
  transition: background 0.12s, color 0.12s, box-shadow 0.12s; cursor: pointer;
}
.seg button:hover { color: var(--fg); }
.seg button.on { color: var(--fg); background: var(--btn-2); box-shadow: 0 0 0 1px var(--btn-2-edge), 0 1px 2px rgba(0, 0, 0, 0.08); }

/* status: a dot and a word */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 520; white-space: nowrap; color: var(--muted); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st.qualified { color: var(--green-ink); }
.st.pending { color: var(--amber-ink); }
.st.disqualified { color: var(--red-ink); }
.st.canceled { color: var(--faint); }

/* struck medals */
img.medal { display: inline-block; vertical-align: middle; object-fit: contain; flex: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18)); }
img.medal.locked { filter: grayscale(1) contrast(0.9); opacity: 0.35; }
svg.emblem { display: inline-block; vertical-align: middle; flex: none; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18)); }
/* tier mark */
.tier { display: inline-block; vertical-align: middle; flex: none; }

/* toggle */
.toggle { position: relative; width: 34px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background 0.15s; }
.toggle span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(14px); }

/* inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 550; color: var(--fg-2); }
.input {
  height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg);
  padding: 0 11px; outline: none; transition: border-color 0.12s, box-shadow 0.12s; width: 100%; color: var(--fg);
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; }
.input:focus { border-color: var(--green-ink); box-shadow: 0 0 0 3px var(--brand-ring); }
select.input { cursor: pointer; }
.input[readonly] { background: var(--sunk); color: var(--muted); }
.hint { font-size: 11.5px; color: var(--faint); }
input[type="range"] { accent-color: var(--green); }

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(14px);
  background: var(--btn); color: var(--btn-fg); padding: 10px 16px; border-radius: 10px;
  font-size: 12.5px; font-weight: 520; opacity: 0; pointer-events: none;
  transition: opacity 0.16s, transform 0.16s; z-index: 1000; box-shadow: var(--shadow-pop); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red-ink); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Linear-style type: Inter with its sharper alternates, tight tracking, tabular figures */
body {
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03", "calt";
  font-size: 13px; line-height: 1.45; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
.num, td, .sc, .v, time { font-variant-numeric: tabular-nums; }
b, strong { font-weight: 600; }
.btn, .seg button, .chip { letter-spacing: -0.01em; }
