/* Coolagent v2 Workbench Styles — 1:1 parity with Contabo live admin.css + style.css */
:root {
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #183248;
  background: #f3f6f8;
  font-synthesis: none;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 360px;
  background: #f3f6f8;
  color: #183248;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  background: #176c72;
  color: #fff;
  cursor: pointer;
  line-height: 20px;
}

button:hover {
  filter: brightness(0.96);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #207eab;
  outline-offset: 3px;
}

input,
select {
  border: 1px solid #c7d5df;
  border-radius: 8px;
  background: #fff;
  color: #183248;
  padding: 10px 12px;
  min-height: 40px;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #176c72;
  width: 16px;
  height: 16px;
  min-height: 0;
  min-width: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 700;
}

h2 {
  font-size: 19px;
  font-weight: 650;
}

h3 {
  font-size: 16px;
  font-weight: 600;
}

small {
  display: block;
}

a {
  color: #166d80;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================================
 * Admin Console (.admin) — Exact parity with Contabo admin.css
 * ============================================================================ */

.admin {
  max-width: 100%;
  margin: auto;
  padding: 18px 20px 36px;
  font-size: 13px;
  min-height: 100vh;
}

.pageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.account {
  font-size: 13px;
  color: #667b8d;
}

.admin .tabs {
  display: flex;
  border-bottom: 1px solid #d3e0e6;
  gap: 24px;
  margin-bottom: 18px;
  overflow: auto;
}

.admin .tabs button {
  border-radius: 0;
  padding: 10px 6px 12px;
  background: transparent;
  color: #667b8d;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  font-size: 14px;
}

.admin .tabs button.active {
  border-bottom-color: #176c72;
  color: #176c72;
  font-weight: 650;
}

.sectionHead,
.panelHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sectionHead {
  margin: 14px 0 12px;
}

.panelHead {
  padding: 14px 18px;
}

.panel {
  background: #fff;
  border: 1px solid #dce5eb;
  border-radius: 12px;
  overflow: visible;
}

.spaced {
  margin-top: 16px;
}

.scroll {
  overflow-x: auto;
}

.secondary {
  background: #e8f0f2;
  color: #176c72;
}

a.secondary {
  display: inline-block;
  border-radius: 8px;
  padding: 8px 14px;
  line-height: 20px;
  text-decoration: none;
}

a.secondary:hover {
  filter: brightness(0.96);
  text-decoration: none;
}

.outline {
  display: inline-block;
  background: #e1f2ef;
  border: 1px solid #8cbbb4;
  border-radius: 8px;
  color: #176c72;
  padding: 7px 14px;
  line-height: 20px;
  text-decoration: none;
}

.outline:hover {
  filter: brightness(0.97);
  text-decoration: none;
}

.textButton,
.numberLink {
  background: none;
  color: #176c72;
  padding: 3px 0;
}

.textButton:hover,
.numberLink:hover {
  text-decoration: underline;
  filter: none;
}

.numberLink {
  font: inherit;
}

.inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tables — high-density 1-screen desktop fit */
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 680px;
}

