/* ═══════════════════════════════════════════════════════
   CoFounder Dekho — Auth Page
   Matches: landing page design system
   ═══════════════════════════════════════════════════════ */

/* ── TOKENS (mirror landing) ────────────────────────── */
:root {
  --cream: #f5f0e8;
  --cream-mid: #ede7d9;
  --cream-deep: #e4dac8;
  --sand: #d4c5a9;
  --ink: #1a1a1a;
  --ink-soft: #2a2720;
  --ink-light: #4a4540;
  --ink-muted: #7a7468;
  --indigo: #2d2b6b;
  --indigo-mid: #3d3a8a;
  --gold: #b8935a;
  --gold-light: #d4af7a;
  --gold-pale: #edd99a;
  --accent: #e85d26;
  --green: #2a7a4b;
}

/* ── BASE ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.45;
}

/* ── LAYOUT ─────────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════════════════════ */
.auth-left {
  display: none;
  width: 46%;
  flex-shrink: 0;
  background: var(--ink-soft);
  position: relative;
  overflow: hidden;
  padding: 40px 48px;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .auth-left {
    display: flex;
  }
}

.auth-left::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(184, 151, 90, 0.18) 0%,
    transparent 65%
  );
  pointer-events: none;
}
.auth-left::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(45, 43, 107, 0.35) 0%,
    transparent 65%
  );
  pointer-events: none;
}

.auth-noise {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 180px;
  pointer-events: none;
}

.auth-left > * {
  position: relative;
  z-index: 1;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(246, 242, 235, 0.4);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  margin-bottom: 48px;
}
.auth-back:hover {
  color: rgba(246, 242, 235, 0.7);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 52px;
}
.auth-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.auth-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.auth-brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: rgba(246, 242, 235, 0.9);
  letter-spacing: -0.3px;
}

.auth-left-headline {
  margin-bottom: 48px;
  flex: 1;
}
.auth-left-headline h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: rgba(246, 242, 235, 0.95);
  margin: 0 0 16px;
}
.auth-left-headline h1 em {
  font-style: italic;
  color: var(--gold-light);
}
.auth-left-headline p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(246, 242, 235, 0.45);
  max-width: 340px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 48px;
}
.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.auth-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(184, 151, 90, 0.12);
  border: 1px solid rgba(184, 151, 90, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  flex-shrink: 0;
  transition: background 0.2s;
}
.auth-feature:hover .auth-feature-icon {
  background: rgba(184, 151, 90, 0.2);
}
.auth-feature-title {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(246, 242, 235, 0.85);
  margin-bottom: 3px;
}
.auth-feature-desc {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(246, 242, 235, 0.4);
}

.auth-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(246, 242, 235, 0.08);
  border-bottom: 1px solid rgba(246, 242, 235, 0.08);
  margin-bottom: 32px;
}
.auth-stat-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 3px;
}
.auth-stat-label {
  font-size: 11px;
  font-weight: 400;
  color: rgba(246, 242, 235, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(246, 242, 235, 0.1);
  flex-shrink: 0;
}

.auth-left-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(246, 242, 235, 0.25);
}
.auth-left-footer a {
  color: rgba(246, 242, 235, 0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.auth-left-footer a:hover {
  color: rgba(246, 242, 235, 0.65);
}
.auth-left-footer-dot {
  opacity: 0.3;
}

/* ══════════════════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════════════════ */
.auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--cream);
  min-height: 100vh;
}

.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
@media (min-width: 1024px) {
  .auth-mobile-brand {
    display: none;
  }
}
.auth-brand-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.auth-brand-name-sm {
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}

/* Card */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border: 1px solid var(--sand);
  border-radius: 24px;
  padding: 36px 32px 32px;
  box-shadow: 0 8px 48px rgba(26, 26, 22, 0.08);
}

.auth-card-header {
  margin-bottom: 24px;
}
.auth-card-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin: 0 0 6px;
}
.auth-card-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-muted);
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--cream-mid);
  border-radius: 12px;
  padding: 4px;
  gap: 3px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "DM Sans", sans-serif;
}
.auth-tab:hover:not(.auth-tab-active) {
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.5);
}
.auth-tab.active {
  background: white !important;
  color: var(--indigo) !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 4px rgba(26, 26, 22, 0.1);
}

