/* Guest auth pages */

:root,
html[data-theme='business'] {
  --guest-bg-1: #05030b;
  --guest-bg-2: #0b0716;
  --guest-border: rgba(233, 92, 187, 0.34);
  --guest-card: rgba(14, 10, 24, 0.9);
  --guest-text: #e5e7eb;
  --guest-text-soft: #b9a7d5;
  --guest-input-bg: rgba(15, 23, 42, 0.9);
  --guest-input-placeholder: #94a3b8;
  --guest-link: #c4b5fd;
  --guest-primary-from: #8e2fb8;
  --guest-primary-to: #6f2fb0;
  --guest-primary-border: rgba(143, 63, 181, 0.88);
  --guest-primary-from-hover: #9b38c5;
  --guest-primary-to-hover: #7b39bc;
  --guest-main-blur: 1px;
  --guest-bg-layer:
    radial-gradient(760px 760px at 98% 2%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.92) 46%, rgba(0, 0, 0, 0.7) 64%, rgba(0, 0, 0, 0.34) 78%, transparent 100%),
    radial-gradient(920px 520px at 16% 6%, rgba(232, 95, 192, 0.36), transparent 64%),
    radial-gradient(1040px 580px at 86% 94%, rgba(183, 95, 242, 0.26), transparent 64%),
    radial-gradient(740px 500px at 52% 40%, rgba(237, 120, 202, 0.2), transparent 72%),
    linear-gradient(160deg, var(--guest-bg-1), var(--guest-bg-2));
  --guest-bg-layer-mobile:
    radial-gradient(560px 560px at 104% -6%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 44%, rgba(0, 0, 0, 0.66) 64%, rgba(0, 0, 0, 0.28) 80%, transparent 100%),
    radial-gradient(920px 520px at 16% 6%, rgba(232, 95, 192, 0.36), transparent 64%),
    radial-gradient(1040px 580px at 86% 94%, rgba(183, 95, 242, 0.26), transparent 64%),
    radial-gradient(740px 500px at 52% 40%, rgba(237, 120, 202, 0.2), transparent 72%),
    linear-gradient(160deg, var(--guest-bg-1), var(--guest-bg-2));
  --guest-card-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(168, 85, 247, 0.12),
    0 0 36px rgba(236, 72, 153, 0.2);
  --guest-orb-opacity: 0.9;
  --guest-orb-filter: saturate(1.25) contrast(1.12) brightness(1.08);
  --guest-orb-shadow:
    0 0 90px rgba(236, 72, 153, 0.35),
    0 0 170px rgba(147, 51, 234, 0.3);
  --guest-orb-blend: screen;
}

html[data-theme='light'] {
  --guest-bg-1: #eef3ff;
  --guest-bg-2: #f8fbff;
  --guest-border: rgba(129, 140, 248, 0.34);
  --guest-card: rgba(255, 255, 255, 0.92);
  --guest-text: #111827;
  --guest-text-soft: #4b5563;
  --guest-input-bg: rgba(248, 250, 252, 0.96);
  --guest-input-placeholder: #6b7280;
  --guest-link: #4338ca;
  --guest-primary-from: #4f46e5;
  --guest-primary-to: #6366f1;
  --guest-primary-border: rgba(79, 70, 229, 0.55);
  --guest-primary-from-hover: #4338ca;
  --guest-primary-to-hover: #4f46e5;
  --guest-main-blur: 0px;
  --guest-bg-layer:
    radial-gradient(1000px 650px at 85% -6%, rgba(139, 92, 246, 0.16), transparent 64%),
    radial-gradient(900px 520px at 8% 2%, rgba(59, 130, 246, 0.12), transparent 66%),
    linear-gradient(160deg, var(--guest-bg-1), var(--guest-bg-2));
  --guest-bg-layer-mobile:
    radial-gradient(620px 520px at 90% -8%, rgba(139, 92, 246, 0.14), transparent 68%),
    radial-gradient(760px 500px at 10% 0%, rgba(59, 130, 246, 0.1), transparent 70%),
    linear-gradient(160deg, var(--guest-bg-1), var(--guest-bg-2));
  --guest-card-shadow:
    0 20px 40px rgba(30, 41, 59, 0.12),
    0 0 0 1px rgba(99, 102, 241, 0.08);
  --guest-orb-opacity: 0.35;
  --guest-orb-filter: saturate(1) contrast(1.02) brightness(1.03);
  --guest-orb-shadow:
    0 0 50px rgba(99, 102, 241, 0.16),
    0 0 100px rgba(168, 85, 247, 0.12);
  --guest-orb-blend: normal;
}

