﻿/* =========================================================================================================
   Sign-in page (Views/Home/LoginPage.cshtml) - 2026-11-06 (user): the same look as the other Mithaq application's sign-in
   (http://localhost:60652): deep navy page with a blue glow and a faint dot grid, the hero on the left, a frosted-glass card with
   a glossy rim on the right, fonts Bricolage Grotesque (titles) + Geist (text). One screen, no scroll on a laptop / desktop.
   Script: wwwroot/js/pages/loginpage.js (ids and the classes it uses are kept: .login-card, .form-input, .error-text,
   .pass-reveal, .btn-signin.is-loading, #btn-label, .loader-overlay, .split-container, .quick-login-item, .custom-swal*).
   ========================================================================================================= */
:root {
    --mq-ink: #061531; --mq-deep: #030a1c; --mq-navy: #0a1f45;
    --mq-blue: #2f6bff; --mq-blue2: #5b8cff; --mq-violet: #8a7dff;
    --mq-sub: #a9b8d6; --mq-line: rgba(169, 184, 214, .18);
    --mq-ok: #4ade80; --mq-bad: #fca5a5;
    --mq-head: 'Bricolage Grotesque', Geist, 'Segoe UI', system-ui, sans-serif;
    --mq-font: Geist, Inter, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; }
body.mq-body { font-family: var(--mq-font); color: #fff; background: var(--mq-deep); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }

/* ---------- page and background ---------- */
.mq-page { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
    background: radial-gradient(60% 70% at 78% 38%, rgba(47, 107, 255, .28), transparent 70%),
                radial-gradient(40% 50% at 10% 100%, rgba(138, 125, 255, .12), transparent 70%),
                linear-gradient(180deg, #030a1c 0%, #061531 60%, #0a1f45 100%); }
.mq-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mq-bg::before { content: ""; position: absolute; inset: 0; opacity: .55;
    background-image: radial-gradient(rgba(169, 184, 214, .22) 1px, transparent 1.2px); background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 30%, transparent 75%); }
.mq-glow { display: none; }
.mq-arches { position: absolute; right: -60px; bottom: -150px; width: 640px; height: auto; filter: drop-shadow(0 0 40px rgba(47, 107, 255, .25)); }
.mq-arches path { stroke: rgba(91, 140, 255, .16); stroke-width: 56; }

/* ---------- top bar ---------- */
.mq-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 56px 16px; }
.mq-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.mq-brand img { width: 44px; height: auto; display: block; }
.mq-brand span { display: flex; flex-direction: column; }
.mq-brand b { font-family: var(--mq-head); font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -.3px; }
.mq-brand small { margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--mq-sub); }
.mq-top-links { display: flex; align-items: center; gap: 12px; }
.mq-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 1px solid var(--mq-line); border-radius: 999px;
    color: #dbe4f5; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; background: rgba(255, 255, 255, .03); transition: background .2s; }
