:root {
    --login-bg: #f3f5f8;
    --login-panel: #ffffff;
    --login-sidebar: #111827;
    --login-sidebar-soft: #1f2937;
    --login-text: #172033;
    --login-muted: #667085;
    --login-border: #dfe5ee;
    --login-primary: #2563eb;
    --login-primary-dark: #1d4ed8;
    --login-danger: #b42318;
    --login-danger-bg: #fff1f2;
    --login-danger-border: #fecaca;
    --login-shadow:
        0 24px 70px
        rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--login-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(37, 99, 235, 0.08),
            transparent 30%
        ),
        var(--login-bg);
    color: var(--login-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.crm-login-page {
    display: grid;
    place-items: center;
    padding: 28px;
}

.crm-login-shell {
    display: grid;
    width: min(1160px, 100%);
    min-height: 690px;
    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(420px, 0.92fr);
    overflow: hidden;
    border: 1px solid
        rgba(15, 23, 42, 0.08);
    border-radius: 26px;
    background: var(--login-panel);
    box-shadow: var(--login-shadow);
}

.crm-login-brand-panel {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.95),
            rgba(17, 24, 39, 0.76)
        ),
        url("../images/banner-min.jpg")
        center / cover no-repeat;
    color: #ffffff;
}

.crm-login-brand-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(59, 130, 246, 0.42),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            transparent 45%,
            rgba(15, 23, 42, 0.64)
        );
}

.crm-login-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
}

.crm-login-brand,
.crm-login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.crm-login-brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid
        rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            #3b82f6,
            #1d4ed8
        );
    color: #ffffff;
    box-shadow:
        0 10px 28px
        rgba(37, 99, 235, 0.32);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.crm-login-brand strong,
.crm-login-mobile-brand strong {
    display: block;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.crm-login-brand small,
.crm-login-mobile-brand small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-login-pitch {
    max-width: 490px;
    padding: 60px 0;
}

.crm-login-eyebrow {
    display: block;
    margin-bottom: 13px;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.crm-login-pitch h1 {
    max-width: 500px;
    margin: 0;
    color: #ffffff;
    font-size:
        clamp(38px, 4.4vw, 58px);
    font-weight: 850;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.crm-login-pitch p {
    max-width: 470px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 16px;
    line-height: 1.7;
}

.crm-login-brand-footer {
    color: rgba(255, 255, 255, 0.54);
    font-size: 12px;
    font-weight: 650;
}

.crm-login-form-panel {
    display: grid;
    place-items: center;
    padding: 56px;
    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fbfcfe
        );
}

.crm-login-form-wrap {
    width: min(100%, 410px);
}

.crm-login-mobile-brand {
    display: none;
    margin-bottom: 38px;
}

.crm-login-mobile-brand strong {
    color: var(--login-text);
}

.crm-login-mobile-brand small {
    color: var(--login-muted);
}

.crm-login-heading {
    margin-bottom: 30px;
}

.crm-login-heading h2 {
    margin: 0;
    color: var(--login-text);
    font-size:
        clamp(29px, 3vw, 37px);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.crm-login-heading p {
    margin: 12px 0 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.65;
}

.crm-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 22px;
    padding: 13px 14px;
    border: 1px solid
        var(--login-danger-border);
    border-radius: 11px;
    background:
        var(--login-danger-bg);
    color: #991b1b;
    font-size: 13px;
    line-height: 1.5;
}

.crm-login-alert-icon {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #fee2e2;
    color: var(--login-danger);
    font-size: 12px;
    font-weight: 900;
}

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

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

.crm-login-field label {
    color: #344054;
    font-size: 13px;
    font-weight: 750;
}

.crm-login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crm-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.crm-login-input-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    display: grid;
    width: 20px;
    place-items: center;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 800;
    pointer-events: none;
}

.crm-login-input-wrap input {
    width: 100%;
    min-height: 52px;
    padding: 12px 78px 12px 45px;
    border: 1px solid
        var(--login-border);
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--login-text);
    box-shadow:
        0 1px 2px
        rgba(16, 24, 40, 0.03);
    font-size: 14px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.crm-login-input-wrap input[type="email"] {
    padding-right: 14px;
}

.crm-login-input-wrap input::placeholder {
    color: #98a2b3;
}

.crm-login-input-wrap input:hover {
    border-color: #c7d2e1;
}

.crm-login-input-wrap input:focus {
    border-color: var(--login-primary);
    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, 0.12);
}

.crm-password-toggle {
    position: absolute;
    right: 8px;
    min-width: 58px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--login-primary);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.crm-password-toggle:hover {
    background: #eff6ff;
}

.crm-password-toggle:focus-visible {
    outline: 3px solid
        rgba(37, 99, 235, 0.22);
    outline-offset: 1px;
}

.crm-login-submit {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    margin-top: 3px;
    padding: 13px 17px;
    border: 0;
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            var(--login-primary),
            var(--login-primary-dark)
        );
    color: #ffffff;
    box-shadow:
        0 10px 24px
        rgba(37, 99, 235, 0.24);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.crm-login-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px
        rgba(37, 99, 235, 0.29);
}

.crm-login-submit:active {
    transform: translateY(0);
}

.crm-login-submit:focus-visible {
    outline: 4px solid
        rgba(37, 99, 235, 0.2);
    outline-offset: 3px;
}

.crm-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 27px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 650;
}

.crm-login-security-icon {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: #ecfdf3;
    color: #15803d;
    font-size: 10px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .crm-login-page {
        padding: 20px;
    }

    .crm-login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .crm-login-brand-panel {
        display: none;
    }

    .crm-login-form-panel {
        min-height: min(680px, calc(100vh - 40px));
        padding: 48px 38px;
    }

    .crm-login-mobile-brand {
        display: flex;
    }
}

@media (max-width: 520px) {
    .crm-login-page {
        display: block;
        padding: 0;
        background: #ffffff;
    }

    .crm-login-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .crm-login-form-panel {
        min-height: 100vh;
        align-items: start;
        padding: 34px 23px;
    }

    .crm-login-form-wrap {
        padding-top: 10px;
    }

    .crm-login-mobile-brand {
        margin-bottom: 52px;
    }

    .crm-login-heading {
        margin-bottom: 27px;
    }

    .crm-login-heading h2 {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behaviour: auto !important;
        transition: none !important;
    }
}