th {
  background: #f8fafb;
  color: #50667a;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

th,
td {
  padding: 10px 10px;
  border-bottom: 1px solid #edf1f4;
  vertical-align: top;
}

td {
  line-height: 1.5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th .sort {
  font-size: 12px;
}

.sort {
  background: none;
  padding: 2px 4px 2px 0;
  color: #50667a;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.sort:hover {
  color: #087c70;
  filter: none;
}

.sort span {
  font-size: 10px;
  margin-left: 3px;
}

.admin .leadTable {
  width: 100%;
  min-width: 1060px;
  table-layout: fixed;
}

.admin .leadTable td {
  overflow-wrap: anywhere;
  padding: 10px 8px;
}

.admin .leadTable th {
  padding: 10px 8px;
  white-space: normal;
  vertical-align: top;
}

.admin .leadTable th > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: center;
}

.admin .leadTable .check {
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

.admin .leadTable .leadColCheck { width: 34px; }
.admin .leadTable .leadColAvatar { width: 52px; }
.admin .leadTable .leadColCreator { width: 16%; }
.admin .leadTable .leadColNationality { width: 6.5%; }
.admin .leadTable .leadColLanguage { width: 7.5%; }
.admin .leadTable .leadColRank { width: 13%; }
.admin .leadTable .leadColAverage { width: 9.5%; }
.admin .leadTable .leadColLive { width: 11%; }
.admin .leadTable .leadColExpiry { width: 11.5%; }
.admin .leadTable .leadColTicket { width: 7.5%; }
.admin .leadTable .leadColActions { width: 10.5%; }

/* PK Opponents grouped compact table (fits 1280px+ with zero horizontal drag) */
.pkTable {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

.pkTable th,
.pkTable td {
  padding: 10px 8px;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.pkTable th {
  white-space: normal;
}

.pkTable .pkColHost { width: 17%; }
.pkTable .pkColOwner { width: 8%; }
.pkTable .pkColLive { width: 10%; }
.pkTable .pkColOpponent { width: 22%; }
.pkTable .pkColLang,
.pkTable .pkColTicket { width: 8.5%; }
.pkTable .pkColMatches { width: 16.5%; }
.pkTable .pkColObserved,
.pkTable .pkColAction { width: 8%; }

.pkDayBadge {
  margin-bottom: 4px;
}

.pkMatchList {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pkMatchLine {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 12px;
  line-height: 1.4;
  padding: 2px 6px;
  background: #f6f9fb;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}

.pkMatchTime {
  color: #50667a;
  font-weight: 600;
}

.pkMatchMode {
  color: #176c72;
}

.pkMatchScore {
  font-weight: 600;
  color: #183248;
  margin-left: auto;
}

.pkSigText {
  font-size: 12px;
  color: #5c7082;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.avatarCell {
  text-align: center;
  vertical-align: middle !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.creatorAvatarWrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: #e3eff2;
  border: 1px solid #cddbe2;
  flex-shrink: 0;
  text-decoration: none;
}

.creatorAvatarWrap:hover {
  text-decoration: none;
  border-color: #176c72;
}

.creatorAvatarWrap.sm {
  width: 34px;
  height: 34px;
}

.creatorAvatarImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creatorAvatarFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  font-weight: 700;
  color: #176c72;
  background: linear-gradient(135deg, #e1f2ef 0%, #d4e8ee 100%);
  text-transform: uppercase;
  user-select: none;
}

.pkCreatorCell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pkCreatorInfo {
  min-width: 0;
  flex: 1;
}

.field {
  display: flex;
  gap: 3px;
  align-items: baseline;
  line-height: 1.9;
  flex-wrap: wrap;
}

.copy {
  background: none;
  padding: 0;
  color: #183248;
  border-radius: 2px;
  font: inherit;
  text-align: left;
  -webkit-user-select: text;
  user-select: text;
  overflow-wrap: anywhere;
}

.copy:hover {
  color: #087c70;
  text-decoration: underline;
  filter: none;
}

.copy:disabled {
  opacity: 1;
  cursor: default;
}

.field small {
  color: #176447;
  font-size: 10px;
}

.note {
  font-size: 11px;
  color: #7c8a95;
  font-weight: 400;
  margin-top: 9px;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  background: #e8f0f2;
  color: #50667a;
}

.green,
.badge.green {
  background: #dcf3e8;
  color: #176447;
}

.pale,
.badge.pale {
  background: #e8f0f2;
  color: #50667a;
}

.amber,
.badge.amber {
  background: #fff4dd;
  color: #946319;
}

.red,
.badge.red {
  background: #f9e8e4;
  color: #923e33;
}

.actions {
  display: flex;
  gap: 9px;
  flex-direction: column;
  align-items: flex-start;
}

.actions > button,
.actions > a {
  font-size: 12px;
  padding: 8px 10px;
}

.actions > button.textButton {
  padding: 4px 0;
}

/* Filters */
.admin .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  margin: 20px 0;
  overflow: visible;
}

.admin .filters > input {
  width: 200px;
}

.admin .filters input {
  min-width: 0;
}

.admin .filters .filterControl,
.admin .filters .range {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  line-height: 17px;
  color: #50667a;
}

.range > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range input {
  width: 83px;
  padding: 10px;
}

.tierFilter {
  position: relative;
  min-width: 125px;
  border: 1px solid #c7d5df;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  font-size: 13px;
  line-height: 20px;
}

.tierFilter summary {
  cursor: pointer;
}

.admin .filters .tierFilter[open] {
  min-width: min(340px, 100%);
  height: auto;
}

.admin .filters .tierFilter > div {
  position: static;
  inset: auto;
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(45px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tierFilter label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #183248;
}

.admin .filters input:not([type="checkbox"]),
.admin .filters select,
.admin .filters .tierFilter {
  height: 44px;
  box-sizing: border-box;
}

.admin .filters .filterActions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.admin .filters .filterActions button {
  height: 44px;
}

.listHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
  color: #50667a;
}

.segmented,
.subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.segmented button,
.subtabs button {
  color: #50667a;
  background: transparent;
  border: 1px solid transparent;
}

.segmented .selected,
.subtabs .selected {
  background: #e1f2ef;
  color: #176c72;
  border-color: #bad7d2;
}

.resourceActions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  margin: 20px 0;
}

.panel > .pagination {
  padding: 0 22px;
}

.pagination button,
.pagination select {
  font: inherit;
  min-height: 40px;
  padding: 9px 14px;
  line-height: 20px;
}

.empty {
  padding: 50px;
  text-align: center;
  color: #7c8a95;
}

/* Home Overview Sections */
.inventorySummary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 24px 24px;
  gap: 22px;
}

.inventorySummary article {
  padding: 4px 0;
}

.inventorySummary span {
  color: #50667a;
  font-size: 13px;
}

.inventorySummary strong {
  display: block;
  font-size: 32px;
  margin-top: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.inventorySummary em {
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  margin-left: 6px;
}

.healthStrip {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #dce5eb;
  border-radius: 12px;
  padding: 16px 24px;
  margin-top: 22px;
  font-size: 13px;
}

.healthItem {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #50667a;
}

.healthItem > span:first-child {
  font-weight: 600;
  color: #183248;
}

.healthItem strong {
  font-weight: 500;
  color: #183248;
}

.healthItem b {
  font-weight: 600;
  color: #176447;
  background: #dcf3e8;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.healthItem.healthLate b {
  color: #a1372c;
  background: #fff0ed;
}

.healthStrip > .textButton {
  margin-left: auto;
  white-space: nowrap;
}

.periodLabel {
  font-size: 12px;
  color: #7c8a95;
}

.trendHeading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 24px 12px;
  font-size: 13px;
}

.trendHeading strong {
  font-weight: 500;
}

.trendHeading span {
  color: #7c8a95;
  font-size: 11px;
}

.chartFigure {
  margin: 0;
  padding: 0 24px 22px;
  min-width: 0;
}

.chartCanvas {
  position: relative;
  height: 310px;
  min-width: 0;
}

.chartCanvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chartTooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(24, 50, 72, 0.94);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  z-index: 4;
  box-shadow: 0 6px 18px rgba(24, 50, 72, 0.25);
}

.chartData {
  margin-top: 8px;
}

.chartData summary {
  color: #7c8a95;
  font-size: 11px;
  cursor: pointer;
  width: max-content;
  padding: 6px 0;
}

.chartData table {
  font-size: 12px;
  margin-top: 10px;
  min-width: 320px;
}

.chartData th {
  font-size: 12px;
}

/* Recruitment Alert */
.recruitmentAlert {
  border: 2px solid #bb302b;
  background: #fff0ed;
  color: #8c211c;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 12px 0;
  line-height: 1.7;
}

.recruitmentAlert strong,
.recruitmentStop {
  color: #a82019;
  font-weight: 800;
}

.recruitmentBlocked {
  background: #fff8f6;
}

.recruitmentAlert button {
  margin: 4px 6px 4px 0;
}

.recruitmentAlert summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

/* Modals (<dialog class="modal">) */
dialog.modal {
  border: 1px solid #dce5eb;
  border-radius: 14px;
  padding: 26px;
  width: min(560px, calc(100vw - 32px));
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  color: #183248;
  box-shadow: 0 18px 60px #18324828;
}

dialog.modal.wide {
  width: min(820px, calc(100vw - 32px));
}

dialog.modal.wide.xl {
  width: min(1240px, calc(100vw - 32px));
}

dialog.modal::backdrop {
  background: #18324860;
}

.modalHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.modalHead h2 {
  font-size: 20px;
}

dialog.modal p {
  font-size: 14px;
  line-height: 1.8;
  margin: 15px 0;
}

dialog.modal table {
  min-width: 0;
}

dialog.modal .scroll table {
  min-width: 530px;
}

.historyDetail {
  min-width: 1080px !important;
}

.historyDetail th,
.historyDetail td {
  padding: 14px 16px;
  white-space: nowrap;
}

.modalFoot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  margin-top: 20px;
  border-top: 1px solid #edf1f4;
  flex-wrap: wrap;
}

.modalFoot > span:first-child {
  margin-right: auto;
  color: #667b8d;
  font-size: 13px;
}

.formField {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #50667a;
  margin: 18px 0;
}

/* TierAllocation Modal */
.batchTierChoices {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #ccd9dd;
  border-radius: 8px;
  padding: 12px;
}

.batchTierChoices label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #183248;
}

