/* ===========================
   Base / Reset
=========================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
}

/* ===========================
   Auth Page Layout
=========================== */
.auth-body{
  background: radial-gradient(circle at top left,#1f2937,#020617 45%,#000 100%);
}

.auth-page{
  min-height: 100vh;
  display: flex;
}

/* LEFT (Desktop Brand Panel) */
.auth-left{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
}
.auth-left::before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(circle at top,#111827 0,#020617 40%,#000 100%);
  opacity:.9;
}

/* ✅ Smaller brand box on desktop */
.auth-left-inner{
  position: relative;
  z-index: 1;
  padding: 16px 18px;               /* was 26/34 */
  border-radius: 18px;              /* was 28 */
  background: rgba(0,0,0,.60);
  border: 1px solid rgba(148,163,184,.45);
  box-shadow: 0 18px 42px rgba(0,0,0,.65); /* a bit lighter */
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: inline-flex;             /* makes box wrap content */
  flex-direction: column;
  gap: 8px;
  max-width: 360px;                 /* smaller */
  width: auto;                      /* wrap content */
}
.auth-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}

/* ✅ Slightly smaller logos */
.brand-logo--plus{ height: 18px; }
.brand-logo--connect{ height: 28px; }

/* RIGHT */
.auth-right{
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.auth-right::before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(circle at top right,#ffffff 0,#e5e7eb 40%,#cbd5f5 100%);
  opacity:.92;
}

/* Desktop inner wrapper */
.auth-right-inner{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Wrap card so we can control height on mobile */
.auth-cardwrap{
  width: 100%;
}

/* Mobile top brand area (hidden on desktop) */
.auth-mobile-top{
  display: none;
}

/* Auth card */
.auth-card{
  width: 100%;
  padding: 28px 24px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(209,213,219,.85);
  box-shadow: 0 18px 45px rgba(15,23,42,.35);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Footer */
.auth-footer{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  font-size:12px;
  color:#6b7280;
  -webkit-user-select:none;
  user-select:none;
}
.auth-footer .dot{ opacity:.6; }
.auth-footer-link{
  color:#4f46e5;
  text-decoration:none;
}
.auth-footer-link:hover{ text-decoration: underline; }

/* ===========================
   Auth Typography
=========================== */
.auth-head{ margin-bottom: 14px; }
.auth-title{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}
.auth-subtitle{
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* ===========================
   Alerts / Errors
=========================== */
.auth-alert{
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 13px;
}
.auth-alert--error{
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.auth-alert__title{
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-alert__list{
  margin: 0;
  padding-left: 18px;
}

/* ===========================
   Form Fields
=========================== */
.auth-form{ margin-top: 6px; }
.auth-field{ margin-bottom: 12px; }

.auth-label{
  display:block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111827;
}

.auth-input{
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(255,255,255,.9);
  color: #0f172a;
}
.auth-input:focus{
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.auth-input.is-invalid{
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.14);
}

.auth-help{
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}
.auth-help--error{
  color: #b91c1c;
}

/* Password row with toggle button */
.auth-password{
  position: relative;
}
.auth-eye{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(148,163,184,.7);
  background: rgba(255,255,255,.8);
  border-radius: 10px;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 14px;
}
.auth-eye:hover{
  filter: brightness(0.98);
}

.auth-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}
.auth-check{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 13px;
  color:#374151;
}
.auth-check input{ transform: translateY(1px); }

.auth-link{
  font-size: 13px;
  color:#4f46e5;
  text-decoration:none;
}
.auth-link:hover{ text-decoration: underline; }

/* Divider */
.auth-divider{
  margin: 16px 0 10px;
  display:flex;
  align-items:center;
  gap: 10px;
  color:#6b7280;
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after{
  content:"";
  height:1px;
  flex:1;
  background: rgba(148,163,184,.55);
}

/* ===========================
   Buttons
=========================== */
.btn{
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary{
  background: linear-gradient(to right,#4f46e5,#6366f1);
  color: #f9fafb;
}
.btn-primary:hover{ filter: brightness(1.05); }

.btn-ghost{
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(148,163,184,.7);
  color: #111827;
}
.btn-ghost:hover{ background: rgba(255,255,255,.70); }

.btn-block{
  width: 100%;
}

/* ===========================
   Mobile Behavior
   - top 20% brand
   - bottom 70% login card
   - bottom 10% footer
=========================== */
@media (max-width: 900px){
  .auth-page{
    display:block;
    min-height: 100vh;
  }

  /* Hide desktop left panel */
  .auth-left{ display:none; }

  /* ✅ Turn right into a strict column: top + bottom */
  .auth-right{
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .auth-right::before{
    background: #020617;
    opacity: 1;
  }

  /* Top 20% */
  .auth-mobile-top{
    display: flex;
    height: 10vh;
    min-height: 70px;
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    flex: 0 0 auto;
  }

  .auth-mobile-brand{
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(0,0,0,.58);
    border: 1px solid rgba(148,163,184,.45);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 36px rgba(0,0,0,.35);
  }

  /* ✅ Bottom 80% container: split card 70% + footer 10% (remaining space safely) */
  .auth-right-inner{
    position: relative;
    z-index: 1;
    height: auto;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  /* Card area ~70% */
  .auth-cardwrap{
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: flex-start;
  }

  .auth-card{
    width: 100%;
    border-radius: 20px;
    padding: 20px 16px 16px;
    max-height: 100%;
    overflow: auto;
    background-color: #020617;
}
.auth-title, .auth-subtitle,.auth-label{
  color: #e5e7eb;
}

  /* Footer area ~10% */
  .auth-footer{
    flex: 0 0 auto;
    height: 5vh;
    min-height: 44px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding-bottom: 4px;
  }
}
