.gate--web {
  --bg: #000;
  --card: #161616;
  --field: #1e1e1e;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #8b8b8b;
  --text: #f2f2f2;
  --accent: #2aabee;
  --accent-dim: rgba(42, 171, 238, 0.16);
  --accent-border: rgba(42, 171, 238, 0.45);
  --tg: #2aabee;
  box-sizing: border-box;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.gate--web *,
.gate--web *::before,
.gate--web *::after {
  box-sizing: border-box;
}

.gate--web .gate-inner {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo {
  width: 132px;
  height: 132px;
  margin: 0 0 2px;
  display: grid;
  place-items: center;
}

.login-logo img {
  width: 132px;
  height: 132px;
  display: block;
  object-fit: contain;
  border-radius: 28px;
}

.gate--web .gate-title {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

.gate--web .gate-brand-sub {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.55);
}

.gate--web .gate-text {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 400;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 28px 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
}

.login-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 8px 12px;
  border-radius: 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.login-tab.is-active {
  color: var(--accent);
  background: transparent;
  border-bottom-color: var(--accent);
}

.login-pane {
  width: 100%;
  text-align: left;
  margin-top: 28px;
}

.login-pane.hidden {
  display: none !important;
}

.login-card {
  width: 100%;
  padding: 20px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
}

.login-panel.hidden {
  display: none !important;
}

.login-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-input {
  width: 100%;
  height: 52px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input::placeholder {
  color: #666;
  font-weight: 400;
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.login-btn {
  width: 100%;
  height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.login-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.login-btn:not(:disabled):active {
  transform: scale(0.98);
}

.login-btn--accent {
  background: var(--accent);
  color: #fff;
}

.login-btn--tg {
  background: var(--tg);
  color: #fff;
}

.login-btn--tg svg {
  width: 18px;
  height: 18px;
}

.login-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.login-or::before,
.login-or::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.login-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
}

.login-panel--otp {
  animation: otp-in 0.32s ease both;
}

@keyframes otp-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.otp-wrap {
  position: relative;
  width: 100%;
  margin: 0 0 4px;
}

.otp-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 2rem;
  letter-spacing: 1.2em;
  z-index: 2;
  outline: none;
}

.otp-boxes {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

.otp-cell {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--field);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.otp-cell.is-filled {
  background: rgba(42, 171, 238, 0.1);
  border-color: rgba(42, 171, 238, 0.35);
  animation: otp-pop 0.18s ease;
}

.otp-cell.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: translateY(-1px);
}

@keyframes otp-pop {
  from { transform: scale(0.92); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .login-panel--otp,
  .otp-cell.is-filled {
    animation: none;
  }
  .otp-cell.is-active {
    transform: none;
  }
}

.login-row-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.login-linkish {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
}

.login-linkish:hover {
  color: #fff;
}

.login-err {
  margin: 12px 0 0;
  color: #ff6b6b;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: center;
}

.login-err.hidden {
  display: none !important;
}

.login-foot {
  margin-top: 18px;
  text-align: center;
}

.login-foot-hint {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-foot-link {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gate--web .gate-widget {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin: 4px 0 0;
}

.gate--web .auth-pane {
  text-align: left;
}
.gate--web .gate-cta,
.gate--web .gate-demo {
  display: none;
}
