:root {
    --crm-navy-950: #07172b;
    --crm-navy-900: #0a203b;
    --crm-navy-850: #0e294a;
    --crm-navy-800: #12345b;
    --crm-navy-700: #1a4576;

    --crm-orange-500: #eba23d;
    --crm-orange-400: #f3b65c;

    --crm-text-950: #081426;
    --crm-text-900: #0d192d;
    --crm-text-800: #1d2a40;
    --crm-text-700: #35435a;
    --crm-text-600: #526078;
    --crm-text-500: #748096;
    --crm-text-400: #97a1b2;

    --crm-border: #d6dce6;
    --crm-border-dark: #c9d1dd;
    --crm-bg: #eef1f5;
    --crm-white: #ffffff;
}

.crm-login-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--crm-text-900);
    background: var(--crm-bg);
    font-family: 'Poppins', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.crm-login-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #f2f4f7 0%,
            #f8f9fb 46%,
            #ebeff4 100%
        );
}

.crm-login-page::before {
    position: absolute;
    top: 0;
    left: 38%;
    width: 1px;
    height: 100%;
    content: '';
    transform: rotate(24deg);
    transform-origin: top;
    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(56, 73, 99, .08),
            transparent
        );
}

.crm-page-ring {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

.crm-page-ring-left {
    top: -330px;
    left: -390px;
    width: 800px;
    height: 800px;
    border: 1px solid rgba(38, 56, 84, .08);
    box-shadow:
        0 0 0 105px rgba(28, 50, 83, .018),
        0 0 0 215px rgba(28, 50, 83, .012);
}

.crm-page-ring-right {
    right: -390px;
    bottom: -500px;
    width: 850px;
    height: 850px;
    border: 1px solid rgba(38, 56, 84, .06);
    box-shadow:
        0 0 0 105px rgba(28, 50, 83, .012),
        0 0 0 215px rgba(28, 50, 83, .009);
}

.crm-dot-pattern {
    position: absolute;
    width: 120px;
    height: 160px;
    opacity: .2;
    background-image:
        radial-gradient(
            circle,
            #77839a 1.4px,
            transparent 1.6px
        );
    background-size: 17px 17px;
}

.crm-dot-pattern-left {
    top: 250px;
    left: -30px;
}

.crm-dot-pattern-right {
    right: -20px;
    bottom: 80px;
}

.crm-login-header {
    position: relative;
    z-index: 5;
    display: flex;
    width: min(calc(100% - 72px), 1480px);
    min-height: 112px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
}

.crm-login-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.crm-logo-symbol {
    position: relative;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .54);
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #173658,
            #07192e
        );
    box-shadow:
        0 15px 35px rgba(8, 26, 51, .22),
        inset 0 1px rgba(255, 255, 255, .18);
}

.crm-logo-symbol::before {
    position: absolute;
    width: 24px;
    height: 24px;
    content: '';
    border: 1.5px solid var(--crm-orange-500);
    border-radius: 5px;
}

.crm-logo-symbol span::before,
.crm-logo-symbol span::after {
    position: absolute;
    top: 50%;
    left: 50%;
    content: '';
    transform: translate(-50%, -50%);
    border-radius: 10px;
    background: var(--crm-orange-500);
}

.crm-logo-symbol span::before {
    width: 10px;
    height: 1.6px;
}

.crm-logo-symbol span::after {
    width: 1.6px;
    height: 10px;
}

.crm-logo-text {
    display: flex;
    flex-direction: column;
}

.crm-logo-text small {
    color: #25334b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
}

.crm-logo-text strong {
    margin-top: 1px;
    color: #0b1c36;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.crm-system-online {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-online-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #11b976;
    box-shadow:
        0 0 0 7px rgba(17, 185, 118, .13),
        0 0 20px rgba(17, 185, 118, .25);
}

.crm-online-copy strong,
.crm-online-copy small {
    display: block;
}

