:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-raised: #0e0e11;
  --surface: rgba(20, 20, 24, 0.94);
  --surface-solid: #141418;
  --surface-soft: #1a1a20;
  --surface-hover: #222229;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #f7f7f8;
  --text-soft: #c5c5cb;
  --text-muted: #8d8d98;
  --green: #d5b8ff;
  --green-bright: #eee3ff;
  --green-dark: #332845;
  --green-ink: #17101f;
  --amber: #f5be65;
  --red: #ff7d86;
  --blue: #75b8ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.3);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --content-width: 1480px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.team-workspace { margin: 28px 0; }
.eprem-panel [data-panel-hidden="true"] { display: none !important; }
.eprem-panel [data-editor-hidden="true"] { display: none !important; }
.eprem-panel .team-card-header { align-items: center; }
.eprem-panel .team-card-header h4 { margin: 0; font-size: 1rem; }
.eprem-panel .team-card-header > .button { margin-left: auto; }
.eprem-panel .team-league-directory { margin: 20px 0 0; }
.eprem-panel .team-config-grid { display: block; padding-bottom: 24px; }
.eprem-panel .team-workspace > .workspace-toolbar { display: none; }
.eprem-panel .team-workspace { padding-top: 24px; }
.eprem-panel .team-status { margin-bottom: 12px; }
.eprem-panel #team-live-status { margin: 0 24px 16px; font-size: 0.8rem; }
.eprem-panel .team-section-nav { border-bottom: 1px solid var(--border); margin-bottom: 24px; padding-bottom: 16px; }
.eprem-panel .team-section-nav a { border-radius: 9px; padding: 11px 18px; }
.eprem-panel .team-section-nav a.is-active { color: var(--text); background: var(--surface-hover); border-color: var(--blue); }
.eprem-panel .team-config-card { padding: 28px; border-radius: 16px; }
.eprem-panel #team-league-save-status { display: none; }
.eprem-panel .team-overview article { background: linear-gradient(145deg,var(--surface-solid),var(--bg-raised)); }
.eprem-panel .team-config-card .field-hint { color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; }
.eprem-panel .team-warning { color: var(--amber); font-size: 0.8rem; line-height: 1.6; }
.team-callout { padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--blue); border-radius: 9px; color: var(--text-soft); line-height: 1.6; font-size: 0.85rem; }
.team-import-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px; margin-top: 24px; }
.team-step-title { display: flex; align-items: center; gap: 10px; margin: 24px 0 18px; font-size: 0.95rem; }
.team-step-title span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-hover); color: var(--blue); }
.team-import-grid .team-step-title { margin-top: 0; }
.team-import-advanced { padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 20px; }
.team-member-choices { max-height: 300px; overflow-y: auto; display: grid; gap: 8px; }
.team-member-choice { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 0.8rem; overflow-wrap: anywhere; }
.team-config-card textarea { width: 100%; padding: 12px; margin-bottom: 16px; resize: vertical; background: var(--surface-solid); color: var(--text); border: 1px solid var(--border-strong); border-radius: 9px; font: inherit; }
@media (max-width: 850px) { .team-import-grid { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 550px) { .eprem-panel .team-config-card { padding: 18px; } .eprem-panel .team-section-nav a { padding: 9px 12px; } }
.comanager-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 24px 24px 0; }
.comanager-overview article { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-solid); }
.comanager-overview strong { display: block; font-size: 1.8rem; letter-spacing: -0.04em; }
.comanager-overview span { color: var(--text-muted); font-size: 0.8rem; }
.comanager-panel .delivery-setting { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; background: var(--bg-raised); }
.comanager-panel .mapping-row { border-radius: var(--radius-md); margin: 10px 16px; border: 1px solid var(--border); background: var(--bg-raised); transition: border-color 150ms ease; }
.comanager-panel .mapping-row:hover { border-color: var(--border-strong); }
.comanager-panel .mapping-row.has-error { border-color: var(--amber); }
.comanager-panel .mapping-row.is-disabled { opacity: 0.8; }
.comanager-panel .workspace-toolbar { gap: 20px; }
@media (max-width: 650px) { .comanager-overview { gap: 8px; padding: 16px 14px 0; } .comanager-overview article { padding: 12px; } .comanager-overview strong { font-size: 1.4rem; } .comanager-panel .delivery-setting { padding: 18px; } }
.team-section-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 24px; }
.team-section-nav a { padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); text-decoration: none; font-size: 0.85rem; }
.team-section-nav a:hover,.team-section-nav a:focus-visible { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }
.team-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.team-card-actions .button-quiet { color: var(--red); }
.team-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0 24px 24px; }
.team-overview article { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-solid); }
.team-overview strong { display: block; font-size: 1.7rem; letter-spacing: -0.04em; }
.team-overview span { color: var(--text-muted); font-size: 0.8rem; }
.team-workspace .team-directory-card { transition: border-color 150ms ease; }
.team-workspace .team-directory-card:hover { border-color: var(--border-strong); }
.team-workspace .team-directory-card .team-card-actions .button { font-size: 0.8rem; min-height: 38px; padding: 9px 12px; }
.team-workspace .team-badge[data-paused="true"] { color: var(--amber); }
.team-workspace #team-league-form[data-editing="true"] { border-color: var(--blue); }
@media (max-width: 550px) { .team-overview { gap: 8px; margin-left: 14px; margin-right: 14px; } .team-overview article { padding: 14px 10px; } .team-overview strong { font-size: 1.4rem; } }
.team-workspace form,.team-workspace section,.team-workspace h3 { scroll-margin-top: 28px; }
.team-workspace .team-config-grid { align-items: start; }
.team-workspace #team-review-queue { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
@media (max-width: 850px) { .team-workspace #team-review-queue { grid-template-columns: 1fr; } }
.team-workspace .workspace-toolbar { align-items: flex-start; gap: 16px; }
.team-workspace .workspace-toolbar p { max-width: 650px; margin-bottom: 0; }
.team-status { padding: 14px 18px; margin: 0 24px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text-soft); line-height: 1.6; }
.team-status[data-error="true"], .team-warning { color: var(--red); }
.team-config-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; padding: 0 24px; }
.team-config-card { min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-raised); }
.team-config-card h3 { margin-top: 0; }
.team-config-card .muted { line-height: 1.65; }
.team-config-card input:not([type="checkbox"]), .team-config-card select { width: 100%; min-width: 0; min-height: 44px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-solid); color: var(--text); font: inherit; }
.team-config-card fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.team-config-card fieldset:disabled { opacity: 0.55; }
.team-workspace > .team-config-card { margin: 0 24px 20px; }
.team-workspace details summary { cursor: pointer; font-weight: 600; color: var(--text-soft); }
.team-workspace details[open] summary { margin-bottom: 18px; }
.team-league-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; margin-top: 24px; }
.team-config-card .team-form-section { padding-top: 16px; border-top: 1px solid var(--border); }
.team-form-section legend { padding: 0 10px 0 0; color: var(--text-soft); font-size: 0.85rem; font-weight: 600; }
.team-config-card input:focus-visible, .team-config-card select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.team-config-card .field-label { display: block; margin: 0 0 8px; }
.team-section-title { margin: 28px 0 14px; padding-top: 24px; border-top: 1px solid var(--border); }
.team-league-directory { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.team-league-directory .team-directory-card { background: var(--surface-solid); }
.team-league-directory h4 { margin: 0 0 10px; }
.team-league-directory p { overflow-wrap: anywhere; font-size: 0.85rem; line-height: 1.6; }
@media (max-width: 850px) { .team-league-layout,.team-league-directory { grid-template-columns: 1fr; } .team-league-layout { gap: 20px; } }
@media (max-width: 550px) { .team-workspace > .team-config-card { margin-left: 14px; margin-right: 14px; } }
.team-check { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; line-height: 1.6; color: var(--text-soft); font-size: 0.85rem; }
.team-check input { margin-top: 6px; flex-shrink: 0; }
.team-preview { margin: 24px; padding: 24px; border: 1px solid var(--green); border-radius: var(--radius-md); background: var(--bg-raised); }
.team-preview ul { padding-left: 22px; line-height: 1.9; color: var(--text-soft); }
.team-directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 24px 12px; }
.team-directory-heading input { max-width: 260px; }
.team-directory { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 0 24px 20px; }
.team-directory-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.team-card-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.team-card-header h4 { margin: 0; overflow-wrap: anywhere; }
.team-badge { font-size: 0.72rem; color: var(--green); border: 1px solid var(--border-strong); padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.team-resource-list { display: grid; grid-template-columns: minmax(95px,0.8fr) minmax(0,1fr); gap: 10px; font-size: 0.8rem; }
.team-resource-list dt { color: var(--text-muted); }
.team-resource-list dd { margin: 0; overflow-wrap: anywhere; }
.team-workspace > .field-hint { padding: 0 24px 20px; line-height: 1.7; }
@media (max-width: 850px) { .team-config-grid,.team-directory { grid-template-columns: 1fr; } }
@media (max-width: 550px) { .team-config-grid { padding: 0 14px; } .team-config-card { padding: 16px; } .team-directory-heading { flex-direction: column; align-items: stretch; } .team-directory-heading input { max-width: none; } .team-card-header { flex-wrap: wrap; } }

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(174, 123, 255, 0.12), transparent 34%),
    radial-gradient(circle at 95% 10%, rgba(255, 255, 255, 0.035), transparent 28%),
    linear-gradient(180deg, #0d0d10 0%, var(--bg) 62%, #070708 100%);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline-color: rgba(189, 168, 255, 0.45);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
}

