/* TXN Metals RC5 login — isolated from the authenticated CRM design system. */
:root {
    --login-ink: #17304d;
    --login-muted: #64748b;
    --login-blue: #1769c2;
    --login-blue-dark: #1254a0;
    --login-border: rgba(255,255,255,.78);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body.login-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    isolation: isolate;
    color: var(--login-ink);
    background: #071b35;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.login-page::before {
    content: "";
    position: fixed;
    z-index: -2;
    inset: -18px;
    background: url("/assets/images/login-tech-bg.jpg") center center / cover no-repeat;
    filter: blur(10px);
    transform: scale(1.035);
}
body.login-page::after {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    background: linear-gradient(135deg, rgba(4,18,39,.42), rgba(6,31,58,.26) 48%, rgba(3,18,39,.48));
}
.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 19px;
    padding: 34px 18px 24px;
}
.login-glass-card {
    width: min(430px, calc(100vw - 32px));
    padding: 30px 30px 26px;
    border: 1px solid var(--login-border);
    border-radius: 22px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 24px 80px rgba(0,12,30,.30), inset 0 1px 0 rgba(255,255,255,.68);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
}
.login-card-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0 0 8px;
    padding: 0 102px;
}
.login-glass-card h1 {
    margin: 0;
    color: #16314f;
    text-align: center;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.4;
}
.login-subtitle { margin: 7px 0 20px; color: #63758c; text-align: center; font-size: 12px; line-height: 1.65; }
.login-qr-frame {
    width: 252px;
    height: 252px;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid rgba(199,214,232,.9);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24,54,90,.08);
}
.login-qr-panel {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    color: #334b67;
    text-align: center;
}
.login-qr-panel iframe { display: block; max-width: 100%; max-height: 100%; border: 0; }
.login-qr-loading { color: #64748b; font-size: 12px; }
.login-helper { margin: 14px 0 19px; color: #63758c; text-align: center; font-size: 12px; line-height: 1.65; }
.login-qr-unavailable { height: auto; min-height: 204px; }
.login-qr-unavailable .login-qr-panel { min-height: 178px; align-content: center; gap: 8px; padding: 16px; }
.login-qr-placeholder-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #cfe0f3; border-radius: 14px; background: #f2f7ff; color: #2874c8; font-size: 26px; }
.login-qr-panel strong { color: #284360; font-size: 13px; }
.login-qr-panel small { max-width: 270px; color: #74849a; font-size: 11px; line-height: 1.6; }
.login-switch {
    position: absolute;
    top: 50%;
    right: 0;
    width: auto;
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid rgba(35,104,184,.22);
    border-radius: 999px;
    background: rgba(239,246,255,.78);
    color: #1c62ad;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    transform: translateY(-50%);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.login-switch:hover { border-color: rgba(35,104,184,.45); background: #e6f1ff; color: #124f98; }
.login-switch.is-muted { color: #75849a; cursor: default; }
.login-error { margin: 0 0 15px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 10px; background: rgba(255,241,242,.96); color: #b42332; font-size: 12px; line-height: 1.55; }
.login-form { display: grid; gap: 7px; }
.login-form label { margin-top: 7px; color: #344d68; font-size: 12px; font-weight: 700; }
.login-form label span { color: #8492a5; font-size: 11px; font-weight: 500; }
.login-form input:not([type=hidden]) {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfdae8;
    border-radius: 9px;
    outline: none;
    background: rgba(255,255,255,.88);
    color: #19334f;
    font: inherit;
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form input:focus { border-color: #5c9ce3; box-shadow: 0 0 0 3px rgba(45,126,211,.13); }
.login-form input::placeholder { color: #9aa8b8; }
.login-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.login-human-check { display: flex; justify-content: center; margin: 13px 0 3px; min-height: 65px; }
.login-security-note { margin: 12px 0 2px; padding: 9px 11px; border: 1px solid #d9e7f8; border-radius: 9px; background: rgba(241,247,255,.84); color: #59718e; font-size: 11px; line-height: 1.6; }
.login-security-note.is-warning { border-color: #f3d4a4; background: #fff8ec; color: #94631d; }
.login-submit {
    width: 100%;
    min-height: 45px;
    margin-top: 9px;
    border: 1px solid #1769c2;
    border-radius: 10px;
    background: linear-gradient(135deg, #287dd4, #155db0);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 7px 16px rgba(24,98,179,.18);
}
.login-submit:hover { background: linear-gradient(135deg, #206fc5, #104f9b); }
.login-footnote { margin: 0; color: rgba(238,245,255,.84); text-align: center; font-size: 11px; text-shadow: 0 1px 8px rgba(0,0,0,.24); }
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .login-glass-card { background: rgba(255,255,255,.96); }
}
@media (max-width: 560px) {
    .login-shell { justify-content: center; gap: 14px; padding: 20px 12px; }
    .login-glass-card { width: min(420px, calc(100vw - 24px)); padding: 24px 20px 21px; border-radius: 18px; }
    .login-card-head { justify-content: flex-start; padding: 0 108px 0 0; }
    .login-glass-card h1 { font-size: 19px; text-align: left; }
    .login-switch { padding: 5px 8px; font-size: 10px; }
    .login-qr-frame { width: 236px; height: 236px; }
    .login-qr-unavailable { height: auto; min-height: 196px; }
}
