/**
 * Directboost-style login theme
 * Dark hero left (dashboard mockup) + clean white form right
 * Loaded AFTER auth-login.css to guarantee overrides
 */

/* -- Reset & base ---------------------------------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

body.auth-page--db {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a12;
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* -- Layout wrapper -------------------------------- */
.db-wrapper {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

/* ========================================
   LEFT PANEL
   ======================================== */
.db-left {
  flex: 1 1 55%;
  max-width: 55%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #0e0d1b 0%, #13112a 40%, #0f0e22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 4vh, 3.5rem) clamp(2rem, 4vw, 4rem);
}

.db-left-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
}

/* -- Mesh gradient blobs --------------------------- */
.db-mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 1;
  pointer-events: none;
}
.db-m1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #E85D2F 0%, transparent 70%);
  top: -10%; left: -10%;
  animation: dbMesh 12s ease-in-out infinite;
}
.db-m2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #9D30C8 0%, transparent 70%);
  bottom: -5%; right: -5%;
  animation: dbMesh 15s ease-in-out infinite reverse;
}
.db-m3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #D4358C 0%, transparent 70%);
  top: 50%; left: 60%;
  transform: translate(-50%, -50%);
  animation: dbMesh 18s ease-in-out infinite 3s;
}

@keyframes dbMesh {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.08); }
  66%      { transform: translate(-20px, 25px) scale(0.95); }
}

/* -- Logo ------------------------------------------- */
.db-logo { margin-bottom: 1.75rem; }

.db-logo-link {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  max-width: 180px;
}

.db-logo-mark {
  display: block;
  max-width: 180px;
  height: auto;
  border-radius: 0;
  overflow: visible;
  line-height: 0;
}

.db-logo-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: none;
}

.db-logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* -- Headline --------------------------------------- */
.db-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.db-headline em {
  font-style: normal;
  background: linear-gradient(90deg, #E85D2F, #D4358C, #9D30C8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.db-tagline {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 26rem;
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

/* -- Dashboard card stack --------------------------- */
.db-cards-stack {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

.db-card-back {
  position: absolute;
  top: 10px; left: 12px; right: -6px; bottom: -6px;
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.04);
}

.db-card-main {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

/* Title bar */
.db-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.db-card-dots { display: flex; gap: 6px; }

.db-cd {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.db-cd-r { background: #ff5f57; }
.db-cd-y { background: #febc2e; }
.db-cd-g { background: #28c840; }

.db-card-url {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}

/* Card body */
.db-card-body { padding: 18px; }

/* -- Metric row ------------------------------------- */
.db-row-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.db-rm {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
}

.db-rm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.db-rm-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
}

.db-rm-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  padding: 1px 6px;
  border-radius: 20px;
}

.db-rm-val {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

/* Sparkline bars */
.db-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.db-sk {
  flex: 1;
  border-radius: 2px;
  min-width: 0;
}

.db-sk-orange { background: linear-gradient(to top, rgba(232,93,47,0.25), rgba(232,93,47,0.7)); }
.db-sk-purple { background: linear-gradient(to top, rgba(157,48,200,0.25), rgba(157,48,200,0.7)); }
.db-sk-pink   { background: linear-gradient(to top, rgba(212,53,140,0.25), rgba(212,53,140,0.7)); }

/* -- Growth chart ----------------------------------- */
.db-growth-chart {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px;
}

.db-gc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.db-gc-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.db-gc-tabs { display: flex; gap: 2px; }

.db-gc-tab {
  font-size: 0.6rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.db-gc-tab.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* -- Floating notifications ------------------------- */
.db-notif {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(25,23,45,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 5;
}

.db-n1 {
  top: 10%; right: -24px;
  animation: dbFloat 5s ease-in-out infinite;
}

.db-n2 {
  bottom: 8%; left: -18px;
  animation: dbFloat 6s ease-in-out infinite 2s;
}

@keyframes dbFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.db-notif-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.db-notif-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
}

.db-notif-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}

/* -- Trust strip ------------------------------------ */
.db-trust-strip {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.db-ts-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}

.db-ts-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
}


/* ========================================
   RIGHT PANEL
   ======================================== */
.db-right {
  flex: 1 1 45%;
  max-width: 45%;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(2rem, 4vh, 3rem) clamp(2rem, 4vw, 3.5rem);
}

.db-right > * { width: 100%; max-width: 400px; }

/* -- Form title ------------------------------------- */
.db-form-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
  text-align: center;
  margin-bottom: 0.35rem;
}

.db-form-sub {
  text-align: center;
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 1.75rem;
}

/* -- Alerts ----------------------------------------- */
.db-right .form-result.auth-alert {
  margin-bottom: 1rem;
}

/* -- Google / Facebook button ----------------------- */
.db-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.db-btn-google:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* -- Divider ---------------------------------------- */
.db-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 1.25rem 0;
}

.db-divider::before,
.db-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.db-divider span {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.08em;
}

/* -- Form ------------------------------------------- */
.db-form { width: 100%; border-top: none !important; padding-top: 0 !important; }

.db-field {
  margin-bottom: 1.1rem;
}

.db-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

#login .db-field input,
#signup .db-field input,
#login .db-field input[type="text"],
#login .db-field input[type="password"],
#login .db-field input[type="email"],
#signup .db-field input[type="text"],
#signup .db-field input[type="password"],
#signup .db-field input[type="email"] {
  width: 100% !important;
  height: 48px !important;
  padding: 0 1rem !important;
  font-size: 0.9375rem !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #111827 !important;
  outline: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#login .db-field input:hover,
#signup .db-field input:hover {
  border-color: #d1d5db !important;
}

#login .db-field input:focus,
#signup .db-field input:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15) !important;
}

#login .db-field input::placeholder,
#signup .db-field input::placeholder {
  color: #9ca3af !important;
  font-size: 0.875rem !important;
}

