/* ===== ASG authentication pages — shared design system ===== */
/* Used by login, registration and password-reset views. */

#top-menu { display: none !important; }

.asg-login * { box-sizing: border-box; }
.asg-login {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    overflow-y: auto;
    background: #ffffff;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    color: #1f2a24;
    -webkit-font-smoothing: antialiased;
}

/* ----- brand panel ----- */
.asg-login__brand {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 60px;
    background-image:
        linear-gradient(150deg, rgba(0,52,24,.93) 0%, rgba(0,116,55,.86) 52%, rgba(0,74,35,.95) 100%),
        url('/content/assets/img/elevator.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
}
.asg-brand__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
}
.asg-brand__glow--1 { width: 340px; height: 340px; top: -90px; left: -70px;
    background: radial-gradient(circle, #6bb53f, transparent 70%); animation: asg-float 13s ease-in-out infinite; }
.asg-brand__glow--2 { width: 300px; height: 300px; bottom: -110px; right: -60px;
    background: radial-gradient(circle, #00b85a, transparent 70%); animation: asg-float 17s ease-in-out infinite reverse; }

.asg-brand__inner {
    position: relative;
    z-index: 2;
    max-width: 460px;
    width: 100%;
    animation: asg-rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.asg-brand__logo { height: 52px; width: auto; margin-bottom: 40px; }
.asg-brand__title {
    font-size: 39px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 44px;
    letter-spacing: .2px;
}
.asg-brand__grid { display: flex; gap: 14px; }
.asg-svc {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(4px);
    color: #fff;
    animation: asg-rise .7s cubic-bezier(.2,.7,.2,1) both;
    transition: transform .25s ease, background .25s ease;
}
.asg-svc:hover { transform: translateY(-5px); background: rgba(255,255,255,.16); }
.asg-svc:nth-child(1) { animation-delay: .25s; }
.asg-svc:nth-child(2) { animation-delay: .35s; }
.asg-svc:nth-child(3) { animation-delay: .45s; }
.asg-svc:nth-child(4) { animation-delay: .55s; }
.asg-svc svg { width: 29px; height: 29px; }
.asg-brand__foot {
    margin-top: 46px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
}

/* ----- form panel ----- */
.asg-login__panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: linear-gradient(165deg, #edf3ef 0%, #f4f7f5 55%, #e8f1eb 100%);
}
.asg-login__panel::before {
    content: "";
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,139,62,.11), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.asg-card-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 432px;
    animation: asg-rise .85s cubic-bezier(.2,.7,.2,1) .1s both;
}
.asg-card {
    background: #fff;
    border-radius: 26px;
    padding: 44px 40px 40px;
    box-shadow:
        0 2px 6px rgba(16,40,28,.05),
        0 28px 56px -18px rgba(16,40,28,.26);
}

.asg-card__title {
    font-size: 25px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    color: #16241c;
}
.asg-card__sub {
    font-size: 13.5px;
    color: #6c7b73;
    text-align: center;
    margin: 0 0 28px;
}

/* ----- step indicator ----- */
.asg-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 26px;
}
.asg-step {
    width: 28px;
    height: 5px;
    border-radius: 3px;
    background: #e0e7e3;
    transition: background .3s ease;
}
.asg-step.is-done { background: #6bb53f; }
.asg-step.is-active { background: linear-gradient(90deg, #008b3e, #6bb53f); }

.asg-alert {
    background: #fdecec;
    border: 1px solid #f5c2c2;
    color: #b3261e;
    font-size: 13.5px;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.asg-field { margin-bottom: 17px; }
.asg-field__label {
    display: block;
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    color: #45554c;
    margin: 0 0 7px 2px;
    letter-spacing: .2px;
}
.asg-field__control { position: relative; }
.asg-field__icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #9aa8a0;
    pointer-events: none;
    transition: color .2s ease;
    z-index: 2;
}
.asg-field__icon svg { width: 20px; height: 20px; }
/* high-specificity selectors: the legacy stylesheet has an
   input[type="password"] rule that otherwise overrides padding/colour */
.asg-login .asg-field__input {
    width: 100%;
    height: 54px;
    padding: 0 48px;
    margin: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #15211b;
    background: #fff;
    border: 1.6px solid #e2e8e4;
    border-radius: 13px;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.asg-login .asg-field__input::placeholder { color: #c0cabf; font-weight: 400; }
.asg-login .asg-field__input:focus {
    border-color: #008b3e;
    box-shadow: 0 0 0 4px rgba(0,139,62,.13);
}
.asg-field__control:focus-within .asg-field__icon { color: #008b3e; }
.asg-login .asg-field__input:-webkit-autofill,
.asg-login .asg-field__input:-webkit-autofill:hover,
.asg-login .asg-field__input:-webkit-autofill:focus {
    -webkit-text-fill-color: #15211b;
    -webkit-box-shadow: 0 0 0 40px #fff inset;
    box-shadow: 0 0 0 40px #fff inset;
    caret-color: #15211b;
    font-weight: 600;
}

.asg-field__toggle {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #9aa8a0;
    border-radius: 8px;
    z-index: 2;
    transition: color .2s ease, background .2s ease;
}
.asg-field__toggle:hover { color: #008b3e; background: #eef4f0; }
.asg-field__toggle svg { width: 19px; height: 19px; }
.asg-field__toggle .asg-eye-off { display: none; }
.asg-field__toggle.is-visible .asg-eye { display: none; }
.asg-field__toggle.is-visible .asg-eye-off { display: block; }

.asg-form__row {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 22px;
}
.asg-link {
    color: #008b3e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .18s ease;
}
.asg-link:hover { color: #6bb53f; text-decoration: none; }

.asg-back {
    display: block;
    text-align: center;
    margin-top: 22px;
    color: #6c7b73;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .18s ease;
}
.asg-back:hover { color: #008b3e; text-decoration: none; }

.asg-btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 13px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #008b3e, #6bb53f);
    box-shadow: 0 10px 24px -8px rgba(0,139,62,.6);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.asg-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(0,139,62,.7); filter: brightness(1.04); }
.asg-btn:active { transform: translateY(0); }
.asg-btn__spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: asg-spin .7s linear infinite;
}
.asg-btn.is-loading { pointer-events: none; filter: saturate(.85) brightness(.97); }
.asg-btn.is-loading .asg-btn__spinner { display: block; }

.asg-or {
    display: flex;
    align-items: center;
    margin: 18px 0;
    color: #aebbb4;
    font-size: 12px;
    font-weight: 600;
}
.asg-or::before,
.asg-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e3e9e6;
}
.asg-or span { padding: 0 14px; }

.asg-btn--ghost {
    background: #fff;
    color: #008b3e;
    border: 1.6px solid #cfe6d8;
    box-shadow: none;
    text-decoration: none;
}
.asg-btn--ghost:hover {
    background: #eff8f2;
    border-color: #008b3e;
    color: #008b3e;
    transform: none;
    box-shadow: none;
    filter: none;
}

/* ===== premium ASG intro splash (login only) — replaces the elevator-door intro ===== */
.asg-intro {
    position: fixed; inset: 0; z-index: 100000;
    display: none; align-items: center; justify-content: center;
    background:
        radial-gradient(760px 380px at 82% -12%, rgba(107,181,63,.45), transparent 70%),
        radial-gradient(620px 520px at 12% 118%, rgba(0,120,55,.55), transparent 72%),
        linear-gradient(135deg, #00401d 0%, #00772f 52%, #00562a 100%);
    opacity: 1;
    transition: opacity .55s ease;
}
.asg-intro.is-hiding { opacity: 0; }
/* soft pulsing halo behind the logo */
.asg-intro__glow {
    position: absolute; width: 440px; height: 440px; max-width: 82vw; max-height: 82vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.17), rgba(255,255,255,0) 62%);
    animation: asgIntroGlow 2.6s ease-in-out infinite; will-change: transform, opacity;
}
.asg-intro__brand {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px;
    animation: asgIntroRise .55s cubic-bezier(.2,.7,.2,1) both;
}
.asg-intro__logo {
    height: 66px; width: auto; display: block;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,.3));
    animation: asgIntroBreathe 2.6s ease-in-out infinite; will-change: transform;
}
/* sleek indeterminate progress bar */
.asg-intro__bar {
    position: relative; width: 176px; height: 4px; border-radius: 999px;
    background: rgba(255,255,255,.18); overflow: hidden;
}
.asg-intro__bar span {
    position: absolute; top: 0; height: 100%; width: 42%; border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,.35), #c2f3d0 50%, rgba(255,255,255,.35));
    animation: asgIntroSlide 1.15s cubic-bezier(.5,.05,.5,.95) infinite;
}
@keyframes asgIntroRise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes asgIntroBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes asgIntroGlow   { 0%,100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes asgIntroSlide  { 0% { left: -45%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
    .asg-intro__logo, .asg-intro__glow { animation: none; }
    .asg-intro__bar span { animation-duration: 2.2s; }
}

/* ----- animations ----- */
@keyframes asg-rise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes asg-float {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(26px, 30px); }
}
@keyframes asg-spin { to { transform: rotate(360deg); } }
@keyframes asg-sheen {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}
@keyframes asg-arrow {
    0%, 100% { opacity: .35; transform: translateY(-2px); }
    50%      { opacity: 1;   transform: translateY(3px); }
}
@keyframes asg-settle {
    0%   { transform: translateY(-9px); }
    45%  { transform: translateY(8px); }
    72%  { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}
@keyframes asg-ding {
    0%, 100% { box-shadow: inset 0 0 14px rgba(0,0,0,.65); }
    45%      { box-shadow: inset 0 0 14px rgba(0,0,0,.65), 0 0 26px rgba(107,181,63,.85); }
}

/* ----- responsive: on phones the form is the focus, no scrolling ----- */
@media (max-width: 940px) {
    .asg-login { flex-direction: column; }
    .asg-login__brand {
        flex: none;
        padding: 16px 24px;
        background-image: linear-gradient(120deg, #00461f, #008b3e);
    }
    .asg-brand__glow { display: none; }
    .asg-brand__inner { display: flex; justify-content: center; animation: none; max-width: none; }
    .asg-brand__title,
    .asg-brand__grid,
    .asg-brand__foot { display: none; }
    .asg-brand__logo { height: 34px; margin: 0; }
    .asg-login__panel { flex: 1; padding: 26px 20px; }
    .asg-login__panel::before { display: none; }
}
@media (max-width: 560px) {
    .asg-card { padding: 34px 24px 30px; }
    .asg-card__title { font-size: 22px; }
    .asg-elev__panel { inset: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .asg-login *,
    .asg-brand__glow,
    .asg-elev__sheen { animation: none !important; transition: none !important; }
}
