:root {
  --bg: #05070d;
  --bg-deep: #02040a;
  --panel: #0b0f18;
  --panel-strong: #0e1420;
  --panel-soft: #111824;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f4f6fb;
  --muted: #8e98aa;
  --muted-strong: #b2bac8;
  --gold: #f5c451;
  --gold-strong: #ffd66c;
  --gold-soft: rgba(245, 196, 81, 0.12);
  --green: #42d79a;
  --green-soft: rgba(66, 215, 154, 0.12);
  --blue: #5a9cff;
  --blue-soft: rgba(90, 156, 255, 0.12);
  --violet: #9d7cff;
  --violet-soft: rgba(157, 124, 255, 0.12);
  --red: #ff6577;
  --red-soft: rgba(255, 101, 119, 0.12);
  --orange: #ffae57;
  --sidebar-width: 272px;
  --sidebar-compact-width: 82px;
  --topbar-height: 72px;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

/* Login */

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(245, 196, 81, 0.055), transparent 34%),
    linear-gradient(180deg, #060910 0%, #03050a 100%);
}

.grid-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black 18%, transparent 78%);
}

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
  opacity: 0.12;
}

.ambient-one {
  top: -220px;
  left: -170px;
  background: var(--gold);
}

.ambient-two {
  right: -230px;
  bottom: -260px;
  background: #4b6fff;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 150px 24px 100px;
}

.login-brand {
  position: absolute;
  top: 34px;
  left: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-emblem {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 196, 81, 0.48);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(245, 196, 81, 0.18), rgba(245, 196, 81, 0.02)),
    #0b0e14;
  box-shadow:
    inset 0 0 18px rgba(245, 196, 81, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.3);
}

.brand-emblem::after {
  position: absolute;
  width: 24px;
  height: 1px;
  content: "";
  transform: rotate(-48deg);
  background: rgba(245, 196, 81, 0.25);
}

.brand-emblem span {
  position: relative;
  z-index: 1;
  color: var(--gold-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-emblem-large {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.brand-emblem-large span {
  font-size: 13px;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.brand-copy small {
  color: #747e90;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-card {
  position: relative;
  width: min(100%, 470px);
  padding: 52px 48px 42px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 38%),
    rgba(9, 13, 21, 0.92);
  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.55),
    inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.login-card::before {
  position: absolute;
  top: 0;
  left: 38px;
  width: 110px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 18px var(--gold);
}

.login-card-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(245, 196, 81, 0.055);
  filter: blur(30px);
  pointer-events: none;
}

.access-seal {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid rgba(245, 196, 81, 0.25);
  border-radius: 16px;
  color: var(--gold);
  background: var(--gold-soft);
  box-shadow: inset 0 0 25px rgba(245, 196, 81, 0.04);
}

.access-seal svg {
  width: 29px;
  height: 29px;
}

.access-seal-danger {
  border-color: rgba(255, 101, 119, 0.3);
  color: var(--red);
  background: var(--red-soft);
  font-size: 25px;
  font-weight: 700;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 18px;
  height: 1px;
  background: currentColor;
}

.eyebrow-danger {
  color: var(--red);
}

.login-card h1 {
  margin: 13px 0 18px;
  font-size: clamp(32px, 8vw, 43px);
  font-weight: 590;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.login-description {
  max-width: 360px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.login-alert {
  margin: -10px 0 18px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 174, 87, 0.18);
  border-radius: 10px;
  color: #f8c98f;
  background: rgba(255, 174, 87, 0.075);
  font-size: 12px;
  line-height: 1.5;
}

.login-alert[data-type="error"] {
  border-color: rgba(255, 101, 119, 0.18);
  color: #ff9dab;
  background: rgba(255, 101, 119, 0.075);
}

.discord-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 13px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #f4f5f8;
  color: #10131a;
  font-size: 13px;
  font-weight: 720;
  transition: 180ms ease;
}

.discord-button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.discord-button.disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.discord-button > svg:first-child {
  width: 23px;
  height: 23px;
}

.discord-button span {
  flex: 1;
  text-align: left;
}

.discord-button .button-arrow {
  width: 17px;
  height: 17px;
  transition: transform 180ms ease;
}

.discord-button:hover .button-arrow {
  transform: translateX(3px);
}

.secondary-login-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 650;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  color: #687285;
  font-size: 10px;
  font-weight: 580;
  letter-spacing: 0.035em;
}

.security-pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(66, 215, 154, 0.7);
}

