:root {
  --auth-bg: #edf6ff;
  --auth-panel: #ffffff;
  --auth-text: #12233d;
  --auth-muted: #66758b;
  --auth-line: #ccd9e8;
  --auth-primary: #0874ce;
  --auth-primary-hover: #075ca4;
  --auth-header: rgba(255, 255, 255, 0.94);
  --auth-shadow: 0 24px 80px rgba(24, 62, 104, 0.17);
}

html[data-theme="dark"] {
  --auth-bg: #091421;
  --auth-panel: #111f2f;
  --auth-text: #ecf5ff;
  --auth-muted: #a8b8c9;
  --auth-line: #30445a;
  --auth-primary: #1998ed;
  --auth-primary-hover: #3babf5;
  --auth-header: rgba(10, 22, 35, 0.95);
  --auth-shadow: 0 25px 90px rgba(0, 0, 0, 0.42);
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 28% 9%, rgba(67, 176, 235, 0.17), transparent 34%),
    var(--auth-bg);
}

.standard-five-bar {
  min-height: 72px;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--auth-header);
  border-bottom: 1px solid var(--auth-line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-text);
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
}

.auth-logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #1da9db, #0964c2);
}

.standard-five {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.five-button {
  min-height: 42px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: var(--auth-panel);
  color: var(--auth-text);
  text-decoration: none;
  cursor: pointer;
  transition: 0.18s ease;
}

.five-button:hover,
.five-button.active {
  border-color: var(--auth-primary);
  background: var(--auth-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.language-button select {
  max-width: 105px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.language-button select option {
  color: #10223a;
  background: #ffffff;
}

.auth-shell {
  min-height: calc(100vh - 72px);
  padding: 44px 18px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(500px, calc(100vw - 32px));
  padding: 38px;
  text-align: center;
  background: var(--auth-panel);
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  box-shadow: var(--auth-shadow);
}

.auth-card-wide {
  width: min(580px, calc(100vw - 32px));
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: clamp(29px, 4vw, 42px);
  color: var(--auth-text);
}

.auth-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 16px;
}

.auth-form {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: start;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--auth-text);
  font-size: 14px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  background: var(--auth-panel);
  color: var(--auth-text);
  outline: none;
}

.auth-form input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 211, 0.14);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-inline-end: 48px;
}

.password-toggle {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-question {
  min-width: 150px;
  padding: 11px 14px;
  text-align: center;
  letter-spacing: 2px;
  border: 1px dashed var(--auth-primary);
  border-radius: 10px;
  color: var(--auth-primary);
  background: rgba(10, 116, 206, 0.07);
  font-size: 19px;
  font-weight: 800;
}

.captcha-refresh {
  padding: 10px 13px;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  color: var(--auth-text);
  background: var(--auth-panel);
  cursor: pointer;
}

.auth-primary {
  min-height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: var(--auth-primary);
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
}

.auth-primary:hover {
  background: var(--auth-primary-hover);
}

.auth-links {
  margin-top: 20px;
}

.auth-links a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 700;
}

.voice-status {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 11px;
  color: #ffffff;
  background: #102940;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .2s;
}

.voice-status.show {
  opacity: 1;
  transform: translateY(0);
}

html[dir="rtl"] .auth-form {
  text-align: right;
}

html[dir="rtl"] .standard-five-bar {
  direction: rtl;
}

html[dir="rtl"] .captcha-row {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

@media (max-width: 780px) {
  .standard-five-bar {
    padding: 10px 12px;
    align-items: flex-start;
  }

  .auth-logo span:last-child {
    display: none;
  }

  .standard-five {
    justify-content: flex-end;
    gap: 5px;
  }

  .five-button {
    min-height: 39px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .auth-card {
    padding: 26px 20px;
  }
}
