/* ============================================================
   Login Page — Professional Corporate Design
   Inspired by: Google Workspace, Slack, Notion, Stripe login patterns
   Key principles: Color harmony, clear hierarchy, soft depth, brand accent
   ============================================================ */

/* Hide Template Customizer only on this login page */
.template-customizer,
.template-customizer-open-btn {
  display: none !important;
}

/* ── Full-width wrapper ── */
.login-page-wrapper {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* ── Background — clean, bright, minimal like Google/Apple ── */
.authentication-wrapper.authentication-basic {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f0f4f8;
  overflow: hidden;
}

/* Circuit board pattern — very subtle on light bg, brand identity */
.authentication-wrapper.authentication-basic::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%231a3a5c' stroke-width='0.6' opacity='0.15'%3E%3Cpath d='M0 100h200M250 100h150M450 100h150'/%3E%3Cpath d='M0 200h100M150 200h250M450 200h150'/%3E%3Cpath d='M0 300h350M400 300h200'/%3E%3Cpath d='M0 400h150M200 400h200M450 400h150'/%3E%3Cpath d='M0 500h250M300 500h300'/%3E%3Cpath d='M100 0v100M100 150v100'/%3E%3Cpath d='M200 100v150M200 300v100'/%3E%3Cpath d='M300 0v200M300 250v150M300 450v150'/%3E%3Cpath d='M400 100v200M400 350v150'/%3E%3Cpath d='M500 0v100M500 150v350M500 550v50'/%3E%3C/g%3E%3Cg fill='%231a3a5c' opacity='0.15'%3E%3Ccircle cx='100' cy='100' r='2'/%3E%3Ccircle cx='200' cy='100' r='2'/%3E%3Ccircle cx='400' cy='100' r='2'/%3E%3Ccircle cx='100' cy='200' r='2'/%3E%3Ccircle cx='200' cy='200' r='2'/%3E%3Ccircle cx='400' cy='200' r='2'/%3E%3Ccircle cx='300' cy='300' r='2'/%3E%3Ccircle cx='500' cy='300' r='2'/%3E%3Ccircle cx='200' cy='400' r='2'/%3E%3Ccircle cx='400' cy='400' r='2'/%3E%3Ccircle cx='300' cy='500' r='2'/%3E%3Ccircle cx='500' cy='500' r='2'/%3E%3C/g%3E%3Cg fill='%234285f4' opacity='0.2'%3E%3Ccircle cx='300' cy='300' r='3'/%3E%3Ccircle cx='100' cy='100' r='3'/%3E%3Ccircle cx='500' cy='500' r='3'/%3E%3Ccircle cx='400' cy='200' r='3'/%3E%3C/g%3E%3Cg fill='none' stroke='%234285f4' stroke-width='0.8' opacity='0.15'%3E%3Cpath d='M100 100h100v100h100v100'/%3E%3Cpath d='M300 300h100v100h100v100'/%3E%3Cpath d='M400 200v100h100'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 600px;
  animation: circuitDrift 80s linear infinite;
}

