:root {
  color-scheme: dark;
  --bg: #090b0a;
  --surface: #101311;
  --surface-raised: #151916;
  --surface-soft: #0d100e;
  --line: rgba(230, 241, 233, 0.1);
  --line-strong: rgba(230, 241, 233, 0.17);
  --text: #f2f6f3;
  --muted: #89928c;
  --muted-strong: #aab3ad;
  --green: #85f2ad;
  --green-deep: #183e29;
  --red: #ff6876;
  --red-deep: #401b21;
  --amber: #e9c978;
  --radius: 22px;
  --radius-small: 13px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -10%, rgba(79, 145, 99, 0.14), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  opacity: 0.11;
  filter: blur(120px);
  pointer-events: none;
}

.ambient-one {
  top: -15rem;
  right: -10rem;
  background: #72d99a;
}

.ambient-two {
  bottom: -22rem;
  left: -12rem;
  background: #315c42;
}

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

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

.wordmark-icon,
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(133, 242, 173, 0.28);
  border-radius: 13px;
  background: rgba(133, 242, 173, 0.08);
  color: var(--green);
  font-size: 20px;
  font-weight: 760;
}

.wordmark strong {
  display: block;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.wordmark small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.market-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 19, 17, 0.76);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.04em;
}

.market-pulse,
.button-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(133, 242, 173, 0.09);
}

main {
  padding: 74px 0 36px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  align-items: end;
  gap: 70px;
  margin-bottom: 74px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 620;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-copy > p:last-child {
  max-width: 550px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.65;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr;
  gap: 10px;
}

.summary-card {
  min-height: 142px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 17, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}

.summary-card > span,
.metric-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 27px;
  font-size: 30px;
  font-weight: 620;
  letter-spacing: -0.045em;
}

.summary-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.summary-connected {
  border-color: rgba(133, 242, 173, 0.2);
  background: linear-gradient(145deg, rgba(28, 54, 37, 0.72), rgba(14, 20, 16, 0.9));
}

.summary-connected strong {
  color: var(--green);
}

.system-state {
  font-size: 20px !important;
}

.system-state.online {
  color: var(--green);
}

.system-state.alert {
  color: var(--red);
}

.desk {
  margin-bottom: 18px;
}

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

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 620;
  letter-spacing: -0.045em;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.48;
}

.button-primary {
  border-color: var(--green);
  background: var(--green);
  color: #071009;
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted-strong);
}

.button-wide {
  width: 100%;
}

.button-primary .button-dot {
  background: #071009;
  box-shadow: none;
}

.button-icon {
  font-size: 16px;
  font-weight: 400;
}

.notice {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(133, 242, 173, 0.22);
  border-radius: 13px;
  background: rgba(133, 242, 173, 0.07);
  color: #bceccb;
  font-size: 12px;
  line-height: 1.5;
}

.notice.error {
  border-color: rgba(255, 104, 118, 0.28);
  background: rgba(255, 104, 118, 0.08);
  color: #ffabb3;
}

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

.slot-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 18, 16, 0.9);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, transform 180ms ease;
}

.slot-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 6px);
}

.slot-card:hover {
  border-color: var(--line-strong);
}

.slot-card.is-trading {
  border-color: rgba(133, 242, 173, 0.22);
}

.slot-card.is-risk {
  border-color: rgba(255, 104, 118, 0.34);
}

.slot-head,
.slot-balance-row,
.slot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.slot-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 720;
}

.slot-name {
  width: min(230px, 100%);
  height: 25px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.slot-caption {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill b {
  font-weight: 750;
}

.status-trading {
  border-color: rgba(133, 242, 173, 0.24);
  background: rgba(133, 242, 173, 0.08);
  color: var(--green);
}

.status-risk {
  border-color: rgba(255, 104, 118, 0.3);
  background: rgba(255, 104, 118, 0.1);
  color: var(--red);
}

.status-ready {
  color: var(--amber);
}

.slot-balance-row {
  align-items: flex-end;
  margin: 25px 0 21px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.slot-balance {
  display: block;
  margin-top: 6px;
  font-size: 27px;
  font-weight: 610;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.slot-balance::after {
  content: " USDT";
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
}

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

.field {
  display: block;
  min-width: 0;
}

.field > span {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-wide {
  grid-column: 1 / -1;
}

.secret-control {
  position: relative;
}

.field input {
  width: 100%;
  height: 43px;
  padding: 0 43px 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  transition: border-color 150ms ease, background 150ms ease;
}

.field input::placeholder {
  color: #59615c;
}

.field input:focus {
  border-color: rgba(133, 242, 173, 0.42);
  background: #111612;
}

.reveal-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.reveal-button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.slot-foot {
  margin-top: 18px;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--muted-strong);
  font-size: 11px;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 34px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #181c19;
  transition: background 150ms ease, border-color 150ms ease;
}

.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #68716b;
  transition: transform 150ms ease, background 150ms ease;
}

.switch-control input:checked + .switch {
  border-color: rgba(133, 242, 173, 0.42);
  background: rgba(133, 242, 173, 0.13);
}

.switch-control input:checked + .switch i {
  transform: translateX(14px);
  background: var(--green);
}

.clear-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #6f7772;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.clear-button:hover {
  color: var(--red);
}

.slot-detail {
  min-height: 15px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.slot-card.is-risk .slot-detail {
  color: #e9969d;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 0 42px;
  color: #515853;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #515853;
}

.signature {
  position: fixed;
  right: 20px;
  bottom: 17px;
  z-index: 20;
  color: rgba(242, 246, 243, 0.54);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.16em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 18, 16, 0.94);
  box-shadow: var(--shadow);
}

.auth-card .brand-mark {
  margin-bottom: 28px;
}

.auth-card .eyebrow {
  margin-bottom: 8px;
}

.auth-card h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 620;
  letter-spacing: -0.055em;
}

.auth-copy {
  margin: 11px 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-field {
  margin-bottom: 15px;
}

.auth-field input {
  padding-right: 13px;
}

.form-error {
  min-height: 16px;
  margin: 13px 0 0;
  color: var(--red);
  font-size: 11px;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 4, 0.78);
  backdrop-filter: blur(14px);
}

.modal {
  width: min(480px, 100%);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #111411;
  box-shadow: var(--shadow);
}

.modal-kicker {
  color: var(--green);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.18em;
}

.modal h2 {
  margin: 12px 0 11px;
  font-size: 25px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.modal p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 25px;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero-copy {
    max-width: 720px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 0 18px;
  }

  .topbar {
    min-height: 80px;
  }

  main {
    padding-top: 52px;
  }

  .hero {
    margin-bottom: 54px;
  }

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

  .slot-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }

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

  .heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .heading-actions .button {
    flex: 1;
  }

}

@media (max-width: 540px) {
  .market-chip {
    padding: 0 11px;
  }

  .wordmark small {
    display: none;
  }

  .hero h1 {
    font-size: 43px;
  }

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

  .summary-connected {
    grid-column: 1 / -1;
  }

  .summary-card {
    min-height: 124px;
    padding: 18px;
  }

  .summary-card strong {
    margin-top: 22px;
    font-size: 25px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .heading-actions .button-ghost {
    flex: 0 0 44px;
    padding: 0;
    font-size: 0;
  }

  .heading-actions .button-icon {
    font-size: 18px;
  }

  .slot-card {
    padding: 18px;
  }

  .slot-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill {
    align-self: flex-start;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

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

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