/* ════════════════════════════════════════════════════════════════
   RAWAJ — Login / Register — v2  "Dark Luxury Glass"
   تصميم: زجاجي داكن فاخر — خطوط نظيفة — شعار بارز
   ════════════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  font-family: 'Tajawal','Cairo','Inter', sans-serif;

  /* خلفية متدرجة غنية */
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(184,147,90,.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(96,165,250,.10) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 60% 50%, rgba(124,58,237,.07) 0%, transparent 60%),
    linear-gradient(160deg, #07102A 0%, #0B1830 40%, #071020 100%);
}

/* نقاط ديكورية */
.auth-container::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(184,147,90,.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

/* دوائر ضوئية متحركة */
.auth-container::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,180,170,.12) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px; right: -150px;
  animation: authOrb 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes authOrb {
  0%   { transform: translate(0,0)   scale(1);    opacity:.6; }
  50%  { transform: translate(-60px,80px) scale(1.1); opacity:.9; }
  100% { transform: translate(40px,-40px) scale(.95); opacity:.5; }
}

/* ── Card ────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  animation: cardAppear .5s cubic-bezier(.34,1.2,.64,1) both;

  background: rgba(223,240,240,.92);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(0,160,155,.18);
  border-radius: 28px;
  padding: 44px 40px 36px;
  box-shadow:
    0 20px 60px rgba(0,160,155,.18),
    0 0 0 1px rgba(0,160,155,.12),
    inset 0 1px 0 rgba(255,255,255,.9);
}

@keyframes cardAppear {
  from { opacity:0; transform:translateY(28px) scale(.97); }
  to   { opacity:1; transform:translateY(0)   scale(1);   }
}

.register-card {
  max-width: 600px;
  padding: 40px;
}

/* ── Logo Block ──────────────────────────────────────────── */
.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* شعار الصورة */
.auth-logo-img {
  display: none; /* replaced by circle container */
}
.auth-logo-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow:
    0 8px 32px rgba(0,0,0,.18),
    0 0 0 3px rgba(255,255,255,.95),
    0 0 0 7px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto 18px;
  animation: logoFloat 5s ease-in-out infinite;
  flex-shrink: 0;
}
.auth-logo-circle img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

@keyframes logoFloat {
  0%,100% { transform: translateY(0);    filter: drop-shadow(0 6px 24px rgba(0,160,155,.40)); }
  50%      { transform: translateY(-6px); filter: drop-shadow(0 12px 32px rgba(0,180,170,.55)); }
}

/* fallback icon if no image */
.auth-logo i {
  display: none;
}

.auth-logo h1 {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 40%, #115E59 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 6px;
  letter-spacing: .5px;
}

.auth-subtitle {
  color: #4A8A8E;
  font-size: 13.5px;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}

/* ── Form ────────────────────────────────────────────────── */
.auth-form {
  margin-bottom: 20px;
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #2E7A7E;
  margin-bottom: 7px;
  letter-spacing: .3px;
}

/* Input wrapper */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon > i:first-child {
  position: absolute;
  right: 14px;
  color: rgba(160,100,240,.65);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
  transition: color .2s;
}

[dir="ltr"] .input-with-icon > i:first-child { right: auto; left: 14px; }

.input-with-icon input,
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"] {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 14px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: #1A4A4E;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(0,160,155,.2);
  border-radius: 14px;
  outline: none;
  transition: all .25s;
  -webkit-text-fill-color: #1A4A4E;
  caret-color: #C084FC;
}

[dir="ltr"] .input-with-icon input {
  padding: 0 14px 0 44px;
}

.input-with-icon input::placeholder { color: rgba(0,120,115,.35); }

.input-with-icon input:focus {
  border-color: rgba(0,160,155,.65);
  background: rgba(0,160,155,.05);
  box-shadow: 0 0 0 3px rgba(0,160,155,.12);
}

.input-with-icon input:focus + i:first-child,
.input-with-icon:focus-within > i:first-child {
  color: rgba(184,147,90,.9);
}

/* toggle password */
.toggle-password {
  position: absolute;
  left: 12px;
  top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: rgba(0,120,115,.45);
  font-size: 13px;
  padding: 4px;
  transition: color .2s;
  z-index: 1;
}

[dir="ltr"] .toggle-password { left: auto; right: 12px; }
.toggle-password:hover { color: rgba(160,120,255,.85); }

/* ── Remember + Forgot ───────────────────────────────────── */
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #4A8A8E;
  font-weight: 600;
}

.checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #B8935A;
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: rgba(160,120,255,.85);
  font-weight: 700;
  text-decoration: none;
  transition: color .2s;
}
.forgot-link:hover { color: #C084FC; }

/* ── Submit Button ───────────────────────────────────────── */
.auth-form .btn-primary.btn-block,
.auth-form .btn-block {
  width: 100%;
  height: 52px;
  font-size: 15px;
  font-weight: 900;
  font-family: inherit;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: linear-gradient(135deg, #B8935A 0%, #D4A96A 50%, #A8832A 100%);
  color: #0A0D14;
  letter-spacing: .4px;
  transition: all .3s;
  box-shadow: 0 6px 28px rgba(184,147,90,.38), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}

.auth-form .btn-primary.btn-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .25s;
}

.auth-form .btn-primary.btn-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(184,147,90,.52), inset 0 1px 0 rgba(255,255,255,.25);
}
.auth-form .btn-primary.btn-block:hover::before { opacity: 1; }
.auth-form .btn-primary.btn-block:active { transform: translateY(0) scale(.98); }

