:root {
  --bg: #061018;
  --bg-2: #0a1622;
  --panel: rgba(10, 24, 36, 0.82);
  --line: rgba(84, 214, 196, 0.16);
  --text: #e8f4f1;
  --muted: #7f9aa3;
  --accent: #2dd4bf;
  --accent-deep: #0d9488;
  --gold: #e8c547;
  --danger: #fb7185;
  --up: #34d399;
  --down: #fb7185;
  --display: "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
}
.login-body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(700px 420px at 88% 8%, rgba(232, 197, 71, 0.08), transparent 50%),
    linear-gradient(180deg, #07131c 0%, #061018 55%, #040c12 100%);
}

.fx-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(125, 211, 200, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 200, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  animation: gridDrift 28s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}
.fx-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.45;
}
.fx-glow-a {
  width: 360px;
  height: 360px;
  background: #115e59;
  left: -80px;
  bottom: 10%;
  animation: floatA 10s ease-in-out infinite;
}
.fx-glow-b {
  width: 280px;
  height: 280px;
  background: #854d0e;
  right: -40px;
  top: 18%;
  animation: floatB 12s ease-in-out infinite;
}
@keyframes floatA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -24px); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, 18px); }
}

.ticker {
  position: relative;
  z-index: 5;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 14, 20, 0.75);
  backdrop-filter: blur(10px);
  height: 36px;
}
.ticker-track {
  display: flex;
  width: max-content;
  padding: 8px 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  animation: ticker 32s linear infinite;
  will-change: transform;
}
.ticker-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  white-space: nowrap;
}
.ticker-group span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ticker-group em {
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ticker-group .up { color: var(--up); }
.ticker-group .down { color: var(--down); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.login-shell {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.login-hero {
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 72px);
}
.hero-inner { max-width: 620px; }
.hero-logo {
  width: min(260px, 72vw);
  margin-bottom: 28px;
  filter: drop-shadow(0 10px 28px rgba(45, 212, 191, 0.28));
  animation: rise 0.8s ease both;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: rise 0.8s ease 0.05s both;
}
.login-hero h1 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
  animation: rise 0.8s ease 0.1s both;
}
.lede {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.65;
  animation: rise 0.8s ease 0.15s both;
}
.hero-pulse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
  animation: rise 0.8s ease 0.22s both;
}
.pulse-card {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 22, 32, 0.55);
  backdrop-filter: blur(8px);
}
.pulse-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pulse-card strong {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.live-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pip 1.6s infinite;
}
@keyframes pip {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-chart {
  margin-top: 36px;
  padding: 14px 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.06), transparent 45%),
    rgba(4, 14, 20, 0.55);
  animation: rise 0.8s ease 0.28s both;
}
.hero-chart-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}
.hero-chart-meta span {
  color: var(--muted);
  letter-spacing: 0.08em;
  font-weight: 700;
}
.hero-chart-meta strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.hero-chart-meta em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}
.hero-chart-meta .up { color: var(--up); }
.mini-candles {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 92px;
  padding: 4px 2px 0;
}
.mini-candles i {
  position: relative;
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 2px 2px;
  transform-origin: bottom center;
  animation: candlePulse 2.8s ease-in-out infinite;
}
.mini-candles i::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1.5px;
  height: calc(var(--b) + 18%);
  transform: translateX(-50%);
  border-radius: 2px;
  opacity: 0.85;
}
.mini-candles i.up {
  background: linear-gradient(180deg, #5eead4, #0f766e);
}
.mini-candles i.up::before { background: #2dd4bf; }
.mini-candles i.dn {
  background: linear-gradient(180deg, #fb7185, #9f1239);
}
.mini-candles i.dn::before { background: #fb7185; }
.mini-candles i:nth-child(3n) { animation-delay: 0.25s; }
.mini-candles i:nth-child(4n) { animation-delay: 0.5s; }
.mini-candles i:nth-child(5n) { animation-delay: 0.75s; }
.mini-candles i.live {
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.45);
  animation: candleLive 1.6s ease-in-out infinite;
}
@keyframes candlePulse {
  0%, 100% { transform: scaleY(1); opacity: 0.9; }
  50% { transform: scaleY(0.86); opacity: 1; }
}
@keyframes candleLive {
  0%, 100% { transform: scaleY(1); filter: brightness(1); }
  50% { transform: scaleY(1.08); filter: brightness(1.15); }
}

.login-main {
  display: grid;
  place-items: center;
  padding: 28px 20px 40px;
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  animation: rise 0.7s ease 0.18s both;
}
.login-card-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.login-card-top .mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25);
}
.login-card-top h2 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.03em;
}
.login-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.login-card label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.login-card input[type="text"],
.login-card input[type="password"] {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 200, 0.18);
  background: rgba(4, 14, 20, 0.85);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}
.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 18px;
  font-size: 12px;
  color: var(--muted);
}
.check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
}
.login-card button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2dd4bf, #0f766e 70%, #115e59);
  color: #042f2e;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.35);
  transition: transform .15s, filter .15s;
}
.login-card button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-arrow {
  font-size: 18px;
  transition: transform .15s;
}
.login-card button:hover .btn-arrow { transform: translateX(3px); }
.login-error {
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fecdd3;
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}
.login-foot {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.muted { color: var(--muted); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 22px 8px; }
  .login-hero h1 { font-size: clamp(34px, 10vw, 48px); }
  .hero-pulse { grid-template-columns: 1fr; }
  .candle-row { height: 64px; margin-top: 24px; }
}
