/* ============================================
   NÉCTAR LOGIN — TECH HONEYCOMB THEME v2
   ============================================ */

/* --- CSS Variables --- */
:root {
  --nectar-green: #00d857;
  --nectar-green-dark: #00b848;
  --nectar-green-glow: rgba(0, 216, 87, 0.35);
  --nectar-bg-deep: #0d1a12;
  --nectar-panel-bg: rgba(28, 28, 28, 0.78);
  --nectar-panel-border: rgba(255, 255, 255, 0.08);
  --nectar-input-bg: #4a4a4a;
  --nectar-input-border: #5a5a5a;
  --nectar-text-primary: #ffffff;
  --nectar-text-secondary: #c0c0c0;
  --nectar-text-muted: #8a8a8a;
}

/* --- Reset for this page --- */
.nectar-login-page *,
.nectar-login-page *::before,
.nectar-login-page *::after {
  box-sizing: border-box;
}

/* --- Full-screen layout --- */
.nectar-login-page {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--nectar-bg-deep);
}

/* --- Background honeycomb image --- */
.nectar-login-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Subtle vignette for depth — keeps center bright */
.nectar-login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    rgba(5, 12, 8, 0.4) 100%
  );
  z-index: 1;
}

/* --- Central hexagonal panel --- */
.nectar-login-panel {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 620px;
  padding: 0 16px;
}

/* 
   The hexagon wrapper creates the hex shape via clip-path.
   This is the OUTER container that clips.
*/
.nectar-hex-wrapper {
  position: relative;
  width: 100%;
  /* Hexagon aspect ratio: height ≈ width × 1.15 for a tall hex */
  padding-bottom: 115%;
}

.nectar-hex-clip {
  position: absolute;
  inset: 0;
  clip-path: polygon(
    50% 0%,
    100% 25%,
    100% 75%,
    50% 100%,
    0% 75%,
    0% 25%
  );
  background: var(--nectar-panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Glow border — slightly larger hex behind the panel */
.nectar-hex-glow {
  position: absolute;
  inset: -2px;
  clip-path: polygon(
    50% 0%,
    100% 25%,
    100% 75%,
    50% 100%,
    0% 75%,
    0% 25%
  );
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  z-index: -1;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Content inside the hexagon — positioned absolutely within the hex */
.nectar-hex-content {
  position: absolute;
  /* Offset inward to avoid clipping content at hex edges */
  top: 16%;
  left: 15%;
  right: 15%;
  bottom: 16%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- Logo --- */
.nectar-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.nectar-login-logo img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(0, 216, 87, 0.15));
}

/* --- Welcome text --- */
.nectar-welcome {
  text-align: center;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.nectar-welcome h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--nectar-text-primary);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.nectar-welcome p {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  color: var(--nectar-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- Form styles --- */
.nectar-form {
  width: 100%;
  max-width: 380px;
}

.nectar-form .nectar-field {
  margin-bottom: 18px;
}

.nectar-form .nectar-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nectar-text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.nectar-form .nectar-label .required {
  color: var(--nectar-green);
  margin-left: 2px;
}

.nectar-form .nectar-input {
  width: 100%;
  height: 48px;
  background: var(--nectar-input-bg) !important;
  border: 1px solid var(--nectar-input-border) !important;
  border-radius: 24px;
  padding: 0 22px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--nectar-text-primary) !important;
  text-align: center;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nectar-form .nectar-input::placeholder {
  color: var(--nectar-text-muted);
  font-size: 0.82rem;
}

.nectar-form .nectar-input:focus {
  border-color: var(--nectar-green) !important;
  box-shadow: 0 0 0 3px var(--nectar-green-glow);
}

/* Password wrapper */
.nectar-password-wrap {
  position: relative;
}

.nectar-password-wrap .nectar-input {
  padding-right: 48px;
}

.nectar-password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--nectar-text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.15rem;
  transition: color 0.2s ease;
  line-height: 1;
}

.nectar-password-toggle:hover {
  color: var(--nectar-green);
}

/* --- Forgot password link --- */
.nectar-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.nectar-forgot-link {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  color: var(--nectar-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nectar-forgot-link:hover {
  color: var(--nectar-green);
  text-decoration: underline;
}

/* --- Submit button --- */
.nectar-btn-submit {
  display: block;
  width: 60%;
  max-width: 220px;
  height: 44px;
  margin: 24px auto 0;
  background: var(--nectar-green);
  border: none;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.nectar-btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.5s ease;
}

.nectar-btn-submit:hover {
  background: var(--nectar-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 216, 87, 0.3);
}

.nectar-btn-submit:hover::before {
  left: 100%;
}

.nectar-btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 216, 87, 0.2);
}

/* --- Flash alert --- */
.nectar-alert {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.35);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  color: #ff6b7a;
}

/* --- Subtle bottom scan-line --- */
.nectar-scanline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nectar-green), transparent);
  opacity: 0.3;
  z-index: 2;
  animation: scanlineMove 5s linear infinite;
}

