/* ==========================================================
   RESET
========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================
   CLIENT LOGIN PAGE
========================================================== */

body.client-login-page {
    min-height: 100vh;

    color: #2d3448;
    background: #ffffff;

    font-family:
        "Montserrat",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.client-login-main {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;
}

.client-login-card {
    width: 100%;
    max-width: 560px;

    padding: 52px 46px 34px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.97),
            rgba(248, 248, 249, 0.98)
        );

    border: 1px solid #f0f0f2;
    border-radius: 30px;

    box-shadow:
        0 32px 85px rgba(31, 38, 55, 0.11),
        0 10px 30px rgba(31, 38, 55, 0.06);

    animation: clientLoginEnter 0.55s ease both;
}

@keyframes clientLoginEnter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================
   BRAND
========================================================== */

.client-login-header {
    margin-bottom: 30px;

    text-align: center;
}

.client-login-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;

    margin-bottom: 24px;
}

.client-login-brand-main {
    display: block;

    font-size: 58px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -3px;
}

.client-login-brand-dark {
    color: #2f3548;
}

.client-login-brand-accent {
    color: #ffb900;
}

.client-login-brand-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    margin-top: 10px;
    padding-left: 12px;

    color: #384056;

    font-size: 19px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 9px;
}

.client-login-brand-number {
    letter-spacing: 5px;
}

.client-login-header h1 {
    margin: 0;

    color: #30364a;

    font-size: 34px;
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.8px;
}

.client-login-header p {
    margin: 14px 0 0;

    color: #9499a5;

    font-size: 19px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.4px;
}

/* ==========================================================
   MESSAGES
========================================================== */

.client-login-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 16px;
    padding: 14px 16px;

    border-radius: 13px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;

    box-shadow:
        0 9px 22px rgba(31, 38, 55, 0.05);

    animation: clientMessageEnter 0.35s ease both;
}

.client-login-message i {
    margin-top: 2px;
}

.client-login-message--error {
    color: #a72d2d;
    background: #fff1f1;

    border: 1px solid #ffd3d3;
}

.client-login-message--success {
    color: #24703a;
    background: #effbf2;

    border: 1px solid #cbeed3;
}