.crm-online-copy strong {
    color: #182437;
    font-size: 13px;
    font-weight: 700;
}

.crm-online-copy small {
    margin-top: 3px;
    color: #68758a;
    font-size: 11px;
    font-weight: 500;
}

.crm-login-main {
    position: relative;
    z-index: 3;
    display: grid;
    width: min(calc(100% - 72px), 1240px);
    flex: 1;
    margin: 0 auto;
    place-items: center;
    padding: 0 0 58px;
}

.crm-login-card {
    display: grid;
    width: 100%;
    min-height: 660px;
    overflow: hidden;
    grid-template-columns:
        minmax(430px, .96fr)
        minmax(520px, 1.04fr);
    border: 1px solid rgba(33, 49, 74, .08);
    border-radius: 27px;
    background: #fff;
    box-shadow:
        0 35px 100px rgba(20, 37, 64, .15),
        0 5px 18px rgba(20, 37, 64, .06);
}

.crm-brand-panel {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(
            145deg,
            #102c4d 0%,
            #0a213d 55%,
            #06172b 100%
        );
}

.crm-building-visual {
    position: absolute;
    z-index: 1;
    right: -105px;
    bottom: -30px;
    width: 610px;
    max-width: none;
    opacity: .64;
    pointer-events: none;
}

.crm-brand-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(5, 22, 42, .98) 0%,
            rgba(8, 29, 52, .85) 44%,
            rgba(8, 29, 52, .42) 100%
        ),
        linear-gradient(
            to bottom,
            rgba(10, 38, 68, .14),
            rgba(3, 15, 29, .42)
        );
}

.crm-brand-content {
    position: relative;
    z-index: 3;
    display: flex;
    height: 100%;
    flex-direction: column;
    padding: 63px 54px 43px;
}

.crm-brand-kicker {
    display: block;
    margin-bottom: 25px;
    color: var(--crm-orange-400);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.crm-brand-top h1 {
    max-width: 480px;
    margin: 0;
    color: #fff;
    font-size: clamp(44px, 4.3vw, 65px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.052em;
}

.crm-brand-top h1 span,
.crm-brand-top h1 strong {
    display: block;
}

.crm-brand-top h1 strong {
    color: var(--crm-orange-400);
    font-weight: 750;
}

.crm-brand-top p {
    max-width: 470px;
    margin: 25px 0 0;
    color: rgba(255, 255, 255, .75);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.85;
}

.crm-security-features {
    display: grid;
    max-width: 410px;
    margin-top: auto;
    margin-bottom: 54px;
    gap: 17px;
}

.crm-security-feature {
    display: flex;
    align-items: center;
    gap: 18px;
}

.crm-feature-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 15px;
    color: var(--crm-orange-400);
    background: rgba(255, 255, 255, .045);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .08),
        0 12px 25px rgba(0, 0, 0, .08);
}

