.auth-page {
    min-height: calc(100vh - 86px);
    display: grid;
    place-items: start center;
    padding: 3rem 0 5rem;
}

.auth-shell {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
}

.auth-page-login .auth-shell { max-width: 560px; }

.auth-form-panel {
    padding: clamp(1.5rem, 4vw, 2.6rem);
    border: 1px solid #e2e8ec;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(23, 52, 75, 0.1);
}

.auth-panel-head {
    margin-bottom: 2rem;
}

.auth-back {
    display: inline-block;
    margin-bottom: 1.35rem;
    color: #5f6e79;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-back:hover { color: #17344b; }

.auth-panel-head h1 {
    margin: 0;
    color: #172331;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.auth-panel-head p {
    margin: 0.7rem 0 0;
    color: #66717c;
    font-size: 1rem;
    line-height: 1.65;
}

.auth-form { display: grid; gap: 1.1rem; }
.auth-grid { display: grid; gap: 1rem; }
.auth-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-field { display: grid; gap: 0.42rem; }

.auth-label {
    color: #2d3a46;
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-label span {
    color: #8a959e;
    font-size: 0.76rem;
    font-weight: 600;
}

.auth-page .form-input {
    width: 100%;
    min-height: 50px;
    padding: 0.85rem 0.95rem;
    border: 1px solid #d7e0e6;
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: #172331;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .form-input::placeholder { color: #98a1a9; }
.auth-page .form-input:focus { border-color: #527188; box-shadow: 0 0 0 4px rgba(23, 52, 75, 0.08); }

.auth-password-wrap { position: relative; }
.auth-password-wrap .form-input { padding-right: 3.3rem; }

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #60717f;
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle.is-active { background: #edf2f5; color: #17344b; }
.auth-password-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(23, 52, 75, 0.12); }
.auth-password-toggle svg { width: 18px; height: 18px; }

.auth-agreements {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 14px;
    background: #f5f8fa;
}

.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #44525e;
    font-size: 0.86rem;
    line-height: 1.45;
    cursor: pointer;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    color: #44525e;
    font-size: 0.88rem;
    cursor: pointer;
}

.auth-checkbox input { width: 17px; height: 17px; accent-color: #17344b; }

.auth-checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 0.12rem;
    accent-color: #17344b;
}

.auth-checkbox-label a,
.auth-footer-panel a { color: #17344b; font-weight: 700; text-underline-offset: 3px; }

.auth-submit { width: 100%; min-height: 52px; border-radius: 12px; }
.auth-submit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-footer-panel {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e5eaee;
    color: #66717c;
    text-align: center;
}

.auth-footer-panel p { margin: 0; }

.auth-error-box {
    padding: 0.85rem 1rem;
    border: 1px solid #e8c5c0;
    border-radius: 12px;
    background: #fff5f3;
    color: #8f4639;
}

.auth-error-box ul,
.auth-page .form-error ul { margin: 0; padding-left: 1.1rem; }
.auth-page .form-error { color: #a14639; font-size: 0.82rem; line-height: 1.45; }

@media (max-width: 720px) {
    .auth-page { min-height: 0; padding: 0.85rem 0 3rem; }
    .auth-shell { width: calc(100% - 24px); }
    .auth-form-panel { padding: 1.25rem; border-radius: 18px; }
    .auth-grid-two { grid-template-columns: 1fr; }
    .auth-panel-head { margin-bottom: 1.5rem; }
}
