:root {
  --deep-navy: #081625;
  --navy: #0F2742;
  --electric: #2BB3FF;
  --electric-2: #126CFF;
  --cyan: #6FE3FF;
  --white: #EAF2FF;
  --muted: #8FA8C7;
  --muted-2: #607A9C;
  --danger: #ff6b86;
  --success: #42e6ac;
  --border: rgba(111, 227, 255, 0.18);
  --border-soft: rgba(234, 242, 255, 0.08);
  --glass: rgba(8, 22, 37, 0.72);
  --dark: #030b14;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(43, 179, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(111, 227, 255, 0.10), transparent 32%),
    linear-gradient(135deg, #030b14 0%, var(--deep-navy) 45%, #020811 100%);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
  mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-20%, -50%);
  background: radial-gradient(circle, rgba(43,179,255,.14), transparent 60%);
  filter: blur(8px);
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

.login-shell {
  width: 100%;
  max-width: 1080px;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(8, 22, 37, 0.84), rgba(4, 12, 22, 0.94));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(24px);
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent, rgba(111, 227, 255, .22), transparent 42%);
  opacity: .5;
  pointer-events: none;
}

.brand-side {
  padding: 58px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 35% 35%, rgba(43, 179, 255, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(15, 39, 66, 0.22), transparent);
  min-width: 0;
}

.brand-side::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 58px;
  bottom: 58px;
  width: 1px;
  background: linear-gradient(transparent, rgba(43,179,255,.42), transparent);
  opacity: .45;
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-mark {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 18px rgba(43, 179, 255, 0.45));
}

.brand-lockup {
  direction: ltr;
}

.brand-name {
  font-size: 42px;
  font-weight: 760;
  letter-spacing: -1.4px;
  line-height: 1;
}

.brand-name span {
  background: linear-gradient(135deg, var(--cyan), var(--electric));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.hero-text {
  max-width: 560px;
  position: relative;
}

.hero-text h1 {
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -2px;
  margin-bottom: 22px;
}

.hero-text h1 span {
  background: linear-gradient(135deg, var(--white), var(--cyan), var(--electric));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 500px;
}

.features {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

.feature-pill {
  border: 1px solid rgba(111, 227, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
  padding: 10px 14px;
  color: #bfd1e8;
  font-size: 13px;
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.login-side {
  padding: 42px;
  border-left: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
    rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lang-switcher {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border-soft);
  background: rgba(3, 11, 20, .38);
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.lang-switcher a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  transition: .2s ease;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: #02101d;
  background: linear-gradient(135deg, var(--cyan), var(--electric));
}

.login-card {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
}

.login-card h2 {
  font-size: 30px;
  margin-bottom: 10px;
  letter-spacing: -0.8px;
}

.login-card .subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.alert {
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 107, 134, .24);
  background: rgba(255, 107, 134, .09);
  color: #ffd7df;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  color: #bdd2eb;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 54px;
  border-radius: 15px;
  border: 1px solid rgba(111, 227, 255, 0.16);
  background: rgba(4, 12, 22, 0.72);
  color: var(--white);
  padding: 0 16px;
  outline: none;
  font-size: 15px;
  transition: 0.25s ease;
}

.input-wrap.has-action input {
  padding-right: 54px;
}

.input-wrap input:focus {
  border-color: rgba(43, 179, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(43, 179, 255, 0.10);
}

.input-wrap input::placeholder {
  color: rgba(143, 168, 199, 0.55);
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  color: var(--cyan);
  cursor: pointer;
  transition: .2s ease;
}

.password-toggle:hover {
  background: rgba(43,179,255,.13);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 6px 0 26px;
  font-size: 13px;
  color: var(--muted);
}

.row label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.row input {
  accent-color: var(--electric);
}

.row a {
  color: var(--cyan);
  text-decoration: none;
}

.row a:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 16px;
  color: #02101d;
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--electric));
  box-shadow: 0 14px 34px rgba(43, 179, 255, 0.28);
  transition: 0.25s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(43, 179, 255, 0.38);
}

.login-btn:disabled {
  opacity: .75;
  cursor: wait;
  transform: none;
}

.secure-note {
  margin-top: 26px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(111, 227, 255, 0.14);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.secure-note strong {
  color: var(--white);
}

.footer-note {
  position: absolute;
  bottom: 22px;
  right: 32px;
  color: rgba(143, 168, 199, 0.45);
  font-size: 12px;
  z-index: 2;
}

.connected-card {
  width: min(520px, 100%);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(4, 12, 22, .72);
  padding: 42px;
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  backdrop-filter: blur(24px);
  position: relative;
  z-index: 1;
}

.connected-card img {
  width: 86px;
  height: 86px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 18px rgba(43, 179, 255, 0.45));
}

.connected-card h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.connected-card p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

.connected-card .email {
  color: var(--cyan);
  margin-bottom: 26px;
  direction: ltr;
}

.connected-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #02101d;
  background: linear-gradient(135deg, var(--cyan), var(--electric));
  text-decoration: none;
  font-weight: 700;
}

[dir="rtl"] .login-side {
  border-left: 0;
  border-right: 1px solid var(--border);
}

[dir="rtl"] .brand-side::after {
  right: auto;
  left: 26px;
}

[dir="rtl"] .lang-switcher {
  right: auto;
  left: 24px;
}

[dir="rtl"] .input-wrap.has-action input {
  padding-right: 16px;
  padding-left: 54px;
}

[dir="rtl"] .password-toggle {
  right: auto;
  left: 8px;
}

[dir="rtl"] .footer-note {
  right: auto;
  left: 32px;
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .brand-side {
    padding: 36px;
    min-height: 430px;
  }

  .brand-side::after {
    display: none;
  }

  .login-side,
  [dir="rtl"] .login-side {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--border);
    padding: 76px 34px 34px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .brand-side,
  .login-side,
  [dir="rtl"] .login-side {
    padding-left: 24px;
    padding-right: 24px;
  }

  .brand-side {
    min-height: 390px;
  }

  .brand-name {
    font-size: 34px;
  }

  .logo-mark {
    width: 60px;
    height: 60px;
  }

  .tagline {
    letter-spacing: 3px;
    font-size: 11px;
  }

  .hero-text h1 {
    letter-spacing: -1.3px;
  }

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

  .footer-note {
    display: none;
  }
}
