/* ==========================================================================
   UXINA Platform — Unified Cyberpunk Deep Navy Design System (Login)
   ========================================================================== */

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

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.35);
  --accent: #38bdf8;
  --cyan: #06b6d4;
  --text: #f8fafc;
  --muted: #94a3b8;
  --bg: #07111f;
  --card: rgba(14, 27, 46, 0.88);
  --line: rgba(56, 189, 248, 0.18);
  --line-strong: rgba(56, 189, 248, 0.35);
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 50% 20%, rgba(2, 132, 199, 0.18) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
              #07111f;
  color: var(--text);
  font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow mesh */
body::before {
  content: "";
  position: fixed;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: #0284c7;
  filter: blur(120px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -150px;
  left: -100px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: #06b6d4;
  filter: blur(120px);
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.login-page {
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 10;
}

.login-card {
  padding: 34px 32px 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55), 0 0 35px rgba(2, 132, 199, 0.15);
  text-align: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.6), 0 0 45px rgba(56, 189, 248, 0.22);
}

/* Top bar: Back to Home + Lang toggle */
.login-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
}

.login-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.65);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  line-height: 1;
}

.login-back-btn:hover {
  color: #f8fafc;
  border-color: var(--accent);
  background: rgba(2, 132, 199, 0.2);
  transform: translateY(-1px);
}

.login-back-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

html[dir="rtl"] .login-back-icon {
  transform: scaleX(1);
}

html[dir="ltr"] .login-back-icon,
html:not([dir="rtl"]) .login-back-icon {
  transform: scaleX(-1);
}

.language-toggle {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-toggle.compact {
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.65);
}

.language-toggle:hover {
  color: #f8fafc;
  border-color: var(--accent);
  background: rgba(2, 132, 199, 0.2);
}

/* Brand display */
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.login-brand-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.35));
}

.login-brand-en {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #f8fafc;
  font-family: 'Inter', sans-serif;
}

.login-brand-dot {
  color: var(--accent);
  font-size: 18px;
}

.login-brand-ar {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0;
}

/* Card titles */
h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 22px;
  font-weight: 800;
}

.login-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

/* Form inputs */
form {
  display: grid;
  gap: 16px;
  text-align: right;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  color: #cbd5e1;
}

input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #07111f;
  color: #f8fafc;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

input::placeholder {
  color: #64748b;
  opacity: 0.7;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: #0b192e;
}

/* Submit and Action Buttons */
button#loginBtn {
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #0284c7 0%, #026ca3 100%);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 46px;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.35);
}

button#loginBtn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 6px 26px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-status {
  min-height: 22px;
  margin: 0;
  color: #f87171;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.login-status:empty {
  display: none;
}

.login-status.success {
  color: #34d399;
}

.text-action {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-align: start;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.text-action:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

/* Google Sign-in Button */
.google-login,
.secondary-auth {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #112238;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  min-height: 46px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-login:hover,
.secondary-auth:hover {
  background: #183152;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.google-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.session-security-note {
  margin: 12px 4px 0;
  text-align: center;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.5;
}

/* Email Verification Box */
.verification-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  font-size: 13px;
}

.verification-box p {
  margin: 0 0 10px;
}

/* English LTR adjustments */
.lang-en form {
  text-align: left;
}

.lang-en .login-card {
  font-family: 'Inter', 'Tajawal', -apple-system, sans-serif;
}

.lang-en .text-action {
  text-align: left;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  body {
    padding: 16px 12px;
  }

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

  .login-top-bar {
    margin-bottom: 18px;
  }

  .login-brand {
    font-size: 22px;
    gap: 8px;
    margin-bottom: 12px;
  }

  .login-brand-ar {
    font-size: 19px;
  }

  h1 {
    font-size: 20px;
  }

  .login-card > p {
    font-size: 13px;
    margin-bottom: 18px;
  }

  input {
    padding: 11px 13px;
    font-size: 14px;
  }

  button#loginBtn,
  .google-login {
    min-height: 44px;
    font-size: 14px;
  }
}
