:root {
    --background: #fbf9f5;
    --surface: #ffffff;
    --surface-soft: #fdfbf8;
    --ink: #17191f;
    --muted: #68707d;
    --border: #e5e2de;
    --border-strong: #d7d3ce;
    --brand: #c95b45;
    --brand-hover: #b84d39;
    --brand-focus: rgba(201, 91, 69, 0.18);
    --green: #4d9560;
    --green-soft: #edf6ef;
    --coral-soft: #fae8e5;
    --gold: #d59620;
    --gold-soft: #fbf2df;
    --violet: #a05899;
    --violet-soft: #f6e9f4;
    --shadow: 0 22px 60px rgba(66, 49, 36, 0.09), 0 2px 8px rgba(66, 49, 36, 0.04);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: "Inter", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: minmax(520px, 51%) minmax(520px, 49%);
}

.login-column {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 54px 52px 46px;
    background-color: #fff8f5;
}

.login-column::before {
    position: absolute;
    top: 50%;
    right: 0;
    width: min(134%, 1260px);
    aspect-ratio: 1;
    background: url('../img/ovillo-rosa-claro-6895df2c7a87e.webp') center / contain no-repeat;
    content: "";
    pointer-events: none;
    transform: translate(50%, -50%);
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(638px, 100%);
    padding: 47px 90px 45px 103px;
    border: 1px solid rgba(220, 216, 211, 0.78);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.brand-lockup {
    display: flex;
    justify-content: center;
    height: 112px;
    margin-bottom: 8px;
}

.brand-lockup img {
    display: block;
    width: min(340px, 100%);
    height: 112px;
    object-fit: contain;
}

.login-heading {
    margin: 0 0 34px;
}

.login-heading h1 {
    margin: 0;
    font-size: clamp(28px, 2.2vw, 34px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.login-heading p {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -13px 0 18px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.45;
}

.alert-error {
    border: 1px solid #f1c9c1;
    background: #fff3f0;
    color: #9d3c2b;
}

.alert-success {
    border: 1px solid #bfddc6;
    background: #f0f8f2;
    color: #327344;
}

.form-group + .form-group {
    margin-top: 21px;
}

.form-group > label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-shell > i {
    position: absolute;
    left: 18px;
    color: #a5aab1;
    font-size: 16px;
    pointer-events: none;
}

.input-shell input {
    width: 100%;
    height: 57px;
    padding: 0 50px 0 52px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    outline: 0;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-shell input::placeholder {
    color: #aab0ba;
}

.input-shell input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-focus);
}

.password-toggle {
    position: absolute;
    right: 8px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #a5aab1;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #f4f2ef;
    color: var(--ink);
    outline: none;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 21px;
    font-size: 13px;
}

.remember-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.remember-control input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--brand);
}

.primary-button,
.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    min-height: 57px;
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button {
    margin-top: 36px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: white;
    box-shadow: 0 10px 25px rgba(201, 91, 69, 0.22);
}

.primary-button:hover {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
    transform: translateY(-1px);
}

.primary-button:focus-visible,
.google-button:focus-visible {
    outline: 3px solid var(--brand-focus);
    outline-offset: 2px;
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 27px 0 20px;
    color: #989da5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-button {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
}

.google-button img {
    width: 20px;
    height: 20px;
}

.google-button:hover {
    border-color: #b8b4af;
    background: #faf9f7;
    box-shadow: 0 7px 20px rgba(66, 49, 36, 0.08);
    transform: translateY(-1px);
}

.information-column {
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(229, 226, 222, 0.58);
    padding: 64px 8.2% 50px 7.1%;
    background: rgba(255, 255, 255, 0.35);
}

.information-content {
    width: min(580px, 100%);
}

.security-intro {
    display: flex;
    gap: 20px;
    padding-bottom: 39px;
    border-bottom: 1px solid var(--border);
}

.security-intro h2 {
    margin: 11px 0 13px;
    font-size: 17px;
    line-height: 1.25;
}