/* ── Footer ──────────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0,160,155,.12);
  margin-top: 4px;
}

.auth-footer p {
  color: #4A8A8E;
  font-size: 13.5px;
  margin: 0;
}

.auth-footer a {
  color: #0D9488;
  font-weight: 800;
  text-decoration: none;
  transition: color .2s;
}
.auth-footer a:hover { color: #C084FC; }

/* ── Language Switcher ───────────────────────────────────── */
.lang-switcher-bottom {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,160,155,.1);
}

.lang-switcher-bottom button {
  padding: 7px 18px;
  border: 1.5px solid rgba(0,160,155,.18);
  background: rgba(255,255,255,.6);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  color: #4A8A8E;
  font-family: inherit;
}

.lang-switcher-bottom button:hover {
  border-color: rgba(184,147,90,.4);
  color: rgba(184,147,90,.9);
}

.lang-switcher-bottom button.active {
  background: rgba(160,80,220,.15);
  border-color: rgba(160,80,220,.55);
  color: #D4A96A;
}

/* ── Register specific ───────────────────────────────────── */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.form-section:last-of-type { border-bottom: none; }

.form-section h3 {
  font-size: 15px;
  font-weight: 800;
  color: #1A4A4E;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subscription-plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.plan-card {
  position: relative;
  border: 1.5px solid rgba(0,160,155,.15);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all .25s;
  display: block;
  background: rgba(255,255,255,.7);
}

.plan-card:hover {
  border-color: rgba(184,147,90,.4);
  background: rgba(184,147,90,.05);
}

.plan-card input { position:absolute;opacity:0;width:0;height:0; }

.plan-card:has(input:checked) {
  border-color: rgba(184,147,90,.7);
  background: rgba(184,147,90,.1);
  box-shadow: 0 0 0 3px rgba(184,147,90,.15);
}

.plan-content {
  text-align: center;
  opacity: 0.7;
  transition: opacity .2s;
}
.plan-card:has(input:checked) .plan-content { opacity: 1; }

.plan-content h4 {
  font-size: 13px; font-weight: 700;
  margin-bottom: 8px; color: #1A4A4E;
}

.plan-price {
  font-size: 26px; font-weight: 900;
  color: #0D9488; margin-bottom: 4px;
}

.plan-content p { font-size: 12px; color: #4A8A8E; margin:0; }

.plan-badge {
  position: absolute; top: -10px; right: 10px;
  background: linear-gradient(135deg,#D97706,#F59E0B);
  color: #fff; padding: 3px 10px; border-radius: 10px;
  font-size: 10px; font-weight: 800; opacity: 0;
  transition: opacity .2s;
}
.rtl .plan-badge,[dir="rtl"] .plan-badge { right:auto; left:10px; }
.plan-card.popular .plan-badge,
.plan-card:has(input:checked) .plan-badge { opacity:1; }

.trial-note {
  text-align:center; font-size:13px; color:#4ADE80;
  font-weight:700; display:flex; align-items:center;
  justify-content:center; gap:8px;
}

/* ── Loader ──────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 99999;
  background: linear-gradient(160deg, #B8D8D8 0%, #C4DEDE 100%);
  display: flex; align-items: center; justify-content: center;
}

.loader-content { text-align: center; }

.logo-animation {
  width: 90px; height: 90px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  animation: loaderPulse 1.6s ease-in-out infinite;
}

.logo-animation {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  box-shadow: 0 4px 24px rgba(0,0,0,.2), 0 0 0 3px rgba(255,255,255,.9), 0 0 0 6px rgba(0,0,0,.08) !important;
  overflow: hidden !important;
}
.logo-animation img {
  width: 82%; height: 82%;
  object-fit: contain;
}

.logo-animation i { font-size: 44px; color: #D4A96A; }

@keyframes loaderPulse {
  0%,100% { transform:scale(1);   filter:drop-shadow(0 0 12px rgba(184,147,90,.5)); }
  50%      { transform:scale(1.08); filter:drop-shadow(0 0 28px rgba(184,147,90,.8)); }
}

.loader-text {
  font-size: 24px; font-weight: 900;
  background: linear-gradient(135deg,#D4A96A,#E8C48A);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 20px; letter-spacing: 2px;
}

.loader-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(0,160,155,.2);
  border-top-color: #0D9488;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── select / textarea in register ──────────────────────── */
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1A4A4E;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(0,160,155,.2);
  border-radius: 14px;
  outline: none;
  transition: all .25s;
}

.auth-form select:focus,
.auth-form textarea:focus {
  border-color: rgba(0,160,155,.65);
  background: rgba(0,160,155,.05);
  box-shadow: 0 0 0 3px rgba(0,160,155,.12);
}

.auth-form select option { background: #FFFFFF; color: #1A4A4E; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-card {
    padding: 32px 24px 28px;
    border-radius: 22px;
  }
  .register-card { padding: 28px 20px; }
  .auth-logo-img { height: 64px; }
  .auth-logo h1 { font-size: 22px; }
  .subscription-plans { grid-template-columns: 1fr; }
  .auth-form .btn-primary.btn-block { height: 48px; font-size: 14px; }
}

@media (max-width: 380px) {
  .auth-card { padding: 28px 18px 24px; }
  .auth-form input { height: 46px; font-size: 13px; }
}
