
/* =========================================
   AUTHENTICATION
========================================= */

.auth-page {
    min-height: 100vh;
    background: #fff;
}

.auth-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.auth-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.back-home {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.back-home:hover,
.forgot-back:hover {
    color: var(--green-800);
}

.back-home span {
    margin-right: 7px;
}

.auth-main {
    min-height: calc(100vh - 77px);
    padding: 35px 24px;
    background: #fbfcfb;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    width: min(1080px, 100%);
    min-height: 650px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(23, 33, 27, 0.04);
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px clamp(28px, 5vw, 64px);
}

.auth-view {
    display: none;
}

.auth-view.active {
    display: block;
    animation: authFade 0.22s ease;
}

@keyframes authFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-kicker {
    color: var(--green-800);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.auth-heading h1 {
    margin-top: 12px;
    color: var(--green-950);
    font-size: clamp(27px, 3vw, 35px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -1.1px;
}

.auth-heading > p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

.auth-view form {
    margin-top: 28px;
}

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

.form-field label {
    display: block;
    margin-bottom: 8px;
    color: #28372c;
    font-size: 11px;
    font-weight: 700;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.label-row label {
    margin-bottom: 8px;
}

.form-field input {
    display: block;
    width: 100%;
    height: 47px;
    padding: 0 13px;
    background: #fff;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    outline: none;
    color: var(--ink);
    font-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input::placeholder {
    color: #a1aaa3;
}

.form-field input:focus {
    border-color: var(--green-700);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.10);
}

.form-field input[aria-invalid="true"] {
    border-color: #dc2626;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 65px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 5px;
    background: transparent;
    border: 0;
    color: var(--green-800);
    font-size: 10px;
    font-weight: 700;
    transform: translateY(-50%);
    cursor: pointer;
}

.text-link {
    padding: 0;
    background: none;
    border: 0;
    color: var(--green-800);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.text-link:hover {
    color: var(--green-950);
    text-decoration: underline;
}

.field-hint,
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.6;
}

.field-hint {
    color: var(--muted);
}

.field-error {
    color: #b91c1c;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 49px;
    margin-top: 6px;
    padding: 0 16px;
    background: var(--green-800);
    border: 1px solid var(--green-800);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
    background: var(--green-900);
    transform: translateY(-1px);
}

.auth-submit:focus-visible {
    outline: 3px solid #86efac;
    outline-offset: 3px;
}

.form-message {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.7;
}

.form-message:empty {
    display: none;
}

.form-message.error {
    color: #b91c1c;
}

.form-message.success {
    color: var(--green-800);
}

.auth-switch {
    margin-top: 23px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.auth-switch .text-link {
    margin-left: 4px;
}

.auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 23px;
    margin-top: 27px;
    border-top: 1px solid #edf0ed;
    color: #7b857d;
    font-size: 10px;
}

.auth-security span {
    color: var(--green-800);
    font-size: 14px;
}

.forgot-back {
    display: inline-block;
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.forgot-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    background: var(--green-50);
    border: 1px solid #d8f0de;
    border-radius: 13px;
    color: var(--green-800);
    font-size: 23px;
}

/* Image panel */

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 650px;
    padding: 30px;
    overflow: hidden;
    background: var(--green-950);
    color: #fff;
}

.auth-photo,
.auth-image-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-photo {
    object-fit: cover;
    object-position: center;
}

.auth-image-overlay {
    background:
        linear-gradient(
            180deg,
            rgba(9, 35, 20, 0.22) 0%,
            rgba(9, 35, 20, 0.24) 25%,
            rgba(9, 35, 20, 0.93) 100%
        );
}

.auth-visual-top,
.auth-visual-content,
.auth-image-footer {
    position: relative;
    z-index: 1;
}

.visual-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    backdrop-filter: blur(10px);
}

.visual-pill span {
    width: 7px;
    height: 7px;
    background: var(--yellow);
    border-radius: 50%;
}

.auth-visual-content {
    padding-top: 120px;
    padding-bottom: 22px;
}

.visual-kicker {
    color: #b6f0c5;
}

.auth-visual-content h2 {
    margin-top: 14px;
    font-size: clamp(31px, 3.4vw, 43px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -1.5px;
}

.auth-visual-content > p {
    max-width: 350px;
    margin-top: 15px;
    color: #e0eae2;
    font-size: 12px;
    line-height: 1.9;
}

.visual-benefits {
    display: grid;
    gap: 12px;
    margin-top: 27px;
}

.visual-benefits div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
}

.visual-benefits div span {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 50%;
    color: #c5f6d1;
    font-size: 10px;
}

.auth-image-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 19px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: #e0eae2;
    font-size: 9px;
}

.auth-image-footer span:first-child {
    font-weight: 800;
    letter-spacing: 1.2px;
}

/* Tablet */

@media (max-width: 850px) {
    .auth-main {
        padding: 25px 18px;
    }

    .auth-layout {
        grid-template-columns: 1fr 0.85fr;
    }

    .auth-form-panel {
        padding: 38px 27px;
    }

    .auth-visual {
        padding: 24px;
    }

    .auth-visual-content h2 {
        font-size: 32px;
    }
}

/* Mobile */

@media (max-width: 650px) {
    .auth-nav {
        min-height: 68px;
    }

    .back-home {
        font-size: 10px;
    }

    .auth-main {
        min-height: auto;
        padding: 18px 14px 30px;
    }

    .auth-layout {
        display: flex;
        flex-direction: column;
        border-radius: 16px;
    }

    .auth-form-panel {
        order: 1;
        padding: 34px 23px 25px;
    }

    .auth-visual {
        order: 2;
        min-height: 330px;
        padding: 22px;
    }

    .auth-visual-content {
        padding-top: 50px;
        padding-bottom: 20px;
    }

    .auth-visual-content h2 {
        font-size: 29px;
    }

    .auth-visual-content > p {
        font-size: 11px;
    }

    .visual-benefits {
        gap: 9px;
        margin-top: 20px;
    }

    .auth-image-footer {
        font-size: 8px;
    }

    .auth-heading h1 {
        font-size: 29px;
    }

    .auth-heading > p {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-view.active {
        animation: none;
    }
}