.allocationSteps {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 4px 0 22px;
}

.allocationSteps li {
  flex: 1;
  border-bottom: 3px solid #d8e3e6;
  padding: 10px 0;
  color: #647980;
}

.allocationSteps [aria-current="step"] {
  border-color: #176c72;
  color: #176c72;
  font-weight: 700;
}

.allocationFilters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.allocationFilters fieldset {
  border: 1px solid #ccd9dd;
  border-radius: 8px;
  min-width: 0;
  padding: 12px 14px;
}

.tierAllocation input[type="number"] {
  width: 110px;
  min-width: 0;
}

.tierAllocation .allocationFilters input {
  width: 40%;
}

.operatorChoices {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px solid #ccd9dd;
  border-radius: 8px;
  padding: 16px;
}

.operatorChoices label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.allocationSummary {
  display: flex;
  gap: 20px;
  background: #edf6f5;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.allocationSummary span {
  flex: 1;
  color: #47626a;
  font-size: 13px;
}

.allocationSummary strong {
  display: block;
  font-size: 25px;
  color: #175e61;
  margin-top: 6px;
}

.allocationStock {
  max-height: 340px;
  overflow: auto;
}

.allocationStock thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.allocationShortage {
  background: #fff0ed;
  color: #9d2822;
}

.allocationConditions,
.metricHelp {
  color: #5a7079;
  font-size: 13px;
  line-height: 1.7;
}

