/* ============================================================
   auth.css — shared styles for login / register / forgot / reset / verify
   Tailwind-equivalent utility-based styles, no runtime dep.
   ============================================================ */

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

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout: split screen ---------- */
.auth-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.auth-hero {
  position: relative;
  display: none;
  width: 50%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2.5rem 3rem;
  background: linear-gradient(150deg, #1e3d6e 0%, #0f2040 40%, #091828 100%);
  color: #fff;
}
@media (min-width: 1024px) {
  .auth-hero { display: flex; }
}

/* decorative layers */
.auth-hero .hero-white-corner {
  pointer-events: none;
  position: absolute;
  top: 0; left: 0;
  height: 14rem; width: 24rem;
  background: radial-gradient(ellipse at top left,
              rgba(255,255,255,0.97) 0%,
              rgba(255,255,255,0.75) 28%,
              rgba(255,255,255,0) 65%);
}
.auth-hero .hero-orb {
  pointer-events: none;
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
}
.auth-hero .hero-orb.tr { top: -6rem; right: -6rem; height: 18rem; width: 18rem; background: rgba(96,165,250,0.10); }
.auth-hero .hero-orb.bl { bottom: -6rem; left: -6rem; height: 18rem; width: 18rem; background: rgba(37,99,235,0.08); }
.auth-hero .hero-orb.tl { top: 10rem; left: -6rem; height: 18rem; width: 18rem; background: rgba(96,165,250,0.10); }
.auth-hero .hero-orb.br { bottom: -6rem; right: -6rem; height: 18rem; width: 18rem; background: rgba(37,99,235,0.08); }

.auth-hero .hero-ring {
  pointer-events: none;
  position: absolute;
  top: 50%;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.05);
  transform: translateY(-50%);
}
.auth-hero .hero-ring.right-lg { right: 0; transform: translate(33%, -50%); height: 28rem; width: 28rem; }
.auth-hero .hero-ring.right-sm { right: 0; transform: translate(25%, -50%); height: 19rem; width: 19rem; border-color: rgba(255,255,255,0.04); }
.auth-hero .hero-ring.left-lg  { left: 0; transform: translate(-33%, -50%); height: 28rem; width: 28rem; }
.auth-hero .hero-ring.left-sm  { left: 0; transform: translate(-25%, -50%); height: 19rem; width: 19rem; border-color: rgba(255,255,255,0.04); }

.auth-hero .hero-dots {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #7ca8d4 1px, transparent 1px);
  background-size: 28px 28px;
}

.auth-hero .hero-logo { position: relative; z-index: 1; }
.auth-hero .hero-logo img { display: block; height: 26px; width: auto; }

.auth-hero .hero-center { position: relative; z-index: 1; }
.auth-hero .hero-center .headline {
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
}
.auth-hero .hero-center .headline .accent {
  background: linear-gradient(90deg, #93c5fd, #bfdbfe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-hero .hero-center .subtitle {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(219, 234, 254, 0.60);
  margin: 0 0 2rem;
}

/* Feature grid (login) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.feature-grid .card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  padding: 0.875rem 1rem;
  backdrop-filter: blur(6px);
}
.feature-grid .icon-wrap,
.feature-list .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem; width: 2rem;
  border-radius: 0.5rem;
  background: rgba(96,165,250,0.15);
  box-shadow: inset 0 0 0 1px rgba(96,165,250,0.20);
}
.feature-grid .icon-wrap svg,
.feature-list .icon-wrap svg { height: 1rem; width: 1rem; color: #93c5fd; }
.feature-grid .title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.feature-grid .desc {
  font-size: 0.75rem;
  color: rgba(219,234,254,0.40);
  line-height: 1.5;
  margin: 0;
}

/* Feature list (register) */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.feature-list li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.feature-list .title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.feature-list .desc {
  font-size: 0.75rem;
  color: rgba(219,234,254,0.45);
  line-height: 1.55;
  margin: 0.125rem 0 0;
}

.auth-hero .hero-footer {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.30);
  margin: 0;
}

/* ---------- Right panel ---------- */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 3rem 1.5rem;
  width: 100%;
}
@media (min-width: 1024px) {
  .auth-form-panel { width: 50%; }
}

.mobile-logo {
  margin-bottom: 2rem;
  display: block;
}
.mobile-logo img { height: 20px; width: auto; }
@media (min-width: 1024px) {
  .mobile-logo { display: none; }
}

.form-card {
  width: 100%;
  max-width: 24rem;
}

.form-card .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.form-card .page-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.375rem 0 2rem;
}

/* ---------- Form controls ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-group .label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.input-wrap {
  position: relative;
}
.input-wrap .icon-left {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  pointer-events: none;
}
.input-wrap .icon-left svg {
  height: 1rem; width: 1rem;
  color: #9ca3af;
}
.input-wrap .icon-right-btn {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  display: flex;
  align-items: center;
  padding-right: 0.75rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: #9ca3af;
}
.input-wrap .icon-right-btn:hover { color: #4b5563; }
.input-wrap .icon-right-btn svg { height: 1rem; width: 1rem; }

.input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.25rem;
  font-size: 0.875rem;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  outline: none;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #9ca3af; }
.input:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.input.no-icon { padding-left: 0.75rem; }
.input.with-right { padding-right: 2.5rem; }
.input[readonly] {
  background: #f3f4f6;
  color: #6b7280;
}

/* ---------- Messages ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.4;
}
.alert svg { height: 1rem; width: 1rem; flex-shrink: 0; margin-top: 0.125rem; }
.alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert.error svg { color: #ef4444; }
.alert.success { background: #ecfdf5; border: 1px solid #bbf7d0; color: #047857; }
.alert.success svg { color: #10b981; }
.alert.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.alert.info svg { color: #3b82f6; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.625rem 1rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.btn-primary[disabled] { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.625rem 1rem;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-secondary:hover { background: #f9fafb; }

/* ---------- Divider ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.divider .line { height: 1px; flex: 1; background: #f3f4f6; }
.divider .label { font-size: 0.75rem; color: #9ca3af; }

/* ---------- Links / small helpers ---------- */
.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}
.link-blue {
  font-size: 0.8125rem;
  color: #2563eb;
  font-weight: 500;
}
.link-blue:hover { color: #1d4ed8; text-decoration: underline; }

/* ---------- Centered single-panel (forgot/reset/verify) ---------- */
.auth-single {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  padding: 2rem 1rem;
}
.auth-single .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2.25rem;
  width: 100%;
  max-width: 26rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}
.auth-single .logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.auth-single .logo-row img { height: 24px; width: auto; }
.back-row { margin-top: 1.5rem; text-align: center; }

/* ---------- Password strength ---------- */
.strength-wrap { display: flex; flex-direction: column; gap: 0.375rem; margin-top: 0.5rem; }
.strength-bars { display: flex; gap: 0.25rem; }
.strength-bars .bar {
  height: 4px;
  flex: 1;
  border-radius: 9999px;
  background: #f3f4f6;
  transition: background-color 0.15s;
}
.strength-bars .bar.weak   { background: #f87171; }
.strength-bars .bar.medium { background: #facc15; }
.strength-bars .bar.strong { background: #22c55e; }
.strength-text { font-size: 0.75rem; }
.strength-text.weak   { color: #ef4444; }
.strength-text.medium { color: #eab308; }
.strength-text.strong { color: #22c55e; }
