:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --line: #d7dee7;
  --text: #17212b;
  --muted: #647282;
  --strong: #101820;
  --accent: #0d776a;
  --accent-2: #315f96;
  --danger: #b3261e;
  --warn: #946200;
  --ok: #1c7c36;
  --shadow: 0 12px 30px rgba(18, 28, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

body.auth-locked .app-shell {
  display: block;
}

body.auth-locked .sidebar,
body.auth-locked .tab-panel,
body.auth-locked .topbar {
  display: none;
}

body.auth-locked .main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.auth-locked .auth-gate {
  display: block;
}

.auth-gate {
  display: none;
  min-height: 100vh;
}

.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.12fr) minmax(430px, 0.88fr);
  background: #ffffff;
}

.auth-media {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #07131f;
  color: #ffffff;
}

.auth-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% center;
  filter: brightness(0.66) saturate(0.86);
}

.auth-media-brand,
.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-media-brand {
  position: absolute;
  z-index: 1;
  top: clamp(28px, 5vw, 64px);
  left: clamp(28px, 6vw, 76px);
}

.auth-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(7, 19, 31, 0.72);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.auth-media-brand > span:last-child,
.auth-mobile-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.auth-media-brand strong,
.auth-mobile-brand strong {
  font-size: 15px;
}

.auth-media-brand small,
.auth-mobile-brand small {
  color: #c8d4df;
  font-size: 11px;
}

.auth-media-copy {
  position: absolute;
  z-index: 1;
  left: clamp(28px, 6vw, 76px);
  bottom: clamp(36px, 8vh, 86px);
  width: min(570px, calc(100% - 56px));
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.auth-eyebrow,
.auth-kicker {
  display: block;
  color: #65d3bd;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-media-copy h1 {
  margin: 14px 0 24px;
  max-width: 560px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.auth-signal-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-signal-row span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(7, 19, 31, 0.68);
  padding: 0 11px;
  font-size: 11px;
  font-weight: 800;
}

.auth-panel {
  min-width: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow-y: auto;
  background: #ffffff;
  padding: 28px clamp(32px, 6vw, 88px);
}

.auth-panel-inner {
  width: min(440px, 100%);
  display: grid;
  gap: 20px;
}

.auth-mobile-brand {
  display: none;
  color: var(--strong);
}

.auth-mobile-brand .auth-logo {
  border-color: #cbd5df;
  background: #17212c;
}

.auth-mobile-brand small {
  color: var(--muted);
}

.auth-language-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -8px;
}

.language-picker {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
}

.language-picker-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.language-select {
  min-width: 112px;
  min-height: 34px;
  padding-right: 28px;
  font-weight: 750;
}

.auth-switch {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f5;
  padding: 4px;
}

.auth-switch-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-switch-button.active {
  background: #ffffff;
  color: var(--strong);
  box-shadow: 0 2px 8px rgba(18, 28, 38, 0.08);
}

.auth-view {
  display: none;
}

.auth-view.active {
  display: grid;
  gap: 24px;
}

.auth-heading {
  display: grid;
  gap: 7px;
}

.auth-heading h2 {
  margin: 0;
  color: var(--strong);
  font-size: 32px;
  line-height: 1.1;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.trial-summary {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 10px 12px;
  color: #174f46;
  background: #eaf7ef;
  border: 1px solid #cce8d5;
  border-radius: 8px;
}

.trial-summary strong {
  font-size: 13px;
}

.trial-summary span {
  color: #517069;
  font-size: 12px;
  line-height: 1.45;
}

.auth-footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

#signupView {
  gap: 14px;
}

#signupView .auth-form {
  gap: 10px;
}

#signupView .auth-form input,
#signupView .auth-form select,
#signupView .auth-submit {
  min-height: 44px;
}

.auth-form label {
  gap: 7px;
  color: #3c4957;
  font-size: 12px;
  font-weight: 800;
}

.auth-form input,
.auth-form select {
  min-height: 48px;
  border-color: #cbd5df;
  background: #fbfcfd;
  padding: 0 13px;
  font-size: 14px;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  font-weight: 800;
}

.auth-text-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #0f766e;
  padding: 2px 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-text-button:hover,