.metricHelp summary {
  cursor: pointer;
  color: #176c72;
}

.tierAllocation .sectionHead {
  margin-top: 22px;
}

/* Removal Dialog */
.dangerButton {
  background: #aa3027 !important;
  color: #fff !important;
}

.dangerText {
  color: #aa3027 !important;
}

.removalModes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid #d8e1e5;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

.removalModes label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Errors & Status Toast */
.error {
  color: #93372c;
  background: #fff1ed;
  padding: 12px 14px;
  border-radius: 6px;
  margin: 12px 0;
}

.notice {
  background: #e7f1f6;
  color: #183248;
  padding: 12px 14px;
  border-radius: 6px;
  margin: 12px 0;
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translate(-50%);
  z-index: 30;
  padding: 12px 26px;
  color: #176447;
  background: #dcf3e8;
  border: 1px solid #b6ddca;
  border-radius: 8px;
  box-shadow: 0 8px 25px #18324815;
}

/* Sticky Table Headers on Desktop (Admin) */
.admin .scroll > table {
  border-collapse: separate;
  border-spacing: 0;
}

.admin .scroll > table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafb;
  box-shadow: 0 1px #dce5eb;
}

@media (min-width: 901px) {
  .admin {
    min-width: fit-content;
  }
  .admin .scroll:not(.allocationStock) {
    overflow: visible;
    isolation: isolate;
  }
}

/* ============================================================================
 * Login & Operator Console (.cc / .leadCenter) — Exact parity with style.css
 * ============================================================================ */

.cc {
  max-width: 1400px;
  margin: auto;
  padding: 42px 30px;
  color: #183248;
  background: #f3f6f8;
  min-height: 100vh;
}

.cc header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cc h1 {
  font-size: 32px;
  margin: 9px 0;
}

