:root {
    --ts-primary: #003183;
    --ts-primary-dark: #00245f;
    --ts-primary-soft: #eef4ff;
    --ts-text: #101828;
    --ts-muted: #667085;
    --ts-border: #d0d5dd;
    --ts-white: #ffffff;
    --ts-black: #101828;
    --ts-shadow: 0 24px 60px rgba(0, 49, 131, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ts-text);
    background:
        radial-gradient(circle at top left, rgba(0, 49, 131, 0.1), transparent 24%),
        linear-gradient(180deg, #edf4ff 0%, #f7faff 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 640px) 1fr;
    gap: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-panel-inner {
    width: 100%;
    max-width: 500px;
    padding: 3rem;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 49, 131, 0.08);
    box-shadow: 0 30px 80px rgba(0, 49, 131, 0.12);
}

.login-brand {
    display: flex;
    align-items: center;
}

.login-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ts-primary);
}

.visual-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 241, 255, 0.82)),
        url("../img/banner-login.png") center right/contain no-repeat;
    min-height: calc(100vh - 4rem);
    border-radius: 36px;
}

.visual-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(237, 244, 255, 0.82) 0%, rgba(237, 244, 255, 0.28) 34%, rgba(237, 244, 255, 0.02) 100%);
}

.visual-caption {
    position: absolute;
    left: 4rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    max-width: 430px;
    color: var(--ts-text);
}

.visual-caption h2 {
    font-size: clamp(2rem, 2.6vw, 3rem);
    line-height: 1.18;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0c234a;
}

.visual-caption p {
    max-width: 380px;
    margin-bottom: 0;
    font-size: 1.04rem;
    line-height: 1.8;
    color: #4c5c78;
}

.visual-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    margin-bottom: 1.2rem;
    border-radius: 999px;
    background: rgba(0, 49, 131, 0.08);
    border: 1px solid rgba(0, 49, 131, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ts-primary);
}

.login-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
}

.login-title {
    font-size: clamp(2rem, 2.4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: var(--ts-muted);
    margin-bottom: 0;
    max-width: 360px;
    line-height: 1.7;
}

.form-label {
    font-weight: 600;
    color: var(--ts-black);
}

.form-control {
    min-height: 58px;
    border-radius: 14px;
    border-color: rgba(152, 162, 179, 0.38);
    padding-left: 18px;
    padding-right: 18px;
    background: rgba(255, 255, 255, 0.94);
}

.form-control:focus {
    border-color: rgba(0, 49, 131, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(0, 49, 131, 0.12);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 3.5rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.95rem;
    transform: translateY(-50%);
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    background: transparent;
    color: var(--ts-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--ts-primary);
    background: rgba(0, 49, 131, 0.08);
    outline: none;
}

.password-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-primary {
    min-height: 58px;
    border-radius: 14px;
    background: var(--ts-primary);
    border-color: var(--ts-primary);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--ts-primary-dark);
    border-color: var(--ts-primary-dark);
}

.login-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 24px;
}

.remember-check .form-check-input {
    margin-top: 0;
    width: 1.1rem;
    height: 1.1rem;
    border-color: rgba(0, 49, 131, 0.3);
}

.remember-check .form-check-label,
.login-link,
.login-footer-note {
    font-size: 0.96rem;
}

.login-link {
    color: var(--ts-primary);
    text-decoration: none;
    font-weight: 600;
}

.login-link:hover {
    color: var(--ts-primary-dark);
}

.login-footer-note {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 49, 131, 0.08);
    color: var(--ts-muted);
    text-align: center;
}

.strong-link {
    font-weight: 700;
}

@media (min-width: 992px) and (max-width: 1280px) {
    .login-shell {
        grid-template-columns: minmax(380px, 520px) 1fr;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .login-panel-inner {
        max-width: 460px;
        padding: 2.25rem;
        border-radius: 28px;
    }

    .visual-panel {
        min-height: calc(100vh - 2.5rem);
        border-radius: 30px;
    }

    .visual-caption {
        left: 2.5rem;
        max-width: 340px;
    }

    .visual-caption p {
        font-size: 0.98rem;
        line-height: 1.65;
    }
}

@media (min-width: 992px) and (max-height: 860px) {
    .login-shell {
        gap: 1rem;
        padding: 1rem;
    }

    .login-panel {
        padding: 0.5rem;
    }

    .login-panel-inner {
        max-width: 440px;
        padding: 2rem 2rem 1.6rem;
        border-radius: 24px;
    }

    .login-brand {
        margin-bottom: 1.1rem !important;
    }

    .login-copy {
        margin-bottom: 1.5rem !important;
    }

    .login-logo {
        max-width: 190px;
    }

    .login-kicker {
        margin-bottom: 0.75rem;
        font-size: 0.78rem;
    }

    .login-title {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }

    .login-subtitle {
        font-size: 0.96rem;
        line-height: 1.55;
        max-width: 320px;
    }

    .form-control,
    .btn-primary {
        min-height: 52px;
    }

    .visual-panel {
        min-height: calc(100vh - 2rem);
    }

    .visual-caption {
        left: 2.25rem;
        max-width: 320px;
    }

    .visual-chip {
        margin-bottom: 1rem;
        padding: 8px 14px;
        font-size: 0.84rem;
    }

    .visual-caption h2 {
        font-size: clamp(1.9rem, 2.2vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .visual-caption p {
        font-size: 0.95rem;
        line-height: 1.6;
        max-width: 320px;
    }

    .login-footer-note {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

@media (max-width: 991.98px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        max-width: none;
    }

    .visual-panel {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 0;
    }

    .login-panel-inner {
        max-width: 100%;
        min-height: 100vh;
        padding: 2rem;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .login-subtitle {
        font-size: 0.98rem;
        line-height: 1.6;
    }
}

@media (max-width: 575.98px) {
    .login-panel-inner {
        padding: 1.35rem;
    }

    .login-title {
        font-size: 1.75rem;
        line-height: 1.15;
    }

    .form-label {
        font-size: 0.95rem;
    }

    .form-control {
        border-radius: 14px;
        font-size: 0.98rem;
        min-height: 54px;
    }

    .login-logo {
        max-width: 170px;
    }

    .login-subtitle {
        font-size: 0.98rem;
    }

    .btn-primary {
        min-height: 54px;
    }

    .login-actions-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-footer-note {
        text-align: left;
    }
}
