:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --ink: #14263a;
  --muted: #637286;
  --line: #dce4ed;
  --line-strong: #cbd6e2;
  --navy: #102d4b;
  --navy-soft: #173d62;
  --blue: #1976d2;
  --blue-soft: #e8f2fd;
  --teal: #0c8c83;
  --orange: #d66b2c;
  --shadow: 0 14px 36px rgba(21, 51, 82, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 90% 2%, rgba(25, 118, 210, 0.08), transparent 30rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__inner {
  width: min(1460px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #fff;
  border-radius: 11px;
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1;
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.brand small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
}

.connection-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
}

.connection-note__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #63d9a3;
  box-shadow: 0 0 0 4px rgba(99, 217, 163, 0.13);
}

.app-shell {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 24px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.eyebrow,
.panel__eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.page-heading__description {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.summary {
  display: flex;
  gap: 10px;
}

.summary__item {
  min-width: 128px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  box-shadow: 0 6px 20px rgba(21, 51, 82, 0.04);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
}

.summary__item .icon {
  color: var(--blue);
}

.summary__item strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.group-panel,
.recent-panel {
  margin-bottom: 18px;
}

.section-label-row {
  min-height: 28px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-label-row h2 {
  margin: 0;
  font-size: 0.83rem;
  letter-spacing: 0.015em;
}

.section-label-row > span {
  color: var(--muted);
  font-size: 0.74rem;
}

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

.group-button {
  min-height: 74px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.group-button:hover {
  transform: translateY(-2px);
  border-color: #aebfd2;
  box-shadow: 0 8px 20px rgba(21, 51, 82, 0.07);
}

.group-button[aria-current="true"] {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 10px 24px rgba(16, 45, 75, 0.22);
}

.group-button__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--group-color, var(--blue));
  background: var(--group-tint, var(--blue-soft));
  border-radius: 11px;
}

.group-button[aria-current="true"] .group-button__icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.group-button__copy {
  min-width: 0;
}

.group-button__copy strong,
.group-button__copy small {
  display: block;
}

.group-button__copy strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-button__copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.group-button[aria-current="true"] .group-button__copy small {
  color: rgba(255, 255, 255, 0.62);
}

.recent-panel {
  padding: 12px 15px 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.recent-panel__title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.recent-panel__title .icon {
  width: 0.95rem;
  color: var(--blue);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.72rem;
}

.text-button:hover {
  color: #a23838;
  background: #fff0f0;
}

.text-button .icon {
  width: 0.84rem;
}

.recent-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.recent-link {
  max-width: 290px;
  padding: 9px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.75rem;
}

.recent-link:hover {
  color: var(--blue);
  border-color: #a9c9eb;
}

.recent-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-link .icon {
  width: 0.82rem;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(520px, 0.66fr);
  gap: 16px;
  align-items: stretch;
}

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

.panel {
  min-width: 0;
  height: min(630px, calc(100vh - 310px));
  min-height: 470px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.environment-panel[hidden] {
  display: none;
}

.panel__header {
  min-height: 52px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel__header h2 {
  margin: 0;
  font-size: 1.07rem;
  letter-spacing: -0.012em;
}

.panel__eyebrow {
  margin-bottom: 5px;
  font-size: 0.61rem;
}

.count-badge {
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  color: var(--navy-soft);
  background: var(--blue-soft);
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.search-field {
  height: 42px;
  margin-bottom: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #7d8b9d;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.search-field:focus-within {
  background: #fff;
  border-color: #77ade2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.11);
}

.search-field .icon {
  width: 1rem;
}

.search-field input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.8rem;
}

.search-field input::placeholder {
  color: #93a0af;
}

.environment-list {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #b8c6d5 transparent;
  scrollbar-width: thin;
}

.environment-button {
  width: 100%;
  min-height: 54px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
}

.environment-button:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.environment-button[aria-selected="true"] {
  color: var(--navy);
  background: var(--blue-soft);
  border-color: #c9def4;
}

.environment-button__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--blue);
  background: #fff;
  border: 1px solid #d5e5f5;
  border-radius: 9px;
}

.environment-button__icon .icon {
  width: 1rem;
}

.environment-button__copy {
  min-width: 0;
  flex: 1;
}

.environment-button__copy strong,
.environment-button__copy small {
  display: block;
}

.environment-button__copy strong {
  overflow: hidden;
  font-size: 0.79rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.environment-button__copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.environment-button .arrow {
  width: 0.92rem;
  color: #9ba8b7;
}

.environment-button[aria-selected="true"] .arrow {
  color: var(--blue);
}

.destination-heading {
  align-items: center;
}

.selected-environment {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.primary-link {
  min-height: 39px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--blue);
  border-radius: 10px;
  box-shadow: 0 7px 16px rgba(25, 118, 210, 0.2);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 750;
}

.primary-link:hover {
  background: #1268bb;
}

.primary-link .icon {
  width: 0.92rem;
}

.destination-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  flex: 1;
  overflow-y: auto;
  padding: 1px 5px 4px 1px;
  scrollbar-color: #b8c6d5 transparent;
  scrollbar-width: thin;
}

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

.destination-card {
  min-width: 0;
  min-height: 66px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.destination-card:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: #a9c9eb;
  box-shadow: 0 7px 16px rgba(21, 51, 82, 0.07);
}

.destination-card__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--teal);
  background: #e3f5f2;
  border-radius: 10px;
}

.destination-card__icon .icon {
  width: 1rem;
}

.destination-card__copy {
  min-width: 0;
  flex: 1;
}

.destination-card__copy strong,
.destination-card__copy small {
  display: block;
}

.destination-card__copy strong {
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.destination-card__copy small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.destination-card__external {
  width: 0.93rem;
  color: #9aa8b7;
}

.destination-card:hover .destination-card__external {
  color: var(--blue);
}

.empty-state {
  min-height: 180px;
  padding: 28px;
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  text-align: center;
  font-size: 0.8rem;
}

.footer {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  padding: 6px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #77879a;
  font-size: 0.68rem;
}

:focus-visible {
  outline: 3px solid rgba(25, 118, 210, 0.28);
  outline-offset: 2px;
}

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

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary {
    width: 100%;
  }

  .summary__item {
    flex: 1;
  }

  .panel {
    height: 660px;
  }
}

@media (max-width: 820px) {
  .topbar__inner,
  .app-shell,
  .footer {
    width: min(100% - 28px, 720px);
  }

  .app-shell {
    padding-top: 26px;
  }

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

  .panel {
    height: auto;
    min-height: 0;
  }

  .environment-list {
    max-height: 390px;
  }

  .destination-grid {
    max-height: 640px;
  }

  .workspace--direct .destination-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 590px) {
  .topbar__inner {
    min-height: 64px;
  }

  .connection-note {
    display: none;
  }

  .page-heading {
    margin-bottom: 22px;
  }

  .page-heading h1 {
    font-size: 2.15rem;
  }

  .page-heading__description {
    max-width: 32ch;
  }

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

  .summary__item {
    min-width: 0;
    padding: 11px;
    align-items: flex-start;
    flex-direction: column;
  }

  .group-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .group-button {
    min-width: 150px;
    scroll-snap-align: start;
  }

  .section-label-row > span {
    display: none;
  }

  .panel {
    padding: 17px;
    border-radius: 16px;
  }

  .destination-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-link {
    width: 100%;
  }

  .destination-grid,
  .workspace--direct .destination-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .environment-list {
    max-height: 330px;
  }

  .destination-grid {
    max-height: none;
    overflow: visible;
  }
}

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