button,
input,
select {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(81, 227, 155, 0.38);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--green-ink);
  background: var(--green-bright);
  border-radius: var(--radius-sm);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.11;
  pointer-events: none;
}

.ambient-one {
  top: -24rem;
  right: -10rem;
  background: #ae7bff;
}

.ambient-two {
  bottom: -28rem;
  left: -18rem;
  background: #7355a5;
}

.app-shell {
  min-height: 100vh;
}

.panel {
  background: linear-gradient(145deg, rgba(24, 24, 29, 0.96), rgba(14, 14, 18, 0.96));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.center-stage {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

.loading-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  width: min(520px, 100%);
  padding: 30px;
  border-radius: var(--radius-xl);
}

.loading-card h1 {
  margin: 2px 0 5px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.035em;
}

.loading-card p {
  margin: 0;
}

.loading-bar {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.loading-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  animation: loading 1.15s ease-in-out infinite;
}

@keyframes loading {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(365%); }
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  color: #062116;
  background: linear-gradient(145deg, var(--green-bright), #36ca82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(174, 123, 255, 0.16);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  place-items: center;
}

.brand-mark-large {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  font-size: 0.85rem;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-name {
  margin: 3px 0 0;
  font-size: 0.98rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--text-muted);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  width: min(1010px, 100%);
  min-height: 610px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(32px, 5vw, 58px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 21, 16, 0.56), rgba(6, 17, 13, 0.92)),
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(82, 227, 155, 0.025) 28px 29px);
}

.login-intro::after {
  content: "";
  position: absolute;
  right: -210px;
  bottom: -240px;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(81, 227, 155, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(81, 227, 155, 0.025),
    0 0 0 104px rgba(81, 227, 155, 0.018);
}

.login-copy {
  z-index: 1;
  max-width: 520px;
  margin: auto 0;
  padding: 70px 0 54px;
}

.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: var(--green-bright);
  background: rgba(81, 227, 155, 0.08);
  border: 1px solid rgba(81, 227, 155, 0.14);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
}

.secure-pill span {
  font-size: 0.55rem;
}

.login-copy h1 {
  max-width: 480px;
  margin: 22px 0 15px;
  font-size: clamp(2.3rem, 5.2vw, 4.25rem);
  letter-spacing: -0.065em;
  line-height: 0.99;
}

.login-copy p {
  max-width: 470px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.04rem;
}

.feature-list {
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.feature-list span {
  color: var(--green);
  font-weight: 800;
}

.login-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 6vw, 70px);
  background: rgba(17, 31, 27, 0.76);
  border-left: 1px solid var(--border);
}

.password-field:focus-within {
  border-color: rgba(189, 168, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(189, 168, 255, 0.08);
}

.form-heading h2 {
  margin: 11px 0 8px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.form-heading .muted {
  margin: 0 0 33px;
  font-size: 0.88rem;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.79rem;
  font-weight: 720;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  height: 52px;
  padding: 0 53px 0 15px;
  background: #0b1713;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.password-field input:focus {
  border-color: rgba(81, 227, 155, 0.62);
  box-shadow: 0 0 0 4px rgba(81, 227, 155, 0.08);
}

.password-field input[aria-invalid="true"] {
  border-color: rgba(255, 125, 134, 0.72);
}

.icon-button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.icon-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.eye-icon,
.eye-icon::after {
  position: absolute;
  inset: 0;
  margin: auto;
}

.eye-icon {
  width: 19px;
  height: 12px;
  border: 1.7px solid currentColor;
  border-radius: 50% 50% 48% 48%;
}

.eye-icon::after {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.icon-button[aria-pressed="true"] .eye-icon::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -3px;
  width: 25px;
  height: 1.7px;
  background: currentColor;
  transform: rotate(-42deg);
}

.field-hint,
.form-message {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 0.78rem;
}

.field-hint {
  color: var(--amber);
}

.form-message {
  color: var(--red);
}

.button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  color: var(--green-ink);
  background: linear-gradient(135deg, #f4edff, #cba7ff);
  border-color: rgba(238, 227, 255, 0.55);
  box-shadow: 0 8px 24px rgba(174, 123, 255, 0.15);
}

.button-primary:not(:disabled):hover {
  background: linear-gradient(135deg, #ffffff, #dcc2ff);
}

.button-primary:disabled {
  opacity: 0.38;
}

.button-wide {
  width: 100%;
  min-height: 49px;
  margin-top: 22px;
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

.button-secondary:hover {
  background: var(--surface-hover);
  border-color: rgba(213, 184, 255, 0.3);
}

.button-quiet {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--border);
}

.button-quiet:not(:disabled):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.button-quiet:disabled {
  opacity: 0.35;
}

.button-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(5, 34, 23, 0.28);
  border-top-color: var(--green-ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .button-label {
  opacity: 0.74;
}

.is-loading .button-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.dashboard {
  min-height: 100vh;
  padding-bottom: 120px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - var(--content-width)) / 2));
  background: rgba(9, 9, 11, 0.84);
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 680;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(81, 227, 155, 0.09);
}

.connection-state[data-state="offline"] .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 125, 134, 0.09);
}

.connection-state[data-state="syncing"] .status-dot {
  background: var(--amber);
  animation: pulse 1.25s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.4; }
}

.content-wrap {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 52px 2px 26px;
}

.hero h1 {
  margin: 8px 0 6px;
  font-size: clamp(2rem, 4.5vw, 3.45rem);
  letter-spacing: -0.06em;
  line-height: 1.03;
}

.hero-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.server-connect {
  min-width: min(100%, 390px);
}

.server-connect > label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.server-connect > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.server-connect select {
  grid-column: 1 / -1;
  width: 100%;
  height: 41px;
  padding: 0 12px;
}

.server-connect input {
  width: 100%;
  height: 41px;
  padding: 0 13px;
  background: #101014;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: 0;
}

.refresh-icon {
  font-size: 1.05rem;
}

.is-spinning .refresh-icon {
  animation: spin 700ms linear infinite;
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 13px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(117, 184, 255, 0.07);
  border: 1px solid rgba(117, 184, 255, 0.19);
  border-radius: var(--radius-md);
}

.notice[data-kind="success"] {
  background: rgba(81, 227, 155, 0.07);
  border-color: rgba(81, 227, 155, 0.2);
}

.notice[data-kind="error"] {
  background: rgba(255, 125, 134, 0.07);
  border-color: rgba(255, 125, 134, 0.22);
}

.notice[data-kind="warning"] {
  background: rgba(245, 190, 101, 0.07);
  border-color: rgba(245, 190, 101, 0.22);
}

.notice-icon {
  display: grid;
  width: 24px;
  height: 24px;
  color: var(--blue);
  background: rgba(117, 184, 255, 0.12);
  border-radius: 50%;
  font-size: 0.76rem;
  font-weight: 850;
  place-items: center;
}

.notice[data-kind="success"] .notice-icon {
  color: var(--green);
  background: rgba(81, 227, 155, 0.12);
}

.notice[data-kind="error"] .notice-icon {
  color: var(--red);
  background: rgba(255, 125, 134, 0.12);
}

.notice[data-kind="warning"] .notice-icon {
  color: var(--amber);
  background: rgba(245, 190, 101, 0.12);
}

.notice strong,
.notice p {
  margin: 0;
}

.notice p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.79rem;
}

.notice-dismiss {
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 1.25rem;
  line-height: 1;
}

.notice-dismiss:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 18px;
  padding: 18px 20px;
  background: linear-gradient(120deg, rgba(81, 227, 155, 0.1), rgba(117, 184, 255, 0.055));
  border-color: rgba(81, 227, 155, 0.25);
}

.demo-banner[hidden] {
  display: none;
}

.demo-banner strong,
.demo-banner p {
  margin: 0;
}

