:root {
  color-scheme: dark;
  --bg: #09110f;
  --panel: #111b18;
  --panel-2: #17231f;
  --text: #f0f7f4;
  --muted: #9eb3aa;
  --line: #263731;
  --accent: #33d69f;
  --accent-2: #f0c85a;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #12382e 0, transparent 32rem), var(--bg);
  color: var(--text);
}

button, input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #06110d;
  font-weight: 800;
  cursor: pointer;
}

button.secondary, .topbar button, .dialog-head button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.auth-grid {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 24px;
  align-items: stretch;
}

.brand-panel, .auth-panel, .blank-panel, dialog {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-radius: 8px;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
}

.brand-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #06110d;
  font-weight: 950;
  margin-bottom: 28px;
}

.brand-panel h1, .topbar h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: .95;
  letter-spacing: 0;
}

.brand-panel p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.12rem;
}

.auth-panel {
  padding: 20px;
  align-self: center;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: .88rem;
}

.tab.active {
  background: var(--accent-2);
  color: #171100;
}

.tab-page {
  display: none;
}

.tab-page.active {
  display: grid;
}

.form {
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .92rem;
}

input {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #07100d;
  color: var(--text);
  padding: 0 12px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.check input {
  min-height: auto;
}

.message {
  min-height: 24px;
  color: var(--accent-2);
}

.message.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.app-view {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 800;
}

.topbar nav {
  display: flex;
  gap: 10px;
}

.chart-section {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #06100d;
}

.tradingview-widget-container, .tradingview-widget-container__widget {
  width: 100%;
  height: 520px;
}

.blank-panel {
  padding: 24px;
}

dialog {
  width: min(620px, calc(100% - 24px));
  color: var(--text);
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, .72);
}

.dialog-form {
  padding: 18px;
}

.terms {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

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

  .brand-panel {
    min-height: 280px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
  }

  .two, .tabs {
    grid-template-columns: 1fr;
  }

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

  .topbar nav {
    width: 100%;
  }

  .topbar nav button {
    flex: 1;
  }
}