/* ── ALERT ──────────────────────────────────────────── */
.auth-alert {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1.5px solid;
  animation: alertSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-alert.hidden {
  display: none !important;
}

.auth-alert-error {
  background: #fff7f5;
  border-color: #f5c6b8;
  color: #7a2a18;
}
.auth-alert-error .auth-alert-icon {
  color: var(--accent);
}

.auth-alert-success {
  background: #f2fbf5;
  border-color: #a8d8b8;
  color: #1a4a2e;
}
.auth-alert-success .auth-alert-icon {
  color: var(--green);
}

.auth-alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Alert body — flex column so the button sits below the message text */
.auth-alert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Alert action button */
.auth-alert-btn {
  display: inline-block;
  align-self: flex-end;
  margin-top: 10px;
  padding: 6px 14px;
  background: #2d2b6b;
  color: #fff !important;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  line-height: 1.4;
  white-space: nowrap;
}
.auth-alert-btn:hover {
  opacity: 0.82;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-form.hidden {
  display: none;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-light);
}
.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-forgot {
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
  transition: color 0.2s;
}
.auth-forgot:hover {
  color: var(--indigo-mid);
}

.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sand);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
}
.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--indigo);
}
.auth-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--cream-deep);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s;
}
.auth-input::placeholder {
  color: var(--sand);
}
.auth-input:focus {
  background: white;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(45, 43, 107, 0.08);
}
.auth-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
  color: white;
  background: var(--ink);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 4px;
  box-shadow: 0 2px 16px rgba(26, 26, 22, 0.16);
  position: relative;
  overflow: hidden;
}
.auth-submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(184, 151, 90, 0.2), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
}
.auth-submit-btn:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(26, 26, 22, 0.22);
}
.auth-submit-btn:hover::before {
  opacity: 1;
}
.auth-submit-btn:active {
  transform: translateY(0);
}
.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* OTP wrapper */
.auth-otp-wrap {
  background: rgba(45, 43, 107, 0.04);
  border: 1.5px solid rgba(45, 43, 107, 0.12);
  border-radius: 12px;
  padding: 16px;
}
.auth-otp-wrap.hidden {
  display: none;
}
.auth-otp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.auth-otp-sent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: rgba(42, 122, 75, 0.08);
  border-radius: 100px;
  padding: 3px 9px;
}
.auth-otp-input {
  width: 100%;
  text-align: center;
  font-family: "DM Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding: 12px;
  color: var(--indigo);
  background: white;
  border: 1.5px solid var(--cream-deep);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s;
  margin-bottom: 10px;
}
.auth-otp-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(45, 43, 107, 0.08);
}
.auth-otp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-otp-timer {
  font-size: 12px;
  color: var(--ink-muted);
}
.auth-otp-timer strong {
  color: var(--ink);
}
.auth-otp-resend {
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  font-family: "DM Sans", sans-serif;
}
.auth-otp-resend:hover {
  color: var(--indigo-mid);
}
.auth-otp-resend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Terms */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.auth-checkbox {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--indigo);
  cursor: pointer;
}
.auth-terms-label {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  cursor: pointer;
}
.auth-terms-label a {
  color: var(--indigo);
  font-weight: 500;
  text-decoration: none;
}
.auth-terms-label a:hover {
  text-decoration: underline;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--cream-deep);
}
.auth-divider-text {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Google button */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  color: var(--ink-light);
  background: white;
  border: 1.5px solid var(--cream-deep);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-google-btn:hover {
  border-color: var(--sand);
  box-shadow: 0 2px 12px rgba(26, 26, 22, 0.07);
  transform: translateY(-1px);
}
.auth-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Secure note */
.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--sand);
  margin-top: 18px;
}

/* Mobile footer */
.auth-mobile-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--sand);
  text-align: center;
}
@media (min-width: 1024px) {
  .auth-mobile-footer {
    display: none;
  }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-right {
    padding: 24px 16px;
  }
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 18px;
  }
  .auth-card-title {
    font-size: 22px;
  }
  .auth-submit-btn {
    font-size: 14px;
    padding: 12px;
  }
  .auth-otp-input {
    font-size: 18px;
    letter-spacing: 0.35em;
  }
  .auth-alert {
    font-size: 13px;
    padding: 11px 14px;
  }
  .auth-alert-btn {
    font-size: 11.5px;
    padding: 5px 12px;
  }
}

.nbrand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 24px;
  text-decoration: none;
  flex-shrink: 0;
  margin-bottom: 1rem;
}
.bicon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f7dff, #2d2b6b);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bname {
  font-size: 13px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}