.security-intro p,
.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.feature-icon {
    display: grid;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    font-size: 20px;
}

.feature-icon-green { background: var(--green-soft); color: var(--green); }
.feature-icon-coral { background: var(--coral-soft); color: var(--brand); }
.feature-icon-gold { background: var(--gold-soft); color: var(--gold); }
.feature-icon-violet { background: var(--violet-soft); color: var(--violet); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 36px;
}

.feature-card {
    min-height: 183px;
    padding: 18px 18px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 7px 20px rgba(58, 48, 39, 0.025);
}

@media (min-width: 1181px) {
    .login-card {
        transform: translate(50px, 18px);
    }

    .information-content {
        transform: translateY(30px);
    }
}

.feature-card .feature-icon {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.feature-card h3 {
    margin: 14px 0 7px;
    font-size: 15px;
    line-height: 1.25;
}

.roles-block {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.roles-block h3 {
    margin: 0 0 14px;
    font-size: 14px;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
}

.role-admin { background: var(--green-soft); color: #367547; }
.role-collections { background: var(--gold-soft); color: #a16d11; }
.role-operator { background: var(--coral-soft); color: #ae4937; }
.role-billing { background: #f3ede7; color: #746354; }

.page-footer {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 6.5%;
    border-top: 1px solid var(--border);
    color: #777c84;
    background: rgba(255, 255, 255, 0.38);
    font-size: 12px;
}

.page-footer > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-footer i {
    color: var(--green);
}

.page-footer p {
    margin: 0;
}

.goh-credit {
    display: flex;
    align-items: center;
    gap: 9px;
}

.goh-credit a {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.goh-credit a:hover {
    opacity: 0.82;
}

.goh-credit a:focus-visible {
    outline: 3px solid var(--brand-focus);
    outline-offset: 3px;
}

.goh-credit img {
    display: block;
    width: auto;
    height: 25px;
    object-fit: contain;
}

.footer-separator {
    color: #b5b0aa;
}

@media (max-width: 1180px) {
    .login-page {
        grid-template-columns: minmax(480px, 52%) minmax(430px, 48%);
    }

    .login-card {
        padding-right: 68px;
        padding-left: 68px;
    }

    .information-column {
        padding-right: 5%;
        padding-left: 5%;
    }
}

@media (max-width: 960px) {
    .login-page {
        display: block;
        min-height: auto;
    }

    .login-column {
        min-height: calc(100vh - 64px);
        padding: 36px 22px;
    }

    .login-column::before {
        right: 50%;
        width: auto;
        height: 134%;
        transform: translate(50%, -50%);
    }

    .information-column {
        display: none;
    }

    .page-footer {
        justify-content: center;
    }

    .page-footer > div {
        display: none;
    }
}

@media (max-width: 560px) {
    .login-column {
        align-items: flex-start;
        min-height: calc(100vh - 52px);
        padding: 16px 12px 24px;
    }

    .login-column::before {
        top: 10px;
        height: 129%;
        transform: translate(50%, 0);
    }

    .login-card {
        padding: 28px 22px 26px;
        border-radius: 13px;
    }

    .brand-lockup,
    .brand-lockup img {
        height: 88px;
    }

    .brand-lockup {
        margin-bottom: 5px;
    }

    .login-heading {
        margin-bottom: 26px;
    }

    .login-heading h1 {
        font-size: 27px;
    }

    .login-heading p {
        margin-top: 9px;
        font-size: 14px;
    }

    .form-options {
        align-items: flex-start;
        font-size: 12px;
    }

    .primary-button {
        margin-top: 28px;
    }

    .page-footer {
        min-height: 52px;
        padding: 0 12px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.recovery-page {
    min-height: 100vh;
}

.recovery-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.recovery-card {
    max-width: 590px;
}

.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.auth-back-link:hover {
    color: var(--brand);
}

.development-reset-link {
    display: block;
    padding: 13px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface);
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}
