/* QuickFMS modern login - compact, no-scroll, responsive */

:root {
    --qf-blue: #1d4ed8;
    --qf-blue-hover: #1e40af;
    --qf-navy: #0f172a;
    --qf-slate: #64748b;
    --qf-border: #e2e8f0;
    --qf-card: #ffffff;
    --qf-right-bg: #f1f5f9;
    --qf-left-start: #e8f1ff;
    --qf-left-end: #f8fbff;
    --qf-radius-sm: 10px;
    --qf-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    --qf-font: 'HK Grotesk', 'Segoe UI', system-ui, sans-serif;
    --qf-script: 'Caveat', 'Segoe Script', 'Brush Script MT', cursive;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body#mainBody.qf-login-body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--qf-font);
    background: var(--qf-right-bg);
    color: var(--qf-navy);
    -webkit-font-smoothing: antialiased;
}

.qf-login {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

/* ---------- Left brand ---------- */
.qf-login__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    background:
        radial-gradient(ellipse 80% 55% at 0% 0%, rgba(59, 130, 246, 0.18), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(37, 99, 235, 0.08), transparent 50%),
        linear-gradient(160deg, #eaf2ff 0%, #f5f9ff 42%, #ffffff 100%);
    overflow: hidden;
    min-height: 0;
}

.qf-login__brand-glow {
    position: absolute;
    inset: auto -10% -20% 40%;
    height: 45%;
    background: radial-gradient(circle at center, rgba(147, 197, 253, 0.22), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.qf-login__brand-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
    padding: clamp(1.15rem, 2.5vh, 2rem) clamp(1.35rem, 3.2vw, 2.75rem) 0;
}

.qf-login__brand-top {
    position: relative;
    z-index: 3;
    flex: 0 1 auto;
    min-height: 0;
    max-width: 640px;
}

.qf-login__eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.65rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(29, 78, 216, 0.08);
    border: 1px solid rgba(29, 78, 216, 0.12);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qf-login__headline {
    font-size: clamp(1.85rem, 3.3vw, 2.55rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: #0b1b33;
    margin: 0 0 0.5rem;
}

.qf-login__subhead {
    font-size: clamp(0.9rem, 1.15vw, 1.02rem);
    line-height: 1.5;
    color: #5b6b7f;
    margin: 0 0 clamp(0.75rem, 1.6vh, 1.1rem);
    max-width: 46ch;
}

.qf-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    width: 100%;
}

.qf-feature {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.75);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qf-feature:hover {
    transform: translateY(-2px);
    border-color: rgba(147, 197, 253, 0.9);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.qf-feature__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.qf-feature__icon--blue { background: #dbeafe; color: #2563eb; }
.qf-feature__icon--green { background: #dcfce7; color: #16a34a; }
.qf-feature__icon--orange { background: #ffedd5; color: #ea580c; }
.qf-feature__icon--purple { background: #ede9fe; color: #7c3aed; }
.qf-feature__icon--amber { background: #fef3c7; color: #d97706; }
.qf-feature__icon--red { background: #fee2e2; color: #dc2626; }
.qf-feature__icon--teal { background: #ccfbf1; color: #0d9488; }
.qf-feature__icon--lime { background: #ecfccb; color: #65a30d; }
.qf-feature__icon--sky { background: #e0f2fe; color: #0284c7; }

.qf-feature__label {
    font-size: 0.76rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
}

/* Campus flush to extreme left-bottom of brand panel */
.qf-login__brand-bottom {
    position: relative;
    z-index: 1;
    margin-top: auto;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    overflow: visible;
    pointer-events: none;
}

.qf-campus-scene {
    position: relative;
    width: 100%;
    height: auto;
    padding-top: 2.75rem;
    overflow: visible;
}

.qf-campus {
    display: block;
    width: auto;
    height: clamp(210px, 36vh, 320px);
    max-width: none;
    margin: 0;
    margin-left: 0;
    margin-bottom: 0;
    transform: translate(-4px, 8px);
    transform-origin: left bottom;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(6px 8px 14px rgba(51, 65, 85, 0.18));
}

.qf-tagline {
    position: absolute;
    left: auto;
    right: clamp(3%, 7%, 11%);
    top: 0.1rem;
    z-index: 2;
    text-align: left;
    transform: rotate(-12deg);
    transform-origin: right top;
    padding: 0.1rem 0.2rem;
    pointer-events: none;
    max-width: 46%;
}

.qf-tagline__line {
    display: block;
    font-family: 'Caveat', 'Segoe Script', 'Brush Script MT', cursive;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    color: #1e3a8a;
    font-weight: 600;
    line-height: 1.05;
    white-space: nowrap;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95),
        0 0 14px rgba(255, 255, 255, 0.8);
}

.qf-tagline__line--accent {
    font-size: clamp(1.5rem, 2.5vw, 2.15rem);
}

.qf-tagline__swoosh {
    display: block;
    width: 92%;
    height: 10px;
    margin-top: 0.1rem;
    margin-left: 0.15rem;
}

/* ---------- Right panel ---------- */
.qf-login__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: clamp(0.75rem, 2vh, 1.5rem) clamp(0.85rem, 2vw, 1.5rem);
    background: var(--qf-right-bg);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.qf-mobile-brand {
    display: none;
    text-align: center;
}

.qf-mobile-brand img {
    height: 26px;
    width: auto;
}

.qf-login__card {
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 3rem);
    background: var(--qf-card);
    border-radius: 16px;
    box-shadow: var(--qf-shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: clamp(0.9rem, 1.8vh, 1.35rem) clamp(1rem, 2vw, 1.4rem);
    overflow: hidden;
}

.qf-login__card-logo {
    display: block;
    height: clamp(24px, 3.2vh, 30px);
    width: auto;
    margin-bottom: 0.55rem;
}

.qf-login__welcome {
    font-size: clamp(1.15rem, 2.2vh, 1.4rem);
    font-weight: 700;
    color: var(--qf-navy);
    margin: 0 0 0.15rem;
    letter-spacing: -0.02em;
}

.qf-login__welcome-sub {
    font-size: clamp(0.78rem, 1.4vh, 0.88rem);
    color: var(--qf-slate);
    margin: 0 0 0.7rem;
    line-height: 1.35;
}

.qf-login form#loginform {
    margin: 0;
}

.qf-field {
    margin-bottom: clamp(0.45rem, 1.1vh, 0.7rem);
}

.qf-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.qf-input {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--qf-border);
    border-radius: var(--qf-radius-sm);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qf-input:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.qf-input__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 1rem;
}

.qf-input .form-control,
.qf-input input.form-control {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 0.88rem;
    padding: 0.5rem 0.55rem 0.5rem 0;
    height: auto;
    min-height: 38px;
    color: var(--qf-navy);
}

.qf-input .form-control::placeholder {
    color: #94a3b8;
}

.qf-input__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.qf-input__toggle:hover {
    color: var(--qf-blue);
}

.qf-forgot {
    display: flex;
    justify-content: flex-end;
    margin: -0.15rem 0 0.65rem;
}

.qf-forgot a {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--qf-blue);
    text-decoration: none;
}

.qf-forgot a:hover {
    text-decoration: underline !important;
}

.qf-btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: var(--qf-radius-sm) !important;
    background: var(--qf-blue) !important;
    border-color: var(--qf-blue) !important;
    color: #fff !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 12px rgba(29, 78, 216, 0.25);
}

.qf-btn-login:hover {
    background: var(--qf-blue-hover) !important;
    border-color: var(--qf-blue-hover) !important;
}

.qf-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.7rem 0 0.55rem;
    color: #94a3b8;
    font-size: 0.72rem;
}

.qf-divider::before,
.qf-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--qf-border);
}

.qf-sso {
    display: block;
    width: 100%;
}

.qf-sso__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 1rem;
    border: 1px solid #c5cdd8;
    border-radius: var(--qf-radius-sm);
    background: #fff;
    color: #3c4043;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.qf-sso__btn:hover {
    border-color: #9aa5b5;
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    text-decoration: none !important;
    color: #3c4043;
}

.qf-sso__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.qf-sso__google-fallback {
    display: none !important;
}

.qf-trust {
    display: block;
    margin-top: 0.75rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--qf-border);
    text-align: center;
}

.qf-trust__banner {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 56px;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}

.qf-login__footer {
    margin: 0;
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
}

.qf-paste-msg {
    display: none;
    color: #dc2626;
    font-size: 0.72rem;
    margin-top: 0.2rem;
}

.qf-login .alert {
    border-radius: var(--qf-radius-sm);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.65rem;
}

/* CSP blocks inline style="display:none" on ASP.NET validators / ValidationSummary. */
.qf-login .alert.alert-danger:not(:has(li)) {
    display: none !important;
}

.qf-login .text-danger {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.45rem;
}

.qf-login .license-panel .form-group {
    margin-bottom: 0.75rem;
}

.qf-login .license-panel label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #212529;
    font-size: 0.75rem;
}

.qf-login .license-code-group .form-control {
    background-color: #f8f9fa;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.78rem;
}

.qf-login .license-copy-btn {
    border-start-end-radius: var(--qf-radius-sm);
    border-end-end-radius: var(--qf-radius-sm);
    border: 1px solid #ced4da;
    border-left: 0;
    background: #fff;
    color: var(--qf-blue);
    padding: 0.35rem 0.75rem;
}

.qf-login .license-copy-feedback {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #198754;
}

.qf-login .license-copy-feedback.is-visible {
    display: block;
}

.qf-login .modal-footer {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
}

.qf-login .btn-danger {
    padding: 0.45rem 1.25rem;
}

/* Session-already-logged-in popup (AjaxControlToolkit ModalPopupExtender) */
.qf-login-body .modalBackground {
    background-color: rgba(15, 23, 42, 0.55);
    filter: none;
    opacity: 1;
}

.qf-login-body .modalPopup,
.qf-login-body #Panel1.modalPopup {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22) !important;
    padding: 0 !important;
    width: min(420px, calc(100vw - 2rem)) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    color: #0f172a !important;
}

