:root {
  color-scheme: dark;
  --bg: #081016;
  --bg-2: #0c171f;
  --surface: #101c24;
  --surface-2: #13232d;
  --panel: rgba(16, 28, 36, 0.92);
  --panel-soft: rgba(19, 35, 45, 0.72);
  --border: #263a47;
  --border-strong: #385260;
  --text: #f4f7f8;
  --muted: #99a9b2;
  --muted-2: #70828d;
  --green: #38c96d;
  --green-2: #179b50;
  --red: #ff5247;
  --yellow: #f1b72b;
  --blue: #3aa9ff;
  --orange: #ff8a2c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 122, 82, 0.11), transparent 27rem),
    radial-gradient(circle at 88% 20%, rgba(45, 150, 210, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(7, 14, 20, 0.98), rgba(9, 18, 25, 0.92));
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0 4px 28px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.brand .mark {
  color: var(--green);
  font-size: 18px;
  letter-spacing: 0;
}

.brand.client-brand {
  display: grid;
  align-items: start;
  gap: 4px;
  font-size: 21px;
  line-height: 1.02;
}

.brand.client-brand .mark {
  color: var(--blue);
  font-size: 12px;
}

.brand.logo-brand {
  align-items: center;
  width: calc(100% - 8px);
  margin: 0 4px 28px;
  padding: 9px;
  border: 1px solid rgba(56, 201, 109, 0.18);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.brand.logo-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.brand.logo-brand.transjordano-brand {
  border-color: rgba(58, 169, 255, 0.26);
  background: #071018;
}

.brand.logo-brand.transjordano-brand img {
  border-radius: 6px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav button,
.nav a {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav button.is-active,
.nav a.is-active {
  border-color: rgba(56, 201, 109, 0.45);
  background: linear-gradient(180deg, rgba(56, 201, 109, 0.12), rgba(56, 201, 109, 0.05));
  color: var(--text);
}

.nav button.demo-locked {
  position: relative;
  cursor: not-allowed;
}

.nav button.demo-locked:hover {
  border-color: rgba(241, 183, 43, 0.46);
  background: rgba(241, 183, 43, 0.08);
  color: #f8d677;
}

.nav button.demo-locked:hover::after,
.nav button.demo-locked:focus-visible::after {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 7px;
  border: 1px solid rgba(241, 183, 43, 0.52);
  border-radius: 999px;
  background: #151b1b;
  color: #f8d677;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  content: attr(data-demo-tip);
}

.nav svg,
.top-actions svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contract-nav {
  display: grid;
  gap: 7px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.contract-nav > span {
  padding: 0 4px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.contract-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.contract-link.is-active,
.contract-link:hover {
  border-color: rgba(58, 169, 255, 0.36);
  background: rgba(58, 169, 255, 0.08);
  color: var(--text);
}

.user {
  position: absolute;
  right: 16px;
  bottom: 22px;
  left: 16px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #119b6b, #174e50);
  color: white;
  font-weight: 700;
}

.avatar.client-avatar {
  background: linear-gradient(135deg, #2f8d7c, #1d4f7a);
}

.user strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

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

.main {
  min-width: 0;
  padding: 22px 24px 30px;
}

.selector-page {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  align-content: start;
  justify-items: center;
  gap: 22px;
  padding: 42px 48px 52px;
  overflow: hidden;
}

.selector-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 360px;
  background: url("/assets/brand/dadalto-bi-pattern.svg") center top / cover no-repeat;
  opacity: 0.68;
  pointer-events: none;
}

.selector-page > * {
  width: min(1180px, 100%);
}

.selector-head {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 980px;
  text-align: center;
}

.selector-brand {
  display: inline-grid;
  justify-items: center;
  width: min(278px, 72vw);
  padding: 10px 14px;
  border: 1px solid rgba(56, 201, 109, 0.18);
  border-radius: 10px;
  background: rgba(8, 16, 22, 0.54);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  color: inherit;
  text-decoration: none;
}

.selector-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.selector-head h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
}

.selector-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.contract-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.selector-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  max-width: 1180px;
}

.contract-card {
  display: grid;
  gap: 10px;
  min-height: 178px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 31, 40, 0.96), rgba(11, 21, 29, 0.96));
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}

.contract-card:hover {
  border-color: rgba(56, 201, 109, 0.48);
}

.contract-card.client-card:hover {
  border-color: rgba(58, 169, 255, 0.5);
}

.contract-card-kicker,
.contract-card span {
  color: var(--muted);
  font-size: 12px;
}

.contract-card-kicker {
  font-weight: 800;
  text-transform: uppercase;
}

.contract-card strong {
  font-size: 27px;
  line-height: 1;
}

.contract-card em {
  color: #b9c8cf;
  font-style: normal;
  font-weight: 750;
}

.contract-card b {
  align-self: end;
  width: max-content;
  padding: 9px 12px;
  border: 1px solid var(--green-2);
  border-radius: 6px;
  color: #8cf0aa;
  font-size: 13px;
}

.contract-card.client-card b {
  border-color: rgba(58, 169, 255, 0.58);
  color: #8bd0ff;
}

.contract-card.public-card {
  border-color: rgba(241, 183, 43, 0.34);
  background: linear-gradient(180deg, rgba(38, 31, 15, 0.82), rgba(15, 20, 22, 0.94));
}

.contract-card.public-card b {
  border-color: rgba(241, 183, 43, 0.68);
  color: #ffd77e;
}

.strategy-board {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 27, 36, 0.96), rgba(8, 17, 24, 0.96));
  box-shadow: var(--shadow);
}

.strategy-board-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.strategy-board-head span,
.strategy-kicker {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.strategy-board-head h2,
.strategy-copy h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.05;
}

.strategy-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.strategy-board-head a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.strategy-board-head a:hover {
  border-color: rgba(56, 201, 109, 0.45);
  color: var(--text);
}

.strategy-board-head a.demo-link {
  border-color: rgba(241, 183, 43, 0.58);
  color: #ffd77e;
}

.strategy-board-head a.demo-link:hover {
  border-color: rgba(241, 183, 43, 0.8);
  color: #ffe4a8;
}

.strategy-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.strategy-tabs::-webkit-scrollbar {
  display: none;
}

.strategy-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(14, 25, 34, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.strategy-tabs button.is-active {
  border-color: rgba(56, 201, 109, 0.52);
  background: rgba(56, 201, 109, 0.12);
  color: #a2efb8;
}

.strategy-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(9, 18, 25, 0.74);
  padding: 20px;
}

.strategy-copy {
  display: grid;
  gap: 16px;
}

.strategy-copy p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.strategy-columns > div,
.lead-scorecard,
.opportunity-grid article,
.brand-name-grid article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(18, 31, 40, 0.7);
}