@keyframes scanlineMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Particle dots --- */
.nectar-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.nectar-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--nectar-green);
  opacity: 0;
  animation: particleRise 10s linear infinite;
}

@keyframes particleRise {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  15% { opacity: 0.5; }
  85% { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

.nectar-particle:nth-child(1) { left: 8%; animation-delay: 0s; animation-duration: 12s; }
.nectar-particle:nth-child(2) { left: 22%; animation-delay: 3s; animation-duration: 9s; }
.nectar-particle:nth-child(3) { left: 48%; animation-delay: 5s; animation-duration: 14s; }
.nectar-particle:nth-child(4) { left: 67%; animation-delay: 1.5s; animation-duration: 10s; }
.nectar-particle:nth-child(5) { left: 82%; animation-delay: 4s; animation-duration: 11s; }
.nectar-particle:nth-child(6) { left: 93%; animation-delay: 7s; animation-duration: 8s; }

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

/* Tablets */
@media (max-width: 768px) {
  .nectar-login-panel {
    max-width: 420px;
  }

  .nectar-hex-content {
    top: 18%;
    left: 12%;
    right: 12%;
    bottom: 18%;
  }

  .nectar-login-logo img {
    max-width: 140px;
  }

  .nectar-welcome h1 {
    font-size: 1.25rem;
  }

  .nectar-welcome p {
    font-size: 0.78rem;
  }

  .nectar-form .nectar-input {
    height: 44px;
    font-size: 0.85rem;
  }

  .nectar-btn-submit {
    height: 40px;
    font-size: 0.88rem;
  }
}

/* Small mobile — switch to rounded panel for usability */
@media (max-width: 520px) {
  .nectar-hex-wrapper {
    padding-bottom: 0;
  }

  .nectar-hex-clip {
    position: relative;
    clip-path: none;
    border-radius: 20px;
    border: 1px solid var(--nectar-panel-border);
    padding: 36px 24px 32px;
  }

  .nectar-hex-glow {
    clip-path: none;
    border-radius: 22px;
  }

  .nectar-hex-content {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }

  .nectar-login-panel {
    max-width: 100%;
    padding: 0 16px;
  }

  .nectar-login-logo img {
    max-width: 120px;
  }

  .nectar-welcome {
    margin-bottom: 20px;
  }

  .nectar-welcome h1 {
    font-size: 1.15rem;
  }
}

/* Very small */
@media (max-width: 380px) {
  .nectar-hex-clip {
    padding: 28px 16px 24px;
  }

  .nectar-form .nectar-input {
    height: 40px;
  }
}

/* Large screens */
@media (min-width: 1440px) {
  .nectar-login-panel {
    max-width: 700px;
  }

  .nectar-login-logo img {
    max-width: 210px;
  }

  .nectar-welcome h1 {
    font-size: 1.7rem;
  }

  .nectar-form .nectar-input {
    height: 52px;
    font-size: 0.95rem;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .nectar-particle,
  .nectar-scanline,
  .nectar-hex-glow {
    animation: none !important;
  }

  .nectar-btn-submit::before {
    display: none;
  }
}
