html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background: #f8fafc;
    color: #172033;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

.auth-page a {
    color: #f6374f;
    text-decoration: none;
}

.auth-page a:hover,
.auth-page a:focus {
    color: #d42c42;
    text-decoration: none;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 44vw) minmax(420px, 1fr);
}

.auth-visual {
    display: flex;
    align-self: start;
    height: 100vh;
    min-height: 100vh;
    position: sticky;
    top: 0;
    padding: 46px;
    overflow: hidden;
    color: #fff;
    background-color: #1a253c;
    background-position: center;
    background-size: cover;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 22, 36, 0.78), rgba(26, 37, 60, 0.52) 48%, rgba(15, 22, 36, 0.82));
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
}

.auth-logo-block {
    display: inline-flex;
    width: 190px;
    max-width: 70%;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-radius: 8px;
    background: #fff;
}

.auth-logo-block img {
    display: block;
    max-height: 58px;
    width: auto;
}

.auth-visual-copy {
    max-width: 520px;
    margin-top: auto;
}

.auth-visual-copy h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 38px;
    font-weight: 600;
    line-height: 1.16;
}

.auth-visual-copy p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    line-height: 1.65;
}

.auth-contact-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.26);
}

.auth-contact-item {
    min-width: 0;
}

.auth-contact-item span {
    display: block;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    line-height: 1.35;
}

.auth-contact-item a,
.auth-contact-item strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.auth-main {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 56px 32px;
}

.portal-switch {
    position: absolute;
    top: 24px;
    right: 32px;
}

.portal-switch a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #cfd9e2;
    border-radius: 8px;
    background: #fff;
    color: #1a253c;
    font-size: 13px;
    font-weight: 600;
}

.portal-switch a:hover,
.portal-switch a:focus {
    border-color: #f6374f;
    color: #f6374f;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    border: 1px solid #dce4ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(18, 35, 49, 0.08);
}

.auth-card-header {
    padding: 30px 34px 18px;
    border-bottom: 1px solid #edf1f4;
}

.auth-card-logo {
    display: block;
    max-height: 58px;
    max-width: 178px;
    margin-bottom: 22px;
}

.auth-card-header h2 {
    margin: 0;
    color: #172033;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
}

.auth-card-header p {
    margin: 8px 0 0;
    color: #647284;
    font-size: 14px;
}

.auth-card-body {
    padding: 26px 34px 32px;
}

.auth-page .alert {
    margin: 0 0 18px;
    border-radius: 8px;
    font-size: 13px;
}

.auth-page .form-group {
    margin-bottom: 16px;
}

.auth-page label {
    display: block;
    margin: 0 0 7px;
    color: #314151;
    font-size: 13px;
    font-weight: 600;
}

.auth-page .form-control,
.auth-page input[type="text"].form-control,
.auth-page input[type="password"].form-control,
.auth-page input[type="email"].form-control,
.auth-page input[type="tel"].form-control {
    height: 46px;
    margin: 0;
    padding: 0 42px 0 13px;
    border: 1px solid #cbd6df;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    color: #172033;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 46px;
}

.auth-page .form-control:focus,
.auth-page input[type="text"].form-control:focus,
.auth-page input[type="password"].form-control:focus,
.auth-page input[type="email"].form-control:focus,
.auth-page input[type="tel"].form-control:focus {
    border-color: #f6374f;
    box-shadow: 0 0 0 3px rgba(246, 55, 79, 0.14);
    outline: 0;
}

.auth-page .form-control-feedback {
    top: 29px;
    right: 1px;
    width: 40px;
    height: 46px;
    color: #7c8994;
    line-height: 46px;
}

.auth-page .has-feedback .form-control {
    padding-right: 42px;
}

.auth-page .input-error {
    border-color: #c43d32 !important;
}

.auth-page .text-danger,
.auth-page .error-message {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 12px;
    font-weight: 500;
}

.auth-page button.btn,
.auth-primary-btn {
    width: 100%;
    height: 46px;
    margin: 2px 0 0;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: #f6374f;
    box-shadow: none;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 46px;
    text-shadow: none;
    transition: background-color 150ms ease;
}

.auth-page button.btn:hover,
.auth-page button.btn:focus,
.auth-primary-btn:hover,
.auth-primary-btn:focus {
    background: #d42c42;
    color: #fff;
    opacity: 1;
    outline: 0;
}

.auth-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.auth-form-footer a {
    color: #314151;
    font-size: 13px;
    font-weight: 600;
}

.demo-actions {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #edf1f4;
}

.demo-actions-title {
    margin: 0 0 2px;
    color: #647284;
    font-size: 13px;
}

.demo-action {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid #dce4ea;
    border-radius: 6px;
    background: #f8fafb;
    color: #172033 !important;
    font-size: 13px;
    font-weight: 600;
}

.demo-action:hover,
.demo-action:focus {
    border-color: #f6374f;
    background: #ffe5e8;
}

.demo-action i {
    color: #f6374f;
}

.auth-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 12px;
    align-items: end;
}

.auth-captcha-image {
    min-height: 46px;
}

.auth-captcha-image img {
    max-width: 100%;
    border-radius: 6px;
}

.catpcha {
    margin-left: 8px;
    color: #f6374f;
    cursor: pointer;
}

.auth-notices {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #edf1f4;
}

.auth-notices h3 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.auth-notice {
    padding: 11px 0;
    border-top: 1px solid #edf1f4;
}

.auth-notice:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.auth-notice h4 {
    margin: 0 0 5px;
    color: #314151;
    font-size: 13px;
    font-weight: 600;
}

.auth-notice p {
    margin: 0;
    color: #647284;
    font-size: 13px;
    line-height: 1.55;
}

.whatsapp-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.whatsapp-panel {
    width: 248px;
    padding: 14px;
    border: 1px solid #dce4ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(18, 35, 49, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 150ms ease, transform 150ms ease;
}

.whatsapp-widget:hover .whatsapp-panel,
.whatsapp-widget:focus-within .whatsapp-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.whatsapp-panel strong {
    display: block;
    color: #172033;
    font-size: 14px;
    line-height: 1.35;
}

.whatsapp-panel span {
    display: block;
    margin-top: 4px;
    color: #647284;
    font-size: 13px;
}

.whatsapp-button {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(18, 35, 49, 0.18);
}

.whatsapp-button:hover,
.whatsapp-button:focus {
    background: #1fb758;
    color: #fff !important;
}

.whatsapp-button i {
    font-size: 28px;
    line-height: 1;
}

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        position: relative;
        top: auto;
        height: auto;
        min-height: 340px;
        padding: 34px;
    }

    .auth-main {
        min-height: auto;
        padding: 72px 24px 40px;
    }
}

@media (max-width: 767px) {
    .auth-visual {
        min-height: 300px;
        padding: 28px 20px;
    }

    .auth-visual-copy h1 {
        font-size: 28px;
    }

    .auth-visual-copy p {
        font-size: 14px;
    }

    .auth-contact-band {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .auth-main {
        padding: 78px 14px 28px;
    }

    .portal-switch {
        top: 20px;
        right: 14px;
    }

    .auth-card-header,
    .auth-card-body {
        padding-left: 22px;
        padding-right: 22px;
    }

    .auth-form-footer {
        display: block;
    }

    .auth-form-footer a {
        display: inline-block;
        margin-top: 12px;
    }

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

    .whatsapp-widget {
        right: 14px;
        bottom: 14px;
    }

    .whatsapp-panel {
        display: none;
    }
}