.strategy-columns > div {
  padding: 16px;
}

.strategy-copy h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.strategy-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strategy-list li {
  position: relative;
  padding-left: 16px;
  color: #c8d5dc;
  font-size: 13px;
  line-height: 1.45;
}

.strategy-list li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.strategy-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strategy-pill-list span,
.reach-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(58, 169, 255, 0.34);
  border-radius: 999px;
  background: rgba(58, 169, 255, 0.08);
  color: #9bd6ff;
  font-size: 12px;
  font-weight: 780;
}

.strategy-callout {
  border-left: 3px solid var(--green);
  padding: 13px 14px;
  background: rgba(56, 201, 109, 0.08);
  color: #d6f3de;
  font-size: 14px;
  line-height: 1.5;
}

.brand-name-grid,
.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brand-name-grid article,
.opportunity-grid article {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.brand-name-grid strong {
  font-size: 18px;
}

.brand-name-grid span,
.opportunity-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.opportunity-grid article > span {
  width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(241, 183, 43, 0.38);
  border-radius: 999px;
  color: #ffd36d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.opportunity-grid h3 {
  margin: 0;
}

.lead-scorecard {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.lead-scorecard-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.lead-scorecard-head h3 {
  margin-bottom: 4px;
}

.lead-scorecard-head strong {
  align-self: start;
  padding: 8px 10px;
  border: 1px solid rgba(56, 201, 109, 0.42);
  border-radius: 6px;
  color: #9af0b2;
  font-size: 18px;
}

.score-weights {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.score-weights div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(6, 14, 20, 0.52);
}

.score-weights strong {
  color: var(--green);
  font-size: 18px;
}

.score-weights span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.lead-table-wrap {
  overflow-x: auto;
}

.lead-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.lead-table th,
.lead-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  color: #cbd8de;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  vertical-align: top;
}

.lead-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.lead-table td:first-child {
  width: 210px;
}

.lead-table td:first-child strong,
.lead-table td:first-child span {
  display: block;
}

.lead-table td:first-child span {
  margin-top: 3px;
  color: var(--muted);
}

.lead-table a {
  color: #9bd6ff;
  font-weight: 800;
  text-decoration: none;
}

.lead-table a:hover {
  color: #c7ebff;
}

.lead-card-list {
  display: grid;
  gap: 10px;
}

.lead-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 16, 23, 0.58);
}