.crm-feature-icon svg {
    width: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-feature-copy strong,
.crm-feature-copy small {
    display: block;
}

.crm-feature-copy strong {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.crm-feature-copy small {
    margin-top: 5px;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.crm-feature-divider {
    width: calc(100% - 76px);
    height: 1px;
    margin-left: 76px;
    background:
        linear-gradient(
            to right,
            rgba(255, 255, 255, .18),
            transparent
        );
}

.crm-brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 25px;
    border-top: 1px solid rgba(243, 182, 92, .55);
}

.crm-brand-footer strong {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
}

.crm-brand-footer span {
    color: rgba(255, 255, 255, .48);
    font-size: 11px;
    font-weight: 500;
}

.crm-form-panel {
    display: grid;
    place-items: center;
    padding: 62px clamp(55px, 5vw, 76px);
    background:
        linear-gradient(
            145deg,
            #fff 0%,
            #fdfdfd 100%
        );
}

.crm-form-container {
    width: min(100%, 520px);
}

.crm-form-heading {
    margin-bottom: 34px;
}

.crm-form-kicker {
    display: block;
    margin-bottom: 12px;
    color: #d78b24;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.crm-form-heading h2 {
    margin: 0;
    color: var(--crm-text-950);
    font-size: clamp(39px, 3.7vw, 55px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.055em;
}

.crm-form-heading h2 span {
    display: block;
}

.crm-form-heading p {
    max-width: 490px;
    margin: 16px 0 0;
    color: var(--crm-text-600);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.75;
}

.crm-login-form {
    display: grid;
    gap: 23px;
}

.crm-login-field {
    display: grid;
    gap: 10px;
}

.crm-field-label {
    color: var(--crm-text-900);
    font-size: 14px;
    font-weight: 700;
}

.crm-input-container {
    position: relative;
    display: block;
}

.crm-input-container input {
    width: 100%;
    height: 61px;
    padding: 0 55px;
    border: 1.5px solid var(--crm-border-dark);
    border-radius: 13px;
    color: var(--crm-text-900);
    background: #fbfcfd;
    font-size: 14px;
    font-weight: 500;
    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.crm-input-container input::placeholder {
    color: #8f99aa;
    opacity: 1;
}

.crm-input-container input:hover {
    border-color: #abb6c6;
}

.crm-input-container input:focus {
    border-color: #234d83;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(35, 77, 131, .11);
}

.crm-input-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 18px;
    width: 22px;
    transform: translateY(-50%);
    fill: none;
    stroke: #718098;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.crm-password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 12px;
    display: grid;
    width: 39px;
    height: 39px;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #728097;
    background: transparent;
    cursor: pointer;
}

.crm-password-toggle:hover {
    color: var(--crm-navy-800);
    background: #eef3f8;
}

.crm-password-toggle svg {
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-eye-closed {
    display: none;
}

.crm-password-toggle.is-visible .crm-eye-open {
    display: none;
}

.crm-password-toggle.is-visible .crm-eye-closed {
    display: block;
}

.crm-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
}

.crm-form-options a {
    color: #174b91;
    font-size: 13px;
    font-weight: 700;
}

.crm-form-options a:hover {
    text-decoration: underline;
}

.crm-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--crm-text-600);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.crm-remember-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.crm-checkbox-box {
    position: relative;
    width: 20px;
    height: 20px;
    border: 1.5px solid #bcc5d1;
    border-radius: 5px;
    background: #fff;
}

.crm-remember-label input:checked + .crm-checkbox-box {
    border-color: var(--crm-navy-800);
    background: var(--crm-navy-800);
}

.crm-remember-label input:checked +
.crm-checkbox-box::after {
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    content: '';
    transform: rotate(45deg);
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

.crm-submit-button {
    position: relative;
    display: flex;
    width: 100%;
    height: 66px;
    margin-top: 1px;
    align-items: center;
    justify-content: center;
    gap: 21px;
    overflow: hidden;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #0e3156 0%,
            #071b33 100%
        );
    box-shadow:
        0 17px 35px rgba(10, 34, 62, .23);
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.crm-submit-button::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    content: '';
    background:
        linear-gradient(
            90deg,
            var(--crm-orange-500),
            var(--crm-orange-400)
        );
}

.crm-submit-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 42px rgba(10, 34, 62, .29);
}

.crm-submit-button svg {
    width: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-security-warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid #d6dde6;
    border-radius: 12px;
    background: #f8fafc;
}

.crm-security-warning svg {
    width: 24px;
    flex: 0 0 24px;
    fill: none;
    stroke: var(--crm-navy-800);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-security-warning p {
    margin: 0;
    color: var(--crm-text-600);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.65;
}

.crm-form-security {
    display: flex;
    margin-top: 22px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--crm-text-500);
}

.crm-form-security > span:not(.crm-security-separator) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
}

