:root {
    --ink: #172431;
    --muted: #687784;
    --line: #d8e0e5;
    --gold: #c79b46;
    --gold-dark: #a87826;
    --paper: #ffffff;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--ink);
    background: #e8edf0;
    font-family: "Montserrat", Arial, sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(420px, .7fr);
    min-height: 100vh;
}

.brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(12, 24, 34, .08), rgba(12, 24, 34, .2)),
        url("../images/fersoft-login-background.png") center center / cover no-repeat;
}

.brand-panel__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 58%, rgba(12, 23, 32, .75) 100%),
        linear-gradient(90deg, transparent 70%, rgba(12, 23, 32, .24) 100%);
}

.brand-panel__caption {
    position: absolute;
    z-index: 1;
    right: 6%;
    bottom: 6%;
    left: 7%;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.brand-panel__caption span {
    max-width: 330px;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: 500;
    line-height: 1.45;
}

.brand-panel__caption strong {
    color: #f1d28d;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-align: right;
    text-transform: uppercase;
}

.access-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(32px, 5vw, 80px);
    background:
        radial-gradient(circle at 100% 0, rgba(199, 155, 70, .13), transparent 32%),
        var(--paper);
}

.access-card {
    width: min(100%, 440px);
}

.access-card__header {
    margin-bottom: 28px;
}

.brand-logo {
    display: block;
    width: 96px;
    height: 96px;
    margin-bottom: 26px;
    border: 1px solid rgba(23, 36, 49, .12);
    border-radius: 50%;
    box-shadow: 0 14px 32px rgba(20, 33, 44, .17);
    object-fit: cover;
}

.eyebrow {
    margin: 0 0 9px;
    color: var(--gold-dark);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
}

h1 {
    margin: 0 0 9px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.6;
}

.register-link {
    display: block;
    margin: -10px 0 22px;
    color: var(--muted);
    font-size: .82rem;
    text-decoration: none;
}

.register-link strong,
.form-options a {
    color: var(--gold-dark);
}

.status-message {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .82rem;
}

.status-message--success {
    color: #166534;
    background: #dcfce7;
}

.status-message--error {
    color: var(--danger);
    background: #fee4e2;
}

.form-field {
    margin-bottom: 19px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: .78rem;
    font-weight: 700;
}

.input-shell {
    position: relative;
}

.input-shell input {
    width: 100%;
    height: 56px;
    padding: 0 50px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: #f9fbfc;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-shell input::placeholder {
    color: #98a3ad;
}

.input-shell input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(199, 155, 70, .14);
    background: #fff;
}

.input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 18px;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
}

.input-icon--user {
    border: 2px solid #667681;
    border-radius: 50%;
}

.input-icon--user::after {
    position: absolute;
    top: 12px;
    left: -5px;
    width: 23px;
    height: 11px;
    border: 2px solid #667681;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    content: "";
}

.input-icon--lock {
    top: 30px;
    height: 14px;
    border: 2px solid #667681;
    border-radius: 3px;
}

.input-icon--lock::before {
    position: absolute;
    top: -10px;
    left: 2px;
    width: 9px;
    height: 10px;
    border: 2px solid #667681;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    content: "";
}

.input-icon--email {
    width: 19px;
    height: 14px;
    border: 2px solid #667681;
    border-radius: 3px;
}

.input-icon--email::after {
    position: absolute;
    top: -1px;
    left: 2px;
    width: 11px;
    height: 11px;
    transform: rotate(45deg);
    border-right: 2px solid #667681;
    border-bottom: 2px solid #667681;
    content: "";
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.password-toggle span {
    position: absolute;
    top: 13px;
    left: 8px;
    width: 22px;
    height: 13px;
    border: 2px solid #667681;
    border-radius: 50% / 60%;
}

.password-toggle span::after {
    position: absolute;
    top: 3px;
    left: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #667681;
    content: "";
}

.form-field--error input {
    border-color: var(--danger);
}

.field-error {
    display: block;
    margin-top: 7px;
    color: var(--danger);
    font-size: .75rem;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 5px 0 26px;
    font-size: .76rem;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-dark);
}

.form-options a {
    font-weight: 600;
    text-decoration: none;
}

.login-button {
    display: flex;
    width: 100%;
    height: 56px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #263746, #172431);
    box-shadow: 0 12px 25px rgba(23, 36, 49, .22);
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 28px rgba(23, 36, 49, .28);
}

.login-button:focus-visible,
.password-toggle:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(199, 155, 70, .45);
    outline-offset: 3px;
}

.button-arrow {
    color: #f1d28d;
    font-size: 1.25rem;
}

.back-to-login {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
}

.back-to-login:hover {
    color: var(--gold-dark);
}

footer {
    margin-top: 32px;
    color: #8b969f;
    font-size: .66rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 960px) {
    .login-page {
        grid-template-columns: minmax(300px, .8fr) minmax(410px, 1fr);
    }

    .brand-panel {
        background-position: 42% center;
    }

    .brand-panel__caption {
        display: none;
    }
}

@media (max-width: 720px) {
    .login-page {
        display: block;
        min-height: 100vh;
        background:
            linear-gradient(rgba(13, 25, 35, .62), rgba(13, 25, 35, .74)),
            url("../images/fersoft-login-background.png") center / cover fixed;
    }

    .brand-panel {
        display: none;
    }

    .access-panel {
        min-height: 100vh;
        padding: 26px 18px;
        background: transparent;
    }

    .access-card {
        padding: 28px 24px;
        border: 1px solid rgba(255, 255, 255, .45);
        border-radius: 22px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
    }

    .brand-logo {
        width: 78px;
        height: 78px;
        margin-bottom: 20px;
    }
}

@media (max-width: 420px) {
    .access-card {
        padding: 24px 18px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
