:root {
  --ink: #132238;
  --ink-soft: #405066;
  --muted: #6d7b8d;
  --line: #dce3ea;
  --line-strong: #c8d2dd;
  --surface: #ffffff;
  --surface-soft: #f4f7f9;
  --surface-blue: #edf5ff;
  --accent: #1769e0;
  --accent-dark: #0d4fae;
  --accent-pale: #dcecff;
  --success: #087a55;
  --success-bg: #e7f6ef;
  --warning: #9a5a00;
  --warning-bg: #fff4df;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --sidebar: #0e1a2b;
  --sidebar-soft: #17263b;
  --radius: 12px;
  --shadow: 0 16px 48px rgba(17, 41, 72, 0.09);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.25);
  outline-offset: 2px;
}

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

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[hidden] {
  display: none !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-weight: 720;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-light {
  color: white;
  font-size: 20px;
}

.brand-light .brand-mark {
  background: white;
  color: var(--accent-dark);
}

.login-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
  background: white;
}

.login-intro {
  position: relative;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  padding: 42px clamp(40px, 7vw, 108px);
  color: white;
  background:
    linear-gradient(145deg, rgba(7, 28, 58, 0.92), rgba(12, 69, 148, 0.9)),
    radial-gradient(circle at 72% 18%, #2b8cff 0, transparent 38%),
    #0d376e;
}

.login-intro::before {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.025),
    0 0 0 150px rgba(255, 255, 255, 0.018);
}

.login-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  max-width: 680px;
}

.login-copy h1 {
  max-width: 620px;
  margin: 16px 0 24px;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.login-copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
  line-height: 1.75;
}

.kicker {
  margin: 0;
  color: #a7d0ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.login-steps {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    linear-gradient(rgba(20, 49, 83, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 49, 83, 0.035) 1px, transparent 1px),
    white;
  background-size: 28px 28px;
}

