:root {
  color-scheme: dark;
  --bg: #06111e;
  --bg-soft: #0b1728;
  --panel: rgba(12, 22, 36, 0.78);
  --panel-strong: rgba(13, 25, 41, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #e7eef8;
  --text-soft: #92a6bd;
  --text-faint: #6f8095;
  --accent: #39a8ff;
  --accent-2: #1bd0d8;
  --danger: #ff6f8e;
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.48);
  --shadow-md: 0 16px 42px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(57, 168, 255, 0.18), transparent 22%),
    radial-gradient(circle at top right, rgba(27, 208, 216, 0.12), transparent 20%),
    linear-gradient(180deg, #07111f 0%, #09131f 46%, #050b14 100%);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

.page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding:
    max(18px, env(safe-area-inset-top))
    16px
    max(18px, env(safe-area-inset-bottom))
    16px;
}

.backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
}

.orb-a {
  top: 8%;
  left: -6%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(57, 168, 255, 0.22), transparent 66%);
}

.orb-b {
  right: -8%;
  bottom: 6%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(27, 208, 216, 0.16), transparent 68%);
}

.grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 92%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: center;
}

.install-button {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  backdrop-filter: blur(14px);
}

.install-button svg,
.toggle-button svg {
  width: 18px;
  height: 18px;
}

.brand-panel {
  padding: 16px 6px;
}

.logo {
  width: min(100%, 300px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.34));
}

.login-card {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(16, 27, 43, 0.9), rgba(9, 18, 31, 0.94));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mark img {
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.card-title {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.field {
  display: block;
}

.field + .field {
  margin-top: 14px;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.input-shell:focus-within {
  border-color: rgba(57, 168, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(57, 168, 255, 0.08);
}

.input-shell input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.input-shell input::placeholder {
  color: var(--text-faint);
}

.toggle-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(57, 168, 255, 0.1);
  color: #8ecaff;
}

.primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #3fa9ff 0%, #1a6bd1 50%, #0f4f9f 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 36px rgba(20, 105, 209, 0.3);
}

.primary-button:disabled {
  opacity: 0.65;
}

.status {
  min-height: 20px;
  margin: 14px 2px 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .brand-panel {
    padding: 0;
  }
}

@media (max-width: 620px) {
  .page {
    padding:
      max(14px, env(safe-area-inset-top))
      12px
      max(14px, env(safe-area-inset-bottom))
      12px;
  }

  .login-card {
    padding: 18px;
    border-radius: 28px;
  }

  .install-button {
    top: max(10px, env(safe-area-inset-top));
    right: 0;
  }
}
