:root {
    --login-primary: #2563eb;
    --login-primary-dark: #1d4ed8;
    --login-text: #172033;
    --login-muted: #667085;
    --login-border: #dbe3ef;
    --login-card: #ffffff;
    --login-soft: #f6f8fc;
    --login-danger: #c62828;
    --login-radius: 24px;
}

.login-container {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 34px 16px;
}

.login-container .row,
.login-container .content {
    width: 100%;
}

.login-container .col-md-5 {
    width: min(100%, 820px);
    max-width: 920px;
    margin: 0 auto;
}

.login-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 38px 34px 32px;
    color: var(--login-text);
    background: var(--login-card);
    border: 1px solid rgba(219, 227, 239, 0.9);
    border-radius: var(--login-radius);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, #2563eb, #4f46e5, #7c3aed);
}

.login-profile-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.login-hero .pfp {
    width: 92px;
    height: 92px;
    object-fit: cover;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--login-border);
    border-radius: 50%;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
}

.login-title {
    margin: 0 0 8px;
    color: var(--login-text);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}

.login-subtitle {
    margin: 0 0 26px;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    color: var(--login-danger);
    font-size: 14px;
    font-weight: 700;
    background: #fff1f1;
    border: 1px solid #f2c5c5;
    border-radius: 12px;
}

.login-hero .form-group {
    margin-bottom: 18px;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.login-label-row label,
.login-hero .form-group>label {
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.login-hero input[type="email"],
.login-hero input[type="password"],
.login-hero input:not([type]) {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    color: var(--login-text);
    font: inherit;
    background: #fff;
    border: 1px solid var(--login-border);
    border-radius: 13px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.login-hero input:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.bio-login-user {
    display: grid;
    gap: 4px;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border: 1px solid #dbeafe;
    border-radius: 14px;
    text-align: center;
}


.bio-login-label-reg {
    color: var(--login-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #c74246 !important;
}

.bio-login-user-name {
    color: var(--login-text);
    font-size: 18px;
    font-weight: 800;
}

.bio-login-user-name {
    color: var(--login-text);
    font-size: 18px;
    font-weight: 800;
}

.bio-login-user-email {
    color: #475467;
    font-size: 14px;
}

.login-hero .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    border-radius: 13px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-hero .btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--login-primary), #4f46e5);
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.login-hero .btn-primary:hover {
    background: linear-gradient(135deg, var(--login-primary-dark), #4338ca);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.login-hero .btn-secondary {
    color: #344054;
    background: #fff;
    border: 1px solid var(--login-border);
    box-shadow: none;
}

.login-hero .btn-secondary:hover {
    background: var(--login-soft);
    transform: translateY(-1px);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--login-border);
}

.login-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 22px 0 0;
    font-size: 14px;
    text-align: center;
}

.login-links a {
    color: var(--login-primary);
    font-weight: 700;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: var(--login-primary);
    font-size: 13px;
    font-weight: 800;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    cursor: pointer;
}

#bioLoginStatus:not(:empty) {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--login-soft);
    border: 1px solid var(--login-border);
    border-radius: 12px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .login-container {
        min-height: 100vh;
        align-items: flex-start;
        padding: 0;
    }

    .login-container .col-md-5 {
        max-width: none;
    }

    .login-hero {
        min-height: 100vh;
        padding: 30px 20px 28px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-hero .pfp {
        width: 78px;
        height: 78px;
    }

    .login-title {
        font-size: 22px;
    }
}

.login-error {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 22px;
    padding: 14px;
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(153, 27, 27, 0.08);
}

.login-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    background: #dc2626;
    border-radius: 50%;
}

.login-error-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.login-error-content strong {
    color: #7f1d1d;
    font-size: 14px;
    line-height: 1.3;
}

.login-error-content span {
    overflow-wrap: anywhere;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.5;
}

.login-refresh-btn {
    min-height: 38px;
    padding: 8px 13px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    background: #b91c1c;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.login-refresh-btn:hover {
    background: #991b1b;
}

@media (max-width: 600px) {
    .login-error {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .login-refresh-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}