.qf-login-forgot-dialog {
    width: 800px;
    max-width: 95vw;
}

.qf-login-forgot-frame {
    border: none;
}

.qf-session-popup {
    padding: 1.25rem 1.35rem 1.15rem;
    text-align: center;
}

.qf-session-popup__message {
    margin: 0 0 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    color: #0f172a;
}

.qf-session-popup__actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.qf-session-popup__actions .btn {
    width: auto !important;
    min-width: 96px;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0.5rem 1.35rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 10px !important;
    box-shadow: none !important;
}

.qf-session-popup__actions .btn-primary {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}

.qf-session-popup__actions .btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

.qf-login a:hover {
    text-decoration: underline !important;
}

/* ---------- Short desktop screens ---------- */
@media (min-width: 992px) and (max-height: 820px) {
    .qf-login__eyebrow {
        margin-bottom: 0.4rem;
        font-size: 0.65rem;
    }

    .qf-login__headline {
        font-size: 1.85rem;
        margin-bottom: 0.4rem;
    }

    .qf-login__subhead {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .qf-features {
        gap: 0.45rem;
    }

    .qf-feature {
        padding: 0.45rem 0.55rem;
        gap: 0.5rem;
    }

    .qf-feature__icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .qf-feature__label {
        font-size: 0.7rem;
    }

    .qf-campus-scene {
        padding-top: 2.25rem;
    }

    .qf-campus {
        height: clamp(180px, 30vh, 260px);
        transform: translate(-3px, 6px);
    }

    .qf-tagline {
        right: 5%;
        top: 0;
        max-width: 46%;
    }

    .qf-tagline__line {
        font-size: 1.25rem;
    }

    .qf-tagline__line--accent {
        font-size: 1.4rem;
    }

    .qf-login__card {
        padding: 0.8rem 1rem;
    }

    .qf-field {
        margin-bottom: 0.4rem;
    }

    .qf-input .form-control {
        min-height: 34px;
        font-size: 0.82rem;
        padding: 0.35rem 0.45rem 0.35rem 0;
    }

    .qf-trust__banner {
        max-height: 48px;
    }
}

@media (min-width: 992px) and (max-height: 700px) {
    .qf-login__brand-inner {
        padding: 0.85rem 1.35rem 0;
    }

    .qf-login__headline {
        font-size: 1.55rem;
    }

    .qf-login__eyebrow {
        display: none;
    }

    .qf-campus-scene {
        padding-top: 1.85rem;
    }

    .qf-campus {
        height: clamp(150px, 26vh, 210px);
        transform: translate(-3px, 5px);
    }

    .qf-tagline {
        right: 4%;
        top: 0;
        transform: rotate(-11deg);
        max-width: 44%;
    }

    .qf-tagline__line {
        font-size: 1.1rem;
    }

    .qf-tagline__line--accent {
        font-size: 1.2rem;
    }

    .qf-login__welcome-sub {
        display: none;
    }

    .qf-divider {
        margin: 0.45rem 0;
    }
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 991.98px) {
    html,
    body#mainBody.qf-login-body {
        overflow: auto;
        overflow-x: hidden;
    }

    .qf-login {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .qf-login__brand {
        display: none;
    }

    .qf-mobile-brand {
        display: block;
    }

    .qf-login__panel {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        padding: 1rem 0.9rem 1.25rem;
        justify-content: center;
    }

    .qf-login__card {
        max-height: none;
        max-width: 420px;
    }
}

@media (max-width: 991.98px) and (max-height: 780px) {
    html,
    body#mainBody.qf-login-body {
        overflow: hidden;
    }

    .qf-login {
        height: 100dvh;
        overflow: hidden;
    }

    .qf-login__panel {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0.65rem 0.75rem;
        gap: 0.4rem;
    }

    .qf-login__card {
        max-height: calc(100dvh - 2.5rem);
        padding: 0.75rem 0.9rem;
        overflow: hidden;
    }

    .qf-login__welcome-sub {
        margin-bottom: 0.45rem;
        font-size: 0.75rem;
    }

    .qf-field {
        margin-bottom: 0.35rem;
    }

    .qf-input .form-control {
        min-height: 34px;
    }

    .qf-trust {
        margin-top: 0.5rem;
        padding-top: 0.45rem;
    }

    .qf-trust__banner {
        max-height: 42px;
    }

    .qf-login__footer {
        font-size: 0.65rem;
    }
}

@media (max-width: 575.98px) {
    .qf-login__panel {
        padding: 0.75rem 0.7rem 1rem;
        align-items: stretch;
    }

    .qf-login__card {
        max-width: none;
        border-radius: 14px;
    }

    .qf-trust__banner {
        max-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qf-feature__icon,
    .qf-campus {
        animation: none !important;
        transition: none !important;
    }
}