.login-footer {
  position: absolute;
  bottom: 32px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4f5868;
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.05em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.footer-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #343c49;
}

/* Dashboard shell */

.dashboard-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 65% -10%, rgba(245, 196, 81, 0.045), transparent 28%),
    var(--bg);
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 14, 0.965);
  transition: width 220ms ease, transform 220ms ease;
  backdrop-filter: blur(18px);
}

.sidebar-head {
  display: flex;
  height: var(--topbar-height);
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px 0 20px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.sidebar-brand-copy strong {
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #7f8999;
  background: rgba(255, 255, 255, 0.025);
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-section-label {
  margin: 20px 11px 8px;
  color: #4d5666;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 140ms ease;
}

.nav-section-label:first-child {
  margin-top: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  margin: 3px 0;
  padding: 0 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #828c9d;
  background: transparent;
  font-size: 12px;
  font-weight: 560;
  text-align: left;
  white-space: nowrap;
  transition: 150ms ease;
}

.nav-button {
  appearance: none;
}

.nav-item:hover {
  color: #c8ced8;
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.active {
  border-color: rgba(245, 196, 81, 0.13);
  color: var(--gold-strong);
  background: var(--gold-soft);
}

.nav-item.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -1px;
  width: 2px;
  border-radius: 0 3px 3px 0;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 10px rgba(245, 196, 81, 0.75);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-item > span:not(.nav-count) {
  flex: 1;
}

.nav-count {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #697384;
  background: rgba(255, 255, 255, 0.045);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  text-align: center;
}

.sidebar-foot {
  padding: 13px;
  border-top: 1px solid var(--line);
}

.network-status-link {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

.network-status-link > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}

.network-status-link strong {
  font-size: 10px;
  font-weight: 650;
}

.network-status-link small {
  color: #667082;
  font-size: 8px;
}

.network-status-link svg {
  width: 15px;
  height: 15px;
  color: #657083;
}

.status-orb {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-orb.online {
  background: var(--green);
  box-shadow: 0 0 12px rgba(66, 215, 154, 0.58);
}

.dashboard-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  transition: margin-left 220ms ease;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.88);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 10px;
}

.mobile-menu {
  display: none;
  margin-right: 11px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #626c7e;
  font-size: 10px;
}

.breadcrumb b {
  color: #303744;
  font-weight: 400;
}

.breadcrumb strong {
  color: #9aa3b2;
  font-weight: 600;
}

.last-update {
  margin-right: 4px;
  color: #586273;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
}

.refresh-button.loading svg {
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.user-menu {
  position: relative;
}

.user-trigger {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 5px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.user-trigger:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.user-avatar {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 196, 81, 0.24);
  border-radius: 9px;
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 9px;
  font-weight: 750;
}

.user-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-copy {
  display: flex;
  min-width: 92px;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.user-copy strong {
  max-width: 120px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy small {
  color: #677183;
  font-size: 8px;
}

.user-trigger > svg {
  width: 14px;
  height: 14px;
  color: #687284;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #0c111a;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.user-dropdown button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  color: #c9ced8;
  background: transparent;
  font-size: 10px;
  text-align: left;
}

.user-dropdown button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.user-dropdown svg {
  width: 15px;
  height: 15px;
}

.dashboard-content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 44px 34px 70px;
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 38px;
}

.welcome-row h1 {
  margin: 11px 0 13px;
  font-size: clamp(38px, 4vw, 60px);
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.welcome-row h1 em {
  color: var(--gold);
  font-style: normal;
}

.welcome-row > div:first-child > p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.master-access-card {
  display: flex;
  min-width: 265px;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(245, 196, 81, 0.13);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.08), rgba(245, 196, 81, 0.015));
}

.master-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(245, 196, 81, 0.2);
  border-radius: 11px;
  color: var(--gold);
  background: rgba(245, 196, 81, 0.08);
}

.master-icon svg {
  width: 22px;
  height: 22px;
}

.master-access-card > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.master-access-card small {
  color: #7a8494;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.master-access-card strong {
  font-size: 13px;
}

.master-access-card em {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7f8b9c;
  font-size: 8px;
  font-style: normal;
}

.master-access-card em i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(66, 215, 154, 0.7);
}

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

.summary-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 50%),
    var(--panel);
}

