/* ==========================================================================
   ArenCRM — Apple-style glass auth screens (internal login + customer portal
   login). Full-bleed configurable background photo/video, single centered
   frosted-glass card. Shared by Views/Account/Login.cshtml and
   Views/CustomerPortal/Login.cshtml.
   ========================================================================== */

html, body.auth-glass-body {
    height: 100%;
    margin: 0;
}

body.auth-glass-body {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    color: #f4f7fc;
    overflow-x: hidden;
}

.auth-glass-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-color: #0b1220;
    transform: scale(1.02);
    /* Softer, more muted rendition of whatever photo/video is configured —
       lower saturation and a touch less contrast/brightness so the glass
       card and its text always sit comfortably on top. */
    filter: saturate(.8) brightness(.9) contrast(.96);
}

.auth-glass-bg video.auth-glass-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-glass-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(15, 23, 42, .15), rgba(7, 12, 24, .55) 62%),
        linear-gradient(180deg, rgba(6, 11, 22, .55) 0%, rgba(6, 11, 22, .35) 45%, rgba(6, 11, 22, .72) 100%);
}

.auth-glass-shell {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
}

.auth-glass-card {
    width: 100%;
    max-width: 408px;
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
    padding: 34px 30px 30px;
    animation: authGlassIn .5s cubic-bezier(.19, 1, .22, 1);
}

@keyframes authGlassIn {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-glass-brand { text-align: center; margin-bottom: 22px; }
.auth-glass-logo {
    display: block;
    width: 58px; height: 58px; object-fit: contain; border-radius: 16px;
    background: rgba(255, 255, 255, .92); padding: 8px; margin: 0 auto 14px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
}
.auth-glass-brand h1 { margin: 0 0 6px; font-size: 1.28rem; font-weight: 900; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.auth-glass-brand p { margin: 0; font-size: .84rem; color: rgba(255, 255, 255, .78); line-height: 1.7; }
.auth-glass-kicker {
    display: inline-block; margin-bottom: 8px; padding: .28rem .85rem; border-radius: 999px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
    font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: #e2e8f0;
}

.auth-glass-message {
    margin-bottom: 16px; padding: 10px 14px; border-radius: 14px; font-size: .82rem; font-weight: 700;
    background: rgba(34, 197, 94, .16); border: 1px solid rgba(74, 222, 128, .35); color: #dcfce7; text-align: center;
}

.auth-glass-info-box {
    margin-bottom: 16px; padding: 12px 14px; border-radius: 14px; font-size: .82rem; font-weight: 700;
    background: rgba(96, 165, 250, .16); border: 1px solid rgba(147, 197, 253, .38); color: #dbeafe;
    display: flex; flex-direction: column; gap: 4px;
}
.auth-glass-info-box strong { color: #fff; }
.auth-glass-info-box small { font-weight: 600; color: rgba(219, 234, 254, .82); }

.auth-glass-form .validation-summary,
.auth-glass-form .cp-validation {
    color: #fecaca; font-size: .8rem; font-weight: 700; margin-bottom: 6px;
}
.auth-glass-form .validation-summary ul { margin: 0; padding-inline-start: 18px; }
.auth-glass-lock-alert {
    margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; font-size: .78rem; font-weight: 700;
    background: rgba(248, 113, 113, .16); border: 1px solid rgba(248, 113, 113, .38); color: #fecaca; text-align: center;
}

.auth-glass-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.auth-glass-field span.auth-glass-field-label { font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .82); }
.auth-glass-field input {
    width: 100%; box-sizing: border-box; height: 46px; padding: 0 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28);
    color: #fff; font: inherit; font-size: .92rem; outline: none;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.auth-glass-field input::placeholder { color: rgba(255, 255, 255, .5); }
.auth-glass-field input:focus {
    background: rgba(255, 255, 255, .18); border-color: rgba(147, 197, 253, .7);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .22);
}
.auth-glass-field .field-validation-error,
.auth-glass-field small.field-validation-error {
    color: #fca5a5; font-size: .74rem; font-weight: 700;
}

.auth-glass-captcha {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px; padding: 10px 14px; margin-bottom: 4px;
}
.auth-glass-captcha .captcha-title { display: block; font-size: .68rem; color: rgba(255, 255, 255, .65); font-weight: 700; }
.auth-glass-captcha strong { font-size: .92rem; color: #fff; font-weight: 900; }
.auth-glass-captcha input {
    width: 84px; height: 40px; text-align: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-weight: 800; outline: none;
}
.auth-glass-captcha input::placeholder { color: rgba(255, 255, 255, .5); }

.auth-glass-options {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 14px 0 18px; font-size: .78rem;
}
.auth-glass-options label { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .82); font-weight: 700; cursor: pointer; }
.auth-glass-options input[type="checkbox"] { accent-color: #60a5fa; width: 16px; height: 16px; }
.auth-glass-options a { color: #bfdbfe; font-weight: 700; text-decoration: none; }
.auth-glass-options a:hover { text-decoration: underline; }

.auth-glass-submit {
    width: 100%; height: 48px; border: 0; border-radius: 14px; cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; font: inherit;
    font-size: .96rem; font-weight: 900; box-shadow: 0 16px 34px rgba(37, 99, 235, .38);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.auth-glass-submit:hover { transform: translateY(-1px); box-shadow: 0 20px 40px rgba(37, 99, 235, .46); filter: brightness(1.04); }
.auth-glass-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.auth-glass-switch {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 18px; padding: 12px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    color: #fff; text-decoration: none; text-align: center; transition: background .16s ease;
}
.auth-glass-switch:hover { background: rgba(255, 255, 255, .14); }
.auth-glass-switch strong { font-size: .84rem; font-weight: 800; }
.auth-glass-switch em { font-style: normal; font-size: .72rem; color: rgba(255, 255, 255, .68); }

.auth-glass-footer { margin-top: 18px; text-align: center; font-size: .7rem; color: rgba(255, 255, 255, .5); }

/* responsive */
@media (max-width: 600px) {
    .auth-glass-shell { padding: 16px 12px; align-items: flex-end; }
    .auth-glass-card { max-width: 100%; padding: 26px 18px 22px; border-radius: 24px; }
    .auth-glass-logo { width: 50px; height: 50px; }
    .auth-glass-brand h1 { font-size: 1.14rem; }
    .auth-glass-brand p { font-size: .8rem; }

    /* Captcha row is the tightest fit on a phone — let it wrap onto two
       lines instead of squeezing the answer box into nothing. */
    .auth-glass-captcha { flex-wrap: wrap; justify-content: flex-start; }
    .auth-glass-captcha .captcha-input-wrap { width: 100%; }
    .auth-glass-captcha input { width: 100%; box-sizing: border-box; }

    .auth-glass-options { flex-wrap: wrap; gap: 8px 14px; }

    .auth-glass-switch { flex-direction: column; gap: 2px; text-align: center; }
}

@media (max-width: 360px) {
    .auth-glass-card { padding: 22px 14px 18px; }
    .auth-glass-brand h1 { font-size: 1.02rem; }
    .auth-glass-field input,
    .auth-glass-submit { height: 44px; font-size: .88rem; }
}

/* Short/landscape phones: the card can exceed the viewport height, so let
   the shell scroll instead of clipping the bottom of the form. */
@media (max-height: 700px) {
    .auth-glass-shell { align-items: center; padding-top: 20px; padding-bottom: 20px; overflow-y: auto; }
}

/* dark/light are irrelevant here — the card is always translucent-dark for
   legibility over a photo, regardless of the app-wide theme toggle. */