.demo-banner > div > p:last-child {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.demo-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(145px, 0.65fr)) minmax(300px, 1.35fr);
  gap: 12px;
  margin-bottom: 17px;
}

.metric-card {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.metric-card > p,
.metric-card > div > p {
  margin: 0 0 7px;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 690;
}

.metric-card > strong,
.metric-card > div > strong {
  display: block;
  margin: 0 0 2px;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-card > span,
.metric-card > div > span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.metric-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.guild-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.guild-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  overflow: hidden;
  color: var(--green-ink);
  background: var(--green);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 900;
  place-items: center;
}

.guild-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-chip > span:last-child {
  min-width: 0;
}

.guild-chip strong,
.guild-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-chip strong {
  max-width: 175px;
  font-size: 0.77rem;
}

.guild-chip small {
  max-width: 175px;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.workspace {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 21px 22px;
  border-bottom: 1px solid var(--border);
}

.workspace-toolbar h2 {
  margin: 5px 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.role-source-note {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-field,
.filter-field {
  position: relative;
  display: block;
}

.search-field input,
.filter-field select {
  height: 40px;
  background: #101014;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
}

.search-field input {
  width: 205px;
  padding: 0 13px 0 38px;
}

.filter-field select {
  min-width: 142px;
  padding: 0 33px 0 12px;
}

.search-field input::placeholder,
.role-search input::placeholder {
  color: #696974;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 13px;
  height: 13px;
  border: 1.7px solid var(--text-muted);
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-58%);
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transform: rotate(45deg);
}

.mapping-head,
.mapping-row {
  display: grid;
  grid-template-columns: minmax(155px, 0.82fr) minmax(245px, 1fr) 35px minmax(245px, 1fr) 92px;
  column-gap: 13px;
}

.delete-row-button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--text-muted);
  background: rgba(255, 125, 134, 0.06);
  border: 1px solid rgba(255, 125, 134, 0.13);
  border-radius: 7px;
  font-size: 1rem;
  line-height: 1;
  place-items: center;
}

.delete-row-button:hover {
  color: var(--red);
  background: rgba(255, 125, 134, 0.12);
}

.delete-row-button[hidden] {
  display: none;
}

.mapping-head {
  align-items: center;
  min-height: 42px;
  padding: 0 22px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.018);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mapping-row {
  position: relative;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--border);
  transition: background-color 140ms ease, opacity 140ms ease;
}

.mapping-row:last-child {
  border-bottom: 0;
}

.mapping-row:hover {
  background: rgba(213, 184, 255, 0.025);
}

.mapping-row.is-disabled .role-search-input,
.mapping-row.is-disabled .role-meta,
.mapping-row.is-disabled .mapping-arrow {
  opacity: 0.82;
}

.mapping-row.has-error {
  background: rgba(255, 125, 134, 0.025);
}

.mapping-row.is-hidden {
  display: none;
}

.activity-row {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-muted, #aeb8b4);
  font-size: 0.9rem;
}

.activity-row:last-child {
  border-bottom: 0;
}

.league-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.league-badge {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--green-bright);
  background: linear-gradient(145deg, rgba(81, 227, 155, 0.13), rgba(81, 227, 155, 0.045));
  border: 1px solid rgba(81, 227, 155, 0.13);
  border-radius: 11px;
  font-size: 0.69rem;
  font-weight: 850;
  place-items: center;
}