.lead-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.lead-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
}

.lead-card-top span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.lead-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lead-card-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(56, 201, 109, 0.34);
  border-radius: 999px;
  color: #9af0b2;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

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

.lead-card dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.lead-card dd {
  margin: 0;
  color: #cbd8de;
  font-size: 12px;
  line-height: 1.4;
}

.lead-source-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lead-source-summary > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.lead-source-summary a {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(58, 169, 255, 0.2);
  border-radius: 6px;
  color: #9bd6ff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
}

.lead-source-summary a:hover {
  border-color: rgba(58, 169, 255, 0.44);
  color: #c6eaff;
}

.lead-source-summary a em {
  color: #b7c6cc;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.strategy-copy code {
  padding: 2px 5px;
  border: 1px solid rgba(58, 169, 255, 0.22);
  border-radius: 4px;
  background: rgba(58, 169, 255, 0.08);
  color: #9bd6ff;
  font-size: 0.92em;
}

.contact-admin-state,
.contact-admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 16, 23, 0.58);
}

.contact-admin-state {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.contact-admin-state strong {
  font-size: 17px;
}

.contact-admin-state span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.contact-admin-state.is-error {
  border-color: rgba(255, 82, 71, 0.36);
  background: rgba(255, 82, 71, 0.08);
}

.contact-admin-list {
  display: grid;
  gap: 10px;
}

.contact-admin-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.contact-admin-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.contact-admin-card header strong,
.contact-admin-card header span {
  display: block;
}

.contact-admin-card header strong {
  font-size: 16px;
}

.contact-admin-card header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.contact-admin-card header b {
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(56, 201, 109, 0.34);
  border-radius: 999px;
  color: #9af0b2;
  font-size: 10px;
  text-transform: uppercase;
}

.contact-admin-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.contact-admin-card dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-admin-card dd {
  margin: 0;
  color: #d6e0e4;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.contact-admin-card p {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd8de;
  font-size: 13px;
  line-height: 1.48;
}

.admin-tools {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.admin-search,
.admin-create-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(68, 92, 105, 0.5);
  border-radius: var(--radius);
  background: rgba(8, 17, 24, 0.46);
}

.admin-search {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

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

.admin-create-form .wide {
  grid-column: 1 / -1;
}

.admin-search label,
.admin-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-search input,
.admin-create-form input,
.admin-create-form select,
.admin-create-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0b1821;
  color: var(--text);
  padding: 0 10px;
}

.admin-create-form textarea {
  min-height: 70px;
  padding: 10px;
  resize: vertical;
}

.admin-search button,
.admin-create-form button,
.admin-pagination button {
  min-height: 38px;
  border: 1px solid rgba(56, 201, 109, 0.42);
  border-radius: 6px;
  background: rgba(56, 201, 109, 0.12);
  color: #9ff2ba;
  font-weight: 850;
  cursor: pointer;
}

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

.admin-notice {
  padding: 10px 12px;
  border: 1px solid rgba(58, 169, 255, 0.38);
  border-radius: 7px;
  background: rgba(58, 169, 255, 0.08);
  color: #b7e1ff;
  font-size: 13px;
  font-weight: 750;
}

.admin-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-user-card dl {
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
}

.admin-user-card dd > span {
  display: block;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.template-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(68, 92, 105, 0.54);
  border-radius: var(--radius);
  background: rgba(8, 17, 24, 0.52);
}

.template-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.template-card header b {
  color: #9ff2ba;
}

.template-card h3 {
  margin: 0;
  font-size: 18px;
}

.template-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.template-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.template-card dl div {
  display: grid;
  gap: 3px;
}

.template-card dt,
.template-card dd {
  margin: 0;
  font-size: 12px;
}

.template-card dt {
  color: var(--muted-2);
  font-weight: 850;
  text-transform: uppercase;
}

.template-card dd {
  color: #d7e2e7;
  overflow-wrap: anywhere;
}

.score-badge {
  display: inline-grid;
  width: 42px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(56, 201, 109, 0.48);
  border-radius: 6px;
  background: rgba(56, 201, 109, 0.1);
  color: #9af0b2;
  cursor: default;
  font-family: inherit;
  font-size: 16px;
  font-weight: 850;
  padding: 0;
}

.score-badge:focus-visible {
  outline: 2px solid rgba(154, 240, 178, 0.65);
  outline-offset: 3px;
}

.score-popover-wrap {
  position: relative;
  display: inline-grid;
  justify-items: end;
}

.score-popover {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: auto;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(460px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(154, 240, 178, 0.22);
  border-radius: 8px;
  background: rgba(10, 22, 30, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity 140ms ease, transform 140ms ease;
  visibility: hidden;
}

.score-popover-wrap:hover .score-popover,
.score-popover-wrap:focus-within .score-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.score-popover strong {
  color: #f4fbf7;
  font-size: 13px;
}

.score-popover small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.score-popover ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.score-popover li {
  display: grid;
  gap: 5px;
}

.score-popover-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #dce7e2;
  font-size: 11px;
  font-weight: 800;
}

.score-popover-row input {
  width: 13px;
  height: 13px;
  accent-color: #38c96d;
  pointer-events: none;
}

.score-popover-row b {
  color: #9af0b2;
  font-size: 11px;
}

.score-popover-meter {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-popover-meter::before {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38c96d, #f5cf4c);
  content: "";
}

.score-popover em {
  color: #b7c6cc;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.score-popover-total {
  padding: 7px 8px;
  border: 1px solid rgba(154, 240, 178, 0.18);
  border-radius: 6px;
  background: rgba(56, 201, 109, 0.07);
  color: #d7eee0;
  font-size: 11px;
  font-weight: 800;
}

.score-popover-sources {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.score-popover-sources > b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.score-popover-sources a {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(58, 169, 255, 0.2);
  border-radius: 6px;
  color: #9bd6ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.score-popover-sources a:hover {
  border-color: rgba(58, 169, 255, 0.44);
  color: #c6eaff;
}

.score-popover-sources a em {
  color: #b7c6cc;
  font-size: 10px;
  font-weight: 650;
}

.score-breakdown {
  border: 1px solid rgba(154, 240, 178, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 24, 0.42);
}

.score-breakdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 11px;
  color: #9af0b2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.score-breakdown summary::-webkit-details-marker {
  display: none;
}

.score-breakdown summary::before {
  width: 16px;
  color: var(--muted);
  content: "+";
  font-size: 14px;
}

.score-breakdown[open] summary::before {
  content: "-";
}

.score-breakdown summary span {
  flex: 1;
}

.score-breakdown summary b {
  display: inline-grid;
  min-width: 56px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(56, 201, 109, 0.42);
  border-radius: 6px;
  background: rgba(56, 201, 109, 0.08);
  color: #9af0b2;
  font-size: 12px;
}

.score-breakdown-body {
  display: grid;
  gap: 12px;
  padding: 0 11px 12px;
}

.score-breakdown-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.score-breakdown-list {
  display: grid;
  gap: 10px;
}

.score-breakdown-item {
  display: grid;
  gap: 5px;
}

.score-breakdown-item label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: #dce7e2;
  font-size: 12px;
  font-weight: 850;
}

.score-breakdown-item input {
  width: 13px;
  height: 13px;
  accent-color: #38c96d;
  pointer-events: none;
}

.score-breakdown-item label b {
  color: #9af0b2;
  font-size: 12px;
}

.score-breakdown-item i {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-breakdown-item i::before {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38c96d, #f5cf4c);
  content: "";
}

.score-breakdown-item em {
  color: #b7c6cc;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.score-breakdown-total {
  padding: 8px 9px;
  border: 1px solid rgba(154, 240, 178, 0.18);
  border-radius: 6px;
  background: rgba(56, 201, 109, 0.07);
  color: #d7eee0;
  font-size: 12px;
}

.score-breakdown-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.score-breakdown-sources > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.score-breakdown-sources a {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(58, 169, 255, 0.2);
  border-radius: 6px;
  color: #9bd6ff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
}

.score-breakdown-sources a:hover {
  border-color: rgba(58, 169, 255, 0.44);
  color: #c6eaff;
}

.score-breakdown-sources a em {
  color: #b7c6cc;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 18px;
}

.title h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  white-space: nowrap;
}

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

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.field select,
.field input {
  height: 38px;
  min-width: 126px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0d171f;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.field input {
  min-width: 142px;
}

.field select:focus,
.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(56, 201, 109, 0.14);
}

.export {
  display: inline-grid;
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin-top: 17px;
  padding: 0 16px;
  border: 1px solid var(--green-2);
  border-radius: 6px;
  background: rgba(56, 201, 109, 0.08);
  color: #7ff0a3;
  font-weight: 750;
  cursor: pointer;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.panel,
.kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 31, 40, 0.96), rgba(11, 21, 29, 0.96));
  box-shadow: var(--shadow);
}