.cc p,
.cc small {
  color: #667b8d;
}

.cc .toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

.cc .toolbar input {
  min-width: 260px;
}

.cc.leadCenter {
  max-width: 1650px;
}

.cc .headerActions,
.cc .detailHeading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cc .actionLink {
  display: inline-block;
  background: #e1f2ef;
  border: 1px solid #8cbbb4;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #176c72;
  text-decoration: none;
}

.cc .actionLink:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.cc .eligible {
  background: #dcf3e8;
  color: #176447;
}

.cc .ineligible {
  background: #f9e8e4;
  color: #923e33;
}

.leadCenter .tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 0;
  border-bottom: 1px solid #dce5eb;
}

.leadCenter .tabs button,
.leadCenter .tabs a {
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #50667a;
  cursor: pointer;
  text-decoration: none;
}

.leadCenter .tabs button:hover,
.leadCenter .tabs a:hover {
  color: #087c70;
  filter: none;
}

.leadCenter .tabs button.active,
.leadCenter .tabs a.active {
  border-bottom-color: #176c72;
  color: #176c72;
}

.leadCenter .fieldNote {
  font-size: 11px;
  color: #7c8a95;
  font-weight: 400;
  margin-top: 9px;
}

.leadCenter .leadField {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
  line-height: 1.9;
}

.leadCenter .copyValue {
  background: none;
  color: #183248;
  padding: 0;
  border-radius: 2px;
  font: inherit;
  text-align: left;
  user-select: text;
  overflow-wrap: anywhere;
}

.leadCenter .copyValue:hover {
  color: #087c70;
  text-decoration: underline;
  filter: none;
}

.leadCenter .copyValue:disabled {
  opacity: 1;
  cursor: default;
}

.leadCenter .copyFeedback {
  font-size: 10px;
  color: #176447;
  line-height: 1.2;
}

.leadCenter .sortButton {
  background: none;
  color: #50667a;
  padding: 4px 5px 4px 0;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.leadCenter .sortButton:hover {
  color: #087c70;
  filter: none;
}

.leadCenter .sortButton span {
  font-size: 10px;
}

.leadActions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.leadActions button,
.leadActions .actionLink {
  font-size: 12px;
  padding: 8px 12px;
}

.leadOverview {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin: 24px 0;
}

.leadOverview .panel {
  padding: 20px;
}

.leadOverview h2 {
  margin: 0 0 18px;
  font-size: 17px;
}

.recruitmentMetrics > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.leadOverview strong {
  display: block;
  font-size: 32px;
  margin: 10px 0;
  font-variant-numeric: tabular-nums;
}

.leadOverview em {
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  margin-left: 5px;
}

.leadOverview small {
  font-size: 11px;
  margin-top: 10px;
}

.inventoryMetrics > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.inventoryMetrics button {
  border: 1px solid #dce5eb;
  background: #f8fafb;
  color: #183248;
  text-align: left;
  padding: 14px;
}

.inventoryMetrics button.selected {
  border-color: #176c72;
  background: #e8f4f0;
}

.leadFilters {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
  margin: 20px 0;
  overflow: visible;
}

.leadFilters input {
  min-width: 0;
}

.leadFilters .filterControl,
.leadFilters .rangeFilter {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  line-height: 17px;
  color: #50667a;
}

.rangeFilter > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rangeFilter input {
  width: 85px;
  padding: 10px;
}

.leadFilters input:not([type="checkbox"]),
.leadFilters select,
.leadFilters .tierFilter {
  height: 44px;
  box-sizing: border-box;
}

.leadFilters .tierFilter[open] {
  min-width: min(340px, 100%);
  height: auto;
}

.leadFilters .tierFilter > div {
  position: static;
  inset: auto;
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(45px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.leadFilters .filterActions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.leadFilters .filterActions button {
  height: 44px;
}

.leadListHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  color: #50667a;
}

.leadCenter .operatorDetail {
  padding: 24px;
  margin: 20px 0;
}

.leadCenter .operatorDetail .detailHeading {
  margin-bottom: 20px;
}

.leadCenter .operatorDetail .detailHeading > button {
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
}

.leadCenter .mobileSort {
  display: none;
}

.leadCenter .leadPagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  margin: 20px 0;
}

.leadCenter .leadPagination button,
.leadCenter .leadPagination select {
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 14px;
  font: inherit;
  line-height: 20px;
}

@media (min-width: 901px) {
  .cc.leadCenter {
    max-width: 100%;
    width: 100%;
    padding: 16px 20px 36px;
  }
  .leadCenter .panel.operatorDetail {
    overflow: visible;
  }
  .leadCenter .leadTableViewport {
    position: static;
    overflow-x: auto;
    width: 100%;
    isolation: isolate;
  }
  .leadCenter .leadTableViewport > table {
    border-collapse: separate;
    border-spacing: 0;
  }
  .leadCenter .leadTableViewport > table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafb;
    box-shadow: 0 1px 0 #dce5eb;
  }
  .cc.leadCenter .leadListTable {
    width: 100%;
    min-width: 960px;
    table-layout: fixed;
    font-size: 13px;
  }
  .leadCenter .leadListTable th,
  .leadCenter .leadListTable td {
    padding: 10px 8px;
    overflow-wrap: anywhere;
  }
  .leadCenter .leadListTable th {
    vertical-align: top;
    white-space: normal;
  }
  .leadCenter .leadListTable th > div {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    align-items: center;
  }
  .leadCenter .leadListTable .leadColAvatar { width: 52px; }
  .leadCenter .leadListTable .leadColCreator { width: 19%; }
  .leadCenter .leadListTable .leadColRank { width: 15%; }
  .leadCenter .leadListTable .leadColAverage { width: 11%; }
  .leadCenter .leadListTable .leadColLive { width: 12.5%; }
  .leadCenter .leadListTable .leadColExpiry { width: 14%; }
  .leadCenter .leadListTable .leadColTicket { width: 10%; }
  .leadCenter .leadListTable .leadColActions { width: 12.5%; }
}