@keyframes clientMessageEnter {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   FORM
========================================================== */

.client-login-form {
    width: 100%;
}

.client-login-hidden-field {
    position: absolute;
    top: auto;
    left: -10000px;

    width: 1px;
    height: 1px;

    padding: 0;

    opacity: 0;
    border: 0;

    overflow: hidden;
    pointer-events: none;

    clip: rect(0 0 0 0);
}

.client-login-field {
    margin-bottom: 14px;
}

/* ==========================================================
   INPUTS
========================================================== */

.client-login-input-box {
    position: relative;

    min-height: 76px;

    display: flex;
    align-items: center;

    padding: 10px 62px 10px 66px;

    background: #ffffff;

    border: 1px solid #ececf0;
    border-radius: 20px;

    box-shadow:
        0 12px 28px rgba(33, 40, 58, 0.07);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background-color 0.2s ease;
}

.client-login-input-box:hover {
    border-color: #e1e2e7;
}

.client-login-input-box:focus-within {
    background: #ffffff;
    border-color: #ffbd18;

    box-shadow:
        0 0 0 4px rgba(255, 185, 0, 0.13),
        0 15px 34px rgba(33, 40, 58, 0.09);

    transform: translateY(-1px);
}

.client-login-input-icon {
    position: absolute;
    top: 50%;
    left: 26px;

    width: 22px;

    color: #4a536b;

    font-size: 20px;
    text-align: center;

    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.client-login-input-box:focus-within
.client-login-input-icon {
    color: #efa900;

    transform:
        translateY(-50%)
        scale(1.05);
}

.client-login-input-content {
    min-width: 0;
    width: 100%;
}

.client-login-input-content label {
    display: block;

    margin-bottom: 3px;

    color: #596076;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.4px;

    cursor: text;
}

.client-login-input-content input {
    width: 100%;
    height: 27px;

    display: block;

    margin: 0;
    padding: 0;

    color: #252b3e;
    background: transparent;

    border: 0;
    border-radius: 0;
    outline: 0;

    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
}

.client-login-input-content input::placeholder {
    color: #b0b4bd;

    font-weight: 400;

    opacity: 1;
}

.client-login-password-toggle {
    position: absolute;
    top: 50%;
    right: 20px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #4d5670;
    background: transparent;

    border: 0;
    border-radius: 50%;

    font-size: 20px;
    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.client-login-password-toggle:hover {
    color: #eaa500;
    background: #fff8e5;

    transform:
        translateY(-50%)
        scale(1.04);
}

.client-login-password-toggle:active {
    transform:
        translateY(-50%)
        scale(0.96);
}

.client-login-password-toggle:focus-visible {
    outline: 3px solid rgba(255, 185, 0, 0.25);
    outline-offset: 2px;
}

/* ==========================================================
   OPTIONS
========================================================== */

.client-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin: 17px 4px 16px;
}

.client-login-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: #444c62;

    font-size: 15px;
    font-weight: 500;

    cursor: pointer;
    user-select: none;
}

.client-login-checkbox input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.client-login-checkbox-box {
    width: 30px;
    height: 30px;

    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;

    color: transparent;
    background: #ffffff;

    border: 1px solid #d9dbe1;
    border-radius: 10px;

    font-size: 13px;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.client-login-checkbox:hover
.client-login-checkbox-box {
    border-color: #efc55b;
}

.client-login-checkbox input:checked
+ .client-login-checkbox-box {
    color: #2f3548;
    background: #ffbd16;

    border-color: #ffbd16;

    box-shadow:
        0 7px 18px rgba(255, 185, 0, 0.25);
}

.client-login-checkbox input:focus-visible
+ .client-login-checkbox-box {
    outline: 3px solid rgba(255, 185, 0, 0.24);
    outline-offset: 2px;
}

.client-login-forgot {
    color: #d99a00;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;

    transition: color 0.2s ease;
}

.client-login-forgot:hover {
    color: #b47f00;
    text-decoration: underline;
}

/* ==========================================================
   MAIN BUTTON
========================================================== */

.client-login-submit {
    width: 100%;
    min-height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 12px 24px;

    color: #2c3347;
    background: #ffbd16;

    border: 0;
    border-radius: 16px;

    box-shadow:
        0 12px 24px rgba(255, 185, 0, 0.24);

    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.client-login-submit:hover {
    background: #ffc629;

    box-shadow:
        0 16px 30px rgba(255, 185, 0, 0.31);

    transform: translateY(-2px);
}

.client-login-submit:active {
    transform: translateY(0);
}

.client-login-submit:focus-visible {
    outline: 4px solid rgba(255, 185, 0, 0.25);
    outline-offset: 3px;
}

.client-login-submit:disabled {
    cursor: wait;
}

/* ==========================================================
   SUBMIT CONTENT AND LOADING
========================================================== */

.client-submit-content,
.client-submit-loading {
    width: 100%;

    align-items: center;
    justify-content: center;
    gap: 11px;
}

.client-submit-content {
    display: flex;
}

.client-submit-loading {
    display: none;
}

.client-login-submit.is-loading {
    cursor: wait;

    background: #ffbd16;

    box-shadow:
        0 8px 18px rgba(255, 185, 0, 0.18);

    opacity: 0.86;

    transform: none;
}

.client-login-submit.is-loading:hover {
    background: #ffbd16;

    box-shadow:
        0 8px 18px rgba(255, 185, 0, 0.18);

    transform: none;
}

.client-login-submit.is-loading
.client-submit-content {
    display: none;
}

.client-login-submit.is-loading
.client-submit-loading {
    display: flex;
}

.client-login-submit.is-loading
.fa-spinner {
    animation: clientSubmitSpinner 0.75s linear infinite;
}

@keyframes clientSubmitSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
   DIVIDER
========================================================== */

.client-login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;

    margin: 18px 10px 16px;
}

.client-login-divider span {
    height: 1px;

    background: #d4d5da;
}

.client-login-divider strong {
    color: #7e8290;

    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

/* ==========================================================
   SECONDARY BUTTON
========================================================== */

.client-login-secondary {
    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 11px 20px;

    color: #343a4d;
    background: #ffffff;

    border: 1px solid #dfe1e6;
    border-radius: 16px;

    box-shadow:
        0 8px 20px rgba(31, 38, 55, 0.05);

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.client-login-secondary i {
    font-size: 17px;
}

.client-login-secondary:hover {
    background: #fffaf0;
    border-color: #f2c860;

    box-shadow:
        0 11px 24px rgba(31, 38, 55, 0.07);

    transform: translateY(-1px);
}

.client-login-secondary:focus-visible {
    outline: 3px solid rgba(255, 185, 0, 0.22);
    outline-offset: 3px;
}

/* ==========================================================
   REGISTER LINK
========================================================== */

.client-login-register {
    margin-top: 22px;

    color: #626779;

    text-align: center;

    font-size: 15px;
    line-height: 1.45;
}

.client-login-register a {
    margin-left: 6px;

    color: #d99a00;

    font-weight: 700;
}

.client-login-register a:hover {
    color: #b47f00;
    text-decoration: underline;
}

/* ==========================================================
   FOOTER
========================================================== */

.client-login-footer {
    margin-top: 28px;

    text-align: center;
}

.client-login-footer span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: #999da8;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.client-login-footer i {
    color: #e5a400;
}

/* ==========================================================
   AUTOFILL
========================================================== */

.client-login-input-content input:-webkit-autofill,
.client-login-input-content input:-webkit-autofill:hover,
.client-login-input-content input:-webkit-autofill:focus {
    -webkit-text-fill-color: #252b3e;

    box-shadow:
        0 0 0 1000px #ffffff inset;

    transition:
        background-color 9999s ease-in-out 0s;
}

/* ==========================================================
   CLIENT REGISTER PAGE
========================================================== */

.client-register-card {
    max-width: 600px;
}

.client-register-page .client-login-header {
    margin-bottom: 26px;
}

.client-register-page .client-login-header h1 {
    font-size: 32px;
}

.client-register-page .client-login-header p {
    max-width: 430px;

    margin-right: auto;
    margin-left: auto;

    font-size: 16px;
    line-height: 1.55;
}

.client-register-form .client-login-field {
    margin-bottom: 12px;
}

.client-register-form .client-login-input-box {
    min-height: 70px;
}

/* ==========================================================
   PASSWORD STRENGTH
========================================================== */

.password-strength {
    margin: -2px 4px 13px;
}

.password-strength-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.password-strength-bar span {
    height: 4px;

    background: #dedfe3;

    border-radius: 999px;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.password-strength-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 7px;

    color: #898d99;

    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.password-strength-info strong {
    color: #777c89;

    font-weight: 700;

    transition: color 0.2s ease;
}

/* Слаба парола */

.password-strength--weak
.password-strength-bar span:nth-child(1) {
    background: #dc4c4c;

    transform: scaleY(1.15);
}

.password-strength--weak
.password-strength-info strong {
    color: #c63c3c;
}

/* Средна парола */

.password-strength--medium
.password-strength-bar span:nth-child(-n + 2) {
    background: #e99e22;

    transform: scaleY(1.15);
}

.password-strength--medium
.password-strength-info strong {
    color: #c98213;
}

/* Добра парола */

.password-strength--good
.password-strength-bar span:nth-child(-n + 3) {
    background: #75a94c;

    transform: scaleY(1.15);
}

.password-strength--good
.password-strength-info strong {
    color: #5f9138;
}

/* Силна парола */

.password-strength--strong
.password-strength-bar span {
    background: #2e9b5b;

    transform: scaleY(1.15);
}

.password-strength--strong
.password-strength-info strong {
    color: #237c47;
}

/* ==========================================================
   PASSWORD MATCH
========================================================== */

.password-match-message {
    min-height: 19px;

    display: flex;
    align-items: center;
    gap: 7px;

    margin: -4px 4px 10px;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;

    animation: clientPasswordMessageEnter 0.2s ease both;
}

.password-match-message:empty {
    min-height: 0;

    margin-bottom: 0;

    animation: none;
}

.password-match-message--success {
    color: #28834c;
}

.password-match-message--error {
    color: #c53c3c;
}

.password-match-message i {
    flex: 0 0 auto;
}

@keyframes clientPasswordMessageEnter {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   PASSWORD NOTE
========================================================== */

.client-register-password-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin: 2px 4px 17px;
    padding: 12px 14px;

    color: #737887;
    background: #f1f2f4;

    border: 1px solid #e5e6ea;
    border-radius: 12px;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.client-register-password-note i {
    flex: 0 0 auto;

    margin-top: 2px;

    color: #d99a00;
}

.client-register-login-link {
    margin-top: 20px;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 700px) {

    .client-login-main {
        padding: 28px 18px;
    }

    .client-login-card {
        max-width: 520px;

        padding: 44px 34px 30px;

        border-radius: 26px;
    }

    .client-login-brand-main {
        font-size: 52px;
    }

    .client-login-header h1 {
        font-size: 31px;
    }

    .client-login-header p {
        font-size: 17px;
    }

    .client-register-card {
        max-width: 540px;
    }

    .client-register-page .client-login-header h1 {
        font-size: 29px;
    }

    .client-register-page .client-login-header p {
        font-size: 15px;
    }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 480px) {

    .client-login-main {
        align-items: flex-start;

        padding: 18px 12px;
    }

    .client-login-card {
        max-width: none;

        padding: 34px 18px 25px;

        border-radius: 23px;

        box-shadow:
            0 18px 45px rgba(31, 38, 55, 0.09);
    }

    .client-login-header {
        margin-bottom: 25px;
    }

    .client-login-brand {
        margin-bottom: 21px;
    }

    .client-login-brand-main {
        font-size: 47px;
        letter-spacing: -2.5px;
    }

    .client-login-brand-sub {
        gap: 13px;

        margin-top: 9px;
        padding-left: 9px;

        font-size: 15px;
        letter-spacing: 7px;
    }

    .client-login-brand-number {
        letter-spacing: 3px;
    }

    .client-login-header h1 {
        font-size: 28px;
        line-height: 1.16;
    }

    .client-login-header p {
        margin-top: 11px;

        font-size: 16px;
    }

    .client-login-input-box {
        min-height: 72px;

        padding-right: 56px;
        padding-left: 58px;

        border-radius: 18px;
    }

    .client-login-input-icon {
        left: 21px;

        font-size: 18px;
    }

    .client-login-input-content label {
        font-size: 13px;
    }

    .client-login-input-content input {
        font-size: 15px;
    }

    .client-login-password-toggle {
        right: 13px;
    }

    .client-login-options {
        gap: 10px;

        margin-right: 2px;
        margin-left: 2px;
    }

    .client-login-checkbox {
        gap: 8px;

        font-size: 14px;
    }

    .client-login-checkbox-box {
        width: 28px;
        height: 28px;

        border-radius: 9px;
    }

    .client-login-forgot {
        font-size: 12px;
    }

    .client-login-submit {
        min-height: 54px;

        border-radius: 15px;

        font-size: 16px;
    }

    .client-login-divider {
        margin-right: 4px;
        margin-left: 4px;
    }

    .client-login-register {
        font-size: 14px;
    }

    .client-login-footer {
        margin-top: 24px;
    }

    /* Регистрация */

    .client-register-page .client-login-main {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .client-register-page .client-login-card {
        padding-top: 28px;
        padding-bottom: 23px;
    }

    .client-register-page .client-login-brand {
        margin-bottom: 17px;
    }

    .client-register-page .client-login-header {
        margin-bottom: 21px;
    }

    .client-register-page .client-login-header h1 {
        font-size: 25px;
    }

    .client-register-page .client-login-header p {
        margin-top: 9px;

        font-size: 14px;
        line-height: 1.45;
    }

    .client-register-form .client-login-input-box {
        min-height: 66px;
    }

    .password-strength {
        margin-right: 2px;
        margin-left: 2px;
    }

    .password-strength-info {
        font-size: 10px;
    }

    .password-match-message {
        margin-right: 2px;
        margin-left: 2px;

        font-size: 10px;
    }

    .client-register-password-note {
        margin-right: 2px;
        margin-left: 2px;
        padding: 11px 12px;

        font-size: 11px;
    }

    .client-register-page .client-login-submit {
        font-size: 14px;
    }
}

/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 360px) {

    .client-login-card {
        padding-right: 14px;
        padding-left: 14px;
    }

    .client-login-brand-main {
        font-size: 43px;
    }

    .client-login-header h1 {
        font-size: 25px;
    }

    .client-login-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-login-forgot {
        margin-left: 38px;
    }

    .client-login-register span,
    .client-login-register a {
        display: block;
    }

    .client-login-register a {
        margin-top: 4px;
        margin-left: 0;
    }

    .client-register-page .client-login-card {
        padding-top: 24px;
    }

    .client-register-page .client-login-header h1 {
        font-size: 23px;
    }

    .client-register-page .client-login-submit {
        padding-right: 14px;
        padding-left: 14px;

        font-size: 13px;
    }

    .client-submit-content,
    .client-submit-loading {
        gap: 8px;
    }
}

/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .client-login-card,
    .client-login-message,
    .password-match-message {
        animation: none;
    }

    .client-login-input-box,
    .client-login-input-icon,
    .client-login-password-toggle,
    .client-login-checkbox-box,
    .client-login-submit,
    .client-login-secondary,
    .password-strength-bar span,
    .password-strength-info strong {
        transition: none;
    }

    .client-login-submit.is-loading
    .fa-spinner {
        animation-duration: 1.5s;
    }
}