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

html {
  overflow-y: auto !important;
}

body[data-page="login"] {
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, #f8fafc, #e2e8f0 80%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-y: hidden !important;
  /* Block all page scrolling */
  display: block;
}

.page-main.page-login {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1050px;
  height: 75vh;
  min-height: 550px;
  max-height: 750px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(15, 23, 42, 0.12), 0 10px 30px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  margin: auto;
}

/* ── LEFT PANEL ── */
.panel-left {
  position: relative;
  background: url('https://images.unsplash.com/photo-1557683316-973673baf926?w=1200&q=80') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 40px;
  overflow: hidden;
}

/* Dark overlay for text readability */
.panel-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(2, 44, 34, 0.9) 0%, rgba(6, 182, 212, 0.5) 100%);
  pointer-events: none;
}

/* blobs with enhanced colors */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.15);
  top: -100px;
  right: -100px;
  animation: drift 12s ease-in-out infinite;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  bottom: 50px;
  left: -80px;
  animation: drift 16s ease-in-out infinite reverse;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.08);
  bottom: 200px;
  right: 60px;
  animation: drift 10s ease-in-out infinite 2s;
}

.blob-4 {
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.05);
  top: 40%;
  left: 30%;
  animation: drift 14s ease-in-out infinite 1s;
}

@keyframes drift {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(14px, 20px);
  }
}

/* Brand / Logo */
.brand {
  position: relative;
  z-index: 2;
}