.league-name {
  margin: 0;
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 760;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-key {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-cell {
  min-width: 0;
}

.role-picker {
  min-width: 0;
}

.role-search,
.role-select-wrap {
  position: relative;
  display: block;
}

.role-search {
  margin-bottom: 6px;
}

.role-search input,
.role-select {
  width: 100%;
  height: 35px;
  background: #0a1512;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  font-size: 0.74rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.role-search input {
  padding: 0 11px 0 34px;
}

.role-search .search-icon {
  left: 12px;
  width: 11px;
  height: 11px;
}

.role-select {
  appearance: none;
  padding: 0 33px 0 11px;
  text-overflow: ellipsis;
}

.role-search input:focus,
.role-select:focus,
.search-field input:focus,
.filter-field select:focus {
  border-color: rgba(81, 227, 155, 0.5);
  box-shadow: 0 0 0 3px rgba(81, 227, 155, 0.06);
}

.role-select[aria-invalid="true"] {
  border-color: rgba(255, 125, 134, 0.58);
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.role-current {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 5px 2px 0;
  color: var(--text-muted);
  font-size: 0.64rem;
}

.role-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--role-color, #73837c);
  border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--role-color, #73837c) 18%, transparent);
}

.role-current-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-meta {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.role-meta.is-warning {
  color: var(--amber);
}

.role-meta.is-error {
  color: var(--red);
}

.mapping-arrow {
  display: grid;
  width: 27px;
  height: 27px;
  color: var(--green);
  background: rgba(81, 227, 155, 0.075);
  border: 1px solid rgba(81, 227, 155, 0.11);
  border-radius: 999px;
  font-size: 0.75rem;
  place-items: center;
}

/* Final compact layout. */
:root { --content-width: 1040px; }

.content-wrap { padding-top: 22px; }

.hero {
  grid-template-columns: minmax(180px, 0.55fr) minmax(390px, 1.45fr) auto;
  gap: 18px;
  padding: 6px 0 20px;
}

.hero h1 {
  margin: 0 0 5px;
  font-size: 1.65rem;
  letter-spacing: -0.035em;
}

.hero-copy { font-size: 0.82rem; }

.workspace { margin-top: 14px; }

.workspace-toolbar {
  padding: 15px 16px;
  margin-bottom: 0;
}

.workspace-toolbar h2 {
  margin: 0;
  font-size: 1.1rem;
}

.toolbar-controls { gap: 7px; }

.toolbar-controls .button,
.search-field input,
.filter-field select { height: 38px; min-height: 38px; }

.empty-state { padding: 42px 20px 46px; }
.empty-state > div { display: none; }
.empty-state h3 { font-size: 0.9rem; }
.empty-state p { margin-bottom: 0; font-size: 0.75rem; }

.save-bar {
  padding: 9px 18px;
  background: rgba(10, 11, 14, 0.94);
}

.save-status-icon { width: 25px; height: 25px; }
.save-status small { display: none; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
}

.enabled-cell {
  display: flex;
  justify-content: flex-end;
}

.switch {
  display: grid;
  justify-items: center;
  gap: 5px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 39px;
  height: 22px;
  background: #24332e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #899b94;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transition: background-color 150ms ease, transform 150ms ease;
}

.switch input:checked + .switch-track {
  background: rgba(81, 227, 155, 0.24);
  border-color: rgba(81, 227, 155, 0.32);
}

.switch input:checked + .switch-track span {
  background: var(--green);
  transform: translateX(17px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(81, 227, 155, 0.32);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.42;
  cursor: not-allowed;
}

.switch-label {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 690;
}

.switch input:checked ~ .switch-label {
  color: var(--green);
}

.row-error {
  display: none;
  grid-column: 2 / 5;
  margin: 7px 0 0;
  color: var(--red);
  font-size: 0.67rem;
}

.mapping-row.has-error .row-error {
  display: block;
}

.empty-state {
  padding: 65px 24px 72px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state > div {
  margin-bottom: 13px;
  color: var(--green);
  font-size: 2rem;
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
}

.empty-state p {
  margin: 0 0 18px;
  font-size: 0.8rem;
}

.save-bar {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 24px;
  background: rgba(6, 15, 12, 0.9);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.save-bar[data-state="dirty"] {
  background: rgba(23, 29, 16, 0.93);
  border-color: rgba(245, 190, 101, 0.22);
}

.save-bar[data-state="error"] {
  background: rgba(31, 15, 17, 0.94);
  border-color: rgba(255, 125, 134, 0.25);
}

.save-inner {
  display: flex;
  width: min(var(--content-width), 100%);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.save-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.save-status-icon {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  color: var(--green);
  background: rgba(81, 227, 155, 0.1);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 900;
  place-items: center;
}

.save-bar[data-state="dirty"] .save-status-icon {
  color: var(--amber);
  background: rgba(245, 190, 101, 0.1);
}

.save-bar[data-state="error"] .save-status-icon {
  color: var(--red);
  background: rgba(255, 125, 134, 0.1);
}

.save-status strong,
.save-status small {
  display: block;
}

.save-status strong {
  font-size: 0.77rem;
}

.save-status small {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.save-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

@media (max-width: 1180px) {
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-wide {
    grid-column: 1 / -1;
  }

  .mapping-head {
    display: none;
  }

  .mapping-row {
    grid-template-columns: 1fr 35px 1fr 80px;
    padding-top: 20px;
  }

  .league-cell {
    grid-column: 1 / -1;
    margin-bottom: 15px;
  }

  .manager-cell {
    grid-column: 1;
  }

  .comanager-cell {
    grid-column: 3;
  }

  .enabled-cell {
    grid-column: 4;
  }

  .role-cell::before {
    display: block;
    margin: 0 0 6px 2px;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 760;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .manager-cell::before {
    content: "Manager role";
  }

  .comanager-cell::before {
    content: "Co-Manager role";
  }

  .mapping-arrow {
    grid-column: 2;
    align-self: center;
    margin-top: 26px;
  }

  .row-error {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .center-stage {
    padding: 16px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-intro {
    padding: 30px;
  }

  .login-copy {
    padding: 48px 0 38px;
  }

  .login-copy h1 {
    max-width: 550px;
    font-size: clamp(2.35rem, 10vw, 4rem);
  }

  .login-form-wrap {
    padding: 38px 30px 42px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .topbar {
    padding: 11px 16px;
  }

  .connection-state {
    display: none;
  }

  .content-wrap {
    width: min(100% - 28px, var(--content-width));
  }

  .hero {
    align-items: start;
    padding-top: 38px;
  }

  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-card {
    padding: 15px;
  }

  .metric-wide {
    grid-column: 1 / -1;
  }

  .workspace-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .toolbar-controls .search-field {
    grid-column: 1 / -1;
  }

  .search-field input,
  .filter-field select {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .dashboard {
    padding-bottom: 145px;
  }

  .brand-line .eyebrow {
    display: none;
  }

  .topbar .brand-mark {
    width: 37px;
    height: 37px;
  }

  .hero {
    align-items: stretch;
    flex-direction: column;
    gap: 19px;
  }

  .hero .button {
    align-self: flex-start;
  }

  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-card {
    text-align: center;
  }

  .metric-card > strong {
    font-size: 1.45rem;
  }

  .metric-card > span {
    display: none;
  }

  .metric-wide {
    align-items: flex-start;
    text-align: left;
  }

  .workspace-toolbar {
    padding: 18px 16px;
  }

  .mapping-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 19px 16px;
  }

  .league-cell,
  .manager-cell,
  .comanager-cell,
  .enabled-cell,
  .row-error {
    grid-column: 1;
  }

  .league-cell {
    margin-bottom: 16px;
  }

  .comanager-cell {
    margin-top: 13px;
  }

  .mapping-arrow {
    display: none;
  }

  .enabled-cell {
    justify-content: flex-start;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
  }

  .switch {
    grid-template-columns: auto auto;
    align-items: center;
  }

  .save-bar {
    padding: 10px 14px;
  }

  .save-inner {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .save-status {
    min-height: 30px;
  }

  .save-actions {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
  }
}

.delivery-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 13px 15px;
  background: rgba(18, 19, 25, 0.72);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.delivery-setting strong,
.delivery-setting span { display: block; }
.delivery-setting strong { font-size: 0.78rem; }
.delivery-setting span { margin-top: 3px; color: var(--text-muted); font-size: 0.68rem; }

.delivery-setting select {
  width: min(320px, 46%);
  height: 38px;
  padding: 0 34px 0 11px;
  color: var(--text);
  background: #0d0e13;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
}

.mapping-row { padding-left: 50px; }

.drag-handle {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 27px;
  height: 42px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: grab;
  font-size: 1rem;
  letter-spacing: -5px;
  transform: translateY(-50%);
  touch-action: none;
}

.drag-handle:hover,
.drag-handle:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.drag-handle:active { cursor: grabbing; }
.mapping-row.is-dragging { opacity: 0.5; }

@media (max-width: 650px) {
  .delivery-setting { align-items: stretch; flex-direction: column; }
  .delivery-setting select { width: 100%; }
  .mapping-row { padding-left: 48px; }
}

@media (max-width: 460px) {
  .login-intro,
  .login-form-wrap {
    padding-right: 22px;
    padding-left: 22px;
  }

  .feature-list {
    display: grid;
  }

  .brand-name {
    font-size: 0.85rem;
  }

  .topbar .button {
    padding-right: 11px;
    padding-left: 11px;
  }

  .overview-grid {
    gap: 7px;
  }

  .metric-card {
    padding: 13px 7px;
  }

  .metric-card > p {
    font-size: 0.65rem;
  }

  .metric-wide {
    padding: 14px;
  }

  .guild-chip {
    max-width: 60%;
  }

  .toolbar-controls {
    grid-template-columns: 1fr;
  }

  .toolbar-controls .search-field {
    grid-column: 1;
  }
}

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

@media (forced-colors: active) {
  .brand-mark,
  .league-badge,
  .save-status-icon,
  .notice-icon,
  .switch-track {
    border: 1px solid CanvasText;
  }

  .status-dot,
  .role-dot {
    forced-color-adjust: none;
  }
}

/* Neutral admin interface. */
:root {
  --bg: #090a0e;
  --bg-raised: #101118;
  --surface: rgba(18, 19, 28, 0.9);
  --surface-solid: #12131b;
  --surface-soft: #171923;
  --surface-hover: #1d2030;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f7fa;
  --text-soft: #c7c8d1;
  --text-muted: #858896;
  --green: #bda8ff;
  --green-bright: #ded4ff;
  --green-dark: #2b2546;
  --green-ink: #110f18;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.2);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --content-width: 1180px;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(110, 84, 196, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(64, 112, 164, 0.14), transparent 30rem),
    linear-gradient(145deg, #0d0e15 0%, #090a0e 52%, #0d0a13 100%);
}

.ambient { opacity: 0.07; }

.panel {
  background: rgba(18, 19, 27, 0.82);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 42px;
  height: 42px;
  padding: 5px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(159, 125, 255, 0.08));
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark-large {
  width: 62px;
  height: 62px;
  padding: 7px;
  border-radius: 18px;
}

.eyebrow {
  color: #a995ec;
  font-size: 0.66rem;
  letter-spacing: 0.13em;
}

.button {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 680;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button-primary {
  color: #121019;
  background: linear-gradient(135deg, #eee9ff, #bca8ff);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(141, 110, 224, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fff, #cabbff);
  transform: translateY(-1px);
}

.button-secondary,
.button-quiet {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}

.login-layout {
  grid-template-columns: 0.92fr 1.08fr;
  width: min(900px, 100%);
  min-height: 540px;
  border-radius: 26px;
}

.login-intro {
  background:
    radial-gradient(circle at 20% 15%, rgba(177, 145, 255, 0.2), transparent 18rem),
    linear-gradient(145deg, rgba(32, 29, 48, 0.92), rgba(14, 15, 22, 0.95));
}

.login-intro::after {
  border-color: rgba(189, 168, 255, 0.11);
  box-shadow:
    0 0 0 42px rgba(189, 168, 255, 0.022),
    0 0 0 104px rgba(111, 139, 205, 0.014);
}

.login-form-wrap {
  background: linear-gradient(145deg, rgba(17, 18, 27, 0.94), rgba(13, 15, 24, 0.82));
}

.secure-pill {
  color: var(--green-bright);
  background: rgba(189, 168, 255, 0.07);
  border-color: rgba(189, 168, 255, 0.14);
}

.login-copy h1 {
  max-width: 430px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.03;
}

.feature-list {
  gap: 10px;
  color: var(--text-soft);
}

.feature-list li span {
  color: var(--green-bright);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: min(var(--content-width), calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 15px;
  border-radius: 16px;
}

.connection-state {
  background: transparent;
  border: 0;
}

.content-wrap {
  width: min(var(--content-width), calc(100% - 32px));
  padding-top: 38px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(400px, 1.2fr) auto;
  gap: 22px;
  align-items: end;
  padding: 10px 0 30px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin-top: 6px;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--text-muted);
}

.server-connect label,
.field-label {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 650;
}

input,
select {
  background: rgba(7, 8, 12, 0.58);
  border-color: var(--border-strong);
  border-radius: 10px;
}

input:hover,
select:hover { border-color: rgba(255, 255, 255, 0.22); }

input:focus,
select:focus {
  border-color: rgba(189, 168, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(189, 168, 255, 0.09);
}

.notice,
.demo-banner {
  margin-top: 18px;
  border-radius: 13px;
}

.overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}

.overview-grid + .overview-grid {
  margin-top: 10px;
  opacity: 0.82;
}

.metric-card {
  min-height: 116px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 14px;
  box-shadow: none;
}

.metric-card strong { font-size: 1.65rem; }
.metric-card > p { color: var(--text-soft); }
.metric-card span { color: var(--text-muted); }

.metric-wide { grid-column: auto; }
.guild-chip { display: none; }

.overview-grid + .overview-grid .metric-card {
  min-height: 84px;
  background: transparent;
  border-color: transparent;
}

.workspace {
  margin-top: 18px;
  padding: 24px;
  border-radius: 18px;
  box-shadow: none;
}

.workspace-toolbar {
  gap: 18px;
  margin-bottom: 22px;
}

.workspace-toolbar h2 {
  margin-top: 5px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.toolbar-controls { gap: 8px; }
.mapping-head { color: #717482; }

.mapping-row {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.018);
  border-color: var(--border);
  border-radius: 13px;
  box-shadow: none;
}

.mapping-row:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.11);
}

.league-badge {
  background: linear-gradient(145deg, rgba(202, 185, 255, 0.18), rgba(98, 122, 181, 0.12));
}

.role-search input,
.role-select-wrap select {
  background-color: rgba(7, 8, 12, 0.55);
}

.switch input:checked + .switch-track {
  background: linear-gradient(135deg, #a991ed, #7869bc);
}

.workspace[aria-labelledby="activity-heading"],
.workspace[aria-labelledby="operations-heading"] {
  background: rgba(15, 16, 22, 0.5);
}

.save-bar {
  background: rgba(9, 10, 14, 0.83);
  border-top-color: var(--border);
  backdrop-filter: blur(18px);
}

.save-bar[hidden] { display: none; }

.save-inner { width: min(var(--content-width), 100%); }

.league-dialog {
  width: min(460px, calc(100% - 28px));
  padding: 0;
  color: var(--text);
  background: linear-gradient(145deg, rgba(26, 25, 38, 0.98), rgba(13, 14, 21, 0.98));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.league-dialog::backdrop {
  background: rgba(4, 5, 8, 0.76);
  backdrop-filter: blur(8px);
}

.league-dialog form { padding: 26px; }
.team-config-card textarea, .league-dialog textarea {
  width: 100%; min-height: 96px; resize: vertical; padding: 12px 14px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; font: inherit; line-height: 1.6;
}
.league-dialog textarea:focus { outline: 2px solid var(--green-bright); outline-offset: 2px; }

.dialog-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.dialog-brand h2 {
  margin: 4px 0 0;
  font-size: 1.4rem;
  letter-spacing: -0.035em;
}

.dialog-copy {
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.league-dialog input {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  padding: 0 13px;
}

.league-dialog .form-message { min-height: 22px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.button-danger {
  color: #fff;
  background: #a94750;
  border-color: #bd5962;
}

.button-danger:hover:not(:disabled) { background: #bc525d; }

.remove-impact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  margin: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.remove-impact dt,
.remove-impact dd { margin: 0; }

.remove-impact dd {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; align-items: stretch; }
  .hero > .button { justify-self: start; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-wide { grid-column: auto; }
}

@media (max-width: 760px) {
  .center-stage { padding: 14px; }
  .login-layout { grid-template-columns: 1fr; min-height: 0; }
  .login-intro { padding: 28px 24px; }
  .login-copy h1 { font-size: 2.25rem; }
  .feature-list { display: none; }
  .login-form-wrap { padding: 30px 24px; }
  .topbar { top: 8px; width: calc(100% - 16px); margin-top: 8px; }
  .connection-state { display: none; }
  .content-wrap { width: calc(100% - 24px); padding-top: 26px; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 104px; }
  .workspace { padding: 17px; }
}

/* Single-field searchable role picker. */
.workspace[aria-labelledby="mapping-heading"] { overflow: visible; }

.mapping-row:focus-within {
  position: relative;
  z-index: 20;
}

.role-picker,
.role-combobox {
  position: relative;
  min-width: 0;
}

.channel-picker {
  width: min(320px, 100%);
}

.delivery-setting:focus-within {
  position: relative;
  z-index: 90;
}

.role-search-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  color: var(--text);
  background: #0d0e13;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: 0;
}

.role-search-input:hover { border-color: rgba(255, 255, 255, 0.22); }

.role-search-input:focus {
  border-color: #8794a7;
  box-shadow: 0 0 0 3px rgba(151, 165, 185, 0.1);
}

.role-search-input[aria-expanded="true"] {
  border-color: #8794a7;
  border-radius: 10px 10px 6px 6px;
}

.role-search-input[aria-invalid="true"] {
  border-color: rgba(255, 125, 134, 0.72);
}

.role-combobox > .search-icon {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 14px;
}

.role-combobox > .select-chevron {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 15px;
  pointer-events: none;
}

.role-search-input[aria-expanded="true"] + .select-chevron {
  transform: rotate(180deg);
}

.role-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 270px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #15161c;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
  scrollbar-color: #474b56 transparent;
  scrollbar-width: thin;
}

.role-options[hidden] { display: none; }

.role-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
}

.role-option:hover:not(:disabled),
.role-option:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
}

.role-option[aria-selected="true"] {
  color: var(--text);
  background: rgba(174, 187, 208, 0.1);
}

.role-option:disabled {
  color: #666a74;
  cursor: not-allowed;
}

.role-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-option small {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.role-options-empty,
.role-options-more {
  margin: 5px;
  padding: 8px;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-align: center;
}

.mapping-arrow {
  width: auto;
  height: auto;
  color: var(--text-muted);
  background: transparent;
  border: 0;
}

@media (max-width: 480px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 1.4rem; }
  .guild-chip { display: none; }
}

/* Brandless presentation: compact, neutral, and task-focused. */
:root {
  --bg: #0b0c0f;
  --bg-raised: #101116;
  --surface: #121319;
  --surface-solid: #121319;
  --surface-soft: #17181f;
  --surface-hover: #1c1e26;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f3f5;
  --text-soft: #c5c7ce;
  --text-muted: #888b95;
  --green: #aebbd0;
  --green-bright: #e7ecf5;
  --green-dark: #252b36;
  --green-ink: #101216;
}

body {
  background: linear-gradient(145deg, #101116 0%, #0b0c0f 48%, #0d0f13 100%);
}

.panel {
  background: var(--surface);
  box-shadow: none;
  backdrop-filter: none;
}

.loading-card {
  display: block;
  width: min(400px, 100%);
  padding: 26px;
  border-radius: 16px;
}

.loading-bar { margin-top: 20px; }
.loading-bar span { background: #aebbd0; }

.login-layout {
  display: block;
  width: min(430px, 100%);
  min-height: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.login-form-wrap {
  padding: 34px;
  background: transparent;
  border: 0;
}

.form-heading h1 {
  margin: 8px 0 6px;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.form-heading .muted { margin-bottom: 26px; }

.password-field {
  background: rgba(7, 8, 11, 0.72);
  border-color: var(--border-strong);
}

.password-field:focus-within {
  border-color: #8794a7;
  box-shadow: 0 0 0 3px rgba(151, 165, 185, 0.1);
}

.eyebrow {
  color: #9ca7b8;
  letter-spacing: 0.11em;
}

.button-primary {
  color: #111318;
  background: linear-gradient(135deg, #f1f3f7, #b8c2d2);
  box-shadow: none;
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fff, #c7d0dd);
}

.topbar {
  top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 13px max(20px, calc((100% - var(--content-width)) / 2));
  background: rgba(13, 14, 18, 0.94);
  border-width: 0 0 1px;
  border-radius: 0;
}

.topbar .brand-name {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.content-wrap { padding-top: 32px; }

.hero {
  grid-template-columns: minmax(240px, 0.75fr) minmax(380px, 1.25fr) auto;
  padding: 8px 0 24px;
}

.hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: -0.045em;
}

.overview-grid {
  gap: 0;
  padding: 4px;
  overflow: hidden;
  background: rgba(18, 19, 25, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.metric-card,
.overview-grid + .overview-grid .metric-card {
  min-height: 86px;
  padding: 15px 17px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
}

.metric-card:last-child { border-right: 0; }
.metric-card strong { font-size: 1.45rem; }

.workspace {
  background: #111218;
  border-radius: 14px;
}

.workspace-toolbar { padding: 18px 20px; }
.mapping-row { border-radius: 10px; }

.league-dialog {
  background: #121319;
  border-radius: 16px;
}

.league-dialog::backdrop {
  background: rgba(4, 5, 7, 0.78);
  backdrop-filter: blur(4px);
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 760px) {
  .login-form-wrap { padding: 28px 24px; }
  .topbar { width: 100%; margin: 0; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
}

/* Clear role identity and league actions. */
.mapping-head,
.mapping-row {
  grid-template-columns: minmax(145px, 0.72fr) minmax(250px, 1fr) 24px minmax(250px, 1fr) 112px;
}

.role-search-input {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-meta {
  display: block;
  min-height: 18px;
  padding: 6px 3px 0;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  line-height: 1.35;
}

.role-option {
  display: grid;
  justify-content: stretch;
  gap: 3px;
}

.role-option span {
  overflow: visible;
  color: var(--text-soft);
  font-weight: 620;
  text-overflow: clip;
  white-space: normal;
}

.role-option small {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: normal;
}

.row-actions {
  display: grid;
  align-self: stretch;
  align-items: center;
  justify-items: end;
  gap: 9px;
  padding-left: 13px;
  border-left: 1px solid var(--border);
}

.enabled-cell {
  justify-content: flex-end;
}

.delete-row-button {
  position: static;
  width: auto;
  height: auto;
  padding: 5px 8px;
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 650;
}

.delete-row-button:hover {
  color: #f09aa1;
  background: rgba(255, 125, 134, 0.07);
  border-color: rgba(255, 125, 134, 0.12);
}

@media (max-width: 1180px) {
  .mapping-row {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 112px;
  }

  .row-actions {
    grid-column: 4;
  }
}

@media (max-width: 650px) {
  .mapping-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    grid-column: 1;
    grid-template-columns: 1fr auto;
    width: 100%;
    margin-top: 15px;
    padding: 13px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .enabled-cell {
    margin: 0;
    padding: 0;
    border: 0;
    justify-self: start;
  }
}

/* Global operator access controls, separate from role configuration. */
#server-access-panel { padding: 24px; margin-bottom: 24px; }
#server-access-panel h2 { margin-top: 0; }
#server-access-panel > p { max-width: 85ch; line-height: 1.6; }
#server-access-form { display: grid; gap: 10px; max-width: 760px; margin-top: 24px; }
#server-access-form input, #server-access-form select { width: 100%; min-width: 0; }
#server-access-form .field-label { margin-top: 8px; }
#server-access-form .button { justify-self: start; }
#server-access-list { max-height: 360px; overflow: auto; margin-top: 16px; }
#server-access-list p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; line-height: 1.6; }
#server-access-list button { white-space: normal; overflow-wrap: anywhere; text-align: left; }
@media (max-width: 650px) { #server-access-panel { padding: 16px; } }

.server-manager-panel #server-access-form input,
.server-manager-panel #server-access-form select {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.4;
}
.server-manager-panel .brand-name { max-width: 18rem; }

/* Shared VPG interface: restrained surfaces, readable controls and clear states. */
:root{--bg:#101216;--bg-raised:#13161b;--surface:#171a20;--surface-solid:#171a20;--surface-soft:#1d2128;--surface-hover:#242a33;--border:#303640;--border-strong:#404855;--text:#f4f2ed;--text-soft:#b9bec7;--text-muted:#98a0ad;--green:#76c6a0;--green-bright:#c8e6d7;--green-dark:#203c31;--green-ink:#101c16;--amber:#deb878;--red:#dc8790;--blue:#d7bd7f;--gold:#d7bd7f;--shadow:none;--shadow-soft:none;--radius-xl:12px;--radius-lg:10px;--radius-md:8px;--radius-sm:7px;--content-width:1280px}
body{background:var(--bg);font-size:14px;line-height:1.6}a{color:var(--text-soft)}button,input,select,textarea{font:inherit}button,input,select,textarea,a{-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:3px}input,select,textarea{accent-color:var(--gold)}.panel{background:var(--surface);border-color:var(--border);box-shadow:none}.button{min-height:40px;padding:9px 15px;border-radius:7px;font-size:12px;font-weight:600;letter-spacing:0;box-shadow:none;gap:8px}.button-primary{background:var(--gold);border:1px solid var(--gold);color:#242016;box-shadow:none}.button-primary:hover:not(:disabled){background:#e5cd9a;border-color:#e5cd9a;transform:none;box-shadow:none}.button-secondary,.button-quiet{border:1px solid var(--border-strong);background:transparent;color:var(--text-soft)}.button-secondary:hover:not(:disabled),.button-quiet:hover:not(:disabled){background:var(--surface-hover);border-color:#566170;color:var(--text)}.button-danger{color:#f1bac0;background:#48282d;border-color:#77404a}.button-danger:hover:not(:disabled){background:#5c3038}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1px;color:var(--gold)}.field-label{font-size:12px;font-weight:500;color:var(--text-soft)}.muted,.field-help{font-size:12px;color:var(--text-muted);line-height:1.7}.field-hint{font-size:11px;color:var(--text-muted);line-height:1.7}.team-warning{font-size:12px;color:var(--amber);line-height:1.7}.skip-link{background:var(--gold);color:#242016}.dashboard{padding-bottom:104px}.content-wrap{width:min(var(--content-width),calc(100% - 64px));padding-top:32px}.topbar{position:relative;min-height:80px;padding:16px max(32px,calc((100% - var(--content-width))/2));background:#13161a;border-color:var(--border);backdrop-filter:none}.brand-line{gap:12px}.admin-brand-logo{object-fit:contain;flex-shrink:0}.topbar .brand-name{font-size:11px;letter-spacing:1.8px;font-weight:700;color:var(--text);margin:0}.brand-context{font-size:11px;color:var(--text-muted);margin:3px 0 0}.topbar-actions{gap:20px}.topbar-actions>a{font-size:11px;text-decoration:none;color:var(--text-muted)}.topbar-actions>a:hover{color:var(--text)}.topbar .button{min-height:37px;padding:7px 13px;font-size:11px}.connection-state{font-size:10px;font-weight:400;gap:6px}.status-dot{width:5px;height:5px;background:var(--green);box-shadow:none}.connection-state[data-state=offline] .status-dot{box-shadow:none}.hero{display:grid;grid-template-columns:minmax(240px,1fr) minmax(300px,440px) auto;align-items:start;gap:24px;padding:7px 0 26px;border:0}.hero h1{font-size:29px;font-weight:600;letter-spacing:-.8px;line-height:1.25;margin:0 0 8px}.hero-copy{font-size:12px;color:var(--text-muted);max-width:480px;line-height:1.7}.hero>.button{margin-top:25px}.server-connect{min-width:0}.server-connect>label{font-size:11px;font-weight:500;margin:0 0 7px;color:var(--text-soft)}.server-connect>div{display:flex;gap:8px}.server-connect select{min-width:0;flex:1;width:100%;height:41px;padding:9px 11px;background:var(--bg);border:1px solid var(--border-strong);font-size:12px;border-radius:7px}.server-advanced{font-size:11px;color:var(--text-muted);margin-top:7px}.server-advanced summary{cursor:pointer;display:inline-block}.server-advanced summary:after{content:' +';margin-left:4px}.server-advanced[open] summary:after{content:' −'}.server-advanced input{display:block;width:100%;min-width:0;margin-top:8px;height:40px;border:1px solid var(--border-strong);background:var(--bg);font-size:12px;border-radius:7px}.refresh-icon{width:16px;height:16px;display:inline-flex}.refresh-icon svg{width:16px;height:16px}.delivery-setting,.comanager-panel .delivery-setting{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px;border-radius:10px;border:1px solid var(--border);background:var(--surface);margin-bottom:24px}.delivery-setting strong{font-size:12px;font-weight:550}.delivery-setting>div>span{font-size:11px;color:var(--text-muted);margin-top:3px}.channel-picker{width:320px}.workspace,.eprem-panel .workspace{padding:0;border-radius:10px;box-shadow:none}.comanager-overview,.team-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0;margin:0;gap:0;border-bottom:1px solid var(--border)}.comanager-overview article,.team-overview article{display:flex;gap:12px;align-items:center;margin:0;padding:17px 22px;min-height:73px;background:transparent;border:0;border-right:1px solid var(--border);border-radius:0}.comanager-overview article:last-child,.team-overview article:last-child{border-right:0}.comanager-overview strong,.team-overview strong{font-size:24px;font-weight:550;letter-spacing:-.5px;line-height:1.2;color:var(--text)}.comanager-overview span,.team-overview span{font-size:11px;line-height:1.5;color:var(--text-muted)}.workspace-toolbar{padding:19px 20px;gap:20px;border-color:var(--border)}.workspace-toolbar h2{font-size:15px;font-weight:550;letter-spacing:-.25px;margin:0}.toolbar-controls{gap:9px}.search-field input,.filter-field select{height:40px;font-size:12px;background:var(--bg);border:1px solid var(--border-strong);border-radius:7px}.search-field input{width:200px}.mapping-head,.mapping-row{grid-template-columns:minmax(170px,.8fr) minmax(0,1fr) 20px minmax(0,1fr) 100px;column-gap:18px}.mapping-head{min-height:39px;padding:0 22px 0 50px;background:#1b1f26;border-bottom:1px solid var(--border);font-size:9px;font-weight:500;letter-spacing:.8px;color:var(--text-muted)}.comanager-panel .mapping-row,.mapping-row{border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;margin:0;padding:22px 22px 22px 50px;min-height:104px}.mapping-row:last-child{border-bottom:0}.mapping-row:hover,.comanager-panel .mapping-row:hover{background:#1a1e25}.mapping-row:focus-within{background:#1b2027}.league-badge{width:34px;height:34px;color:var(--gold);background:#d7bd7f0d;border:1px solid #524b3d;border-radius:8px;font-size:10px;font-weight:600}.league-name{font-size:12px;font-weight:550;white-space:normal;overflow-wrap:anywhere;letter-spacing:0}.league-key{font-size:9px;font-weight:400;color:#8f97a4;letter-spacing:0}.league-cell{gap:10px}.drag-handle{left:16px;color:#777f8c;font-size:14px}.role-search-input{background:var(--bg);border:1px solid var(--border-strong);border-radius:7px;font-size:12px;font-weight:500;height:42px;padding-left:34px;padding-right:30px}.role-search-input:focus{border-color:#a48f62;box-shadow:0 0 0 2px #d7bd7f13}.role-meta{font-size:9px;padding-top:6px;color:#8f97a4;min-height:18px}.role-combobox>.search-icon{left:13px;transform:scale(.88)}.role-combobox>.select-chevron{right:13px}.role-options{background:#1c2027;border:1px solid var(--border-strong);border-radius:8px;box-shadow:0 12px 24px #0005;padding:5px}.role-option{border-radius:5px;min-height:43px;padding:8px 10px}.role-option span{font-size:12px;font-weight:500}.role-option small{font-size:9px;color:var(--text-muted)}.role-option[aria-selected=true]{background:#d7bd7f10}.role-option:hover:not(:disabled),.role-option:focus-visible{background:#2c323d}.row-actions{border-color:var(--border);padding-left:13px}.switch{gap:7px}.switch-track{background:#3b424e;border:1px solid #4b5462;box-shadow:none;width:32px;height:19px}.switch-track span{width:13px;height:13px;left:2px;top:2px;background:#abb2bf;box-shadow:none}.switch input:checked+.switch-track{background:var(--gold);border-color:var(--gold)}.switch input:checked+.switch-track span{background:#3e3420;transform:translateX(13px)}.switch-label,.switch input:checked~.switch-label{font-size:9px;font-weight:400;color:var(--text-muted)}.delete-row-button{font-size:10px;font-weight:400;padding:3px 5px}.mapping-arrow{color:#727d8b;font-size:15px}.row-error{font-size:11px}.save-bar{background:#171a20f5;border-top:1px solid var(--border);box-shadow:0 -6px 24px #0002;backdrop-filter:blur(12px)}.save-inner{max-width:var(--content-width);padding:16px 32px}.save-bar[data-state=dirty]{border-color:#776746}.save-status-icon{background:#d7bd7f16;color:var(--gold);border:1px solid #61553d}.save-status strong{font-size:12px;font-weight:550}.save-status small{font-size:11px;color:var(--text-muted)}.save-actions{gap:8px}.notice{padding:16px 18px;border-radius:8px;background:var(--surface);border-color:var(--border)}.notice strong{font-size:12px;font-weight:550}.notice p{font-size:12px;line-height:1.7}.notice-icon{background:#d7bd7f12;color:var(--gold)}.league-dialog{background:var(--surface);border:1px solid var(--border-strong);border-radius:12px;max-height:calc(100svh - 40px);overflow:auto;box-shadow:0 20px 70px #0007}.league-dialog h2{font-size:22px;font-weight:550;letter-spacing:-.5px}.league-dialog p{font-size:12px;line-height:1.7;color:var(--text-muted)}.league-dialog input,.league-dialog textarea{font:inherit;font-size:13px;background:var(--bg);border:1px solid var(--border-strong);border-radius:7px}.league-dialog::backdrop{background:#090b0ec9;backdrop-filter:blur(3px)}.login-layout{width:min(410px,100%);border-radius:12px;box-shadow:none}.login-form-wrap{padding:34px;background:transparent}.admin-login-brand{display:flex;align-items:center;gap:11px;margin-bottom:33px;color:var(--gold);font-size:10px;font-weight:650;letter-spacing:1.7px}.admin-login-brand img{object-fit:contain}.form-heading h1{font-size:29px;font-weight:550;letter-spacing:-.7px}.form-heading .muted{font-size:12px;margin:8px 0 25px}.password-field{background:var(--bg);border:1px solid var(--border-strong);border-radius:7px}.password-field:focus-within{border-color:#a48f62;box-shadow:0 0 0 2px #d7bd7f13}.password-field input{font-size:14px}.login-form-wrap>p{font-size:11px;margin-top:22px}.login-form-wrap>p a{text-decoration:none;color:var(--text-muted)}.loading-card{border-radius:12px;background:var(--surface)}.loading-card h1{font-size:19px;font-weight:550}.loading-bar{height:2px;background:var(--border)}.loading-bar span{background:var(--gold)}
.eprem-panel .hero{grid-template-columns:minmax(240px,1fr) minmax(260px,440px) auto}.eprem-panel .hero .server-connect>div{display:block}.eprem-panel .team-workspace{margin:0;overflow:visible}.eprem-panel .team-status{margin:0;padding:15px 20px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;font-size:12px;line-height:1.7;color:var(--text-soft)}.eprem-panel #team-live-status{margin:0;padding:10px 20px;font-size:10px;color:var(--text-muted)}.eprem-panel .team-section-nav{display:flex;gap:22px;padding:0 20px;border:0;border-bottom:1px solid var(--border);margin:0;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}.eprem-panel .team-section-nav a{flex-shrink:0;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--text-muted);padding:13px 0 12px;font-size:12px}.eprem-panel .team-section-nav a:hover{color:var(--text)}.eprem-panel .team-section-nav a.is-active{border-color:var(--gold);background:transparent;color:var(--gold)}.eprem-panel .team-overview{margin:0;border-bottom:1px solid var(--border)}.team-config-card{padding:22px;border:1px solid var(--border);border-radius:9px;background:var(--surface);min-width:0}.eprem-panel .team-config-card{padding:22px;border-radius:9px;background:transparent}.team-workspace>.team-config-card{margin:20px}.team-workspace>details.team-config-card{padding:15px 20px;background:#13161b}.team-workspace details summary{font-size:12px;font-weight:500;color:var(--text-soft)}.team-workspace details p{font-size:12px;line-height:1.8;color:var(--text-muted)}.team-config-card h3{font-size:17px;font-weight:550;letter-spacing:-.3px}.team-config-card h4{font-size:14px;font-weight:550}.team-card-header h4{font-size:15px;font-weight:550;letter-spacing:-.25px}.team-league-directory{gap:14px}.team-config-card .team-directory-card{background:#1b1f26;border-color:var(--border);border-radius:8px;padding:19px}.team-directory-card p{font-size:12px;line-height:1.6;color:var(--text-soft);margin:10px 0}.team-badge{font-size:10px;padding:3px 7px;border-radius:5px;border-color:#3c5348;color:var(--green);background:#76c6a00a;white-space:nowrap}.team-badge[data-paused=true]{border-color:#65543a;color:var(--amber);background:#deb8780a}.team-card-actions{gap:7px;margin-top:17px}.team-card-actions>.button{font-size:11px;min-height:36px;padding:8px 11px}.team-workspace .team-card-actions .button-quiet{color:var(--red);border-color:transparent}.team-workspace .team-card-actions .button-quiet:hover{background:#dc87900c;border-color:#dc879030}.team-config-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:20px}.eprem-panel .team-config-grid{padding:0 20px 20px}.team-config-card input:not([type=checkbox]),.team-config-card select,.team-config-card textarea{font-size:13px;min-height:42px;border-color:var(--border-strong);border-radius:7px;background:var(--bg);padding:10px 11px;margin-bottom:13px;line-height:1.5}.team-config-card input[type=checkbox]{accent-color:var(--gold);width:15px;height:15px;flex-shrink:0}.team-config-card .field-label{font-size:12px;font-weight:500;margin-bottom:7px;color:var(--text-soft)}.team-config-card .muted,.team-config-card .field-hint,.team-config-card .field-help{font-size:12px;line-height:1.7;color:var(--text-muted)}.team-check{font-size:12px;gap:9px;line-height:1.7;color:var(--text-soft)}.team-config-card .team-warning{font-size:11px;line-height:1.8;color:var(--amber)}.team-league-layout,.team-import-grid{gap:24px;margin-top:24px}.team-form-section legend{font-size:11px;color:var(--text-muted)}.team-form-section{border-color:var(--border)}.team-callout{padding:12px 14px;border-color:var(--border);border-left:2px solid var(--gold);background:#d7bd7f05;font-size:12px;line-height:1.8}.team-step-title{font-size:13px;font-weight:550}.team-step-title span{color:var(--gold);background:#d7bd7f10;border:1px solid #5c513c;border-radius:6px;font-size:11px;width:24px;height:24px}.team-import-advanced{padding:15px 0;border-color:var(--border);margin-top:20px}.team-member-choice{font-size:12px;line-height:1.7;background:var(--bg);border-color:var(--border);border-radius:7px;padding:11px}.team-preview{margin:20px;border:1px solid #6a5a3b;border-radius:9px;background:#d7bd7f05;padding:22px}.team-preview h3{font-size:18px;font-weight:550}.team-preview p,.team-preview li{font-size:12px;line-height:1.8;color:var(--text-soft)}.team-directory-heading{padding:20px;gap:16px}.team-directory-heading h3{font-size:17px;font-weight:550}.team-directory-heading input[type=search]{font-size:12px;height:40px;border:1px solid var(--border-strong);border-radius:7px;background:var(--bg);padding:9px 11px;min-width:0}.team-directory{padding:0 20px 20px;gap:16px}.team-directory>.team-directory-card{background:#1b1f26;padding:20px;border-color:var(--border);border-radius:9px}.team-directory .team-config-card{padding:12px;margin:15px 0;background:var(--surface)}.team-resource-list{font-size:11px;line-height:1.7;gap:8px}.team-maintenance{margin:0 20px 20px;padding:16px 18px;border:1px solid var(--border);border-radius:8px;background:#13161b}.team-maintenance>div{display:grid;gap:9px;padding-top:16px}.team-maintenance .button{white-space:normal;line-height:1.7;text-align:left;justify-content:flex-start;font-size:12px}.team-workspace>.field-hint{padding:0 20px 20px;margin:0;color:var(--text-muted);font-size:11px;line-height:1.8}.team-workspace code{font-size:11px;background:#d7bd7f0b;color:#d4c295;padding:2px 4px;border-radius:3px}.team-directory-card .team-resource-list dd{color:var(--text-soft)}
@media(max-width:1180px){.mapping-head,.mapping-row{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) 100px}.mapping-row .league-cell{grid-column:1/-1}.mapping-row{row-gap:17px}.mapping-head{display:none}.row-actions{grid-column:4}.hero,.eprem-panel .hero{grid-template-columns:minmax(220px,1fr) minmax(300px,1fr) auto}}
@media(max-width:980px){.hero,.eprem-panel .hero{grid-template-columns:minmax(0,1fr) auto;gap:20px}.hero>div:first-child{grid-column:1/-1}.hero>.button{margin-top:25px}.toolbar-controls{flex-wrap:wrap;justify-content:flex-end}.workspace-toolbar{align-items:flex-start}.team-league-layout,.team-import-grid{grid-template-columns:1fr;gap:20px}.team-config-grid{grid-template-columns:1fr}}
@media(max-width:760px){.topbar{width:100%;margin:0;padding:14px 20px;min-height:74px}.topbar-actions{gap:12px}.topbar-actions>a{display:none}.topbar-actions .button{min-height:36px;padding:7px 11px}.admin-brand-logo{width:44px;height:33px}.brand-line{gap:9px}.topbar .brand-name{font-size:10px;letter-spacing:1.4px}.brand-context{font-size:10px}.content-wrap{width:calc(100% - 32px);padding-top:26px}.hero,.eprem-panel .hero{grid-template-columns:minmax(0,1fr);gap:17px;padding:0 0 24px}.hero h1{font-size:27px}.hero>div:first-child{grid-column:1}.hero>.button{margin:0;justify-self:start}.hero-copy{font-size:12px;max-width:100%}.server-connect>div{display:flex}.server-connect select,.server-advanced input{font-size:16px;min-height:44px}.server-connect .button{min-height:44px}.delivery-setting,.comanager-panel .delivery-setting{padding:17px;display:grid;gap:14px;grid-template-columns:1fr;margin-bottom:20px}.channel-picker{width:100%}.comanager-overview article,.team-overview article{padding:16px 12px;flex-direction:column;align-items:flex-start;gap:5px;min-height:81px}.comanager-overview strong,.team-overview strong{font-size:23px}.comanager-overview span,.team-overview span{font-size:10px}.workspace-toolbar{padding:17px;display:grid;gap:14px;grid-template-columns:1fr}.workspace-toolbar h2{font-size:16px}.toolbar-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.toolbar-controls>.button{grid-column:1/-1;min-height:41px}.search-field,.filter-field{min-width:0}.search-field input{width:100%;font-size:16px;min-height:43px;padding-left:33px}.filter-field select{width:100%;font-size:12px;min-height:43px}.mapping-row,.comanager-panel .mapping-row{grid-template-columns:minmax(0,1fr);row-gap:17px;margin:0;padding:21px 17px 20px 42px}.mapping-row .league-cell,.row-actions{grid-column:1}.mapping-row .mapping-arrow{display:none}.mapping-row .role-cell{grid-column:1}.league-name{font-size:14px}.league-key{font-size:10px}.league-badge{width:33px;height:33px}.role-search-input{font-size:16px;min-height:44px;font-weight:400}.role-meta{font-size:9px}.row-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0;padding:12px 0 0;border-left:0;border-top:1px solid var(--border)}.enabled-cell{margin:0;padding:0;border:0}.switch-label,.switch input:checked~.switch-label{font-size:10px}.delete-row-button{font-size:11px}.role-cell:before{font-size:9px;font-weight:500;letter-spacing:.7px;margin-bottom:7px;color:var(--text-muted)}.drag-handle{left:12px;top:24px;transform:none}.save-inner{padding:13px 16px;gap:13px;flex-wrap:wrap}.save-status{min-width:0}.save-status small{font-size:10px}.save-actions{margin-left:auto}.league-dialog{width:calc(100vw - 32px);padding:23px;max-height:calc(100svh - 32px)}.league-dialog input,.league-dialog textarea{font-size:16px}.eprem-panel .team-section-nav{padding:0 17px;gap:20px}.eprem-panel .team-section-nav a{font-size:12px;padding:13px 0}.eprem-panel .team-status{padding:14px 17px;font-size:11px}.eprem-panel #team-live-status{padding:9px 17px;font-size:10px}.team-workspace>.team-config-card{margin:17px}.team-workspace>details.team-config-card{padding:14px 16px}.eprem-panel .team-config-card,.team-config-card{padding:17px}.team-config-card .team-directory-card{padding:17px}.team-league-directory,.team-directory{grid-template-columns:1fr}.team-config-grid,.eprem-panel .team-config-grid{padding:0 17px 17px;gap:17px}.team-card-header{flex-wrap:wrap;gap:12px}.team-card-header>.button{margin:0}.team-card-actions>.button{font-size:11px;min-height:38px;padding:9px 11px}.team-config-card input:not([type=checkbox]),.team-config-card select,.team-config-card textarea{font-size:16px;min-height:44px}.team-config-card .field-label{font-size:12px}.team-league-layout,.team-import-grid{margin-top:20px}.team-directory-heading{padding:17px;align-items:flex-start}.team-directory-heading input[type=search]{width:100%;max-width:none;font-size:16px;min-height:44px}.team-directory{padding:0 17px 17px}.team-maintenance{margin:0 17px 17px}.team-preview{margin:17px;padding:17px}.team-workspace>.field-hint{padding:0 17px 17px}.team-resource-list{grid-template-columns:100px minmax(0,1fr)}.team-card-header h4{font-size:15px}.login-form-wrap{padding:29px}.admin-login-brand{margin-bottom:29px}.login-form-wrap>p{margin-top:22px}.form-heading h1{font-size:29px}}
@media(max-width:390px){.toolbar-controls{grid-template-columns:minmax(0,1fr)}.toolbar-controls>.button{grid-column:1}.team-card-header{align-items:flex-start}.topbar-actions .button{font-size:10px}.brand-context{max-width:155px;overflow-wrap:anywhere}.save-actions{width:100%;justify-content:flex-end}.save-status-icon{width:26px;height:26px}.team-resource-list{grid-template-columns:88px minmax(0,1fr)}.league-name{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}
input:focus,select:focus,textarea:focus{border-color:#a48f62;box-shadow:0 0 0 2px #d7bd7f13}.password-field input,.password-field input:focus,.password-field input:focus-visible{background:transparent;border:0;box-shadow:none;outline:0}.eprem-panel .team-overview article{background:transparent}
