/* ==========================================================================
   Greenfield Infra — member login (Default.aspx)
   Requires theme.css. Also styles the server-driven dialogs on this page:
     - #pnlpopup            forgot-password panel (AjaxControlToolkit ModalPopupExtender)
     - #messageModal        MessageBox.ShowUp / PopUp  (greenfield/js/popup.js)
   ========================================================================== */

.gf-login { min-height: 100vh; min-height: 100svh; background: var(--gf-night); }
.gf-login form { min-height: inherit; }
.hidden { display: none !important; }

/* --- backdrop: the deck's cover art. Dark on the left (where the card sits), emblem on the right --- */
.login__bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.login__bg::before {
  content: ""; position: absolute; inset: -2%;
  background: url(../img/hero.jpg) 78% 50% / cover no-repeat;
  animation: gf-login-drift 26s ease-in-out infinite alternate;
}
.login__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 14, 7, .93) 0%, rgba(3, 14, 7, .8) 32%, rgba(3, 14, 7, .18) 62%, rgba(3, 14, 7, 0) 80%),
    linear-gradient(0deg, rgba(3, 14, 7, .78) 0%, rgba(3, 14, 7, 0) 32%),
    radial-gradient(60% 60% at 18% 50%, rgba(147, 207, 28, .1), rgba(147, 207, 28, 0) 70%);
}
@keyframes gf-login-drift { to { transform: scale(1.07) translate3d(-1.2%, -.8%, 0); } }

/* --- layout --- */
.login__wrap {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: center; gap: 6vw;
  padding: 32px clamp(20px, 8vw, 140px);
}

.login__card {
  position: relative; width: 100%; padding: 58px clamp(22px, 3vw, 34px) 28px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(14, 40, 22, .82), rgba(5, 20, 11, .9));
  border: 1px solid var(--gf-line-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(147, 207, 28, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  animation: gf-card-in .9s var(--gf-ease) both;
}
@keyframes gf-card-in { from { opacity: 0; transform: translateY(26px) scale(.985); } }

/* logo tile, half-overlapping the top edge like the reference */
.login__logo {
  position: absolute; left: 50%; top: 0; translate: -50% -50%;
  width: 92px; height: 92px; padding: 14px; border-radius: 24px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, #154a20, #04160a 78%);
  border: 1px solid rgba(223, 233, 6, .45);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .9), 0 0 44px -6px rgba(147, 207, 28, .6);
  transition: transform .4s var(--gf-ease), box-shadow .4s var(--gf-ease);
}
.login__logo:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 22px 44px -12px rgba(0, 0, 0, .9), 0 0 60px -4px rgba(223, 233, 6, .7); }
.login__logo img { width: 100%; height: auto; }

.login__title { margin: 0; text-align: center; font: 700 1.7rem/1.15 var(--gf-head); letter-spacing: -.01em; color: #fff; }
.login__sub { margin: 8px 0 24px; text-align: center; font-size: .84rem; color: var(--gf-muted); }

/* --- fields --- */
.login__label { display: block; margin: 0 0 8px; font: 600 .78rem/1.2 var(--gf-head); color: var(--gf-text); }
.field { position: relative; margin-bottom: 16px; }
.field .ico {
  position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 18px; height: 18px;
  color: var(--gf-dim); pointer-events: none; transition: color .25s;
}
.field__input {
  display: block; width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 14px;
  font: 500 .95rem/1 var(--gf-body); color: #fff; background: rgba(2, 12, 6, .62);
  border: 1px solid var(--gf-line-2); outline: 0; -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field__input::placeholder { color: var(--gf-dim); opacity: 1; }
.field__input:hover { border-color: rgba(190, 232, 150, .42); }
.field__input:focus { border-color: var(--gf-lime); background: rgba(2, 12, 6, .82); box-shadow: 0 0 0 4px rgba(147, 207, 28, .18); }
.field:focus-within .ico { color: var(--gf-citron); }
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff; caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #07200f inset; box-shadow: 0 0 0 1000px #07200f inset;
  transition: background-color 9999s ease-out 0s;
}

.login__show {
  display: inline-flex; align-items: center; gap: 7px; margin: -4px 0 14px; padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font: 500 .78rem/1 var(--gf-body); color: var(--gf-muted); transition: color .2s;
}
.login__show:hover { color: var(--gf-citron); }
.login__show .ico { width: 16px; height: 16px; }

.login__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font: 500 .84rem/1 var(--gf-body); color: var(--gf-text); user-select: none; }
.check input {
  -webkit-appearance: none; appearance: none; margin: 0; width: 19px; height: 19px; flex: none; border-radius: 6px; cursor: pointer;
  border: 1.5px solid var(--gf-line-2); background: rgba(2, 12, 6, .62); display: grid; place-items: center; transition: background-color .2s, border-color .2s;
}
.check input::after { content: ""; width: 10px; height: 6px; margin-top: -2px; border-left: 2.4px solid #06240c; border-bottom: 2.4px solid #06240c; rotate: -45deg; scale: 0; transition: scale .2s var(--gf-ease); }
.check input:checked { background: var(--gf-lime); border-color: var(--gf-lime); }
.check input:checked::after { scale: 1; }

.login__link { font: 600 .84rem/1 var(--gf-head); color: var(--gf-gold); transition: color .2s; }
.login__link:hover { color: var(--gf-sun); text-decoration: underline; text-underline-offset: 3px; }

.login__submit { height: 54px; font-size: 1rem; }
input.login__submit { -webkit-appearance: none; appearance: none; }

.login__alt { margin: 22px 0 0; text-align: center; font-size: .86rem; color: var(--gf-muted); }
.login__alt a { font-weight: 600; color: var(--gf-gold); }
.login__alt a:hover { color: var(--gf-sun); text-decoration: underline; text-underline-offset: 3px; }
.login__home { margin: 14px 0 0; text-align: center; font-size: .78rem; }
.login__home a { display: inline-flex; align-items: center; gap: 6px; color: var(--gf-dim); transition: color .2s; }
.login__home a:hover { color: var(--gf-text); }
.login__home .ico { width: 14px; height: 14px; }

/* --- brand statement on the artwork side (desktop only) --- */
.login__aside { align-self: end; justify-self: end; padding-bottom: 5vh; text-align: right; animation: gf-card-in 1.1s var(--gf-ease) .2s both; }
.login__aside img { width: clamp(280px, 27vw, 440px); height: auto; margin-left: auto; filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .75)); }

