﻿* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
    color: #111;
}

.login-page {
    min-height: 100vh;
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 36px;
}

.brand-header {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
}

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
}

.tracurate-logo {
    width: 390px;
    max-width: 46vw;
    height: auto;
    filter: brightness(1.05) contrast(1.16) saturate(1.22);
}

.bke-logo {
    width: 205px;
    max-width: 28vw;
    height: auto;
}


.welcome {
    text-align: center;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    margin-bottom: 24px;
}

.login-card {
    width: min(680px, 100%);
    margin: 0 auto;
    border: 1px solid #cfd3d7;
    border-radius: 6px;
    padding: 24px 58px 44px;
    box-shadow: 0 10px 26px rgba(0,0,0,.045);
}

.google-login {
    text-align: center;
}

.google-login h1 {
    margin: 0 0 12px;
    font-size: clamp(23px, 3vw, 31px);
}

.google-login p {
    max-width: 540px;
    margin: 8px auto;
    color: #3e4b5e;
    font-size: 17px;
    line-height: 1.55;
}

.google-login .biometric-note {
    color: #5b6574;
    font-size: 14px;
}

.google-sign-in-btn {
    display: inline-flex;
    min-width: 285px;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 0;
    padding: 11px 20px;
    color: #202124;
    background: #fff;
    border: 1px solid #aeb4bd;
    border-radius: 7px;
    box-shadow: 0 2px 5px rgba(0,0,0,.08);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.google-sign-in-btn:hover { background: #f7f9fc; border-color: #7d8794; }
.google-sign-in-btn:focus-visible { outline: 3px solid rgba(26,115,232,.28); outline-offset: 2px; }
.google-sign-in-btn:disabled { opacity: .65; cursor: wait; }
.google-mark { color: #1a73e8; font-size: 24px; font-weight: 800; }

.legacy-login {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e4e9;
}

.legacy-login summary {
    color: #52627a;
    text-align: center;
    cursor: pointer;
}

.legacy-login > p {
    color: #677386;
    font-size: 13px;
    text-align: center;
}

.legacy-login .form-row {
    grid-template-columns: 140px minmax(220px, 1fr);
    margin-top: 22px;
}

.legacy-login .form-row label { font-size: 17px; }

.form-row {
    display: grid;
    grid-template-columns: 190px minmax(280px, 520px) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
}

    .form-row label {
        font-size: 24px;
        font-weight: 500;
    }

.input-wrap {
    position: relative;
}

.input-icon {
    display: none;
}

.input-wrap input {
    width: 100%;
    height: 54px;
    border: 1px solid #c9cdd2;
    border-radius: 5px;
    font-size: 20px;
    padding: 0 18px;
    outline: none;
}

    .input-wrap input:focus {
        border-color: #6aa7e8;
        box-shadow: 0 0 0 3px rgba(106, 167, 232, .18);
    }

.forgot-link {
    font-size: 18px;
    color: #0056c9;
    white-space: nowrap;
}

.button-row {
    text-align: center;
    margin-top: 6px;
}

.sign-in-btn {
    min-width: 220px;
    height: 58px;
    border: 1px solid #c4c8cc;
    border-radius: 6px;
    background: linear-gradient(#fff, #f0f0f0);
    font-size: 26px;
    cursor: pointer;
}

    .sign-in-btn:hover {
        background: linear-gradient(#fafafa, #e7e7e7);
    }

.login-status {
    margin-top: 24px;
    min-height: 24px;
    color: #d00000;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.login-status.success {
    color: #18733b;
}

.sign-in-progress {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(245, 248, 252, .94);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, visibility .16s ease;
}

.sign-in-progress.is-visible {
    opacity: 1;
    visibility: visible;
}

.sign-in-progress-card {
    width: min(410px, 100%);
    padding: 38px 34px 32px;
    text-align: center;
    background: #fff;
    border: 1px solid #dbe1e8;
    border-radius: 14px;
    box-shadow: 0 22px 65px rgba(29, 48, 73, .16);
}

.sign-in-progress-card h2 {
    margin: 0 0 8px;
    color: #172033;
    font-size: 24px;
}

.sign-in-progress-card p {
    margin: 0;
    color: #5b6574;
    font-size: 15px;
}

.progress-line {
    height: 3px;
    margin-top: 26px;
    overflow: hidden;
    background: #e8edf3;
    border-radius: 999px;
}

.progress-line span {
    display: block;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #18733b);
    border-radius: inherit;
    animation: secure-progress 1.15s ease-in-out infinite;
}

@keyframes secure-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(245%); }
}

@media (prefers-reduced-motion: reduce) {
    .progress-line span { animation-duration: 2.4s; }
}

/* Tablet */
@media (max-width: 900px) {
    .login-page {
        padding-top: 32px;
    }

    .logo-wrap {
        gap: 28px;
    }

    .tracurate-logo {
        width: 300px;
    }

    .bke-logo {
        width: 150px;
    }

    .logo-divider {
        height: 82px;
    }

    .login-card {
        padding: 38px 28px;
    }

    .form-row {
        grid-template-columns: 150px 1fr auto;
        gap: 12px;
    }

        .form-row label {
            font-size: 18px;
        }

    .input-wrap input {
        font-size: 17px;
    }

    .forgot-link {
        font-size: 14px;
    }
}

/* Phone */
@media (max-width: 640px) {
    .login-page {
        width: calc(100% - 24px);
        padding-top: 22px;
    }

    .logo-wrap {
        flex-direction: column;
        gap: 12px;
    }

    .logo-divider {
        display: none;
    }

    .tracurate-logo {
        max-width: 78vw;
        width: 270px;
    }

    .bke-logo {
        max-width: 45vw;
        width: 145px;
    }

    .welcome {
        font-size: 18px;
        line-height: 1.4;
        margin: 22px 0 18px;
    }

    .login-card {
        padding: 22px 16px;
    }

    .sign-in-progress-card {
        padding: 32px 22px 28px;
    }

    .form-row {
        display: block;
        margin-bottom: 20px;
    }

        .form-row label {
            display: block;
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 8px;
        }

    .input-wrap input {
        height: 48px;
        font-size: 15px;
        padding-left: 18px;
    }

    .input-icon {
        left: 16px;
        font-size: 19px;
    }

    .forgot-link {
        display: block;
        margin-top: 10px;
        text-align: center;
        font-size: 14px;
    }

    .sign-in-btn {
        width: 100%;
        font-size: 20px;
        height: 52px;
    }
}