.kpi {
  min-height: 205px;
  padding: 13px 11px 11px;
  overflow: hidden;
}

.kpi h2,
.panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kpi .unit {
  color: var(--muted);
  font-size: 11px;
}

.gauge {
  display: block;
  width: 100%;
  height: 98px;
  margin-top: 7px;
  overflow: visible;
}

.gauge .track {
  stroke: #1a2a34;
  stroke-width: 13;
  fill: none;
  stroke-linecap: round;
}

.gauge .zone-red,
.gauge .zone-yellow,
.gauge .zone-green {
  stroke-width: 13;
  fill: none;
  stroke-linecap: round;
  opacity: 0.92;
}

.zone-red {
  stroke: var(--red);
}

.zone-yellow {
  stroke: var(--yellow);
}

.zone-green {
  stroke: var(--green);
}

.needle {
  stroke: #dce7eb;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.needle-dot {
  fill: #dce7eb;
}

.needle.red,
.kpi[data-status="red"] .needle-dot {
  stroke: var(--red);
  fill: var(--red);
}

.needle.yellow,
.kpi[data-status="yellow"] .needle-dot {
  stroke: var(--yellow);
  fill: var(--yellow);
}

.needle.green,
.kpi[data-status="green"] .needle-dot {
  stroke: var(--green);
  fill: var(--green);
}