.mq-pill i { color: #7fa2ff; }
a.mq-pill:hover { background: rgba(255, 255, 255, .08); }
.mq-pill.is-light { background: #fff; color: var(--mq-ink); border-color: #fff; }
.mq-pill.is-light i { color: var(--mq-blue); }

/* ---------- main ---------- */
.mq-main { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 460px); gap: 64px;
    align-items: center; padding: 0 56px; max-width: 1480px; width: 100%; margin: 0 auto; }
.mq-hero { min-width: 0; }
.mq-badge { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 6px; border: 1px solid var(--mq-line); border-radius: 999px;
    background: rgba(47, 107, 255, .10); color: #cfdcff; font-size: 13px; font-weight: 600; }
.mq-badge span { height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--mq-blue); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; }
.mq-title { margin: 22px 0 0; font-family: var(--mq-head); font-weight: 600; font-size: clamp(38px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -1.7px; color: #fff; }
.mq-title em { font-style: normal; background: linear-gradient(90deg, #8fb0ff, #5b8cff 45%, #a99dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mq-lead { margin: 22px 0 0; max-width: 640px; color: var(--mq-sub); font-size: 18px; line-height: 1.6; }
.mq-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; }
.mq-chips li { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--mq-line); border-radius: 999px;
    background: rgba(255, 255, 255, .035); color: #dbe4f5; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.mq-chips li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mq-blue2); box-shadow: 0 0 0 4px rgba(91, 140, 255, .18); flex: none; }
.mq-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--mq-line); max-width: 640px; }
.mq-stats div { display: block; }
.mq-stats b { display: block; font-family: var(--mq-head); font-size: 28px; font-weight: 600; letter-spacing: -.5px; color: #fff; }
.mq-stats span { display: block; margin-top: 2px; color: var(--mq-sub); font-size: 13px; }

/* ---------- the sign-in card: frosted glass with a glossy rim ---------- */
.mq-side { display: flex; justify-content: flex-end; min-width: 0; }
.login-card.mq-card { position: relative; isolation: isolate; width: 100%; max-width: 460px; padding: 36px 34px 26px; border-radius: 28px; color: #fff;
    background: linear-gradient(155deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .05) 38%, rgba(255, 255, 255, .03) 60%, rgba(91, 140, 255, .10) 100%);
    -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .06), 0 0 60px -10px rgba(47, 107, 255, .35); }
.login-card.mq-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1.5px; pointer-events: none;
    background: linear-gradient(140deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .08) 30%, rgba(91, 140, 255, .15) 60%, rgba(169, 157, 255, .7));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.login-card.mq-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; z-index: -1; border-radius: 28px 28px 60% 60% / 28px 28px 22% 22%; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0)); }
