:root {
  color-scheme: dark;
  --desktop: #000000;
  --mica: rgba(32, 32, 32, .96);
  --mica-solid: #202020;
  --surface: #2b2b2b;
  --surface-hover: #323232;
  --surface-pressed: #272727;
  --line: #3f3f3f;
  --line-soft: rgba(255, 255, 255, .075);
  --text: #ffffff;
  --muted: #c7c7c7;
  --subtle: #9d9d9d;
  --accent: #60cdff;
  --accent-strong: #0067c0;
  --accent-hover: #1975c5;
  --green: #6ccb5f;
  --orange: #fce100;
  --red: #ff99a4;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--desktop);
  color: var(--text);
}

html {
  scrollbar-color: #555 #171717;
}

body {
  padding-bottom: 0;
  letter-spacing: .01em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #9bddff;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
.button-link {
  transition: background-color .12s ease, border-color .12s ease, transform .12s ease;
}

button:active,
.button:active,
.button-link:active {
  transform: scale(.985);
}

.topbar {
  position: sticky;
  left: auto;
  top: 0;
  bottom: auto;
  z-index: 100;
  width: 100%;
  min-height: 54px;
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transform: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  border-radius: 0;
  background: rgba(0, 0, 0, .82);
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(120%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 7px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.logo:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: #f2f2f2;
  font-size: 13px;
}

nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.nav-icon {
  color: var(--accent);
  font-size: 16px;
}

.flash {
  position: relative;
  z-index: 20;
  width: min(680px, calc(100% - 32px));
  margin: 18px auto -2px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(44, 44, 44, .96);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .55);
}

.flash.success {
  border-left: 3px solid var(--green);
  color: #dfffdc;
}

.flash.error,
.inline-error {
  border: 1px solid #8d3842;
  border-left: 3px solid #ff6775;
  background: #352226;
  color: #ffd7db;
}

.inline-error {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 7px;
}

.auth-shell {
  min-height: calc(100vh - 55px);
  display: grid;
  place-items: center;
  padding: 46px 20px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #151515;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .48);
}

.auth-card {
  position: relative;
  width: min(480px, 100%);
  padding: 40px;
  overflow: hidden;
}

.auth-card::before {
  content: none;
}

.auth-card::after {
  content: none;
}

.wide-form {
  width: min(760px, 100%);
}

h1,
h2,
h3 {
  font-family: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-weight: 600;
}

h1 {
  margin: 7px 0 12px;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -.035em;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.auth-card form,
.admin-section > form {
  display: grid;
  gap: 17px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #f2f2f2;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #4d4d4d;
  border-bottom-color: #8b8b8b;
  border-radius: 5px;
  outline: none;
  background: #1f1f1f;
  color: #fff;
}

input:hover,
select:hover,
textarea:hover {
  background: #242424;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #515151;
  border-bottom: 2px solid var(--accent);
  background: #252525;
  box-shadow: none;
}

input[type="checkbox"] {
  min-height: 0;
  accent-color: var(--accent-strong);
}

.check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
}

.check input {
  width: 18px;
  height: 18px;
}

.primary,
.secondary,
.danger,
.button-link {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.primary {
  border-color: #68bfea;
  background: var(--accent-strong);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

.primary:hover {
  border-color: #83d6ff;
  background: var(--accent-hover);
  color: #fff;
}

.secondary,
.button-link {
  border-color: #4b4b4b;
  background: #2d2d2d;
  color: #fff;
}

.secondary:hover,
.button-link:hover {
  background: #393939;
  color: #fff;
}

.danger {
  border-color: #743b42;
  background: #4a242a;
  color: #ffdadd;
}

.danger:hover {
  background: #5c2b32;
}

.button,
.button-link {
  display: inline-grid;
  place-items: center;
}

.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.foot-note {
  margin: 20px 0 0;
  color: var(--muted);
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid.three {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.align-end {
  align-self: end;
}

.dashboard,
.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 64px 24px 72px;
}

.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.welcome.compact h1 {
  font-size: 36px;
}

.status-pill,
.mini-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill {
  padding: 8px 13px;
}

.status-pill.online {
  border: 1px solid #477f42;
  background: #20371f;
  color: #c5f6be;
}

.status-pill.setup {
  border: 1px solid #766c2f;
  background: #37331e;
  color: #fff4a3;
}

.computer-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #151515;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.computer-screen {
  position: relative;
  height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.computer-screen::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(0, 103, 192, .14);
  filter: blur(45px);
}

.computer-screen::after {
  content: none;
}

.window-logo {
  z-index: 1;
  color: #f4f4f4;
  font-size: 120px;
  font-weight: 300;
  text-shadow: 0 0 36px rgba(96, 205, 255, .28);
}

.computer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
}

.computer-info p {
  margin: 0;
  color: var(--muted);
}

.security-note {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
  color: var(--muted);
}

.security-note strong {
  color: #fff;
  white-space: nowrap;
}

.admin-shell {
  display: grid;
  gap: 22px;
}

.admin-section {
  padding: 30px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a1a1a;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
}

th {
  background: #252525;
  color: #d5d5d5;
  font-weight: 600;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

tr:last-child td {
  border-bottom: 0;
}

.mini-status {
  padding: 5px 9px;
}

.mini-status.active {
  background: #263d23;
  color: #c9ffc3;
}

.mini-status.pending {
  background: #423c21;
  color: #fff3a2;
}

.mini-status.disabled {
  background: #45252b;
  color: #ffc7cc;
}

.inline-form {
  display: inline;
}

.create-user {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

details > summary {
  cursor: pointer;
}

.create-user summary {
  color: #f2f2f2;
  font-weight: 600;
}

.setup-box {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191919;
}

.setup-box pre {
  padding: 15px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #0d0d0d;
  color: #c7ecff;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
}

.setup-box li {
  margin: 8px 0;
  color: var(--muted);
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #111;
  color: #b9eaff;
}

.activity-list {
  display: grid;
}

.activity-list > div {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 15px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.activity-list > div:last-child {
  border-bottom: 0;
}

.activity-list span {
  color: #f3f3f3;
}

.activity-list strong {
  color: var(--accent);
  font-size: 13px;
}

.activity-list small {
  color: var(--subtle);
  text-align: right;
}

footer {
  padding: 18px 15px 12px;
  color: #777;
  font-size: 12px;
  text-align: center;
}

.page-intro,
.update-hero {
  max-width: 820px;
  margin-bottom: 36px;
}

.page-intro h1,
.update-hero h1 {
  font-size: clamp(42px, 7vw, 72px);
  margin: 10px 0 14px;
}

.page-intro p,
.update-hero p {
  max-width: 720px;
  font-size: 18px;
}

.simple-page {
  max-width: 980px;
}

.simple-stack {
  display: grid;
  gap: 14px;
}

.settings-row {
  padding: 22px 24px;
}

.settings-row > div,
.download-product {
  display: flex;
  align-items: center;
  gap: 18px;
}

.settings-row > div > div {
  flex: 1;
}

.settings-row h2,
.settings-row p,
.download-product h2,
.download-product p {
  margin: 0;
}

.settings-row p,
.download-product p {
  color: var(--muted);
}

.settings-row details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.settings-row summary {
  color: var(--accent);
  font-size: 13px;
}

.compact-form {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin-top: 16px;
}

.row-icon,
.product-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  color: #000;
  font-size: 20px;
  font-weight: 700;
}

.product-icon.large {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  font-size: 34px;
}

.authenticator-setup {
  display: grid;
  gap: 1px;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.authenticator-setup > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 16px;
  background: #1b1b1b;
}

.authenticator-setup span {
  color: var(--subtle);
}

.auth-secret {
  user-select: all;
  letter-spacing: .12em;
}

.break-link {
  overflow-wrap: anywhere;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.recovery-grid code {
  padding: 12px;
  border: 1px solid #333;
  text-align: center;
  user-select: all;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cell-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 11px;
}

.update-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 58px 24px 80px;
}

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--muted);
}

.update-status-grid,
.update-grid {
  display: grid;
  gap: 16px;
}

.update-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.simple-stat {
  display: grid;
  gap: 6px;
  min-height: 150px;
  padding: 24px;
  border-radius: 20px;
  background: #f5f5f7;
  color: #111;
}

.simple-stat span,
.simple-stat small {
  color: #666;
}

.simple-stat strong {
  align-self: center;
  font-size: 34px;
}

.update-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.update-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
}

.update-card p {
  min-height: 52px;
  color: var(--muted);
  line-height: 1.55;
}

.update-card form {
  display: grid;
  gap: 14px;
}

.history-section {
  margin-top: 46px;
}

.history-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.history-list > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #151515;
}