.auth-text-button:focus-visible {
  color: #0b5e57;
  text-decoration: underline;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.inline-link {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

#logoutButton[hidden],
body.auth-locked #logoutButton {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: #17212c;
  color: #f4f7fb;
  padding: 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f7fb;
  color: #17212c;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.brand p {
  margin: 2px 0 0;
  color: #b5c1ce;
  font-size: 12px;
}

.nav-tabs {
  display: grid;
  gap: 6px;
}

.nav-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5df;
  padding: 0 12px;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  background: #243241;
  color: #ffffff;
}

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

.sidebar-context {
  margin-top: 22px;
  display: grid;
  gap: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
  color: #dbe4ed;
}

.sidebar-context:empty {
  display: none;
}

.sidebar-context-label {
  color: #94a6b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-context strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-context .tag {
  background: rgba(255, 255, 255, 0.09);
  color: #dbe4ed;
}

.main {
  min-width: 0;
  padding: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.topbar h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.subline,
.actions,
.toolbar,
.lookup-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.actions {
  justify-content: flex-end;
}

.language-picker-topbar {
  align-self: flex-end;
}

.workspace-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(45, 95, 154, 0.15);
}

.api-key-field input {
  width: 240px;
}

.demo-requests-section {
  margin-top: 18px;
}

.demo-requests-table th,
.demo-requests-table td {
  vertical-align: top;
}

.demo-request-contacts {
  display: grid;
  gap: 3px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
}

.login-field input {
  width: 160px;
}

.checkbox-label {
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.checkbox-label input {
  min-height: auto;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  min-height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  padding: 0 14px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
}

.danger-button {
  border: 1px solid rgba(185, 28, 28, 0.26);
  background: #fff5f5;
  color: #b91c1c;
  padding: 0 12px;
  cursor: pointer;
}

.danger-button:hover {
  border-color: rgba(185, 28, 28, 0.5);
  background: #fee2e2;
}

.icon-button {
  width: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.icon {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
}

.icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-pill,
.count-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.ok {
  color: var(--ok);
  background: #e7f5eb;
}

.status-pill.warn {
  color: var(--warn);
  background: #fff3d7;
}

.status-pill.error {
  color: var(--danger);
  background: #fde8e6;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 16px;
}

.workspace-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 12px 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.workspace-panel:empty,
.module-grid:empty {
  display: none;
}

.product-status-section[hidden] {
  display: none;
}

.product-status-header > div {
  min-width: 0;
}

.product-status-header h3,
.product-status-header p {
  margin: 0;
}

.product-status-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.product-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-status-item {
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 5px 10px;
  align-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid #aab6c3;
  padding: 13px 14px 12px 11px;
}

.product-status-item:nth-child(3n) {
  border-right: 0;
}

.product-status-item:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.product-status-item.ok {
  border-left-color: var(--ok);
}

.product-status-item.warn {
  border-left-color: var(--warn);
}

.product-status-item.shadow {
  border-left-color: var(--accent-2);
}

.product-status-icon {
  grid-row: 1 / -1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent-2);
}

.product-status-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.product-status-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.product-status-copy strong,
.product-status-copy span,
.product-status-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-status-copy strong {
  color: var(--strong);
  font-size: 13px;
}

.product-status-copy span,
.product-status-item small {
  color: var(--muted);
  font-size: 11px;
}

.product-status-item small {
  grid-column: 2 / -1;
}

.product-status-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.product-status-badge.ok {
  color: var(--ok);
  background: #e7f5eb;
}

.product-status-badge.warn {
  color: var(--warn);
  background: #fff3d7;
}

.product-status-badge.shadow {
  color: var(--accent-2);
  background: #eaf1f8;
}

.workspace-copy {
  min-width: 0;
}

.workspace-copy h3 {
  margin: 4px 0 5px;
  color: var(--strong);
  font-size: 22px;
}

.workspace-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.workspace-command {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.workspace-stack {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.workspace-modules {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.score-ring {
  --score-color: var(--accent);
  width: 78px;
  height: 78px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--score) * 1%), #e8edf3 0);
}

.score-ring.warn {
  --score-color: var(--warn);
}

.score-ring.error {
  --score-color: var(--danger);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.score-ring span {
  position: relative;
  display: grid;
  place-items: center;
  line-height: 1;
}

.score-ring strong {
  color: var(--strong);
  font-size: 20px;
}

.score-ring small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.insight-grid:empty {
  display: none;
}

.insight-card {
  min-height: 118px;
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid var(--line);
  border-left: 3px solid #b8c4d2;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 13px;
  cursor: pointer;
  text-align: left;
}

.insight-card.ok {
  border-left-color: var(--ok);
}

.insight-card.warn {
  border-left-color: var(--warn);
}

.insight-card.error {
  border-left-color: var(--danger);
}

.insight-card:hover {
  border-color: #b8c4d2;
  border-left-color: var(--accent-2);
  transform: translateY(-1px);
}

.insight-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent-2);
}

.insight-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.insight-card strong {
  color: var(--strong);
  font-size: 24px;
  line-height: 1;
}

.insight-card > span:last-child {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.module-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 12px;
  text-align: left;
}

.module-card:hover {
  border-color: #b8c4d2;
  transform: translateY(-1px);
}

.module-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent-2);
}