.mq-card-title { margin: 0; font-family: var(--mq-head); font-size: 30px; font-weight: 600; letter-spacing: -.6px; line-height: 1.15; color: #fff; }
.mq-card-title em { font-style: normal; background: linear-gradient(90deg, #8fb0ff, #5b8cff 50%, #a99dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mq-card-sub { margin: 8px 0 24px; color: var(--mq-sub); font-size: 14.5px; line-height: 1.5; }

.form-group { margin-bottom: 16px; }
.group-label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #d5def0; font-size: 13px; font-weight: 600; }
.group-label i { color: #7fa2ff; width: 14px; text-align: center; font-size: 12px; }
.input-group { position: relative; }
.form-input { display: block; width: 100%; height: 50px; padding: 0 16px; margin: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: rgba(3, 10, 28, .38);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); color: #fff; font-family: var(--mq-font); font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.form-input.has-reveal { padding-right: 50px; }
.form-input::placeholder { color: rgba(203, 214, 236, .55); }
.form-input:focus { border-color: rgba(91, 140, 255, .95); background: rgba(3, 10, 28, .55); box-shadow: 0 0 0 4px rgba(47, 107, 255, .25), inset 0 1px 2px rgba(0, 0, 0, .25); }
.form-input.has-error { border-color: rgba(248, 113, 113, .9); box-shadow: 0 0 0 4px rgba(239, 68, 68, .18); }
.form-input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #0b1d40 inset; caret-color: #fff; }
.pass-reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px;
    background: transparent; color: #9fb0d0; cursor: pointer; font-size: 15px; }
.pass-reveal:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.error-text { display: none; margin-top: 7px; color: var(--mq-bad); font-size: 12.5px; font-weight: 600; }
.error-text.visible { display: block; }

/* keep me signed in (switch) */
.mq-remember { display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 13.5px; color: #c3d0ea; cursor: pointer; user-select: none; }
.mq-remember input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mq-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .16); transition: background .2s; flex: none; }
.mq-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.mq-remember input:checked + .mq-switch { background: var(--mq-blue); }
.mq-remember input:checked + .mq-switch::after { transform: translateX(16px); }
.mq-remember input:focus-visible + .mq-switch { box-shadow: 0 0 0 3px rgba(47, 107, 255, .4); }

.btn-signin { position: relative; width: 100%; height: 52px; margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px;
    color: #fff; font-family: var(--mq-font); font-size: 15.5px; font-weight: 600; cursor: pointer;
    background: linear-gradient(180deg, #4d82ff 0%, #2f6bff 55%, #2559e8 100%);
    box-shadow: 0 14px 30px -12px rgba(47, 107, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .15s, box-shadow .15s; }
.btn-signin:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -12px rgba(47, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-signin:active { transform: translateY(0); }
.btn-signin:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(143, 162, 255, .45); }
.btn-signin .mq-arrow { font-size: 14px; transition: transform .15s; }
.btn-signin:hover .mq-arrow { transform: translateX(3px); }
.spinner-icon { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-signin.is-loading { pointer-events: none; opacity: .85; }
.btn-signin.is-loading .spinner-icon { display: inline-block; }
.btn-signin.is-loading .mq-arrow { display: none; }

.forgot-link { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px auto 0; width: max-content; color: #c3d0ea; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.forgot-link:hover { color: #fff; }
.mq-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); color: #9fb0d0; font-size: 12.5px; text-align: center; }
.mq-secure i { color: var(--mq-ok); }

/* quick login (when it is on) */
.quick-login-section { margin-top: 18px; }
.quick-login-title { margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9fb0d0; text-align: center; }
.quick-login-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.quick-login-item { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--mq-line);
    background: rgba(255, 255, 255, .05); color: #fff; font-family: var(--mq-font); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.quick-login-item i { color: #7fa2ff; font-size: 12px; }
.quick-login-item:hover { background: rgba(47, 107, 255, .2); border-color: rgba(143, 162, 255, .5); }
.quick-login-item:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47, 107, 255, .4); }

/* ---------- footer ---------- */
.mq-foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 56px 16px; border-top: 1px solid var(--mq-line); color: #7d8db0; font-size: 12.5px; }
.mq-foot a { color: #a9b8d6; text-decoration: none; }
.mq-foot a:hover { color: #fff; }

/* ---------- loading overlay ---------- */
.loader-overlay { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: rgba(3, 10, 28, .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.loader-overlay.active { display: flex; }
.loader-circle { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .14); border-top-color: var(--mq-blue2); animation: spin .8s linear infinite; }
.loader-message { font-size: 14px; color: var(--mq-sub); }

/* ---------- SweetAlert (the page's messages) ---------- */
.custom-swal { border-radius: 20px !important; background: #0b1d40 !important; border: 1px solid rgba(255, 255, 255, .14) !important; font-family: var(--mq-font) !important; }
.custom-swal-title { color: #fff !important; font-family: var(--mq-head) !important; font-size: 22px !important; font-weight: 600 !important; }
.custom-swal-content { color: #d5def0 !important; font-size: 14.5px !important; }
.custom-swal-btn { background: linear-gradient(180deg, #4d82ff 0%, #2f6bff 55%, #2559e8 100%) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; font-weight: 600 !important; padding: 10px 26px !important; cursor: pointer; }

/* ---------- animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-6px); } 30% { transform: translateX(6px); } 45% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } 90% { transform: translateX(2px); } }
.animate-shake { animation: shake .45s ease; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- one screen, no page scroll (laptop / desktop) ---------- */
@media (min-width: 1101px) {
    html, body.mq-body { height: 100%; overflow: hidden; }
    .mq-page { height: 100vh; min-height: 0; }
}
@media (max-height: 860px) {
    .mq-title { font-size: clamp(34px, 4vw, 56px); }
    .mq-lead { font-size: 16px; margin-top: 16px; }
    .mq-chips { margin-top: 20px; }
    .mq-stats { margin-top: 26px; padding-top: 18px; }
    .login-card.mq-card { padding: 28px 30px 20px; }
    .mq-card-sub { margin-bottom: 18px; }
}
@media (max-height: 720px) {
    .mq-stats, .mq-lead { display: none; }
    .mq-secure { margin-top: 14px; padding-top: 12px; }
    .form-input { height: 44px; }
    .btn-signin { height: 46px; }
    .mq-remember { margin-bottom: 10px; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
    html, body.mq-body { overflow: auto; }
    .mq-page { height: auto; min-height: 100vh; }
    .mq-main { grid-template-columns: 1fr; gap: 36px; padding: 10px 28px 36px; }
    .mq-side { justify-content: center; order: -1; }
    .mq-top, .mq-foot { padding-left: 28px; padding-right: 28px; }
    .login-card.mq-card { max-width: 480px; }
    .mq-arches { width: 420px; }
}
@media (max-width: 640px) {
    .mq-lead, .mq-stats, .mq-top-links .mq-pill:not(.is-light) { display: none; }
    .mq-top { padding: 16px; }
    .mq-main { padding: 8px 16px 28px; }
    .mq-title { font-size: 36px; }
    .login-card.mq-card { padding: 28px 22px 22px; }
    .mq-foot { flex-direction: column; padding: 16px; }
}

/* ---------- 2026-11-06: the card's other parts (the same as the other Mithaq application): progress, messages, forgot password ---------- */
.mq-sec[hidden] { display: none !important; }
.mq-sec.mq-in { animation: mqIn .25s ease; }
@keyframes mqIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* signing in / sending / saving */
.mq-progress { text-align: center; }
.mq-progress-body { padding: 30px 0; }
.mq-spinner { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .14); border-top-color: #5b8cff; animation: spin .8s linear infinite; }
.mq-progress-text { color: var(--mq-sub); font-size: 14px; }

/* a friendly message inside the card */
.mq-alert { text-align: center; padding: 4px 4px 6px; }
.mq-alert-ico { width: 64px; height: 64px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; border-radius: 20px; font-size: 26px; color: #fecaca;
    background: linear-gradient(150deg, rgba(248, 113, 113, .35), rgba(239, 68, 68, .12)); border: 1px solid rgba(252, 165, 165, .45);
    box-shadow: 0 12px 28px -12px rgba(239, 68, 68, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
.mq-alert.is-ok .mq-alert-ico { color: #bbf7d0; background: linear-gradient(150deg, rgba(74, 222, 128, .35), rgba(34, 197, 94, .12)); border-color: rgba(134, 239, 172, .45);
    box-shadow: 0 12px 28px -12px rgba(34, 197, 94, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
.mq-alert-kicker { margin-bottom: 6px; color: #fca5a5; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mq-alert.is-ok .mq-alert-kicker { color: #86efac; }
.mq-alert .mq-card-title { text-align: center; font-size: 26px; }
.mq-alert-text { margin: 10px auto 0; max-width: 340px; color: #d5def0; font-size: 14.5px; line-height: 1.55; }
.mq-alert-text b { color: #fff; font-weight: 700; }
.mq-alert-tips { list-style: none; margin: 16px 0 6px; padding: 12px 14px; text-align: left; border-radius: 14px; background: rgba(3, 10, 28, .35); border: 1px solid rgba(255, 255, 255, .10); }
.mq-alert-tips li { position: relative; padding: 4px 0 4px 22px; color: #c3d0ea; font-size: 13px; line-height: 1.45; }
.mq-alert-tips li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: #5b8cff; box-shadow: 0 0 0 3px rgba(91, 140, 255, .2); }
.mq-alert + .btn-signin, .mq-alert + .mq-back-btn { margin-top: 14px; }
.mq-card-sub b { color: #fff; }

/* Back (ghost) and the two buttons side by side */
.mq-back-btn { width: 100%; height: 52px; margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: #fff; font-family: var(--mq-font); font-size: 15.5px; font-weight: 600; transition: background .15s; }
.mq-back-btn:hover { background: rgba(255, 255, 255, .12); }
.mq-back-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(143, 162, 255, .45); }
.mq-btn-group { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* Caps Lock */
.caps-warning { display: none; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(245, 158, 11, .16); color: #fcd34d; font-size: 12px; font-weight: 700; }
.caps-warning.visible { display: block; }
@media (max-height: 720px) { .mq-progress-body { padding: 18px 0; } .mq-back-btn { height: 46px; } .mq-alert-ico { width: 52px; height: 52px; font-size: 22px; margin-bottom: 10px; } }
