@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --bg: #0f1116;
  --bg-soft: #1c1f2b;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-dark: rgba(17, 18, 24, 0.85);
  --panel-border: rgba(255, 255, 255, 0.2);
  --text: #f2f2f5;
  --text-muted: rgba(242, 242, 245, 0.75);
  --accent: #0b1a34;
  --accent-light: #c7bc96;
  --shadow: 0 40px 110px rgba(0, 0, 0, 0.6);
}

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

body {
  margin: 0;
  font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body.lang-en {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(15, 16, 24, 0.9));
}

.hero.login-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 5, 10, 0.6), rgba(4, 5, 10, 0.9)),
    url('/static/assets/bg.jpg') center/cover no-repeat;
  filter: saturate(0.9);
  z-index: -3;
}

body.lang-en .hero-bg {
  background: linear-gradient(180deg, rgba(255,255,255,0.3), rgba(0,0,0,0.9)),
    url('/static/assets/bg.jpg') center/cover no-repeat;
}

body.lang-ar .hero-bg {
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.85)),
    url('/static/assets/bg.jpg') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.85));
  z-index: -2;
}

body.lang-en .hero-overlay {
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.65));
}

body.lang-ar .hero-overlay {
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.9));
}

.hero-head {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 2;
}

.hero-logo-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-logo-top .logo {
  height: 56px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.7));
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.lang-ar .hero-controls {
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 10px;
  border-radius: 16px;
}

body.lang-en .hero-controls {
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid rgba(15, 18, 40, 0.25);
}

.lang-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  border-radius: 99px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 1.1rem;
}

.auth-card {
  width: min(380px, 90vw);
  background: var(--panel);
  border-radius: 30px;
  padding: 28px 30px 34px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.22);
  text-align: right;
  z-index: 2;
}

body.lang-en .auth-card,
.hero.login-hero.lang-en .auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(241,241,248,0.95));
  color: #0f1224;
  border: 1px solid rgba(15,18,40,0.12);
  box-shadow: 0 30px 80px rgba(33, 33, 56, 0.35);
}

body.lang-ar .auth-card,
.hero.login-hero.lang-ar .auth-card {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow);
}

.card-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
  justify-content: center;
  gap: 8px;
}

body.lang-en .card-tabs {
  background: rgba(0, 0, 0, 0.15);
}

.card-tabs .tab {
  flex: 1;
  padding: 10px 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
}

.card-tabs .tab.active {
  background: var(--accent);
  color: #fff;
}

.card-tabs .tab.ghost {
  color: inherit;
  opacity: 0.7;
}

.form label {
  font-size: 0.92rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.92);
  color: #0b1224;
  font-size: 1rem;
  margin-bottom: 12px;
}

body.lang-ar .form input {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

body.lang-en .form input {
  background: rgba(241, 241, 241, 0.95);
  border-color: rgba(15, 18, 40, 0.12);
}

.password-wrap {
  position: relative;
}

.toggle-pass {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.toggle-pass::after {
  content: '👁';
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.remember {
  display: flex;
  gap: 6px;
  align-items: center;
}

.link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

body.lang-en .link {
  color: #0f1224;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn.btn-accent {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.btn.full {
  width: 100%;
}

.fine-print {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

.footer {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  z-index: 2;
}

.reset-view {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 50;
}

.reset-view.show {
  display: grid;
}

.rv-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4)),
    url('/static/assets/bg.jpg') center/cover no-repeat;
  filter: blur(4px);
  z-index: -3;
}

.rv-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.85));
  z-index: -2;
}

.reset-card {
  width: min(92vw, 520px);
  padding: 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f1224;
  box-shadow: var(--shadow);
  text-align: right;
}

body.lang-ar .reset-card {
  background: rgba(4, 4, 8, 0.85);
  color: var(--text);
}

body.lang-en .reset-card {
  background: rgba(255, 255, 255, 0.95);
  color: #0f1224;
  border: 1px solid rgba(15, 18, 40, 0.12);
}

.reset-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.reset-desc {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 1rem;
}

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

.reset-input {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 1rem;
}

.reset-btn {
  background: var(--accent);
  color: #fff;
}

.reset-back {
  position: absolute;
  top: 18px;
  right: 24px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  z-index: 2;
}

body.lang-en .reset-back {
  left: 24px;
  right: auto;
  background: rgba(255, 255, 255, 0.15);
  color: #0f1224;
  border: 1px solid rgba(15, 18, 40, 0.2);
}

body.lang-ar .reset-back {
  right: 24px;
  left: auto;
  background: rgba(0, 0, 0, 0.35);
}

.theme-light {
  background: #f6f4f2;
  color: #0b1224;
}

body.theme-light .auth-card {
  background: rgba(255, 255, 255, 0.95);
  color: #0b1224;
}

@media (max-width: 600px) {
  .hero-head {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .auth-card {
    padding: 22px;
  }

  .footer {
    position: static;
    margin-top: 24px;
  }
}