/* Soft ambient color spots */
.authentication-wrapper.authentication-basic::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(66, 133, 244, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(26, 115, 232, 0.09) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(66, 133, 244, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Inner container ── */
.authentication-wrapper.authentication-basic .authentication-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* ── Card — crisp white on light bg, elevated with shadow ── */
.authentication-wrapper.authentication-basic .card.login-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.authentication-wrapper.authentication-basic .card.login-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Brand accent bar at top of card */
.login-card-accent {
  height: 4px;
  background: linear-gradient(90deg, #1a73e8, #4285f4, #669df6, #4285f4, #1a73e8);
  background-size: 200% 100%;
  animation: accentShimmer 4s ease-in-out infinite;
}

@keyframes accentShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Card body */
.authentication-wrapper.authentication-basic .card .card-body {
  padding: 2.5rem 2.25rem 2rem;
}

/* Logo */
.login-logo {
  max-width: 260px;
  height: auto;
}

/* Welcome heading */
.login-heading {
  color: #202124 !important;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

/* Subtext */
.login-subtext {
  color: #5f6368;
  font-size: 0.9rem;
  font-weight: 400;
}

/* ── Google Sign-in Button — Material Design style ── */
.login-google-btn {
  background: #ffffff !important;
  color: #3c4043 !important;
  border: 1.5px solid #dadce0 !important;
  border-radius: 0.625rem;
  padding: 0.8rem 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.login-google-btn:hover {
  background: #f7f8f8 !important;
  color: #1a73e8 !important;
  border-color: #c6c9cc !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}

.login-google-btn:active {
  transform: translateY(0);
  background: #f1f3f4 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.login-google-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

/* Thin divider line before secure text */
.login-divider {
  display: flex;
  align-items: center;
  margin: 0.75rem 0 1rem;
}

.login-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d0d7e0, transparent);
}

/* Secure sign-in text — clearly visible */
.login-secure-text {
  color: #6b7a8d !important;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.login-secure-text .ti {
  color: #34a853;
  font-size: 0.9rem;
}

/* ── Footer below card ── */
.login-footer {
  color: #70808f;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.login-footer p {
  color: #70808f;
  margin-bottom: 0;
}

.login-footer .ti {
  font-size: 0.75rem;
}

/* ── Decorative accent lines ── */
.login-accent-top,
.login-accent-bottom {
  position: absolute;
  height: 1px;
  z-index: 1;
  pointer-events: none;
}

.login-accent-top {
  top: 20%;
  left: 5%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.25), transparent);
  animation: accentSlide 12s ease-in-out infinite;
}

.login-accent-bottom {
  bottom: 20%;
  right: 5%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.18), transparent);
  animation: accentSlide 14s ease-in-out infinite reverse;
}

/* ── Animations ── */
@keyframes circuitDrift {
  from { background-position: 0 0; }
  to   { background-position: 600px 600px; }
}

@keyframes accentSlide {
  0%, 100% { transform: translateX(-20px); opacity: 0.2; }
  50%      { transform: translateX(20px);  opacity: 0.7; }
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .authentication-wrapper.authentication-basic {
    padding: 1.25rem 0.75rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .authentication-wrapper.authentication-basic .authentication-inner {
    max-width: 100%;
  }

  .authentication-wrapper.authentication-basic .card.login-card {
    border-radius: 1.125rem;
  }

  .authentication-wrapper.authentication-basic .card .card-body {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .login-logo { max-width: 200px; }
  .login-heading { font-size: 1.2rem; }

  .login-accent-top,
  .login-accent-bottom {
    display: none;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .authentication-wrapper.authentication-basic .authentication-inner {
    max-width: 400px;
  }

  .authentication-wrapper.authentication-basic .card .card-body {
    padding: 2rem 1.75rem 1.75rem;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .authentication-wrapper.authentication-basic .authentication-inner {
    max-width: 430px;
  }
}

@media (min-width: 1201px) {
  .authentication-wrapper.authentication-basic .authentication-inner {
    max-width: 460px;
  }

  .authentication-wrapper.authentication-basic .card .card-body {
    padding: 3rem 2.5rem 2.25rem;
  }
}

/* ── Dark mode ── */
[data-bs-theme="dark"] .authentication-wrapper.authentication-basic {
  background: #111827;
}

[data-bs-theme="dark"] .authentication-wrapper.authentication-basic::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.4' opacity='0.05'%3E%3Cpath d='M0 100h200M250 100h150M450 100h150'/%3E%3Cpath d='M0 200h100M150 200h250M450 200h150'/%3E%3Cpath d='M0 300h350M400 300h200'/%3E%3Cpath d='M0 400h150M200 400h200M450 400h150'/%3E%3Cpath d='M0 500h250M300 500h300'/%3E%3Cpath d='M100 0v100M100 150v100'/%3E%3Cpath d='M200 100v150M200 300v100'/%3E%3Cpath d='M300 0v200M300 250v150M300 450v150'/%3E%3Cpath d='M400 100v200M400 350v150'/%3E%3Cpath d='M500 0v100M500 150v350M500 550v50'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='0.06'%3E%3Ccircle cx='100' cy='100' r='2'/%3E%3Ccircle cx='200' cy='100' r='2'/%3E%3Ccircle cx='400' cy='100' r='2'/%3E%3Ccircle cx='100' cy='200' r='2'/%3E%3Ccircle cx='200' cy='200' r='2'/%3E%3Ccircle cx='400' cy='200' r='2'/%3E%3Ccircle cx='300' cy='300' r='2'/%3E%3Ccircle cx='500' cy='300' r='2'/%3E%3Ccircle cx='200' cy='400' r='2'/%3E%3Ccircle cx='400' cy='400' r='2'/%3E%3Ccircle cx='300' cy='500' r='2'/%3E%3Ccircle cx='500' cy='500' r='2'/%3E%3C/g%3E%3Cg fill='%234285f4' opacity='0.12'%3E%3Ccircle cx='300' cy='300' r='3'/%3E%3Ccircle cx='100' cy='100' r='3'/%3E%3Ccircle cx='500' cy='500' r='3'/%3E%3Ccircle cx='400' cy='200' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

[data-bs-theme="dark"] .authentication-wrapper.authentication-basic .card.login-card {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .login-card-accent {
  background: linear-gradient(90deg, #1a73e8, #4285f4, #669df6, #4285f4, #1a73e8);
  background-size: 200% 100%;
}

[data-bs-theme="dark"] .login-heading {
  color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .login-subtext {
  color: #9ca3af;
}

[data-bs-theme="dark"] .login-google-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #e5e7eb !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .login-google-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(66, 133, 244, 0.4) !important;
  color: #93c5fd !important;
}

[data-bs-theme="dark"] .login-secure-text {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .login-divider span {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

[data-bs-theme="dark"] .login-footer p {
  color: #6b7280;
}
