﻿/**
 * Login Page â€” dark cinematic layout: frosted card on the left, glowing bulb photo on the right.
 */

:root {
  --lp-teal:       #12968f;
  --lp-teal-hover: #17aba3;
  --lp-orange:     #ffa61a;
  --lp-input-bg:   #f1f2f6;
  --lp-input-text: #1a2233;
  --lp-ease:       all .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  background: #0b0c1c;
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* â”€â”€â”€ Full-screen backdrop â”€â”€â”€ */
.login-page {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  padding: 32px 20px;
  overflow: hidden;
  background:
    radial-gradient(900px 700px at 100% 100%, rgba(120,110,160,.55), transparent 65%),
    radial-gradient(700px 600px at 20% 100%, rgba(60,60,120,.35), transparent 70%),
    linear-gradient(180deg, #06070f 0%, #101229 55%, #23264a 100%);
}

/* â”€â”€â”€ Bulb photo (right) â”€â”€â”€ */
.bulb-stage {
  position: absolute;
  top: 50%;
  right: 10vw;
  height: min(80vh, 700px);
  aspect-ratio: 520 / 700;
  transform: translateY(-50%);
  background: url('../../IMAGE/login-bulb.jpg') center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 52% 52% at 50% 50%, #000 74%, transparent 100%);
          mask-image: radial-gradient(ellipse 52% 52% at 50% 50%, #000 74%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* â”€â”€â”€ Frosted card â”€â”€â”€ */
.login-form-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-left: clamp(0px, 29vw, 560px);
}
.login-form-inner {
  width: 100%;
  max-width: 496px;
  padding: 38px 40px 30px;
  background: linear-gradient(180deg, rgba(62,62,88,.62), rgba(150,150,188,.6));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}

/* Branding */
.brand-block { text-align: center; margin-bottom: 22px; }
.cp-mark { width: 128px; height: auto; display: block; margin: 0 auto 2px; }
.brand-title {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  line-height: 1.1;
}
.brand-title sup { font-size: .32em; vertical-align: super; margin-left: 1px; }
.brand-subtitle {
  margin-top: 4px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--lp-orange);
}

/* â”€â”€â”€ Fields â”€â”€â”€ */
.input-wrap { position: relative; margin-bottom: 14px; }
.input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: var(--lp-input-bg);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  color: var(--lp-input-text);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: var(--lp-ease);
}
.input-wrap input::placeholder { color: #6b7385; }
.input-wrap input:focus {
  background: #fff;
  border-color: var(--lp-teal);
  box-shadow: 0 0 0 4px rgba(18,150,143,.3);
}
.input-wrap input#password { padding-right: 52px; }

.toggle-pw {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: #6b7488;
  cursor: pointer;
  transition: var(--lp-ease);
}
.toggle-pw:hover { color: var(--lp-teal); background: rgba(18,150,143,.12); }

/* Forgot link */
.form-extras { display: flex; justify-content: flex-end; margin: 0 6px 18px; }
.forgot-link {
  color: #e9f7ff;
  font-size: .82rem;
  text-decoration: none;
  transition: var(--lp-ease);
}
.forgot-link:hover { color: #fff; text-decoration: underline; }

/* â”€â”€â”€ Login button â”€â”€â”€ */
.btn-login {
  width: 100%;
  height: 52px;
  background: linear-gradient(180deg, #15a098, #0e857f);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: .98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--lp-ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(10,110,105,.45);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10,110,105,.6); }
.btn-login:active { transform: translateY(0); }
.btn-login:focus-visible { outline: 3px solid rgba(255,255,255,.55); outline-offset: 2px; }
.btn-login:disabled { opacity: .65; cursor: not-allowed; transform: none !important; }
.btn-login .loading {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sign up + footer */
.signup-line {
  margin-top: 20px;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.signup-link { color: #14245e; font-weight: 700; text-decoration: underline; margin-left: 2px; }
.signup-link:hover { text-decoration: underline; }
.login-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.4;
  color: #10131f;
}

/* â”€â”€â”€ Alerts (used by login.js) â”€â”€â”€ */
.alert-message {
  position: fixed;
  top: 20px; right: 20px;
  padding: 14px 22px;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 9999;
  font-weight: 500;
  font-size: .88rem;
  animation: alertIn .35s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  backdrop-filter: blur(10px);
}
.alert-message.success { background: rgba(34,197,94,.92); }
.alert-message.warning { background: rgba(245,158,11,.92); }
.alert-message.error   { background: rgba(239,68,68,.92); }
.alert-message.info    { background: rgba(18,150,143,.92); }
@keyframes alertIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut { to { opacity: 0; transform: translateY(-8px); } }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 1024px) {
  .login-page { justify-content: center; }
  .login-form-panel { justify-content: center; margin-left: 0; }
  .bulb-stage { right: -8vw; height: 60vh; opacity: .5; }
}

@media (max-width: 600px) {
  .login-page { padding: 20px 16px; }
  .bulb-stage { right: 50%; transform: translate(50%, -50%); height: 80vh; opacity: .18; }
  .login-form-inner { max-width: 100%; padding: 28px 22px 22px; }
  .brand-title { font-size: 1.8rem; }
  .alert-message { left: 16px; right: 16px; max-width: none; }
}

/* â”€â”€â”€ Forgot Password popup â”€â”€â”€ */
.fpw-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,9,20,.65);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.fpw-backdrop.show { display: flex; }
.fpw-card {
  position: relative;
  width: 100%; max-width: 400px;
  padding: 34px 32px 28px;
  background: linear-gradient(180deg, rgba(62,62,88,.85), rgba(150,150,188,.8));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  text-align: center;
}
.fpw-card h4 { color: #fff; font-weight: 700; font-size: 1.3rem; margin: 0 0 6px; }
.fpw-card > p { color: #d8dbe6; font-size: .88rem; margin: 0 0 20px; }
.fpw-card .input-wrap { margin-bottom: 6px; }
.fpw-hint { color: #b6bacb; font-size: .74rem; text-align: left; margin: 2px 6px 18px; }
.fpw-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.08); border: none; border-radius: 50%;
  color: #e9f7ff; font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.fpw-close:hover { background: rgba(255,255,255,.18); }
.fpw-msg { border-radius: 10px; padding: 10px 14px; font-size: .85rem; margin-bottom: 16px; text-align: left; }
.fpw-msg.success { background: rgba(34,197,94,.18); color: #bdf5cf; border: 1px solid rgba(34,197,94,.35); }
.fpw-msg.error { background: rgba(239,68,68,.18); color: #ffd0d0; border: 1px solid rgba(239,68,68,.35); }