.summary-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 11px;
}

.summary-icon svg {
  width: 20px;
  height: 20px;
}

.summary-icon.gold {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(245, 196, 81, 0.17);
}

.summary-icon.green {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(66, 215, 154, 0.17);
}

.summary-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(90, 156, 255, 0.17);
}

.summary-icon.violet {
  color: var(--violet);
  background: var(--violet-soft);
  border-color: rgba(157, 124, 255, 0.17);
}

.summary-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: 9px;
}

.summary-copy small {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  overflow: hidden;
  color: #798394;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-copy strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px;
  font-weight: 580;
  letter-spacing: -0.05em;
}

.summary-copy em {
  overflow: hidden;
  color: #576172;
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.8fr);
  gap: 12px;
  margin-bottom: 44px;
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.022), transparent 42%),
    var(--panel);
}

.panel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 21px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: #626c7e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-card h2,
.section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.live-badge,
.phase-badge {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid rgba(66, 215, 154, 0.13);
  border-radius: 7px;
  color: #75d8ad;
  background: rgba(66, 215, 154, 0.065);
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}

.live-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(66, 215, 154, 0.6);
}

.phase-badge {
  border-color: rgba(245, 196, 81, 0.13);
  color: var(--gold);
  background: rgba(245, 196, 81, 0.065);
}

.host-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 21px 13px;
}

.host-glyph {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #9aa4b4;
  background: rgba(255, 255, 255, 0.025);
}

.host-glyph svg {
  width: 21px;
  height: 21px;
}

.host-identity > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.host-identity strong {
  font-size: 12px;
}

.host-identity small {
  color: #687284;
  font-size: 8px;
}

.host-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7d8999;
  font-size: 8px;
}

.host-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.metric-list {
  display: grid;
  gap: 14px;
  padding: 9px 21px 20px;
}

.metric-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #748091;
  font-size: 8px;
}

.metric-row strong {
  color: #aeb6c4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 550;
}

.metric-track {
  height: 4px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.metric-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ddb047, var(--gold-strong));
  box-shadow: 0 0 9px rgba(245, 196, 81, 0.35);
  transition: width 500ms ease;
}

.metric-row:nth-child(2) .metric-track span {
  background: linear-gradient(90deg, #4984e4, #66a7ff);
  box-shadow: 0 0 9px rgba(90, 156, 255, 0.3);
}

.host-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.host-footer > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 14px 20px;
  border-right: 1px solid var(--line);
}

.host-footer > span:last-child {
  border-right: 0;
}

.host-footer small {
  overflow: hidden;
  color: #606b7c;
  font-size: 7px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.host-footer strong {
  color: #b5bdca;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 560;
}

.migration-card {
  overflow: hidden;
}

.migration-visual {
  display: flex;
  min-height: 93px;
  align-items: center;
  justify-content: center;
  padding: 17px 25px 5px;
}

.migration-node,
.migration-targets span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: #98a2b1;
  background: #0d131e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 750;
}

.migration-node {
  width: 46px;
  height: 46px;
  border-color: rgba(245, 196, 81, 0.25);
  border-radius: 13px;
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 10px;
}

.migration-line {
  position: relative;
  width: 65px;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.55), rgba(255, 255, 255, 0.08));
}