.module-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.module-copy strong,
.module-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-copy strong {
  color: var(--strong);
  font-size: 13px;
}

.module-copy small {
  color: var(--muted);
  font-size: 12px;
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}

.signal-list,
.playbook-list {
  display: grid;
  gap: 0;
}

.signal-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.signal-row strong,
.signal-row span {
  min-width: 0;
}

.signal-row strong {
  display: block;
  color: var(--strong);
}

.signal-row div > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.signal-meter {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8797a8;
}

.progress-fill.ok {
  background: var(--ok);
}

.progress-fill.warn {
  background: var(--warn);
}

.progress-fill.error {
  background: var(--danger);
}

.playbook-list {
  padding: 10px;
  gap: 8px;
}

.playbook-action {
  min-height: 64px;
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.playbook-action:hover {
  border-color: #b8c4d2;
  background: #fafbfc;
}

.playbook-action span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.playbook-action strong,
.playbook-action small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playbook-action strong {
  color: var(--strong);
}

.playbook-action small {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 14px;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  color: var(--strong);
  font-size: 28px;
  line-height: 1;
}

.metric span:last-child {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.lookup-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

#clientRegistryPanel > .panel:first-child #clientForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#clientRegistryPanel > .panel:first-child #clientForm > .new-client-data,
#clientRegistryPanel > .panel:first-child #clientForm > .client-create-access,
#clientRegistryPanel > .panel:first-child #clientForm > button[type="submit"] {
  grid-column: 1 / -1;
}

.client-api-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.client-api-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.client-api-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.client-api-identity {
  min-width: 0;
}

.client-api-identity strong,
.client-api-identity span {
  display: block;
  overflow-wrap: anywhere;
}

.client-api-identity strong {
  color: var(--strong);
  font-size: 15px;
}

.client-api-identity span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.client-api-status,
.client-api-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.client-api-status {
  justify-content: flex-end;
}

.client-api-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.client-api-facts > div {
  min-width: 0;
  padding: 10px 12px;
  background: #ffffff;
}

.client-api-facts span,
.client-api-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

.client-api-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-api-facts strong {
  margin-top: 3px;
  color: var(--strong);
  font-size: 13px;
}

.client-api-tags,
.client-api-scopes {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.client-api-tags {
  display: grid;
  gap: 7px;
}

.client-api-scopes summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--strong);
  font-weight: 800;
  cursor: pointer;
}

.client-api-scopes[open] summary {
  margin-bottom: 9px;
}

.client-api-actions {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.client-api-actions .secondary-button,
.client-api-actions .danger-button {
  min-height: 34px;
  width: auto;
  padding: 7px 10px;
  font-size: 12px;
}

.client-workflow-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
}

.client-workflow-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.client-workflow-tab.active {
  color: #ffffff;
  background: var(--strong);
}

.workflow-step {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
}

.feed-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

#clientFeedsPanel .betbuilder-panel {
  margin-top: 16px;
}

