/* HAKRO WEATHER — Auth pages (login / register) */

.auth-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: #05080f;
  overflow: hidden;
}

/* LEFT: hero / animated weather scene */
.auth-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(59,130,246,0.45), transparent 60%),
    radial-gradient(900px 700px at 90% 90%, rgba(34,211,238,0.30), transparent 60%),
    linear-gradient(160deg, #0a1a3a 0%, #061024 55%, #03060d 100%);
  color: #e6eefc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
}

/* Floating clouds */
.auth-hero .cloud {
  position: absolute;
  width: 260px;
  height: 90px;
  border-radius: 100px;
  background: radial-gradient(closest-side, rgba(255,255,255,0.28), rgba(255,255,255,0));
  filter: blur(6px);
  animation: drift 26s linear infinite;
  will-change: transform;
}
.auth-hero .cloud.c2 { top: 24%; width: 340px; height: 110px; animation-duration: 38s; opacity: 0.6; }
.auth-hero .cloud.c3 { top: 60%; width: 200px; height: 70px; animation-duration: 22s; opacity: 0.5; }
.auth-hero .cloud.c4 { top: 78%; width: 380px; height: 120px; animation-duration: 46s; opacity: 0.4; }

@keyframes drift {
  from { transform: translateX(-30vw); }
  to   { transform: translateX(120vw); }
}

/* Glowing sun */
.auth-hero .sun {
  position: absolute; top: 12%; right: 14%;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, #ffe49a 0%, #ffb547 55%, rgba(255,160,60,0) 72%);
  filter: blur(4px);
  animation: pulseSun 6s ease-in-out infinite;
}
@keyframes pulseSun {
  0%,100% { transform: scale(1); opacity: 0.9; }
  50%     { transform: scale(1.06); opacity: 1; }
}

/* Rain streaks */
.auth-hero .rain {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 0 90%, rgba(180,220,255,0.35) 90% 100%),
    linear-gradient(transparent 0 90%, rgba(180,220,255,0.25) 90% 100%);
  background-size: 2px 60px, 1px 90px;
  background-position: 30% 0, 70% 0;
  animation: rainFall 1.1s linear infinite;
  opacity: 0.35;
  mix-blend-mode: screen;
}
@keyframes rainFall {
  from { background-position: 30% -80px, 70% -80px; }
  to   { background-position: 30% 80px, 70% 80px; }
}

/* Hero content */
.auth-hero .hero-brand {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; letter-spacing: 1px; font-size: 18px;
}
.auth-hero .hero-brand .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #4fc3f7;
  box-shadow: 0 0 22px #4fc3f7, 0 0 44px rgba(79,195,247,0.5);
}
.auth-hero .hero-copy { position: relative; z-index: 2; max-width: 520px; }
.auth-hero h1 {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05; margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.auth-hero h1 .grad {
  background: linear-gradient(120deg, #7dd3fc, #22d3ee 60%, #a5b4fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero p.lead { color: #a9bfe0; font-size: 15px; margin: 0 0 22px; }
.auth-hero .feature-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.auth-hero .pill {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cfe0ff;
}
.auth-hero .hero-footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 20px;
  font-size: 12px; color: #7f95b8;
}

/* RIGHT: auth card */
.auth-side {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(900px 600px at 100% 0%, rgba(79,195,247,0.10), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(59,130,246,0.10), transparent 60%),
    #080d18;
}
.auth-panel {
  width: 100%; max-width: 420px;
  padding: 32px;
  border-radius: 18px;
  background: rgba(17, 24, 42, 0.72);
  border: 1px solid rgba(120,160,220,0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}
.auth-panel .auth-title {
  font-size: 26px; font-weight: 800; margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.auth-panel .auth-sub { color: #8ba0c4; font-size: 13px; margin: 0 0 22px; }

.auth-panel .brand-mini {
  display: none; align-items: center; gap: 10px; margin-bottom: 18px;
  font-weight: 800; letter-spacing: 0.5px;
}
.auth-panel .brand-mini .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4fc3f7; box-shadow: 0 0 14px #4fc3f7;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field {
  position: relative;
  display: flex; align-items: center;
  background: rgba(10,18,32,0.7);
  border: 1px solid rgba(120,160,220,0.20);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field:focus-within {
  border-color: #4fc3f7;
  box-shadow: 0 0 0 3px rgba(79,195,247,0.18);
  background: rgba(10,18,32,0.95);
}
.field .icon {
  width: 42px; text-align: center; color: #7f95b8; font-size: 16px;
}
.field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e6eefc;
  padding: 14px 14px 14px 0;
  font-size: 15px;
}
.field input::placeholder { color: #5f7297; }
.field .toggle-pass {
  background: transparent; border: none; color: #7f95b8;
  cursor: pointer; padding: 0 12px; font-size: 14px;
}
.field .toggle-pass:hover { color: #4fc3f7; }

.auth-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #8ba0c4;
}
.auth-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-row input[type="checkbox"] { accent-color: #4fc3f7; }

.btn-auth {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  color: #031024;
  background: linear-gradient(135deg, #7dd3fc, #4fc3f7 45%, #3b82f6);
  box-shadow: 0 10px 30px rgba(79,195,247,0.35);
  transition: transform .12s, box-shadow .12s;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(79,195,247,0.45); }
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: 0.7; cursor: not-allowed; }

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  color: #5f7297; font-size: 12px; margin: 6px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: ""; flex: 1; height: 1px; background: rgba(120,160,220,0.18);
}

.auth-links { text-align: center; margin-top: 18px; font-size: 13px; color: #8ba0c4; }
.auth-links a { color: #4fc3f7; font-weight: 600; }

.auth-alert {
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
  margin-bottom: 14px;
}
.auth-alert.err { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.5); color: #ffd1d1; }
.auth-alert.ok  { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.5); color: #c9ffe9; }

/* Password strength meter (register) */
.pw-strength { display: flex; gap: 4px; margin-top: 6px; }
.pw-strength span {
  height: 4px; flex: 1; border-radius: 4px; background: rgba(120,160,220,0.20);
  transition: background .2s;
}
.pw-strength[data-score="1"] span:nth-child(1) { background: #ef4444; }
.pw-strength[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pw-strength[data-score="3"] span:nth-child(-n+3) { background: #eab308; }
.pw-strength[data-score="4"] span { background: #10b981; }

/* RTL support */
[dir="rtl"] .auth-hero { text-align: right; }
[dir="rtl"] .field input { padding: 14px 0 14px 14px; }
[dir="rtl"] .auth-hero .sun { right: auto; left: 14%; }

/* Mobile */
@media (max-width: 900px) {
  .auth-body { grid-template-columns: 1fr; }
  .auth-hero {
    display: none;
  }
  .auth-side {
    padding: 30px 18px;
    min-height: 100vh;
    background:
      radial-gradient(900px 500px at 50% -10%, rgba(79,195,247,0.20), transparent 60%),
      #080d18;
  }
  .auth-panel .brand-mini { display: flex; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-hero .cloud,
  .auth-hero .sun,
  .auth-hero .rain { animation: none; }
}