.needle.neutral,
.kpi[data-status="neutral"] .needle-dot {
  stroke: var(--green);
  fill: var(--green);
}

.gauge-value {
  margin-top: -22px;
  text-align: center;
  font-size: 23px;
  font-weight: 850;
}

.kpi[data-status="red"] .gauge-value,
.kpi-foot b.bad {
  color: var(--red);
}

.kpi[data-status="yellow"] .gauge-value,
.kpi-foot b.warn {
  color: var(--yellow);
}

.kpi[data-status="green"] .gauge-value,
.kpi-foot b.good {
  color: var(--green);
}

.kpi[data-status="neutral"] .gauge-value,
.kpi-foot b.neutral {
  color: var(--green);
}

.gauge-sub {
  min-height: 17px;
  margin-top: 2px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.kpi-foot {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.kpi-foot b {
  color: var(--green);
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 0.85fr);
  gap: 12px;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-head .meta {
  color: var(--muted);
  font-size: 12px;
}

.chart {
  width: 100%;
  height: 270px;
}

.axis,
.grid-line {
  stroke: rgba(145, 166, 177, 0.15);
}

.axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.axis-label-right {
  fill: #f4b96a;
}

.chart-divider {
  stroke: rgba(241, 183, 43, 0.28);
  stroke-dasharray: 5 5;
}

.trips-grid {
  stroke: rgba(241, 183, 43, 0.12);
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
}

.impact-stack {
  display: grid;
  gap: 8px;
}

.impact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(241, 183, 43, 0.4);
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(241, 183, 43, 0.11), rgba(241, 183, 43, 0.04));
}

.impact.red {
  border-color: rgba(255, 82, 71, 0.46);
  background: linear-gradient(90deg, rgba(255, 82, 71, 0.12), rgba(255, 82, 71, 0.04));
}

.impact.blue {
  border-color: rgba(58, 169, 255, 0.42);
  background: linear-gradient(90deg, rgba(58, 169, 255, 0.12), rgba(58, 169, 255, 0.04));
}

.impact strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
}

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

.impact .count {
  min-width: 54px;
  text-align: right;
  font-size: 25px;
  font-weight: 850;
}

.impact.red .count {
  color: var(--red);
}

.impact.yellow .count {
  color: var(--yellow);
}