html[data-theme='color'] {
  --guest-bg-1: #09050f;
  --guest-bg-2: #140826;
  --guest-border: rgba(233, 92, 187, 0.34);
  --guest-card: rgba(14, 10, 24, 0.9);
  --guest-text: #e5e7eb;
  --guest-text-soft: #b9a7d5;
  --guest-input-bg: rgba(15, 23, 42, 0.9);
  --guest-input-placeholder: #94a3b8;
  --guest-link: #c4b5fd;
  --guest-primary-from: #c23fd1;
  --guest-primary-to: #8b46df;
  --guest-primary-border: rgba(163, 77, 219, 0.86);
  --guest-primary-from-hover: #cf56dc;
  --guest-primary-to-hover: #9f5ae6;
  --guest-main-blur: 1px;
  --guest-bg-layer:
    radial-gradient(760px 760px at 98% 2%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.92) 46%, rgba(0, 0, 0, 0.7) 64%, rgba(0, 0, 0, 0.34) 78%, transparent 100%),
    radial-gradient(920px 520px at 16% 6%, rgba(232, 95, 192, 0.36), transparent 64%),
    radial-gradient(1040px 580px at 86% 94%, rgba(183, 95, 242, 0.26), transparent 64%),
    radial-gradient(740px 500px at 52% 40%, rgba(237, 120, 202, 0.2), transparent 72%),
    linear-gradient(160deg, var(--guest-bg-1), var(--guest-bg-2));
  --guest-bg-layer-mobile:
    radial-gradient(560px 560px at 104% -6%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 44%, rgba(0, 0, 0, 0.66) 64%, rgba(0, 0, 0, 0.28) 80%, transparent 100%),
    radial-gradient(920px 520px at 16% 6%, rgba(232, 95, 192, 0.36), transparent 64%),
    radial-gradient(1040px 580px at 86% 94%, rgba(183, 95, 242, 0.26), transparent 64%),
    radial-gradient(740px 500px at 52% 40%, rgba(237, 120, 202, 0.2), transparent 72%),
    linear-gradient(160deg, var(--guest-bg-1), var(--guest-bg-2));
  --guest-card-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(168, 85, 247, 0.12),
    0 0 36px rgba(236, 72, 153, 0.2);
  --guest-orb-opacity: 0.9;
  --guest-orb-filter: saturate(1.25) contrast(1.12) brightness(1.08);
  --guest-orb-shadow:
    0 0 90px rgba(236, 72, 153, 0.35),
    0 0 170px rgba(147, 51, 234, 0.3);
  --guest-orb-blend: screen;
}

.guest-shell {
  background: var(--guest-bg-layer);
  color: var(--guest-text);
  position: relative;
  overflow: hidden;
}

.guest-main {
  backdrop-filter: blur(var(--guest-main-blur));
}

.guest-theme-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--guest-border);
  background: rgba(0, 0, 0, 0.22);
}

html[data-theme='light'] .guest-theme-switch {
  background: rgba(255, 255, 255, 0.82);
}

.guest-theme-switch .btn {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
}

.guest-theme-switch .btn.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

.guest-theme-switch .btn.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.guest-theme-switch .btn[aria-pressed='true'] {
  background: linear-gradient(135deg, var(--guest-primary-from), var(--guest-primary-to)) !important;
  border-color: var(--guest-primary-border) !important;
  color: #ffffff !important;
}

html[data-theme='light'] .guest-theme-switch .btn.btn-ghost {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.14);
  color: #111827;
}

.auth-card {
  border: 1px solid var(--guest-border) !important;
  background: var(--guest-card) !important;
  box-shadow: var(--guest-card-shadow);
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.auth-card .card-body {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.auth-page-stack {
  position: relative;
  z-index: 1;
}

.auth-page-logo {
  margin-top: -56px;
  margin-bottom: 32px;
}

.auth-page-logo img {
  height: 44px;
  width: auto;
}

.auth-card .label-text,
.auth-card .text-base-content\/60 {
  color: var(--guest-text-soft) !important;
}

.auth-card .input {
  background: var(--guest-input-bg) !important;
  border-color: var(--guest-border) !important;
  color: var(--guest-text) !important;
  border-radius: 0.55rem !important;
}

.auth-card .input::placeholder {
  color: var(--guest-input-placeholder);
}

.auth-card .link {
  color: var(--guest-link);
}

.auth-primary-btn {
  background: linear-gradient(135deg, var(--guest-primary-from), var(--guest-primary-to)) !important;
  border-color: var(--guest-primary-border) !important;
  color: #fff !important;
  border-radius: 0.6rem !important;
}

.auth-primary-btn:hover {
  background: linear-gradient(135deg, var(--guest-primary-from-hover), var(--guest-primary-to-hover)) !important;
  border-color: var(--guest-primary-border) !important;
}

.guest-orb {
  position: fixed;
  top: -120px;
  right: -130px;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: var(--guest-orb-opacity);
  background:
    url('/uploads/sphere_2.svg+xml') no-repeat center / contain,
    url('/uploads/sphere.svg') no-repeat center / contain;
  mix-blend-mode: var(--guest-orb-blend);
  isolation: isolate;
  filter: var(--guest-orb-filter);
  -webkit-mask-image: radial-gradient(circle, #000 66%, transparent 67%);
  mask-image: radial-gradient(circle, #000 66%, transparent 67%);
  box-shadow: var(--guest-orb-shadow);
  animation: guest-orb-drift 11s ease-in-out infinite alternate;
}

@keyframes guest-orb-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-12px, 10px, 0) scale(1.02);
  }
}

@media (max-width: 960px) {
  .guest-shell {
    background: var(--guest-bg-layer-mobile);
  }

  .guest-orb {
    width: min(70vw, 420px);
    top: -96px;
    right: -120px;
    opacity: calc(var(--guest-orb-opacity) * 0.82);
  }
}