.client-settings-selector {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(100px, 140px) auto auto;
  gap: 10px;
  align-items: end;
}

.new-client-data {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-create-access {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.client-create-access-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-create-access-fields label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.client-create-access-fields input,
.client-create-access-fields select {
  width: 100%;
}

.client-enabled-control {
  align-self: end;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.client-settings-fields {
  display: grid;
  gap: 12px;
}

.unsaved-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-left: 3px solid var(--warn);
  padding: 8px 12px;
  background: #fffaf0;
  color: var(--strong);
  font-size: 13px;
}

.unsaved-notice[hidden] {
  display: none;
}

.advanced-settings {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.advanced-settings summary {
  padding: 12px;
  color: var(--strong);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.advanced-settings-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.client-settings-summary {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.client-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-summary-head span,
.client-summary-head strong,
.client-summary-head small {
  display: block;
}

.client-summary-head strong {
  margin-top: 3px;
  color: var(--strong);
  font-size: 18px;
}

.client-summary-head small,
.client-summary-head div > span {
  color: var(--muted);
}

.client-summary-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.client-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.client-summary-list dt {
  color: var(--muted);
}

.client-summary-list dd {
  margin: 0;
  color: var(--strong);
  font-weight: 800;
}

.betbuilder-panel {
  grid-column: 1 / -1;
}

.trading-layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 16px;
}

.trading-history-panel {
  grid-column: 1 / -1;
}

.operator-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 16px;
}

.password-reset-queue-panel {
  grid-column: 1 / -1;
}

.password-reset-request-list {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
}

.password-reset-request-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.password-reset-request-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.password-reset-request-row span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.operator-email-editor {
  min-width: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 6px;
}

.operator-email-editor input {
  min-width: 0;
  min-height: 38px;
}

.integration-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  margin: 0;
  font-size: 15px;
}

.toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.client-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.integration-plan-form {
  border-bottom: 1px solid var(--line);
}

.integration-plan-form .primary-button {
  width: 100%;
  justify-content: center;
}

.integration-plan-form .profile-hint {
  display: grid;
  gap: 4px;
}

.portal-summary-panel {
  padding: 14px;
}

.profile-hint {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.4;
}

.profile-hint.warning {
  border-color: #f0d58a;
  background: #fff8e5;
  color: #7a5600;
}

.trading-permission-hint {
  margin: 14px 14px 0;
}

.entitlement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 5px;
}

.secret-box {
  margin: 0 14px 14px;
  border: 1px solid #f0d58a;
  background: #fff8e5;
  border-radius: 8px;
  padding: 12px;
}

.secret-box h4 {
  margin: 0 0 8px;
}

.portal-summary {
  display: grid;
  gap: 12px;
}

.portal-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  padding: 12px;
}

.portal-hero h3 {
  margin: 4px 0;
  color: var(--strong);
  font-size: 18px;
}

.portal-hero p {
  margin: 0;
  color: var(--muted);
}

.portal-grid {
  display: grid;
  gap: 8px;
}

.portal-api-key .secret-value {
  border-color: #f0d58a;
  background: #fff8e5;
}

.integration-files {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.integration-file {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.integration-file-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.integration-file-header strong,
.integration-file-header span {
  display: block;
}

.integration-file-header strong {
  color: var(--strong);
}

.integration-file-header span {
  color: var(--muted);
  font-size: 12px;
}

.integration-file pre {
  max-height: 340px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  background: #101820;
  color: #d7e4ef;
  font-size: 12px;
  line-height: 1.55;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
}

.chat-sidebar-panel,
.chat-panel {
  min-height: 620px;
}

.chat-thread-list {
  display: grid;
  gap: 8px;
}

.chat-thread {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.chat-thread:hover,
.chat-thread.active {
  border-color: #90c2bd;
  background: #eef8f6;
}

.chat-thread strong,
.chat-thread span,
.chat-thread small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread strong {
  color: var(--strong);
}

.chat-thread span,
.chat-thread small {
  color: var(--muted);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
}

.chat-messages {
  min-height: 0;
  max-height: 560px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #f7faf9, #eef3f7);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chat-message {
  width: min(680px, 88%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 28, 38, 0.06);
}

.chat-message.mine {
  justify-self: end;
  border-color: #a7d6ce;
  background: #e9f7f4;
}

.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chat-message-meta strong {
  color: var(--strong);
}

.chat-message p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.chat-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: #ffffff;
}

.secret-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

.secret-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
}

.link-button {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #fafbfc;
}

td {
  color: var(--text);
}

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

.tag-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
}