.crm-form-security svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-security-separator {
    width: 1px;
    height: 20px;
    background: #d6dce5;
}

.crm-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: -10px 0 24px;
    padding: 14px 16px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
}

.crm-login-alert svg {
    width: 21px;
    flex: 0 0 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-login-alert-danger {
    color: #a83243;
    background: #fff0f2;
}

.crm-login-alert-success {
    color: #147457;
    background: #eaf8f2;
}

.crm-login-footer {
    position: relative;
    z-index: 4;
    display: flex;
    width: min(calc(100% - 72px), 1480px);
    min-height: 58px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    color: #69768a;
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 1180px) {
    .crm-login-card {
        grid-template-columns:
            minmax(380px, .9fr)
            minmax(470px, 1.1fr);
    }

    .crm-brand-content {
        padding-right: 40px;
        padding-left: 40px;
    }

    .crm-brand-top h1 {
        font-size: 50px;
    }

    .crm-form-panel {
        padding-right: 45px;
        padding-left: 45px;
    }
}

@media (max-width: 950px) {
    .crm-login-header,
    .crm-login-main,
    .crm-login-footer {
        width: min(calc(100% - 40px), 700px);
    }

    .crm-login-card {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .crm-brand-panel {
        min-height: 400px;
    }

    .crm-brand-content {
        padding: 45px;
    }

    .crm-brand-top h1 {
        font-size: 48px;
    }

    .crm-security-features {
        display: grid;
        margin-top: 40px;
        margin-bottom: 35px;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }

    .crm-feature-divider {
        display: none;
    }

    .crm-building-visual {
        right: -70px;
        width: 520px;
    }

    .crm-form-panel {
        padding: 55px;
    }
}

@media (max-width: 650px) {
    .crm-login-header,
    .crm-login-main,
    .crm-login-footer {
        width: calc(100% - 28px);
    }

    .crm-login-header {
        min-height: 86px;
    }

    .crm-logo-symbol {
        width: 46px;
        height: 46px;
    }

    .crm-logo-text small {
        font-size: 9px;
    }

    .crm-logo-text strong {
        font-size: 24px;
    }

    .crm-online-copy {
        display: none;
    }

    .crm-login-main {
        padding-bottom: 30px;
    }

    .crm-login-card {
        border-radius: 21px;
    }

    .crm-brand-panel {
        min-height: 270px;
    }

    .crm-brand-content {
        padding: 32px 27px;
    }

    .crm-brand-kicker {
        margin-bottom: 14px;
        font-size: 10px;
    }

    .crm-brand-top h1 {
        max-width: 360px;
        font-size: 36px;
    }

    .crm-brand-top p {
        max-width: 380px;
        margin-top: 16px;
        font-size: 13px;
    }

    .crm-security-features,
    .crm-brand-footer {
        display: none;
    }

    .crm-building-visual {
        right: -110px;
        bottom: -120px;
        width: 500px;
        opacity: .5;
    }

    .crm-form-panel {
        padding: 42px 27px;
    }

    .crm-form-heading {
        margin-bottom: 28px;
    }

    .crm-form-heading h2 {
        font-size: 36px;
    }

    .crm-form-heading p {
        font-size: 13px;
    }

    .crm-input-container input {
        height: 58px;
        font-size: 14px;
    }

    .crm-submit-button {
        height: 60px;
        font-size: 15px;
    }

    .crm-form-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-form-security {
        flex-wrap: wrap;
    }

    .crm-security-separator {
        display: none;
    }

    .crm-login-footer {
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 18px 0;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .crm-brand-top h1 {
        font-size: 31px;
    }

    .crm-brand-top p {
        display: none;
    }

    .crm-brand-panel {
        min-height: 205px;
    }

    .crm-form-panel {
        padding: 34px 20px;
    }

    .crm-form-heading h2 {
        font-size: 31px;
    }

    .crm-security-warning {
        padding: 14px;
    }
}