.migration-line i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(245, 196, 81, 0.7);
  animation: travel 2.2s ease-in-out infinite;
}

@keyframes travel {
  50% {
    transform: translateX(60px);
  }
}

.migration-targets {
  display: flex;
  gap: 5px;
}

.migration-targets span {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 7px;
}

.migration-card > p {
  margin: 0;
  padding: 7px 21px 16px;
  color: #747f90;
  font-size: 9px;
  line-height: 1.65;
}

.migration-progress {
  padding: 13px 21px 18px;
  border-top: 1px solid var(--line);
}

.migration-progress > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #687385;
  font-size: 7px;
}

.migration-progress strong {
  color: #9ba5b4;
  font-weight: 650;
}

.migration-progress > div {
  height: 4px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.migration-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c99d39, var(--gold));
  transition: width 500ms ease;
}

.services-section {
  scroll-margin-top: 92px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
}

.section-heading p {
  margin: 7px 0 0;
  color: #687284;
  font-size: 10px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.filter-tabs button {
  min-height: 29px;
  padding: 0 11px;
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  color: #687284;
  background: transparent;
  font-size: 8px;
  font-weight: 620;
}

.filter-tabs button:hover {
  color: #b5bdc9;
}

.filter-tabs button.active {
  color: var(--gold);
  background: var(--gold-soft);
}

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

.service-card {
  display: flex;
  min-width: 0;
  min-height: 278px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.022), transparent 42%),
    var(--panel);
  transition: 180ms ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 17px 10px;
}

.service-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: #adb5c2;
  background: rgba(255, 255, 255, 0.035);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 750;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  font-weight: 600;
}

.service-status i,
.integration-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.service-status.online {
  color: var(--green);
}

.service-status.online i {
  box-shadow: 0 0 8px rgba(66, 215, 154, 0.6);
}

.service-status.degraded {
  color: var(--orange);
}

.service-status.offline {
  color: var(--red);
}

.service-status.unknown {
  color: #626d7e;
}

.service-title {
  padding: 3px 17px 15px;
}

.access-badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #6d7788;
  background: rgba(255, 255, 255, 0.025);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.access-badge.sso {
  border-color: rgba(245, 196, 81, 0.16);
  color: var(--gold);
  background: var(--gold-soft);
}

.access-badge.public {
  border-color: rgba(90, 156, 255, 0.16);
  color: var(--blue);
  background: var(--blue-soft);
}

.access-badge.migration {
  border-color: rgba(157, 124, 255, 0.14);
  color: #aa93ee;
  background: rgba(157, 124, 255, 0.07);
}

.service-title h3 {
  margin: 10px 0 6px;
  font-size: 15px;
  font-weight: 630;
  letter-spacing: -0.025em;
}

.service-title p {
  min-height: 32px;
  margin: 0;
  color: #6c7687;
  font-size: 9px;
  line-height: 1.65;
}

.service-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: auto 17px 13px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-metrics > div {
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid var(--line);
}

.service-metrics > div:first-child {
  padding-left: 0;
}

.service-metrics > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.service-metrics dt {
  margin-bottom: 5px;
  color: #596374;
  font-size: 7px;
  text-transform: uppercase;
}

.service-metrics dd {
  margin: 0;
  overflow: hidden;
  color: #abb3c0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-footer {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 17px 13px;
}

.integration-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5f697a;
  font-size: 7px;
}

.integration-label.connected {
  color: #6aa98e;
}

.integration-label.unreachable {
  color: #b66a75;
}

.integration-label.not_configured {
  color: #626c7c;
}

.integration-label i {
  width: 4px;
  height: 4px;
}

.service-footer a,
.service-footer button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #c8ced7;
  background: rgba(255, 255, 255, 0.035);
  font-size: 7px;
  font-weight: 650;
}

.service-footer a:hover {
  border-color: rgba(245, 196, 81, 0.22);
  color: var(--gold);
  background: var(--gold-soft);
}