@media (max-width: 900px) {
  .login__bg::before { background-image: url(../img/hero-m.jpg); background-position: 50% 12%; }
  .login__bg::after {
    background:
      linear-gradient(180deg, rgba(3, 14, 7, .5) 0%, rgba(3, 14, 7, .72) 34%, rgba(3, 14, 7, .95) 70%),
      radial-gradient(80% 50% at 50% 60%, rgba(147, 207, 28, .1), rgba(147, 207, 28, 0) 70%);
  }
  .login__wrap { grid-template-columns: minmax(0, 440px); justify-content: center; padding: 78px 16px 28px; }
  .login__aside { display: none; }
}
@media (max-height: 640px) and (min-width: 901px) { .login__wrap { align-items: start; padding-top: 78px; } }

/* ==========================================================================
   Dialogs
   ========================================================================== */
/* AjaxControlToolkit paints its own veil element with BackgroundCssClass — ours is on the panel itself */
.gf-veil { background: transparent; }

#pnlpopup, #messageModal {
  position: fixed !important; inset: 0 !important; left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important; margin: 0; z-index: 10001 !important;
  display: flex !important; align-items: center; justify-content: center; padding: 18px; overflow-y: auto;
  background: rgba(2, 10, 5, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 1; animation: gf-veil-in .25s ease both;
}
#messageModal { z-index: 10050 !important; }
@keyframes gf-veil-in { from { opacity: 0; } }

#pnlpopup .modal-dialog, #messageModal .modal-dialog { width: 100%; max-width: 420px; margin: auto; animation: gf-card-in .45s var(--gf-ease) both; }
#pnlpopup .modal-content, #messageModal .modal-content {
  overflow: hidden; border-radius: 22px; color: var(--gf-text);
  background: linear-gradient(180deg, #0f3319, #061a0c);
  border: 1px solid var(--gf-line-2); box-shadow: 0 40px 90px -20px #000, 0 0 70px -30px rgba(147, 207, 28, .5);
}
#pnlpopup .modal-header, #messageModal .modal-header { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; border: 0; }
#pnlpopup .modal-title, #messageModal .modal-title { flex: 1; margin: 0; font: 700 1.12rem/1.25 var(--gf-head); color: #fff; text-transform: none; }
#pnlpopup .modal-body, #messageModal .modal-body { padding: 14px 22px 8px; font-size: .92rem; line-height: 1.6; color: var(--gf-text); }
#pnlpopup .modal-body p { margin: 0 0 16px; }
#messageModal .modal-footer { padding: 14px 22px 22px; border: 0; text-align: right; }

#messageModal .btn, #pnlpopup .gf-modal__go {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-width: 108px; padding: .8em 1.6em; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 .92rem/1.2 var(--gf-head); color: #06240c; background: var(--gf-grad); box-shadow: var(--gf-glow);
  transition: transform .25s var(--gf-ease), box-shadow .25s var(--gf-ease);
}
#messageModal .btn:hover, #pnlpopup .gf-modal__go:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -8px rgba(147, 207, 28, .7); }
#pnlpopup .gf-modal__go { display: flex; width: 100%; margin: 6px 0 18px; height: 50px; }

.gf-pop__ico { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--gf-citron); background: rgba(147, 207, 28, .14); border: 1px solid rgba(147, 207, 28, .4); }
.gf-pop__ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gf-pop--warn .gf-pop__ico { color: var(--gf-warn); background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .42); }
.gf-pop--ok .gf-pop__ico { color: var(--gf-ok); background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .42); }

.gf-modal__x {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--gf-muted);
  border: 1px solid var(--gf-line-2); background: rgba(255, 255, 255, .05); transition: background-color .2s, color .2s;
}
.gf-modal__x:hover { background: rgba(248, 113, 113, .16); color: #fff; }
.gf-modal__x .ico { width: 17px; height: 17px; }
.gf-modal__note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: .82rem; line-height: 1.5; color: var(--gf-muted); background: rgba(245, 195, 2, .07); border: 1px solid rgba(245, 195, 2, .22); }
.gf-modal__note .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--gf-gold); }