/* Standalone Ops/Insights Cards */
.metricCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metricCard {
  background: #fff;
  border: 1px solid #dce5eb;
  border-radius: 12px;
  padding: 18px 20px;
}

.metricCard span {
  font-size: 13px;
  color: #50667a;
}

.metricCard strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .admin {
    padding: 28px 22px;
  }
  .leadOverview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin .scroll {
    position: relative;
    max-height: 70vh;
    overflow: auto;
    scrollbar-gutter: stable;
  }
  .leadCenter .leadListTable colgroup {
    display: none;
  }
  .leadCenter .mobileSort {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .leadCenter .leadListHeading {
    flex-wrap: wrap;
    gap: 12px;
  }
  .leadCenter .mobileSort select,
  .leadCenter .mobileSort button {
    padding: 8px;
    font-size: 12px;
  }
  .operatorConsole .leadListTable,
  .operatorConsole .leadListTable tbody,
  .operatorConsole .leadListTable tr,
  .operatorConsole .leadListTable td {
    display: block;
    width: auto;
  }
  .operatorConsole .leadListTable thead {
    display: none;
  }
  .operatorConsole .leadListTable tr {
    padding: 12px;
    border-bottom: 1px solid #c7d5df;
  }
  .operatorConsole .leadListTable td {
    padding: 10px;
    border: 0;
  }
  .operatorConsole .leadListTable td::before {
    content: attr(data-label);
    display: block;
    color: #50667a;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .leadActions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .admin {
    padding: 22px 12px;
  }
  .cc {
    padding: 22px 12px;
  }
  .pageHeader h1 {
    font-size: 25px;
  }
  .admin .tabs {
    gap: 14px;
    margin-bottom: 20px;
  }
  .admin .tabs button {
    font-size: 14px;
  }
  .inventorySummary {
    padding: 0 18px 18px;
    gap: 10px;
  }
  .inventorySummary strong {
    font-size: 26px;
  }
  .allocationFilters {
    grid-template-columns: 1fr;
  }
  .allocationSummary {
    gap: 10px;
    padding: 12px;
  }
  .allocationSummary strong {
    font-size: 21px;
  }
  .healthStrip {
    padding: 14px;
    gap: 12px;
  }
  .healthStrip > .textButton {
    margin-left: 0;
  }
  dialog.modal {
    padding: 20px;
  }
}
