/* ==========================================================================
   login-modern.css — futuristic restyle of the login / store-select screen
   Pure CSS override: no markup or JS changes required. Loaded after the
   legacy login.css / cssmin bundle, so these rules win on specificity+order.
   Palette matches the public landing page (home.php).
   ========================================================================== */

:root {
  --lm-green: #00a65b;
  --lm-green-dark: #00804a;
  --lm-green-deep: #053d28;
  --lm-glow: rgba(0, 220, 130, .14);
}

/* ---------- backdrop: deep-space green, glow orbs, fine grid ---------- */
body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(0, 166, 91, .35), transparent 60%),
    radial-gradient(800px 480px at 105% 110%, rgba(0, 128, 74, .30), transparent 55%),
    linear-gradient(160deg, #04281a 0%, #053d28 48%, #021a10 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}
body.login-page::before {           /* fine perspective grid */
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
}
body.login-page::after {            /* slow-drifting aurora highlight */
  content: "";
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(38% 30% at 50% 42%, var(--lm-glow), transparent 70%);
  animation: lm-drift 14s ease-in-out infinite alternate;
}
@keyframes lm-drift {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  body.login-page::after { animation: none; }
}

/* keep the actual content above the decorative layers */
.login-box { position: relative; z-index: 1; }

/* ---------- logo / store name ---------- */
.login-logo { margin-top: 9vh; }
.login-logo .text {
  color: #ffffff;
  font-family: "Source Sans Pro", "Segoe UI", -apple-system, sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 26px rgba(0, 220, 130, .45);
}
.login-logo .text strong { font-weight: 700; }

/* ---------- glass card ---------- */
.login-box {
  width: 400px;
  max-width: calc(100vw - 32px);
  margin: 0 auto;
}
.login-box-body {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(0, 220, 130, .35) !important;
  border-radius: 16px;
  padding: 30px 30px 24px;
  box-shadow:
    0 24px 70px -18px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .06),
    0 0 44px -6px rgba(0, 220, 130, .22) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: lm-card-in .5s ease both;
}
@keyframes lm-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .login-box-body { animation: none; }
}

.login-box-msg {
  font-family: "Source Sans Pro", "Segoe UI", -apple-system, sans-serif;
  font-size: 19px;
  letter-spacing: .4px;
  color: var(--lm-green-deep);
  text-align: center;
  margin-bottom: 20px;
}

/* ---------- inputs ---------- */
.login-box-body .input-group { width: 100%; }
.login-box-body .input-group-addon {
  background: #eef5f1;
  border: 1px solid #cfe0d6;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  color: var(--lm-green-dark);
  padding: 0 12px;
}
.login-box-body .input-group-addon .svg-icon { fill: var(--lm-green-dark); }
.login-box-body .form-control {
  height: 48px;
  font-size: 15.5px;
  border: 1px solid #cfe0d6;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-box-body .form-control:focus {
  border-color: var(--lm-green);
  box-shadow: 0 0 0 3px rgba(0, 166, 91, .22);
  outline: none;
}
.login-box-body .form-group { margin-bottom: 16px; }

/* ---------- primary button ---------- */
#login-btn,
.login-box-body .btn-success {
  height: 48px;
  border: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, var(--lm-green) 0%, var(--lm-green-dark) 100%);
  box-shadow: 0 10px 26px -8px rgba(0, 166, 91, .55);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
#login-btn:hover, #login-btn:focus,
.login-box-body .btn-success:hover,
.login-box-body .btn-success:focus {
  filter: brightness(1.07);
  box-shadow: 0 12px 32px -8px rgba(0, 166, 91, .7);
  transform: translateY(-1px);
  color: #fff;
}
#login-btn:active, .login-box-body .btn-success:active { transform: translateY(0); }

/* ---------- links & footer ---------- */
.login-box-body a.text-danger {      /* "Forgot password?" */
  color: var(--lm-green-dark) !important;
  font-weight: 600;
  text-decoration: none;
}
.login-box-body a.text-danger:hover { text-decoration: underline; }

.login-page .copyright {
  margin-top: 26px;
  color: rgba(255, 255, 255, .72);
  font-size: 13.5px;
}
.login-page .copyright a { color: #7fe9b8; text-decoration: none; font-weight: 600; }
.login-page .copyright a:hover { text-decoration: underline; }

.login-page .back-home { margin-top: 12px; text-align: center; }
.login-page .back-home a {
  color: rgba(255, 255, 255, .66);
  font-size: 14px;
  text-decoration: none;
  letter-spacing: .3px;
}
.login-page .back-home a:hover { color: #ffffff; text-decoration: underline; }

/* ---------- store selection (post-login multi-branch picker) ---------- */
.login-page .store-list { border-radius: 10px; }
.login-page .store-list .list-group-item {
  border: 1px solid #cfe0d6;
  border-radius: 10px !important;
  margin-bottom: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-page .store-list .list-group-item:hover {
  border-color: var(--lm-green);
  box-shadow: 0 0 0 3px rgba(0, 166, 91, .15);
}

/* ---------- forgot-password modal ---------- */
#forgotPasswordModal .modal-content {
  border-radius: 14px;
  border: 1px solid rgba(0, 220, 130, .3);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
}
#forgotPasswordModal .modal-header { border-bottom-color: #e3e7df; }
#forgotPasswordModal .modal-title { color: var(--lm-green-deep); font-weight: 700; }
#forgotPasswordModal .form-control {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #cfe0d6;
  box-shadow: none;
}
#forgotPasswordModal .form-control:focus {
  border-color: var(--lm-green);
  box-shadow: 0 0 0 3px rgba(0, 166, 91, .22);
}

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  .login-logo { margin-top: 6vh; }
  .login-logo .text { font-size: 18px; letter-spacing: 1.5px; }
  .login-box-body { padding: 24px 20px 20px; }
}