.auth-form {
  display: grid;
  width: min(100%, 420px);
  gap: 22px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-form h2 {
  margin: 4px 0 6px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.auth-note {
  margin: -6px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.section-label {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.muted {
  margin: 0;
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
}

label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

label > small {
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8995a5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 15px;
  cursor: pointer;
  font-weight: 680;
  white-space: nowrap;
  transition:
    transform 100ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: white;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #a8b6c5;
  background: var(--surface-soft);
}

.button-light {
  border-color: rgba(255, 255, 255, 0.7);
  background: white;
  color: var(--accent-dark);
}

.button-wide {
  width: 100%;
  min-height: 46px;
}

.form-error {
  margin: 0;
  border-left: 3px solid var(--danger);
  padding: 8px 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100dvh;
  flex-direction: column;
  padding: 24px 18px 20px;
  background: var(--sidebar);
  color: white;
}

.sidebar > .brand {
  padding: 0 10px 28px;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.main-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  border-radius: 9px;
  padding: 0 13px;
  color: #aebbd0;
  font-weight: 620;
  transition:
    color 120ms ease,
    background 120ms ease;
}

.main-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.065);
}

.main-nav a.active {
  color: white;
  background: var(--sidebar-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-foot {
  display: grid;
  gap: 14px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px 10px 0;
}

.service-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aebbd0;
  font-size: 12px;
}

.service-dot span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27c58a;
  box-shadow: 0 0 0 4px rgba(39, 197, 138, 0.12);
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 0;
  background: none;
  color: #aebbd0;
  cursor: pointer;
  font-size: 13px;
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(22px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 1px 0 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

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

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.account-chip > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 750;
}

.account-chip div {
  display: grid;
}

.account-chip strong {
  font-size: 13px;
}

.account-chip small {
  color: var(--muted);
  font-size: 11px;
}

.mobile-nav-button {
  display: none;
}

.page {
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 34px clamp(22px, 4vw, 54px) 64px;
}

.page-loading {
  display: grid;
  width: min(100%, 1460px);
  margin: 0 auto;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 34px clamp(22px, 4vw, 54px);
}

.page-loading div {
  height: 124px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eef2f5, #f8fafb, #eef2f5);
  background-size: 220% 100%;
  animation: loading 1.3s infinite linear;
}

@keyframes loading {
  to {
    background-position: -220% 0;
  }
}

.welcome-strip {
  display: flex;
  min-height: 190px;
  align-items: flex-end;
  gap: 24px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 34px;
  background:
    linear-gradient(115deg, rgba(7, 32, 68, 0.96), rgba(15, 93, 190, 0.9)),
    #164e96;
  color: white;
  box-shadow: var(--shadow);
}

.welcome-strip > div {
  margin-right: auto;
}

.welcome-strip .section-label {
  color: #9dccff;
}

.welcome-strip h2 {
  margin: 6px 0 6px;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.045em;
}

.welcome-strip p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.metric {
  display: grid;
  min-height: 136px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: white;
}

.metric span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.metric strong {
  margin: 8px 0 2px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.metric small {
  color: var(--muted);
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

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

.panel-heading h3 {
  margin: 0;
  font-size: 17px;
}

.panel-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.next-action-content {
  padding: 24px;
}

.action-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.action-row > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-blue);
  color: var(--accent);
  font-weight: 750;
}

.action-row h4 {
  margin: 0;
}

.action-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.definition-list {
  margin: 0;
  padding: 10px 22px 4px;
}

.definition-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.definition-list > div:last-child {
  border-bottom: 0;
}

.definition-list dt {
  color: var(--muted);
}

.definition-list dd {
  margin: 0;
  font-weight: 680;
}

.server-card > .button {
  margin: 12px 22px 22px;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 680;
}

.status-ok {
  background: var(--success-bg);
  color: var(--success);
}

.status-warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-muted {
  background: #eef2f5;
  color: var(--ink-soft);
}

.status-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.page-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-actions h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.page-actions p {
  margin: 4px 0 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

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

th,
td {
  min-width: 110px;
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8fafb;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
}

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

tbody tr:hover td {
  background: #fbfcfd;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 2px;
  color: var(--muted);
}

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

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mini-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: white;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

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

.mini-button.danger {
  color: var(--danger);
}

.domain-link {
  color: var(--accent-dark);
  font-weight: 680;
}

.domain-link:hover {
  text-decoration: underline;
}

.empty-state {
  display: grid;
  min-height: 380px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 42px;
  background: white;
  text-align: center;
}

.empty-number {
  color: var(--accent-pale);
  font-size: 70px;
  font-weight: 800;
  line-height: 1;
}

.empty-state h3 {
  margin: 12px 0 5px;
  font-size: 21px;
}

.empty-state p {
  max-width: 440px;
  margin: 0 0 20px;
  color: var(--muted);
}

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

.device-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
  background: white;
}

.device-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.device-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-blue);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.device-card-head > div:nth-child(2) {
  min-width: 0;
  margin-right: auto;
}

.device-card h3 {
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.device-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.device-card dl div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.device-card dt {
  color: var(--muted);
  font-size: 11px;
}

.device-card dd {
  overflow: hidden;
  margin: 2px 0 0;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal {
  width: min(92vw, 560px);
  max-height: 90dvh;
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: white;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(8, 27, 51, 0.25);
}

.modal::backdrop {
  background: rgba(5, 17, 32, 0.62);
  backdrop-filter: blur(3px);
}

.modal > form,
.modal > div {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.modal-wide {
  width: min(92vw, 760px);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
}

.modal-heading h2 {
  margin: 3px 0 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.modal-close {
  border: 0;
  padding: 5px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.https-lock {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #b9e4d2;
  border-radius: 10px;
  padding: 13px;
  background: var(--success-bg);
  color: var(--success);
}

.https-lock .check-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-weight: 800;
}

.https-lock div {
  display: grid;
}

.https-lock small {
  color: #34745f;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.switch-line > span {
  display: grid;
}

.switch-line input {
  width: 20px;
  min-height: 20px;
}

.os-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.os-tab {
  border: 0;
  border-radius: 7px;
  padding: 7px 16px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.os-tab:hover {
  color: var(--ink);
}

.os-tab.active {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: 0 1px 3px rgba(17, 41, 72, 0.12);
}

.install-steps {
  display: grid;
  gap: 10px;
}

.windows-fallback {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 16px;
}

.windows-fallback p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.windows-fallback .fallback-title {
  color: var(--ink);
  font-weight: 650;
}

.windows-fallback a {
  color: var(--accent);
  font-weight: 600;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.alert-settings {
  margin-bottom: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 6px;
}

.settings-grid label {
  display: grid;
  gap: 4px;
}

.settings-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.settings-actions .form-error {
  margin: 0;
  margin-right: auto;
}

.alert-unread td {
  background: var(--warning-bg);
}

@media (max-width: 760px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.install-steps p {
  margin: 0;
}

.code-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 12px;
  background: #0b1728;
}

.code-copy code {
  overflow-x: auto;
  color: #d7e8ff;
  font-size: 12px;
  white-space: nowrap;
}

.guide-page {
  max-width: 1200px;
}

.guide-hero {
  max-width: 820px;
  padding: 12px 0 18px;
}

.guide-hero h2 {
  margin: 8px 0 14px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.guide-hero > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.guide-hero code,
.guide-step code,
.guide-files code {
  border-radius: 5px;
  padding: 2px 5px;
  background: #eaf0f5;
  color: #24405e;
  font-size: 0.9em;
}

.guide-index {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 26px 0 42px;
  background: var(--line);
}

.guide-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
}

.guide-index a:hover {
  background: var(--surface-blue);
}

.guide-index strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.guide-step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 24px;
  scroll-margin-top: 24px;
  border-top: 1px solid var(--line-strong);
  padding: 42px 0;
}

.step-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-size: 18px;
  font-weight: 760;
}

.step-body {
  max-width: 900px;
}

.step-body > h3 {
  margin: 3px 0 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.step-body > p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

.step-body ol {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
  padding-left: 24px;
}

.example-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.example-table > div {
  display: grid;
  grid-template-columns: 140px 180px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: white;
}

.example-table > div:last-child {
  border-bottom: 0;
}

.example-table span {
  color: var(--muted);
}

.example-table small {
  color: var(--muted);
}

.callout {
  margin-top: 14px;
  border-left: 4px solid var(--accent);
  padding: 13px 16px;
  background: var(--surface-blue);
}

.code-example {
  overflow: hidden;
  border-radius: var(--radius);
  background: #0b1728;
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  color: white;
  font-size: 12px;
}

.code-title small {
  color: #8498b1;
}

.code-example pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  color: #d7e8ff;
  font-size: 13px;
}

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

.form-example div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: white;
}

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

.result-url {
  overflow-x: auto;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--success-bg);
  color: var(--success);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 750;
  white-space: nowrap;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.control-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: white;
}

.control-card h4 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.control-card .control-os {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
}

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

.control-card dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}

.control-card dd {
  margin: 0;
  overflow-x: auto;
  border-radius: 7px;
  padding: 8px 10px;
  background: #0b1728;
  color: #d7e8ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
}

.control-card small {
  color: var(--muted);
  font-size: 12px;
}

.control-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

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

.trouble-grid > div {
  border-top: 2px solid var(--line-strong);
  padding: 14px 4px 0;
}

.trouble-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.guide-files {
  display: flex;
  align-items: center;
  gap: 24px;
  border-radius: var(--radius);
  padding: 26px;
  background: var(--ink);
  color: white;
}

.guide-files > div {
  margin-right: auto;
}

.guide-files h3 {
  margin: 0;
}

.guide-files p {
  max-width: 720px;
  margin: 5px 0 0;
  color: #b9c8d9;
}

.toast-region {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 18px;
  display: grid;
  width: min(380px, calc(100vw - 36px));
  gap: 8px;
}

.toast {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 9px;
  padding: 12px 14px;
  background: white;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast strong,
.toast span {
  display: block;
}

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

@keyframes toast-in {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: 330px;
    padding: 28px;
  }

  .login-copy {
    margin: 46px 0;
  }

  .login-copy h1 {
    font-size: 40px;
  }

  .login-panel {
    min-height: calc(100dvh - 330px);
    padding: 24px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    left: 0;
    transform: translateX(-100%);
    width: 236px;
    transition: transform 160ms ease;
  }

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

  .mobile-nav-button {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    background: white;
    color: var(--ink);
  }

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

  .guide-index {
    grid-template-columns: repeat(2, 1fr);
  }

  .example-table > div {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .example-table small {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 72px;
    padding: 12px 16px;
  }

  .account-chip div {
    display: none;
  }

  .page {
    padding: 22px 16px 48px;
  }

  .welcome-strip {
    display: grid;
    align-items: start;
    padding: 24px;
  }

  .welcome-strip .button {
    width: fit-content;
  }

  .metric-grid,
  .device-grid,
  .form-example,
  .trouble-grid,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 116px;
  }

  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions .button {
    width: 100%;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .guide-index {
    grid-template-columns: 1fr;
  }

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

  .example-table > div {
    grid-template-columns: 1fr;
  }

  .example-table small {
    grid-column: 1;
  }

  .guide-files {
    align-items: stretch;
    flex-direction: column;
  }

  .code-copy {
    grid-template-columns: 1fr;
  }

  .login-steps {
    gap: 12px;
    font-size: 10px;
  }
}

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