:root {
  --ink: #f4f7f1;
  --muted: #99aaa4;
  --surface: rgba(12, 32, 27, 0.78);
  --surface-strong: #0b221c;
  --line: rgba(196, 231, 214, 0.13);
  --mint: #92f5c5;
  --mint-deep: #45c58c;
  --gold: #f4d58d;
  --danger: #ff9b8f;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #061612;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(93, 227, 166, 0.15), transparent 34rem),
    radial-gradient(circle at 96% 40%, rgba(241, 207, 131, 0.09), transparent 28rem),
    linear-gradient(160deg, #061612 0%, #071b16 48%, #04100d 100%);
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
}

.ambient-one {
  top: -15rem;
  right: -10rem;
  width: 28rem;
  height: 28rem;
  background: rgba(84, 231, 167, 0.09);
}

.ambient-two {
  bottom: -17rem;
  left: -11rem;
  width: 31rem;
  height: 31rem;
  background: rgba(238, 198, 111, 0.06);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 58px;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(152, 244, 202, 0.42);
  border-radius: 12px;
  color: var(--mint);
  background: rgba(116, 240, 185, 0.08);
  box-shadow: inset 0 0 20px rgba(119, 244, 186, 0.08);
}

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

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 0.2em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.live-chip {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 25, 21, 0.65);
  font-size: 11px;
}

.live-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #75837e;
}

.live-chip.online i {
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(146, 245, 197, 0.09), 0 0 12px var(--mint);
}

.hero {
  margin: 0 2px 38px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 13px;
  color: var(--mint-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(44px, 12vw, 76px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--mint);
  font-weight: 400;
}

.hero-copy {
  max-width: 30rem;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.panel {
  position: relative;
  margin-bottom: 14px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(18, 43, 36, 0.86), rgba(7, 24, 20, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel::before {
  position: absolute;
  top: 0;
  left: 11%;
  width: 78%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(182, 249, 213, 0.4), transparent);
  content: "";
}

.panel-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.step-badge,
.status-dot {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(148, 241, 195, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(143, 242, 195, 0.05);
  font-size: 10px;
}

.status-dot.active {
  color: var(--mint);
  border-color: rgba(146, 245, 197, 0.34);
  background: rgba(146, 245, 197, 0.1);
}

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

.install-steps div {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  color: #b7c5c0;
  background: rgba(0, 0, 0, 0.12);
  font-size: 13px;
}

.install-steps b {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  color: var(--mint);
  background: rgba(146, 245, 197, 0.1);
  font-size: 11px;
}

.install-steps strong {
  color: var(--ink);
  font-weight: 600;
}

.installed-state {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(146, 245, 197, 0.18);
  border-radius: 16px;
  background: rgba(146, 245, 197, 0.06);
}

.success-orbit {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #082118;
  background: var(--mint);
  font-size: 20px;
  font-weight: 800;
}

.installed-state strong {
  font-size: 14px;
}

.installed-state p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.support-copy {
  min-height: 44px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

label {
  display: block;
  margin: 0 0 8px;
  color: #aabbb5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: rgba(2, 15, 12, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input {
  min-height: 49px;
  padding: 0 14px;
}

textarea {
  padding: 13px 14px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(146, 245, 197, 0.52);
  box-shadow: 0 0 0 3px rgba(146, 245, 197, 0.08);
}

.password-row {
  position: relative;
  margin-bottom: 15px;
}

.password-row input {
  padding-right: 69px;
}

.icon-button {
  position: absolute;
  top: 9px;
  right: 9px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #102a23;
  font-size: 11px;
}

.primary-button,
.secondary-button {
  min-height: 49px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.primary-button {
  border: 1px solid rgba(193, 255, 221, 0.25);
  color: #062018;
  background: linear-gradient(135deg, #b8ffdd, #72eab6);
  box-shadow: 0 12px 25px rgba(67, 199, 139, 0.18);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active {
  transform: scale(0.98);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.full-width {
  width: 100%;
}

.text-button,
.logout-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.text-button {
  display: block;
  margin: 14px auto 0;
  padding: 6px;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
}

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

.metric-card {
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 32, 26, 0.68);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.metric-card strong {
  display: inline-block;
  margin: 19px 4px 4px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 400;
}

.metric-card.accent {
  color: #082019;
  background: linear-gradient(145deg, #e9d595, #ba9d55);
}

.metric-card.accent span,
.metric-card.accent small {
  color: rgba(8, 32, 25, 0.62);
}

.metric-card.accent strong {
  font-family: "SF Pro Display", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

#pushForm label:not(:first-child) {
  margin-top: 16px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: 20px;
}

.logout-button {
  display: block;
  margin: 28px auto 10px;
  padding: 10px;
  font-size: 11px;
}

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding: 0 5px;
  color: #61726c;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100% - 40px), 480px);
  padding: 13px 16px;
  transform: translate(-50%, 25px);
  border: 1px solid rgba(170, 240, 204, 0.22);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(11, 35, 28, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (min-width: 680px) {
  .shell {
    padding-top: 38px;
  }

  .panel {
    padding: 28px;
  }

  .install-panel,
  .notification-panel {
    display: inline-block;
    width: calc(50% - 7px);
    vertical-align: top;
  }

  .install-panel {
    margin-right: 10px;
  }
}

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

