/* ============================================================
   Admin login / 2FA page (Views/Account/Index.cshtml)
   Standalone page (Layout = null) — linked directly in the head.
   ============================================================ */
:root {
    --al-ink: #15171a;
    --al-ink-2: #23262b;
    --al-gold: #c9a44c;
    --al-gold-soft: #e7cf8f;
    --al-paper: #f6f4ee;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.al-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;          /* dynamic vh — accounts for mobile browser chrome */
    overflow-y: auto;            /* scroll when content is taller than the viewport */
    -webkit-overflow-scrolling: touch;
    font-family: 'Noto Sans', Arial, sans-serif;
    background: radial-gradient(1200px 600px at 10% 10%, #2a2e35 0%, #15171a 55%, #0e0f12 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.al-card {
    width: 100%;
    max-width: 1000px;
    margin: auto;                /* keeps the card centered yet scrollable when tall */
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}

/* Short / landscape viewports: don't vertically center (it would clip the top) */
@media (max-height: 760px) {
    body.al-body { align-items: flex-start; }
}

/* ---------- Brand (left) panel ---------- */
.al-brand {
    position: relative;
    padding: 32px 36px;
    color: #fff;
    background: linear-gradient(150deg, var(--al-ink) 0%, var(--al-ink-2) 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    /* decorative gold glows */
    .al-brand::before,
    .al-brand::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(8px);
        opacity: .25;
        pointer-events: none;
    }

    .al-brand::before {
        width: 240px;
        height: 240px;
        right: -70px;
        top: -70px;
        background: radial-gradient(circle, var(--al-gold) 0%, transparent 70%);
    }

    .al-brand::after {
        width: 200px;
        height: 200px;
        left: -60px;
        bottom: -60px;
        background: radial-gradient(circle, var(--al-gold) 0%, transparent 70%);
    }

.al-brand-logo {
    display: block;
    max-width: 220px;
    width: auto;
    height: auto;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.al-eyebrow {
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--al-gold);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.al-brand h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}

.al-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,.72);
    margin: 0 0 22px;
    position: relative;
    z-index: 1;
}

.al-rule {
    width: 54px;
    height: 3px;
    background: var(--al-gold);
    border-radius: 2px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.al-illus {
    margin-top: auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

    .al-illus img {
        max-width: 62%;
        max-height: 190px;
        height: auto;
        opacity: .96;
    }

.al-site-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 16px;
    border: 1px solid rgba(201,164,76,.5);
    border-radius: 10px;
    color: var(--al-gold-soft);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: .2s ease;
    align-self: flex-start;
}

    .al-site-link:hover {
        background: rgba(201,164,76,.14);
        color: #fff;
    }

/* ---------- QR (2FA) block inside brand panel ---------- */
.al-qr {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(201,164,76,.35);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

    .al-qr h6 {
        font-size: 13px;
        color: var(--al-gold-soft);
        margin: 0 0 12px;
        font-weight: 600;
    }

    .al-qr img {
        width: 190px;
        height: 190px;
        background: #fff;
        padding: 8px;
        border-radius: 10px;
    }

/* emailed-QR variant (QR no longer rendered on screen) */
.al-qr-emailed { text-align: center; }

    .al-qr-emailed .material-icons-outlined {
        font-size: 40px;
        color: var(--al-gold);
        margin-bottom: 6px;
    }

    .al-qr-emailed p {
        font-size: 12.5px;
        color: rgba(255,255,255,.75);
        line-height: 1.6;
        margin: 8px 0 0;
    }

    .al-qr-emailed .al-site-link { margin-top: 14px; }

/* ---------- Form (right) panel ---------- */
.al-form {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.al-form-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 0px;
}

.al-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--al-ink);
    margin: 0 0 6px;
}

.al-subtitle {
    font-size: 14px;
    color: #6b6b6b;
    margin: 0 0 26px;
}

.al-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2ddcf;
    background: #fff;
    color: #1c1c1c;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
    margin-bottom: 12px;
}

    .al-btn img { width: 20px; height: 20px; }

    .al-btn:hover {
        border-color: var(--al-gold);
        box-shadow: 0 6px 16px rgba(0,0,0,.08);
        transform: translateY(-1px);
        color: #1c1c1c;
    }