.event-list {
  display: grid;
  max-height: 460px;
  overflow: auto;
}

.event-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 76px;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.event-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-row span {
  color: var(--muted);
  font-size: 12px;
}

.flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
}

.flag-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flag-item img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.flag-placeholder {
  width: 26px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.flag-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.json-output {
  min-height: 440px;
  max-height: 640px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  background: #101820;
  color: #d7e4ef;
  font-size: 12px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  min-width: 240px;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #17212c;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 32, 0.48);
}

.modal-overlay[hidden] {
  display: none;
}

.help-dialog {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(15, 23, 32, 0.2);
}

.account-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(15, 23, 32, 0.2);
}

.account-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.account-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-form input {
  width: 100%;
  min-height: 44px;
}

.modal-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.help-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.help-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.help-section h4 {
  margin: 0 0 10px;
  color: var(--strong);
  font-size: 14px;
}

.help-section dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.help-section dt {
  color: var(--strong);
  font-weight: 800;
}

.help-section dd {
  margin: -5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-media {
    min-height: 280px;
    max-height: 300px;
  }

  .auth-media-copy {
    bottom: 30px;
  }

  .auth-media-copy h1 {
    max-width: 620px;
    margin: 10px 0 16px;
    font-size: 34px;
  }

  .auth-panel {
    align-items: start;
    padding-top: 38px;
    padding-bottom: 48px;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
  }

  .brand {
    margin: 0;
    flex: 0 0 auto;
  }

  .nav-tabs {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
  }

  .sidebar-context {
    display: none;
  }

  .nav-button {
    width: auto;
  }

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

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

  .product-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-status-item:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .product-status-item:nth-child(2n) {
    border-right: 0;
  }

  .product-status-item:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .product-status-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .ops-layout {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .split-layout,
  .lookup-layout,
  .client-layout,
  .feed-settings-layout,
  .integration-layout,
  .chat-layout,
  .trading-layout,
  .operator-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  body.auth-locked .main {
    padding: 0;
  }

  .password-reset-request-row {
    grid-template-columns: 1fr;
  }

  .auth-media {
    min-height: 225px;
    max-height: 225px;
  }

  .auth-media-brand {
    top: 18px;
    left: 18px;
  }

  .auth-logo {
    width: 40px;
    height: 40px;
  }

  .auth-media-copy {
    left: 18px;
    bottom: 20px;
    width: calc(100% - 36px);
  }

  .auth-media-copy h1 {
    margin: 8px 0 0;
    font-size: 27px;
  }

  .auth-signal-row {
    display: none;
  }

  .auth-panel {
    padding: 28px 20px 36px;
  }

  .auth-panel-inner {
    gap: 22px;
  }

  .auth-heading h2 {
    font-size: 28px;
  }

  .auth-footer {
    display: grid;
    gap: 7px;
  }

  .topbar {
    display: grid;
  }

  .actions {
    justify-content: flex-start;
  }

  .language-picker-topbar {
    align-self: auto;
  }

  .workspace-panel {
    grid-template-columns: 1fr;
  }

  .workspace-command {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace-stack {
    justify-content: flex-start;
  }

  .score-ring {
    width: 68px;
    height: 68px;
  }

  .insight-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .product-status-grid {
    grid-template-columns: 1fr;
  }

  .product-status-item,
  .product-status-item:nth-child(2n),
  .product-status-item:nth-child(3n),
  .product-status-item:nth-last-child(-n + 2),
  .product-status-item:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-status-item:last-child {
    border-bottom: 0;
  }

  .signal-row {
    grid-template-columns: 1fr;
  }

  .signal-meter {
    justify-items: start;
  }

  .actions,
  .toolbar,
  .lookup-form {
    align-items: stretch;
  }

  .api-key-field,
  .api-key-field input,
  .login-field,
  .login-field input,
  .toolbar label,
  .lookup-form label,
  .client-form label,
  .client-form select,
  .entitlement-grid {
    width: 100%;
  }

  fieldset {
    grid-template-columns: 1fr;
  }

  .entitlement-grid {
    grid-template-columns: 1fr;
  }

  .client-workflow-tabs,
  .client-settings-selector,
  .new-client-data,
  .client-create-access-fields {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .event-row {
    grid-template-columns: 1fr;
  }

  .portal-hero,
  .integration-file-header,
  .chat-form,
  .chat-message-meta {
    display: grid;
  }

  .chat-message {
    width: 100%;
  }
}
.stream-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stream-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #7f8d95;
}

.stream-status.online {
  color: #16955d;
}

.stream-status.online i {
  background: #20c875;
  box-shadow: 0 0 0 4px rgba(32, 200, 117, 0.14), 0 0 12px rgba(32, 200, 117, 0.55);
  animation: streamOnlinePulse 1.6s ease-in-out infinite;
}

.stream-status.upcoming i {
  background: #e8ab32;
}

.stream-status.unavailable {
  color: #c44747;
}

.stream-status.unavailable i {
  background: #d75b5b;
}

.disabled-button {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes streamOnlinePulse {
  50% { opacity: 0.62; transform: scale(0.82); }
}

.warning-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d59622;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff8e8;
  color: #8b5800;
  font-weight: 800;
  cursor: pointer;
}

.panel-kicker {
  max-width: 680px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.client-lifecycle-actions {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.client-suspension-note {
  display: grid;
  gap: 3px;
  border-left: 3px solid #d59622;
  padding: 9px 11px;
  background: #fff8e8;
  color: #704900;
}

.client-suspension-note span {
  font-size: 12px;
}

.client-module-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.client-module-panel {
  min-width: 0;
}

.client-access-form,
.client-quote-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.client-access-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-access-form .primary-button {
  grid-column: 1 / -1;
}

.client-quote-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-quote-form .client-rule-reason {
  grid-column: span 2;
}

.client-access-form label,
.client-quote-form label {
  min-width: 0;
}

.client-access-form label > span,
.client-quote-form label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-access-form input,
.client-access-form select,
.client-quote-form input,
.client-quote-form select {
  width: 100%;
}

.client-access-list,
.client-rule-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.client-access-row,
.client-rule-row {
  display: grid;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.client-access-row {
  grid-template-columns: minmax(140px, 1fr) auto auto auto;
}

.client-rule-row {
  grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) auto auto;
}

.client-access-row div > strong,
.client-access-row div > span,
.client-rule-row div > strong,
.client-rule-row div > span {
  display: block;
}

.client-access-row div > span,
.client-rule-row div > span,
.rule-markets {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.access-role,
.rule-value {
  color: var(--strong);
  font-size: 12px;
  font-weight: 850;
}

.client-access-actions {
  display: flex;
  gap: 6px;
}

.field-disabled {
  opacity: 0.48;
}

@media (max-width: 980px) {
  .client-module-grid,
  .client-access-form,
  .client-quote-form {
    grid-template-columns: 1fr;
  }

  .client-quote-form .client-rule-reason,
  .client-access-form .primary-button {
    grid-column: auto;
  }

  .client-access-row,
  .client-rule-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .client-access-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .client-lifecycle-actions .warning-button,
  .client-access-actions .secondary-button,
  .client-access-actions .danger-button {
    width: 100%;
  }
}

.odds-desk-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.odds-desk-header {
  align-items: flex-start;
}

.odds-desk-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) auto repeat(3, minmax(130px, 0.8fr)) 38px;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 14px;
  background: #f7f9fa;
}

.odds-desk-toolbar label,
.odds-desk-actionbar label {
  min-width: 0;
}

.odds-desk-toolbar label > span,
.odds-desk-actionbar label > span,
.odds-desk-target > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.odds-desk-toolbar select,
.odds-desk-actionbar select,
.odds-desk-actionbar input {
  width: 100%;
}

.client-locked-selector select {
  border-color: #b8c8ce;
  background: #e8eef0;
  color: #304b55;
  font-weight: 800;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  min-width: 190px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.segment-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.segment-button.active {
  background: var(--strong);
  color: #ffffff;
}

.odds-desk-actionbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) 120px auto;
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
  background: #152f3a;
  color: #ffffff;
}

.odds-desk-actionbar label > span,
.odds-desk-actionbar .odds-desk-target > span {
  color: #adc2cb;
}

.odds-desk-target strong {
  display: block;
  min-height: 36px;
  padding-top: 8px;
  font-size: 14px;
}

.odds-desk-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
}

.odds-desk-summary > strong {
  margin-left: auto;
  color: var(--strong);
  font-size: 12px;
}

.odds-desk-events {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
  padding: 12px;
  background: #eef2f3;
}

.odds-event-item {
  overflow: hidden;
  border: 1px solid #cfd9dc;
  border-radius: 8px;
  background: #ffffff;
}

.odds-event-head {
  display: grid;
  grid-template-columns: 145px minmax(230px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  background: #ffffff;
}

.odds-event-time strong,
.odds-event-time span,
.odds-event-teams strong,
.odds-event-teams small {
  display: block;
}

.odds-event-time strong {
  color: var(--strong);
  font-size: 12px;
}

.odds-event-time span,
.odds-event-teams small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.odds-event-teams strong {
  overflow-wrap: anywhere;
  color: #142c35;
  font-size: 14px;
}

.odds-event-teams strong span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.odds-event-state {
  display: flex;
  gap: 5px;
}

.odds-market-list {
  border-top: 1px solid var(--line);
}

.odds-market-row {
  display: grid;
  grid-template-columns: minmax(100px, 150px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #e5eaec;
  padding: 8px 12px;
}

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

.odds-market-title strong,
.odds-market-title span {
  display: block;
}

.odds-market-title strong {
  color: var(--strong);
  font-size: 12px;
  text-transform: uppercase;
}

.odds-market-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.odds-selections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
}

.odds-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #d7e0e3;
  border-radius: 6px;
  padding: 5px 8px;
  background: #f7f9fa;
}

.odds-selection small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odds-selection strong {
  color: #11673c;
  font-size: 13px;
}

.odds-selection-editor {
  grid-template-columns: minmax(34px, 1fr) 74px 32px;
  padding: 3px 4px 3px 8px;
  cursor: text;
}

.odds-selection-input {
  width: 74px;
  min-width: 0;
  height: 30px;
  border: 1px solid #b9c8cc;
  border-radius: 5px;
  padding: 0 7px;
  background: #ffffff;
  color: #11673c;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.odds-selection-input:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(47, 128, 113, 0.15);
}

.odds-selection-editor .odds-selection-save {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

@media (max-width: 1180px) {
  .odds-desk-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .odds-desk-client {
    grid-column: span 2;
  }

  .odds-event-head {
    grid-template-columns: 120px minmax(200px, 1fr) auto;
  }

  .odds-event-head .odds-desk-event-apply {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .odds-desk-toolbar,
  .odds-desk-actionbar,
  .odds-event-head,
  .odds-market-row {
    grid-template-columns: 1fr;
  }

  .odds-desk-client,
  .odds-event-head .odds-desk-event-apply {
    grid-column: auto;
  }

  .odds-desk-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .odds-desk-summary > strong {
    margin-left: 0;
  }

  .odds-event-state {
    flex-wrap: wrap;
  }

  .odds-desk-events {
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .client-api-list {
    grid-template-columns: 1fr;
  }

  .client-api-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #clientRegistryPanel > .panel:first-child #clientForm {
    grid-template-columns: 1fr;
  }

  #clientRegistryPanel > .panel:first-child #clientForm > * {
    grid-column: auto;
  }

  .client-api-list {
    padding: 9px;
  }

  .client-api-head {
    display: grid;
  }

  .client-api-status {
    justify-content: flex-start;
  }

  .client-api-facts {
    grid-template-columns: 1fr;
  }

  .client-api-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-api-actions .secondary-button,
  .client-api-actions .danger-button {
    width: 100%;
  }
}
