.panel-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgba(62, 242, 162, 0.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(155, 135, 255, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(96, 165, 250, 0.1), transparent 42%),
    #05070b;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(62, 242, 162, 0.08), rgba(96, 165, 250, 0.06)),
    rgba(8, 13, 20, 0.9);
  padding: clamp(24px, 5vw, 42px);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.45);
}

.auth-brand {
  margin-bottom: 36px;
}

.auth-card h1 {
  font-size: clamp(42px, 8vw, 78px);
}

.auth-card p {
  color: var(--muted);
  line-height: 1.55;
}

.client-shell {
  align-items: start;
}

.client-portal-card {
  width: min(980px, 100%);
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.portal-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-form h2 {
  margin: 0;
  color: #fff;
}

.portal-form p {
  margin: 0;
  color: #d8e2ee;
}

.portal-form input,
.portal-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 7, 11, 0.72);
  color: #fff;
  padding: 12px;
  font: inherit;
}

.portal-form textarea {
  min-height: 110px;
  resize: vertical;
}

.markup-tool {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 7, 11, 0.72);
  overflow: hidden;
}

.edit-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.edit-categories legend {
  width: 100%;
  color: var(--green);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.edit-categories label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.edit-categories input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.markup-tool iframe,
.markup-tool canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.markup-tool canvas {
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.markup-actions {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
}

.markup-actions .button {
  min-height: 38px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
}

.form-msg {
  min-height: 22px;
  color: var(--red);
  font-size: 14px;
}

.small-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.small-link::before {
  content: "↗";
  margin-right: 7px;
}

.form-msg.ok {
  color: var(--green);
}

.dash-shell {
  padding: 130px clamp(20px, 6vw, 72px) 72px;
}

.command-center {
  position: relative;
}

.command-center::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000, transparent 86%);
}

.command-hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(143, 255, 224, 0.22);
}

.command-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, 0.095) 45%, transparent 54% 100%);
  animation: adminSweep 8s ease-in-out infinite;
}

.command-hero > * {
  position: relative;
  z-index: 1;
}

.dash-hero h1 {
  font-size: clamp(46px, 8vw, 104px);
}

.dash-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.provider-rack {
  border-block: 1px solid rgba(255, 255, 255, 0.09);
  mask-image: linear-gradient(90deg, #000 0 92%, transparent);
}

.provider-card,
.goal-card,
.ops-card,
.lead-card,
.small-card {
  border-radius: 0;
  background:
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--lane, #3ef2a2) 16%, transparent), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.032)),
    rgba(6, 12, 20, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 28px 84px rgba(0, 0, 0, 0.34);
}

.goal-panel {
  margin: 18px 0 6px;
}

.goal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 18px;
  align-items: end;
  padding: 20px;
  border: 1px solid rgba(62, 242, 162, 0.2);
}

.goal-card span,
.goal-form label {
  color: var(--green);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.9;
}

.goal-card p {
  margin: 10px 0 0;
  color: #d8e2ee;
}

.goal-form {
  display: grid;
  gap: 10px;
}

.goal-form label {
  display: grid;
  gap: 8px;
}

.goal-form input,
.goal-form button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(5, 7, 11, 0.72);
  color: #fff;
  padding: 0 12px;
  font: inherit;
  font-weight: 900;
}

.goal-form button {
  background: linear-gradient(135deg, #fff, var(--green));
  color: #04110c;
  cursor: pointer;
}

.goal-meter {
  grid-column: 1 / -1;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.goal-meter span {
  display: block;
  width: var(--goal, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  box-shadow: 0 0 22px rgba(62, 242, 162, 0.34);
}

.provider-card {
  min-height: 260px;
}

.provider-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-topline b {
  color: var(--yellow);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
}

.provider-card.on .provider-topline b {
  color: var(--green);
}

.spend-meter {
  display: grid;
  gap: 8px;
  margin: 16px 0 12px;
}

.spend-meter > div {
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.spend-meter span {
  display: block;
  width: var(--spend, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--yellow));
  box-shadow: 0 0 22px rgba(62, 242, 162, 0.34);
}

.spend-meter p,
.provider-note,
.provider-model {
  margin: 0;
  color: #d8e2ee;
  font-size: 13px;
  line-height: 1.45;
}

.provider-model {
  margin-top: 8px;
  color: #fff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
}

.model-stack {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.model-pill {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    rgba(5, 7, 11, 0.62);
}

.model-pill.preferred {
  border-color: rgba(62, 242, 162, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 24px rgba(62, 242, 162, 0.12);
}

.model-pill span,
.model-pill small {
  color: #9eb0c5;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-pill strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
}

.cap-control {
  display: grid;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cap-control input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(5, 7, 11, 0.72);
  color: #fff;
  padding: 0 11px;
  font: inherit;
}

.provider-card strong,
.ops-head strong {
  font-size: clamp(30px, 3vw, 46px);
  line-height: 0.92;
}

.dash-tabs {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 20px 70px rgba(0, 0, 0, 0.34);
}

.dash-tabs a {
  min-width: 104px;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(62, 242, 162, 0.055)),
    rgba(255, 255, 255, 0.055);
}

.ops-grid {
  align-items: start;
}

.ops-card {
  min-height: 142px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.ops-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 34px 96px rgba(0, 0, 0, 0.42);
}

.ops-card.is-collapsed {
  min-height: 0;
}

.ops-head {
  min-height: 82px;
}

.lane-toggle,
.card-actions button,
.provider-actions button,
.small-card button,
.contact-row a {
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 34px rgba(0, 0, 0, 0.24);
}

.card-actions button:first-child,
.small-card button:last-child {
  color: #04110c;
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(135deg, #fff, #8fffe0 60%, #60a5fa);
}

.empty-state {
  min-height: 98px;
  display: grid;
  place-items: center start;
  color: #e8f4ff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(62, 242, 162, 0.04)),
    rgba(255, 255, 255, 0.035);
}

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

.dash-card {
  min-height: 300px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(8, 13, 20, 0.82);
  padding: 24px;
}

.dash-card h2 {
  margin: 70px 0 12px;
  font-size: 28px;
}

.dash-card p {
  color: var(--muted);
  line-height: 1.55;
}

.dash-card .button {
  margin-top: 18px;
}

.status {
  display: inline-block;
  width: 14px;
  height: 14px;
  box-shadow: 0 0 22px currentColor;
}

.nav-button {
  color: var(--ink);
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 100, 124, 0.08)),
    rgba(255, 255, 255, 0.055);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.24);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.nav-button:hover {
  color: var(--red);
  border-color: rgba(255, 100, 124, 0.35);
  transform: translateY(-1px);
}

@keyframes adminSweep {
  0%,
  68%,
  100% {
    transform: translateX(-120%);
    opacity: 0;
  }
  78% {
    opacity: 1;
  }
  92% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .dash-shell {
    padding-top: 56px;
  }

  .command-center {
    width: min(100% - 24px, 720px);
  }

  .provider-rack {
    margin-inline: -12px;
    padding-left: 12px;
  }

  .provider-card {
    flex-basis: 86vw;
  }

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

  .ops-head {
    min-height: 74px;
  }

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

  .auth-shell {
    padding: 92px 14px 24px;
    place-items: start stretch;
  }

  .auth-card {
    padding: 24px;
    border-color: rgba(62, 242, 162, 0.22);
  }

  .auth-brand {
    margin-bottom: 30px;
  }

  .auth-card h1 {
    font-size: clamp(48px, 16vw, 72px);
  }
}