.service-footer button {
  cursor: not-allowed;
  opacity: 0.48;
}

.service-footer svg {
  width: 12px;
  height: 12px;
}

.service-skeleton {
  min-height: 278px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(100deg, var(--panel) 25%, #101622 38%, var(--panel) 52%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.empty-services {
  display: flex;
  min-height: 210px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: #838d9d;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}

.empty-services strong {
  font-size: 12px;
}

.empty-services span {
  color: #5d6778;
  font-size: 9px;
}

.empty-services.error strong {
  color: #df8e99;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  max-width: 340px;
  padding: 12px 15px;
  opacity: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: #ccd2dc;
  background: #101620;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-size: 10px;
  transform: translateY(8px);
  transition: 200ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-overlay {
  display: none;
}

/* Compact sidebar */

.sidebar-compact .sidebar {
  width: var(--sidebar-compact-width);
}

.sidebar-compact .dashboard-shell {
  margin-left: var(--sidebar-compact-width);
}

.sidebar-compact .sidebar-brand-copy,
.sidebar-compact .nav-section-label,
.sidebar-compact .nav-item > span,
.sidebar-compact .network-status-link > span:nth-child(2),
.sidebar-compact .network-status-link > svg {
  display: none;
}

.sidebar-compact .sidebar-head {
  flex-direction: column;
  height: 123px;
  justify-content: center;
  gap: 9px;
  padding: 10px;
}

.sidebar-compact .sidebar-collapse svg {
  transform: rotate(180deg);
}

.sidebar-compact .nav-item {
  justify-content: center;
  padding: 0;
}

.sidebar-compact .network-status-link {
  justify-content: center;
  padding: 0;
}

/* Responsive */

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

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

@media (max-width: 960px) {
  .sidebar,
  .sidebar-compact .sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-compact .sidebar-brand-copy,
  .sidebar-compact .nav-section-label,
  .sidebar-compact .nav-item > span,
  .sidebar-compact .network-status-link > span:nth-child(2),
  .sidebar-compact .network-status-link > svg {
    display: initial;
  }

  .sidebar-compact .sidebar-head {
    height: var(--topbar-height);
    flex-direction: row;
    justify-content: space-between;
    padding: 0 17px 0 20px;
  }

  .sidebar-compact .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .dashboard-shell,
  .sidebar-compact .dashboard-shell {
    margin-left: 0;
  }

  .mobile-menu {
    display: grid;
  }

  .mobile-overlay {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.62);
    transition: 200ms ease;
  }

  .mobile-overlay.visible {
    visibility: visible;
    opacity: 1;
  }

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

@media (max-width: 720px) {
  .login-shell {
    align-items: flex-start;
    padding: 120px 18px 90px;
  }

  .login-brand {
    top: 26px;
    left: 22px;
  }

  .login-card {
    padding: 39px 26px 32px;
  }

  .login-footer {
    bottom: 22px;
    font-size: 8px;
  }

  .login-footer .footer-divider,
  .login-footer span:last-child {
    display: none;
  }

  .topbar {
    padding: 0 15px;
  }

  .breadcrumb,
  .last-update,
  .user-copy {
    display: none;
  }

  .user-trigger {
    padding-right: 5px;
  }

  .dashboard-content {
    padding: 32px 17px 55px;
  }

  .welcome-row {
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
  }

  .master-access-card {
    min-width: 0;
  }

  .summary-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .filter-tabs button {
    padding: 0 6px;
  }

  .host-footer > span {
    padding: 13px 12px;
  }

  .migration-visual {
    padding-inline: 12px;
  }

  .migration-line {
    width: 39px;
  }

  @keyframes travel {
    50% {
      transform: translateX(34px);
    }
  }
}

@media (max-width: 420px) {
  .login-card h1 {
    font-size: 32px;
  }

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

  .summary-card {
    padding: 15px;
  }

  .host-identity {
    align-items: flex-start;
  }

  .host-state {
    display: none;
  }

  .migration-targets span:last-child {
    display: none;
  }
}

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