:root {
    --auth-green: #4a7c52;
    --auth-green-dark: #3b6542;
    --auth-red: #a4281d;
    --auth-text: #1a2420;
    --auth-muted: #4d5651;
    --auth-border: #d3d6d4;
}

.auth-card {
    width: 100%;
    max-width: 340px;
    background: #fff;
    color: var(--auth-text);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    margin-bottom: 24px;
}

.auth-card.wide {
    max-width: 420px;
}

.auth-body {
    padding: 22px 24px 18px;
}

.auth-body h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-sub {
    color: var(--auth-muted);
    margin: 2px 0 14px;
}

.field {
    margin-bottom: 9px;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.field input,
.field select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-text);
    font-size: 0.88rem;
    font-family: inherit;
}

.field select {
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%234d5651' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 18px center;
    padding-right: 42px;
}

.field input::placeholder {
    color: #8a918d;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 82, 0.18);
}

.field.invalid input,
.field.invalid select {
    border: 1.5px solid var(--auth-red);
}

.field-error {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--auth-red);
    font-size: 0.8rem;
    font-weight: 500;
}

.field.invalid .field-error {
    display: flex;
}

.field-error::before {
    content: "!";
    flex: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--auth-red);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
}

.link-green {
    color: var(--auth-green-dark);
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none;
}

.link-green:hover {
    text-decoration: underline;
}

.password-wrap {
    position: relative;
}

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

.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--auth-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.btn-primary {
    width: 100%;
    height: 38px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: var(--auth-green);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--auth-green-dark);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 24px;
    background: #fafafa;
    border-top: 1px solid #e4e6e5;
    color: var(--auth-muted);
}

.btn-outline {
    padding: 7px 11px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-text);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline:hover {
    background: #f3f4f3;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

@media (max-width: 560px) {
    .auth-body {
        padding: 30px 24px 26px;
    }

    .auth-footer {
        padding: 18px 24px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}
