﻿html, body {
    height: 100%;
    margin: 0;
}

.auth-layout,
.login-page {
    min-height: 100vh;
    background: #0f2d66;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 32px 16px;
}

.login-shell {
    width: min(920px, 100%);
    min-height: 520px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.login-brand {
    background:
        radial-gradient(circle at 20% 20%, rgba(38, 84, 242, .28), transparent 42%),
        linear-gradient(165deg, #163F8B 0%, #122f6b 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-logo {
    width: 320px;
    max-width: 92%;
    height: auto;
    display: block;
    margin: 0 auto;
    background: transparent;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .25));
}

.login-brand-title {
    margin: 28px 0 10px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.login-brand-copy {
    margin: 0 auto;
    max-width: 28ch;
    font-size: 15px;
    line-height: 1.55;
    color: #d5e2ff;
}

.login-panel {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel-head {
    margin-bottom: 26px;
}

.login-panel-head h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: #163F8B;
    letter-spacing: -.02em;
}

.login-panel-head p {
    margin: 0;
    font-size: 14px;
    color: #6b7a99;
}

.login-form {
    font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #163F8B;
    margin-bottom: 7px;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8cb0;
    font-size: 16px;
    pointer-events: none;
}

.login-panel .form-ctrl,
.login-panel input[type="text"],
.login-panel input[type="email"],
.login-panel input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 8px 14px 8px 40px;
    font-size: 14px;
    border: 1.5px solid #d7deea;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    box-shadow: none;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.login-panel .form-ctrl:focus {
    border-color: #2654F2;
    box-shadow: 0 0 0 3px rgba(38, 84, 242, .12);
}

.password-wrapper .form-ctrl {
    padding-right: 44px;
}

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    color: #7b8cb0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-toggle:hover,
.pw-toggle.visible {
    color: #2654F2;
    background: #eef3ff;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fdecec;
    color: #b42318;
    border: 1px solid #f5c2c0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-alert i {
    margin-top: 1px;
}

.login-form .btn-primary-blue-block {
    width: 100%;
    height: 44px;
    margin-top: 8px;
    background: #2654F2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.login-form .btn-primary-blue-block:hover {
    background: #1B3FBF;
    color: #fff;
}

.login-forgot {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #266DF1;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
    color: #1B3FBF;
}

.login-hint {
    color: #9ab0d8;
    font-size: 12px;
    margin-top: 4px;
}

.login-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #EEF3FF;
    color: #163F8B;
    border: 1px solid #C9DAFF;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-info i {
    margin-top: 1px;
    color: #266DF1;
}

.login-code-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 20px;
    font-weight: 700;
}

.login-code-fallback {
    letter-spacing: 4px;
    font-size: 16px;
}

.login-fallback-link {
    display: inline;
    font-weight: 700;
    color: #163F8B;
    word-break: break-all;
}

.login-form .btn-back {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.login-panel .field-error {
    display: block;
    min-height: 0;
    margin-top: 4px;
    font-size: 12px;
    color: #d04545;
}

.validation-summary .text-danger,
.text-danger {
    color: #d04545;
    font-size: 13px;
    margin-top: 8px;
}

@media (max-width: 800px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-brand {
        padding: 32px 28px 28px;
        align-items: center;
        text-align: center;
    }

    .login-brand-copy {
        max-width: 36ch;
    }

    .login-panel {
        padding: 32px 28px 36px;
    }
}