.al-btn-google { background: #fff; }

.al-btn-facebook {
    background: #f6f7fb;
}

.al-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b3b3b3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 8px 0 16px;
}

    .al-divider::before,
    .al-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #eceae3;
    }

/* welcome chip */
.al-welcome {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fbf7ed;
    border: 1px solid #ecdcae;
    color: #8a6d2c;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    max-width: 100%;
    word-break: break-all;
}

/* 2FA note */
.al-note {
    display: flex;
    gap: 8px;
    background: #f6faff;
    border: 1px solid #d8e8fb;
    border-left: 3px solid #4a90e2;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: #3a4a5a;
    line-height: 1.5;
    margin-bottom: 18px;
}

    .al-note .material-icons-outlined { font-size: 18px; color: #4a90e2; }

.al-code-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8a8576;
    margin-bottom: 6px;
    display: block;
}

.al-code-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #e2ddcf;
    border-radius: 10px;
    font-size: 18px;
    letter-spacing: 6px;
    text-align: center;
    font-weight: 700;
    color: #1c1c1c;
    margin-bottom: 16px;
    outline: none;
    transition: .2s ease;
}

    .al-code-input:focus {
        border-color: var(--al-gold);
        box-shadow: 0 0 0 3px rgba(201,164,76,.2);
    }

.al-submit {
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--al-gold) 0%, var(--al-gold-soft) 100%);
    color: #1c1c1c;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

    .al-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(201,164,76,.4);
    }

.al-secured {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: #f1f8f3;
    border: 1px solid #cfe9d6;
    border-left: 3px solid #2e9e5b;
    border-radius: 8px;
    font-size: 12.5px;
    color: #2c6b44;
    line-height: 1.5;
}

    .al-secured .material-icons-outlined {
        font-size: 18px;
        color: #2e9e5b;
        flex-shrink: 0;
    }

.al-fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #8a6d1f;
    text-decoration: none;
}

    .al-fallback-link:hover { color: var(--al-gold); text-decoration: underline; }
    .al-fallback-link .material-icons-outlined { font-size: 16px; }

.al-foot {
    margin-top: 22px;
    font-size: 11.5px;
    color: #a9a9a9;
    text-align: center;
}

/* ---------- Responsive ---------- */
/* Tablet / small laptop — tighten padding so both columns breathe */
@media (max-width: 1024px) and (min-width: 861px) {
    .al-card { max-width: 880px; }
    .al-brand { padding: 28px 28px; }
    .al-form { padding: 30px 30px; }
    .al-brand h1 { font-size: 23px; }
}

@media (max-width: 860px) {
    body.al-body {
        overflow-y: auto;     /* allow scroll when stacked on small screens */
        max-height: none;
        min-height: 100vh;
        align-items: flex-start;
        padding: 12px;
    }

    .al-card {
        grid-template-columns: 1fr;
        max-width: 460px;
        max-height: none;
    }

    .al-brand {
        padding: 26px 24px;
    }

        /* keep the mobile header compact */
        .al-brand .al-illus {
            display: none;
        }

        .al-brand p {
            display: none;
        }

        .al-brand .al-rule {
            margin-bottom: 16px;
        }

    .al-form {
        padding: 30px 24px;
    }
}

@media (max-width: 480px) {
    body.al-body { padding: 0; }

    .al-card {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .al-brand {
        padding: 22px 20px;
    }

    .al-form {
        padding: 26px 20px 32px;
    }

    .al-form-logo {
        max-width: 130px;
    }

    .al-title {
        font-size: 21px;
    }

    .al-code-input {
        font-size: 16px;
        letter-spacing: 4px;
    }

    .al-qr img {
        width: 160px;
        height: 160px;
    }
}

/* ===== Login loading overlay ===== */
.al-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(28, 28, 28, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

    .al-loader.is-active { display: flex; }

.al-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 26px 34px;
    background: rgba(28, 28, 28, 0.9);
    border: 1px solid rgba(201, 164, 76, 0.4);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.al-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(201, 164, 76, 0.22);
    border-top-color: #c9a44c;
    border-radius: 50%;
    animation: alSpin 0.8s linear infinite;
}

.al-loader-text {
    color: #f4eddc;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0;
}

@keyframes alSpin {
    to { transform: rotate(360deg); }
}
