/* ═══════════════════════════════════════════════════
   AUTH MODERN — shared styles for login, register,
   forgot-password pages
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body.auth-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  background: #f8f6f9;
}

/* ── Left panel ── */
.panel-left {
  position: relative;
  width: 50%;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  color: #fff;
}

.panel-left-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.panel-left-bg svg {
  width: 100%;
  height: 100%;
}

.panel-left > *:not(.panel-left-bg) {
  position: relative;
  z-index: 1;
}

/* Hero text on left panel */
.pl-hero h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.pl-hero p {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.72;
  max-width: 340px;
}

.pl-footer {
  font-size: 11px;
  line-height: 1.7;
  opacity: 0.4;
}

/* Docs button */
.btn-docs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 22px;
  background: rgba(255,255,255,0.14);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s;
  letter-spacing: 0.1px;
}
.btn-docs:hover {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-1px);
  color: #fff;
}
.btn-docs svg { flex-shrink: 0; }

/* ── Right panel ── */
.panel-right {
  width: 50%;
  min-height: 100vh;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
}

.auth-box {
  width: 100%;
  max-width: 400px;
}

/* Logo in right panel */
.auth-logo {
  margin-bottom: 32px;
}
.auth-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Heading */
.auth-head { margin-bottom: 30px; }
.auth-head h2 {
  font-size: 26px;
  font-weight: 700;
  color: #1a0514;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.auth-head p {
  font-size: 14px;
  color: #999;
  line-height: 1.5;
}

/* Alert */
.alert-error {
  background: #fff1f4;
  border: 1px solid #f0b8c8;
  border-left: 3px solid #c0392b;
  border-radius: 8px;
  padding: 11px 14px;
  color: #c0392b;
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-info {
  background: #f0f4ff;
  border: 1px solid #b8c8f0;
  border-left: 3px solid #2b60c0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #2b60c0;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.55;
}

/* Field */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 7px;
}
.field input,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1a0514;
  background: #fafafa;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus,
.field select:focus {
  border-color: #811F64;
  box-shadow: 0 0 0 3px rgba(129,31,100,0.12);
  background: #fff;
}
.field input::placeholder { color: #c0c0c0; }

/* Two fields side by side */
.field-row {
  display: flex;
  gap: 14px;
}
.field-row .field { flex: 1; }

/* Submit button */
.btn-submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  background: linear-gradient(135deg, #911f6e 0%, #6e1a55 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 18px rgba(129,31,100,0.35);
}
.btn-submit:hover {
  opacity: 0.92;
  box-shadow: 0 6px 24px rgba(129,31,100,0.45);
}
.btn-submit:active { transform: scale(0.98); }

/* Links row */
.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-links a {
  color: #811F64;
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
}
.auth-links a:hover { opacity: 0.6; }

/* Back link (single centered) */
.auth-back {
  text-align: center;
  margin-top: 22px;
}
.auth-back a {
  color: #811F64;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: opacity .2s;
}
.auth-back a:hover { opacity: 0.6; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,5,15,0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 18px;
  padding: 36px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid #f0e5ee;
}
.modal-head h3 {
  font-size: 19px;
  font-weight: 700;
  color: #1a0514;
}
.modal-x {
  width: 34px; height: 34px;
  border: none;
  background: #f5f0f4;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  font-family: 'Inter', sans-serif;
}
.modal-x:hover { background: #e8dce4; }

.dg { margin-bottom: 26px; }
.dg:last-child { margin-bottom: 0; }
.dg-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #811F64;
  margin-bottom: 10px;
}

.dl { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.dl li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1.5px solid #f0e8ed;
  border-radius: 9px;
  color: #333;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color .18s, background .18s, color .18s;
}
.dl li a:hover {
  border-color: #811F64;
  background: #fdf6fb;
  color: #811F64;
}
.di {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: #f5edf3;
  border-radius: 7px;
  flex-shrink: 0;
  transition: background .18s;
}
.dl li a:hover .di { background: #811F64; }
.dl li a:hover .di svg { stroke: #fff; }
.di svg { width: 15px; height: 15px; stroke: #811F64; }

/* ── Responsive ── */
@media (max-width: 900px) {
  body.auth-page { flex-direction: column; }
  .panel-left {
    width: 100%;
    min-height: 260px;
    padding: 32px 28px;
  }
  .pl-hero h1 { font-size: 24px; }
  .panel-right {
    width: 100%;
    min-height: auto;
    padding: 36px 28px;
  }
  .field-row { flex-direction: column; gap: 0; }
}