.impact.blue .count {
  color: var(--blue);
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(520px, 1fr);
  gap: 12px;
  margin-top: 12px;
}

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

th,
td {
  border-bottom: 1px solid rgba(68, 92, 105, 0.45);
  padding: 7px 8px;
  text-align: left;
  font-size: 12px;
}

th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

td.num,
th.num {
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  background: rgba(56, 201, 109, 0.12);
  color: #9ff2b4;
  font-size: 11px;
  font-weight: 750;
}

.pill.red {
  background: rgba(255, 82, 71, 0.13);
  color: #ff958e;
}

.pill.yellow {
  background: rgba(241, 183, 43, 0.13);
  color: #f8cf68;
}

.priority {
  width: 68px;
  justify-content: center;
}

.heatmap-wrap {
  overflow: auto;
  padding-bottom: 2px;
}

.heatmap {
  min-width: 670px;
}

.heatmap th,
.heatmap td {
  padding: 5px 6px;
  text-align: center;
}

.heatmap th:first-child,
.heatmap td:first-child,
.heatmap th:nth-child(2),
.heatmap td:nth-child(2) {
  text-align: left;
}

.heat-cell {
  min-width: 28px;
  border-radius: 2px;
  color: white;
  font-weight: 750;
}

.heat-0 {
  background: #24313a;
  color: #748692;
}

.heat-1,
.heat-2 {
  background: #c83e38;
}

.heat-3,
.heat-4 {
  background: #d1a126;
  color: #101820;
}

.heat-5,
.heat-6,
.heat-7,
.heat-8 {
  background: #2ea754;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.detail-grid > article:only-child {
  grid-column: 1 / -1;
}

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

.product-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(68, 92, 105, 0.45);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(56, 201, 109, 0.13);
  color: #9ff2b4;
  font-size: 11px;
  font-weight: 800;
}

.product-item strong {
  display: block;
  font-size: 13px;
}

.product-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.status-line b {
  color: var(--text);
}

.distance-bars {
  display: grid;
  gap: 9px;
  max-height: 332px;
  overflow: auto;
  padding-right: 2px;
}

.distance-row {
  display: grid;
  grid-template-columns: 48px minmax(130px, 1fr) 108px;
  gap: 9px;
  align-items: center;
}

.distance-label,
.distance-meta {
  color: var(--muted);
  font-size: 11px;
}

.distance-meta {
  text-align: right;
}

.distance-track {
  position: relative;
  display: flex;
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(68, 92, 105, 0.55);
  border-radius: 3px;
  background: #172630;
}

.distance-track span {
  display: block;
  min-width: 2px;
}

.distance-track .asphalt {
  background: linear-gradient(90deg, #3aa9ff, #38c96d);
}

.distance-track .dirt {
  background: linear-gradient(90deg, #f1b72b, #ff8a2c);
}

.distance-track .revenue {
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.distance-track .queue {
  background: linear-gradient(90deg, #f1b72b, #ff8a2c);
}

.revenue-bars {
  max-height: 332px;
}

.revenue-row {
  grid-template-columns: 48px minmax(130px, 1fr) 124px;
}

.action-board {
  margin-top: 12px;
}

.action-page-badge {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(241, 183, 43, 0.52);
  border-radius: 999px;
  background: rgba(241, 183, 43, 0.08);
  color: #f8d677;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-board-head {
  align-items: start;
}

.action-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.action-filter span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.action-filter input {
  width: 136px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0b1821;
  color: var(--muted);
  padding: 0 8px;
}

.action-filter b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(241, 183, 43, 0.52);
  border-radius: 999px;
  color: #f8d677;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.kanban-column {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 254px;
  padding: 10px;
  border: 1px solid rgba(68, 92, 105, 0.48);
  border-radius: var(--radius);
  background: rgba(8, 17, 24, 0.58);
}

.kanban-column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.kanban-column header span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(58, 169, 255, 0.36);
  border-radius: 50%;
  color: #9bd6ff;
  font-size: 11px;
}

.kanban-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 12px 12px 12px 28px;
  border: 1px solid rgba(68, 92, 105, 0.55);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(18, 31, 40, 0.92), rgba(11, 21, 29, 0.94));
  cursor: not-allowed;
}

.kanban-card:hover {
  border-color: rgba(241, 183, 43, 0.5);
}