/* -- Remember / forgot ------------------------------ */
.db-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.25rem 0 1.25rem;
}

.db-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.db-remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #f97316;
  cursor: pointer;
}

.db-forgot {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f43f5e;
  text-decoration: none;
}
.db-forgot:hover {
  color: #e11d48;
  text-decoration: underline;
}

/* -- Submit button ---------------------------------- */
.db-btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #f43f5e, #ec4899);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(244,63,94,0.4);
  transition: opacity 0.2s, box-shadow 0.2s, transform 0.1s;
}

.db-btn-login:hover {
  opacity: 0.92;
  box-shadow: 0 6px 20px -4px rgba(244,63,94,0.5);
}

.db-btn-login:active { transform: scale(0.99); }
.db-btn-login:disabled { opacity: 0.65; cursor: wait; }

/* -- Sign up link ----------------------------------- */
.db-signup {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.db-signup a {
  font-weight: 700;
  color: #f43f5e;
  text-decoration: none;
}
.db-signup a:hover {
  color: #e11d48;
  text-decoration: underline;
}

/* -- Trust bottom ----------------------------------- */
.db-trust-bottom {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f3f4f6;
}

.db-tb {
  font-size: 0.7rem;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Large screens */
@media (min-width: 1400px) {
  .db-left { padding: 4rem 5rem; }
  .db-left-inner { max-width: 620px; }
  .db-right > * { max-width: 420px; }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  .db-left { flex: 1 1 50%; max-width: 50%; }
  .db-right { flex: 1 1 50%; max-width: 50%; }
  .db-row-metrics { gap: 8px; }
  .db-rm { padding: 10px; }
  .db-rm-val { font-size: 1rem; }
  .db-notif { display: none; }
}

/* Mobile: stacked */
@media (max-width: 767px) {
  .db-wrapper {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .db-left {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
  }

  .db-left-inner {
    text-align: center;
    max-width: 100%;
  }

  .db-headline { font-size: 1.5rem; text-align: center; }
  .db-tagline  { text-align: center; max-width: 100%; margin-left: auto; margin-right: auto; }

  .db-cards-stack { display: none; }
  .db-trust-strip { justify-content: center; }

  .db-right {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 380px) {
  .db-left { padding: 1.5rem 1.25rem 1.25rem; }
  .db-headline { font-size: 1.35rem; }
  .db-right { padding: 1.5rem 1.25rem; border-radius: 20px 20px 0 0; }
}

/* ========================================
   SIGNUP PAGE OVERRIDES
   ======================================== */

/* Signup right panel needs scroll for longer form */
.db-right--signup {
  overflow-y: auto;
  justify-content: flex-start;
  padding-top: clamp(2.5rem, 5vh, 4rem);
  padding-bottom: 2rem;
}

/* Side-by-side fields (first+last name, password+confirm) */
.db-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.db-field-row .db-field { margin-bottom: 1.1rem; }

/* Timezone trigger styled like text inputs */
#login .db-tz-trigger,
#signup .db-tz-trigger {
  width: 100% !important;
  height: 48px !important;
  padding: 0 1rem !important;
  font-size: 0.9375rem !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #111827 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#login .db-tz-trigger:hover,
#signup .db-tz-trigger:hover {
  border-color: #d1d5db !important;
}

#login .db-tz-trigger:focus,
#signup .db-tz-trigger:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15) !important;
  outline: none !important;
}

/* Signup alert styling on white bg */
.db-right .auth-alert .auth-alert__inner {
  color: #dc2626;
}

/* Mobile: stack the field rows */
@media (max-width: 480px) {
  .db-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