.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Hero */
.hero-tag {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  background: rgba(2, 44, 34, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-badge i {
  font-size: 8px;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: #f8fafc;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.hero-headline em {
  font-style: normal;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.hero-sub {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: 32px;
  font-weight: 400;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 16px 10px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.stat:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.stat-num {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  display: block;
}

.stat-label {
  font-size: 9px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  font-weight: 600;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feat {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: slideUp 0.5s ease forwards;
}

.feat:nth-child(1) {
  animation-delay: 0.08s;
}

.feat:nth-child(2) {
  animation-delay: 0.18s;
}

.feat:nth-child(3) {
  animation-delay: 0.28s;
}

.feat:nth-child(4) {
  animation-delay: 0.38s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feat-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
}

.feat:nth-child(odd) .feat-icon {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.38);
}

.feat-txt {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

.left-foot {
  position: relative;
  z-index: 2;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── RIGHT PANEL ── */
.panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
  overflow-y: auto;
}

.form-shell {
  width: 100%;
  max-width: 400px;
}

/* Tabs */
.tab-row {
  display: flex;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(36, 119, 184, 0.04);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #64748b;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.26s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.tab-btn i {
  font-size: 12px;
}

/* Form panels */
.form-panel {
  display: none;
}

.form-panel.active {
  display: block;
  animation: fadeUp 0.36s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(11px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.form-head {
  margin-bottom: 24px;
  text-align: center;
}

.form-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* Fields */
.field {
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.field-row .field {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #475569;
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 12px 16px;
  background: #f4f7fb;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 10px;
  color: #1e293b;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.field-input::placeholder {
  color: #94a3b8;
}

.field-input:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.field-input:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0,0,0,0.01);
}

/* Strength */
.strength-wrap {
  margin: 8px 0 14px;
}

.strength-bars {
  display: flex;
  gap: 5px;
  margin-bottom: 4px;
}

.sbar {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: background 0.3s;
}

.sbar.s-weak {
  background: #e53e3e;
}

.sbar.s-fair {
  background: #f59e0b;
}

.sbar.s-strong {
  background: #7ac143;
}

.strength-label {
  font-size: 12px;
  color: #64748b;
}

/* Util */
.util-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.check-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.check-wrap input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #2477b8;
  cursor: pointer;
}

.check-label {
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
}

.link-small {
  font-size: 13px;
  color: #2477b8;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.link-small:hover {
  opacity: 0.7;
}

/* CTA */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: 0.6s ease-in-out;
}

.btn-primary:hover::after {
  left: 150%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.div-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.div-text {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  font-weight: 600;
}

/* Social */
.socials {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-social {
  flex: 1;
  padding: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-social:hover {
  border-color: #2477b8;
  color: #2477b8;
  background: #f4f9fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 119, 184, 0.1);
}

.btn-social i {
  font-size: 14px;
}

.form-foot {
  text-align: center;
  margin-top: 8px;
}

.form-foot a {
  color: #2477b8;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}

.form-foot a:hover {
  opacity: 0.75;
}

/* Green accent on signup tab active (optional) */
.tab-btn[data-tab="signup"].active {
  background: linear-gradient(135deg, #5c8a2a 0%, #7ac143 100%);
  box-shadow: 0 4px 14px rgba(122, 193, 67, 0.28);
}

/* Alert messages */
.alert-error {
  background: #fee;
  color: #c33;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 14px;
  border-left: 4px solid #c33;
}

.alert-success {
  background: #efe;
  color: #3c3;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 14px;
  border-left: 4px solid #3c3;
}

/* Password field with toggle */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 14px;
  padding: 4px;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: #64748b;
}

/* Password requirements box */
.password-requirements {
  margin-bottom: 20px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.password-requirements .req-title {
  margin-bottom: 8px;
  font-weight: 600;
  color: #475569;
}

.password-requirements ul {
  margin: 0;
  padding-left: 20px;
}

.password-requirements li {
  margin-bottom: 4px;
}

/* ── RESPONSIVE: TABLET (768px – 900px) ── */
@media (max-width: 900px) {
  html, body[data-page="login"] {
    overflow-y: auto !important;
  }

  .page-main.page-login {
    height: auto;
    min-height: 100vh;
    padding: 0;
    align-items: flex-start;
  }

  .shell {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }

  /* Left panel becomes a compact hero banner */
  .panel-left {
    min-height: 280px;
    padding: 32px 28px 28px;
    justify-content: flex-end;
    flex-direction: column;
    gap: 0;
  }

  .brand {
    position: absolute;
    top: 28px;
    left: 28px;
  }

  .brand-logo {
    height: 40px;
  }

  .hero-tag {
    order: 1;
  }

  .hero-badge {
    margin-bottom: 12px;
    font-size: 9px;
    padding: 5px 12px;
  }

  .hero-headline {
    font-size: clamp(24px, 5vw, 34px);
    margin-bottom: 8px;
  }

  .hero-sub {
    font-size: 12px;
    margin-bottom: 0;
    max-width: 100%;
  }

  /* Hide decorative sections to keep banner compact */
  .stats,
  .features,
  .left-foot {
    display: none;
  }

  /* Right panel becomes full-page form */
  .panel-right {
    padding: 36px 28px 48px;
    overflow-y: visible;
    background: #f8fafc;
  }

  .form-shell {
    max-width: 520px;
    margin: 0 auto;
  }

  .tab-row {
    margin-bottom: 20px;
  }

  .form-head {
    margin-bottom: 20px;
  }

  .form-title {
    font-size: 26px;
  }

  .field {
    margin-bottom: 14px;
  }

  .field-input {
    padding: 13px 16px;
    font-size: 15px;
  }

  .btn-primary {
    padding: 15px;
    font-size: 15px;
  }
}

/* ── RESPONSIVE: MOBILE (max 480px) ── */
@media (max-width: 480px) {
  html, body[data-page="login"] {
    overflow-y: auto !important;
  }

  .page-main.page-login {
    height: auto;
    padding: 0;
    align-items: flex-start;
  }

  .shell {
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    min-height: 100dvh;
  }

  /* Compact hero on mobile */
  .panel-left {
    min-height: 220px;
    padding: 72px 20px 24px;
  }

  .brand {
    position: absolute;
    top: 20px;
    left: 20px;
  }

  .brand-logo {
    height: 34px;
  }

  .hero-badge {
    font-size: 8px;
    padding: 4px 10px;
    margin-bottom: 10px;
  }

  .hero-headline {
    font-size: clamp(20px, 6vw, 28px);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
  }

  .hero-sub {
    font-size: 11px;
    margin-bottom: 0;
  }

  .stats,
  .features,
  .left-foot {
    display: none;
  }

  /* Full-width form section */
  .panel-right {
    padding: 28px 16px 40px;
    background: #f8fafc;
    overflow-y: visible;
  }

  .form-shell {
    max-width: 100%;
  }

  .tab-row {
    margin-bottom: 18px;
    border-radius: 10px;
    padding: 5px;
  }

  .tab-btn {
    padding: 10px 8px;
    font-size: 12px;
  }

  .form-head {
    margin-bottom: 18px;
    text-align: left;
  }

  .form-title {
    font-size: 22px;
  }

  .form-subtitle {
    font-size: 12px;
  }

  /* Stack two-column field rows */
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .field {
    margin-bottom: 12px;
  }

  .field-label {
    font-size: 10px;
    margin-bottom: 5px;
  }

  .field-input {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
  }

  .util-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }

  .btn-primary {
    padding: 14px;
    font-size: 14px;
    border-radius: 12px;
    margin-top: 12px;
    margin-bottom: 14px;
  }

  .divider {
    margin-bottom: 14px;
  }

  .socials {
    gap: 10px;
    margin-bottom: 14px;
  }

  .btn-social {
    padding: 10px 8px;
    font-size: 11px;
    gap: 6px;
  }

  .form-foot {
    font-size: 13px;
    text-align: center;
  }
}