.kanban-card:hover::after {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(241, 183, 43, 0.12);
  color: #f8d677;
  font-size: 10px;
  font-weight: 900;
  content: "Demo";
}

.drag-handle {
  position: absolute;
  top: 12px;
  left: 10px;
  color: var(--muted-2);
  font-size: 14px;
  letter-spacing: -3px;
}

.kanban-card strong {
  padding-right: 48px;
  font-size: 13px;
}

.kanban-card > span {
  color: var(--muted);
  font-size: 12px;
}

.kanban-card dl {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
}

.kanban-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(68, 92, 105, 0.34);
  padding-top: 4px;
}

.kanban-card dt,
.kanban-card dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.kanban-card dd {
  color: #d7e2e7;
  text-align: right;
  font-weight: 750;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ops-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(68, 92, 105, 0.45);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.ops-card span,
.ops-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.ops-card strong {
  display: block;
  margin: 4px 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-table {
  margin-top: 8px;
}

.empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1320px) {
  .shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .brand {
    justify-content: center;
    font-size: 18px;
  }

  .brand.logo-brand {
    width: 52px;
    margin: 0 0 18px;
    padding: 5px;
  }

  .brand.client-brand {
    justify-items: center;
    width: 52px;
    overflow: hidden;
    text-align: center;
    font-size: 9px;
    line-height: 1.05;
    word-break: break-word;
  }

  .brand.client-brand span:first-child {
    display: inline;
  }

  .brand.client-brand .mark {
    display: none;
  }

  .brand span:first-child,
  .nav button span:last-child,
  .nav a span:last-child,
  .contract-nav > span,
  .contract-link,
  .user div:last-child {
    display: none;
  }

  .brand.client-brand span:first-child {
    display: inline;
  }

  .brand.client-brand .mark {
    display: none;
  }

  .nav button,
  .nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .contract-nav {
    margin-top: 12px;
    padding-top: 12px;
  }

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

  .contract-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-name-grid,
  .opportunity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .content-grid,
  .lower-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 5;
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    display: flex;
    justify-content: start;
    margin: 0;
    font-size: 22px;
  }

  .brand.logo-brand {
    display: grid;
    width: 108px;
    margin: 0;
    padding: 5px;
  }

  .brand span:first-child {
    display: inline;
  }

  .brand .mark {
    display: inline;
    font-size: 13px;
  }

  .nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button,
  .nav a {
    min-width: 42px;
  }

  .contract-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    margin-top: 0;
    padding-top: 10px;
    overflow-x: auto;
  }

  .contract-nav > span {
    display: none;
  }

  .contract-link {
    display: flex;
    flex: 0 0 auto;
  }

  .user {
    display: none;
  }

  .main {
    padding: 16px 12px 22px;
  }

  .selector-page {
    align-content: start;
    padding: 28px 14px;
  }

  .selector-head h1 {
    font-size: 32px;
  }

  .contract-card-grid {
    grid-template-columns: 1fr;
  }

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

  .strategy-board {
    padding: 14px;
  }

  .strategy-board-head {
    display: grid;
  }

  .strategy-board-head h2,
  .strategy-copy h2 {
    font-size: 23px;
  }

  .strategy-panel {
    padding: 14px;
  }

  .strategy-columns,
  .brand-name-grid,
  .opportunity-grid {
    grid-template-columns: 1fr;
  }

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

  .lead-scorecard {
    padding: 12px;
  }

  .lead-scorecard-head {
    display: grid;
  }

  .lead-card dl {
    grid-template-columns: 1fr;
  }

  .contact-admin-card dl {
    grid-template-columns: 1fr;
  }

  .score-popover {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: auto;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 32px);
  }

  .lead-source-summary,
  .score-breakdown-sources {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .title h1 {
    font-size: 27px;
    white-space: normal;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .field select,
  .field input,
  .export {
    width: 100%;
    min-width: 0;
  }

  .export {
    grid-column: 1 / -1;
    margin-top: 0;
    justify-content: center;
  }

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

  .kpi {
    min-height: 190px;
  }

  .panel {
    overflow: auto;
  }

  .chart {
    min-width: 680px;
  }

  table {
    min-width: 720px;
  }

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

  .distance-row {
    grid-template-columns: 44px minmax(120px, 1fr);
  }

  .distance-meta {
    grid-column: 2;
    text-align: left;
  }

  .heatmap {
    min-width: 640px;
  }
}
