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

:root,
html[data-theme="light"] {
  --lg-bg: #eef1f6;
  --lg-card: #ffffff;
  --lg-border: #d5dbe6;
  --lg-text: #0a0c10;
  --lg-muted: #2f3742;
  --lg-dim: #4b5563;
  --lg-accent: #e86b0f;
  --lg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[data-theme="dark"] {
  --lg-bg: #0b0b0b;
  --lg-card: #141414;
  --lg-border: #2a2a2a;
  --lg-text: #ffffff;
  --lg-muted: #e8e8e8;
  --lg-dim: #cfcfcf;
  --lg-accent: #fb923c;
}

body.login-page {
  font-family: var(--lg-font);
  background: var(--lg-bg);
  color: var(--lg-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--lg-text);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 26px;
}

.login-brand-stack {
  flex-direction: column;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.login-brand-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.login-brand-icon {
  width: 26px;
  height: 26px;
}

.login-box {
  width: 100%;
  background: var(--lg-card);
  border: 1px solid var(--lg-border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.05);
  padding: 30px 28px;
  text-align: center;
}

.login-heading {
  font-size: 21px;
  font-weight: 800;
  color: var(--lg-text);
}

.login-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--lg-muted);
}

.google-btn {
  margin-top: 22px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: #ffffff;
  border: 1px solid #d5d9e0;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  /* Qora fonda ham oq tugmada matn doim qora */
  color: #1f2937 !important;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.google-btn:hover {
  background: #f7f8fa;
  border-color: #c4c9d2;
  color: #111827 !important;
}

html[data-theme="dark"] .google-btn {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #1f2937 !important;
}

.google-g {
  width: 18px;
  height: 18px;
}

.email-toggle {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--lg-muted);
  font-size: 13px;
  font-family: var(--lg-font);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.email-toggle:hover {
  color: var(--lg-text);
}

.email-area {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--lg-border);
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--lg-font);
  color: #111827;
  background: #fff;
  border: 1px solid #d5d9e0;
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px rgba(245, 128, 32, 0.15);
}

.login-spam-hint {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--lg-dim);
  text-align: left;
}

.primary-btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--lg-font);
  color: #fff;
  background: var(--lg-accent);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s;
}

.primary-btn:hover {
  background: #e0710f;
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pending-line {
  font-size: 13px;
  color: var(--lg-muted);
  margin-bottom: 12px;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.otp-slot {
  width: 100%;
  aspect-ratio: 1 / 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--lg-text);
  background: #fff;
  border: 1px solid #d5d9e0;
  border-radius: 9px;
  outline: none;
}

.otp-slot:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px rgba(245, 128, 32, 0.15);
}

.inline-actions {
  margin-top: 12px;
  text-align: center;
}

.inline-link {
  background: none;
  border: none;
  color: var(--lg-muted);
  font-size: 13px;
  font-family: var(--lg-font);
  cursor: pointer;
  text-decoration: underline;
}

.inline-link:hover {
  color: var(--lg-text);
}

.auth-message {
  display: none;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-message.is-visible {
  display: block;
}

.auth-msg-success {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.auth-msg-error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.login-terms {
  margin-top: 22px;
  max-width: 320px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--lg-dim);
}

.login-terms a {
  color: var(--lg-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