.history-list > article > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.history-list span {
  color: var(--subtle);
  font-size: 12px;
}

.history-list code {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rollback-form {
  display: grid;
  gap: 10px;
  width: min(360px, 80vw);
  padding-top: 12px;
}

.download-product {
  justify-content: space-between;
  padding: 30px;
}

.download-product > div:nth-child(2) {
  flex: 1;
}

.release-notes {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.hash-note {
  color: var(--subtle);
  overflow-wrap: anywhere;
}

.narrow {
  width: min(520px, calc(100% - 32px));
  margin: 60px auto;
  padding: 28px;
}

@media (max-width: 720px) {
  body {
    padding-bottom: 0;
  }

  .topbar {
    top: 0;
    bottom: auto;
    width: 100%;
    padding: 0 10px;
  }

  .logo span:last-child,
  .nav-label {
    display: none;
  }

  nav a {
    padding: 0 9px;
  }

  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .welcome,
  .computer-info,
  .security-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .computer-screen {
    height: 235px;
  }

  .window-logo {
    font-size: 90px;
  }

  .dashboard,
  .admin-shell {
    padding: 34px 16px 46px;
  }

  .auth-card {
    padding: 30px 24px;
  }

  .activity-list > div {
    grid-template-columns: 1fr;
  }

  .activity-list small {
    text-align: left;
  }

  .update-status-grid,
  .update-grid {
    grid-template-columns: 1fr;
  }

  .update-shell {
    padding: 38px 16px 60px;
  }

  .page-intro h1,
  .update-hero h1 {
    font-size: 42px;
  }

  .settings-row > div,
  .download-product,
  .history-list > article {
    align-items: flex-start;
    flex-direction: column;
  }

  .recovery-grid {
    grid-template-columns: 1fr;
  }

  .authenticator-setup > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.download-intro {
  max-width: 900px;
}

.download-product-featured {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-color: #424242;
  background: #171717;
}

.download-product-copy {
  display: grid;
  gap: 7px;
}

.download-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border: 1px solid #2f7695;
  border-radius: 999px;
  background: #102d3a;
  color: #a7e5ff;
  font-size: 12px;
  font-weight: 600;
}

.download-product-copy small,
.download-feature p,
.release-detail p,
.download-note,
.deployment-check p,
.deployment-steps li {
  color: var(--muted);
  line-height: 1.65;
}

.download-button {
  flex: 0 0 auto;
  min-width: 136px;
  text-align: center;
}

.download-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.download-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 132px;
  padding: 22px;
  border-radius: 15px;
  box-shadow: none;
}

.download-feature > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #252525;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.download-feature h2,
.download-feature p {
  margin: 0;
}

.download-feature p {
  margin-top: 6px;
  font-size: 13px;
}

.release-detail,
.empty-download {
  display: grid;
  gap: 20px;
  margin-top: 16px;
  padding: 28px;
  box-shadow: none;
}

.release-detail h2,
.release-detail p,
.empty-download h2,
.empty-download p {
  margin: 0;
}

.release-hash {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.release-hash span {
  color: var(--subtle);
  font-size: 12px;
}

.release-hash code {
  overflow-wrap: anywhere;
  user-select: all;
}

.download-note {
  margin: 14px 4px 0;
  font-size: 12px;
}

.deployment-shell {
  max-width: 1180px;
}

.readiness-summary {
  display: grid;
  gap: 5px;
  max-width: 690px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #31612d;
  border-radius: 12px;
  background: #172415;
}

.readiness-summary.has-errors {
  border-color: #8d3842;
  background: #352226;
}

.readiness-summary span {
  color: var(--muted);
  font-size: 13px;
}

.deployment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.deployment-check {
  display: flex;
  gap: 16px;
  min-height: 154px;
  padding: 22px;
  border-radius: 15px;
  box-shadow: none;
}

.check-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #183315;
  color: #8cec80;
  font-weight: 700;
}

.deployment-check.warn .check-mark {
  background: #342f0d;
  color: #ffe970;
}

.deployment-check.error .check-mark {
  background: #3c1d22;
  color: #ff99a4;
}

.deployment-check h2 {
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.deployment-check p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.deployment-steps {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  padding: 28px;
  box-shadow: none;
}

.deployment-steps h2 {
  margin: 6px 0 0;
}

.deployment-steps ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

@media (max-width: 720px) {
  .download-feature-grid,
  .deployment-grid {
    grid-template-columns: 1fr;
  }

  .download-product-featured {
    align-items: flex-start;
  }

  .download-button {
    width: 100%;
  }
}

.auth-methods{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0}.auth-methods a{padding:12px 16px;border:1px solid #879bbf;border-radius:10px;text-decoration:none}.auth-methods a[aria-current=page]{background:#2563eb;color:white;border-color:#2563eb}.auth-qr{text-align:center;margin:24px auto}.auth-qr canvas{display:block;max-width:100%;height:auto;margin:auto;background:white;border-radius:8px}.auth-qr p{font-size:14px}.auth-card form+form{margin-top:20px}
