* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: #0f172a;
    overflow-x: hidden;
}

.crm-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background:
            radial-gradient(circle at top left, rgba(37,99,235,.25), transparent 32%),
            radial-gradient(circle at bottom right, rgba(124,58,237,.20), transparent 34%),
            #0f172a;
}

.crm-login-left {
    width: 55%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(28px, 4vh, 54px) clamp(36px, 4vw, 64px);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.crm-login-left::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    background: rgba(59,130,246,.14);
    filter: blur(120px);
    top: -160px;
    left: -120px;
    border-radius: 50%;
    pointer-events: none;
}

.crm-login-left::after {
    content: '';
    position: absolute;
    width: 460px;
    height: 460px;
    background: rgba(124,58,237,.13);
    filter: blur(120px);
    bottom: -150px;
    right: -120px;
    border-radius: 50%;
    pointer-events: none;
}

.crm-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    width: fit-content;
    margin-bottom: clamp(24px, 4vh, 46px);
}

.crm-brand-mark {
    width: clamp(40px, 4.5vh, 52px);
    height: clamp(40px, 4.5vh, 52px);
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 45px rgba(37,99,235,.35);
    animation: crmMailFly 2.8s ease-in-out infinite;
}

.crm-brand-mark i {
    color: #fff;
    font-size: clamp(18px, 2vh, 23px);
}

.crm-brand-text {
    font-size: clamp(28px, 3.5vh, 36px);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #ffffff, #93c5fd, #ffffff);
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: crmShine 3s linear infinite;
}

@keyframes crmShine {
    0% { background-position: -220% center; }
    100% { background-position: 220% center; }
}

@keyframes crmMailFly {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }

    35% {
        transform: translateX(7px) translateY(-4px) rotate(-6deg);
    }

    70% {
        transform: translateX(-3px) translateY(3px) rotate(4deg);
    }
}
.crm-topbar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(24px, 4vh, 46px);
}

.crm-topbar .crm-brand {
    margin-bottom: 0;
}

.crm-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-nav-link {
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all .25s ease;
}

.crm-nav-primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 16px 34px rgba(37,99,235,.28);
}

.crm-nav-secondary {
    color: #fff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(12px);
}

.crm-nav-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

.crm-content {
    position: relative;
    z-index: 2;
    max-width: 690px;
}

.crm-badge {
    display: inline-flex;
    align-items: center;
    padding: clamp(7px, 1vh, 10px) 18px;
    border-radius: 100px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: clamp(11px, 1.2vh, 13px);
    font-weight: 700;
    letter-spacing: .4px;
    margin-bottom: clamp(14px, 2.2vh, 26px);
    backdrop-filter: blur(10px);
}

.crm-content h1 {
    color: #fff;
    font-size: clamp(34px, 5.1vh, 52px);
    line-height: 1.08;
    font-weight: 800;
    margin: 0 0 clamp(14px, 2vh, 22px);
    letter-spacing: -1.5px;
}

.crm-content > p {
    color: rgba(255,255,255,.74);
    font-size: clamp(14px, 1.75vh, 17px);
    line-height: 1.65;
    margin: 0 0 clamp(18px, 3vh, 34px);
    max-width: 610px;
}

.crm-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.45vh, 16px);
    margin-bottom: clamp(18px, 3vh, 34px);
}

.crm-feature-item {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1.5vh, 18px);
    background: rgba(255,255,255,.065);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: clamp(16px, 2vh, 24px);
    padding: clamp(12px, 1.8vh, 22px);
    backdrop-filter: blur(12px);
    transition: all .25s ease;
}

.crm-feature-item:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,.42);
    background: rgba(255,255,255,.095);
}

.crm-feature-wide {
    grid-column: span 2;
}

.crm-feature-icon {
    width: clamp(40px, 4.7vh, 58px);
    height: clamp(40px, 4.7vh, 58px);
    min-width: clamp(40px, 4.7vh, 58px);
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 18px 35px rgba(37,99,235,.28);
}

.crm-feature-icon i {
    font-size: clamp(16px, 2vh, 24px);
}

.crm-feature-item h3 {
    color: #fff;
    font-size: clamp(13px, 1.55vh, 16px);
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.crm-feature-item p {
    color: rgba(255,255,255,.62);
    font-size: clamp(11px, 1.3vh, 13px);
    line-height: 1.45;
    margin: 0;
}

.crm-price-box {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: clamp(14px, 1.9vh, 20px) clamp(22px, 2.5vw, 28px);
    border-radius: 24px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 25px 60px rgba(37,99,235,.35);
}

.crm-price-box .price {
    color: #fff;
    font-size: clamp(30px, 4vh, 42px);
    font-weight: 800;
    line-height: 1;
}

.crm-price-box .text {
    color: rgba(255,255,255,.90);
    font-size: clamp(12px, 1.45vh, 14px);
    line-height: 1.5;
    font-weight: 500;
}

.crm-login-right {
    width: 45%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 4vw, 40px);
    position: relative;
}

.crm-login-card {
    width: 100%;
    max-width: 480px;
}

.crm-login-heading {
    text-align: center;
    margin-bottom: clamp(30px, 4vh, 44px);
}

.crm-login-title {
    font-size: clamp(30px, 4vh, 36px);
    font-weight: 800;
    color: #111827;
    margin-bottom: 0;
    letter-spacing: -0.8px;
}

.crm-form-control {
    height: clamp(54px, 6vh, 60px) !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    padding-left: 20px !important;
    font-size: 15px !important;
    transition: all .2s ease !important;
}

.crm-form-control:focus {
    border-color: #2563eb !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.10) !important;
}

.crm-login-button {
    height: clamp(54px, 6vh, 60px);
    border-radius: 16px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    border: none !important;
    transition: all .25s ease;
}

.crm-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(37,99,235,.25);
}

.crm-error-area {
    border-radius: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 14px 18px;
    margin-bottom: 25px;
    color: #dc2626;
    font-size: 14px;
}

@media(max-width: 1199px) and (min-width: 992px) {
    .crm-login-left {
        width: 58%;
        padding-left: 36px;
        padding-right: 36px;
    }

    .crm-login-right {
        width: 42%;
        padding: 30px;
    }

    .crm-feature-grid {
        grid-template-columns: 1fr;
    }

    .crm-feature-wide {
        grid-column: span 1;
    }
}

@media(max-height: 760px) and (min-width: 992px) {
    .crm-brand {
        margin-bottom: 18px;
    }

    .crm-content h1 {
        font-size: 32px;
    }

    .crm-content > p {
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .crm-feature-grid {
        gap: 8px;
        margin-bottom: 14px;
    }

    .crm-feature-item {
        padding: 10px;
    }

    .crm-feature-item p {
        display: none;
    }

    .crm-price-box {
        padding: 12px 18px;
    }
}

@media(max-width: 991px) {
    body {
        overflow-y: auto;
    }

    .crm-login-page {
        position: relative;
        overflow-x: hidden;
        overflow-y: visible;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        flex-direction: column;
        padding: 24px 16px;
        background:
                radial-gradient(circle at top left, rgba(37,99,235,.24), transparent 34%),
                radial-gradient(circle at bottom right, rgba(124,58,237,.18), transparent 36%),
                #0f172a;
    }

    .crm-login-page::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
                radial-gradient(circle at 20% 35%, rgba(37,99,235,.18), transparent 34%),
                radial-gradient(circle at 80% 70%, rgba(124,58,237,.16), transparent 36%);
        pointer-events: none;
        z-index: 0;
    }

    .crm-login-left {
        display: contents;
    }

    .crm-login-left::before,
    .crm-login-left::after {
        display: none;
    }

    .crm-brand {
        order: 1;
        width: 100%;
        justify-content: center;
        margin: 0 0 20px 0;
    }

    .crm-login-right {
        order: 2;
        width: 100%;
        min-height: auto;
        background: #ffffff;
        padding: 34px 22px 38px;
        border-radius: 22px;
        box-shadow: 0 24px 70px rgba(0,0,0,.28);
    }

    .crm-login-card {
        max-width: 100%;
    }

    .crm-login-heading {
        margin-bottom: 30px;
    }

    .crm-login-title {
        font-size: 30px;
    }

    .crm-content {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 30px 0 0 0;
        padding-bottom: 28px;
    }

    .crm-brand,
    .crm-login-right,
    .crm-content {
        position: relative;
        z-index: 1;
    }

    .crm-badge {
        font-size: 11px;
        padding: 8px 13px;
        margin-bottom: 18px;
    }

    .crm-content h1 {
        font-size: 28px;
        line-height: 1.18;
        margin-bottom: 16px;
        letter-spacing: -1px;
    }

    .crm-content > p {
        font-size: 14px;
        line-height: 1.65;
        margin-bottom: 22px;
    }

    .crm-feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    .crm-feature-wide {
        grid-column: span 1;
    }

    .crm-feature-item {
        padding: 15px;
        border-radius: 18px;
        gap: 13px;
        background: rgba(255,255,255,.075);
    }

    .crm-feature-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 14px;
    }

    .crm-feature-icon i {
        font-size: 17px;
    }

    .crm-feature-item h3 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .crm-feature-item p {
        font-size: 11px;
        line-height: 1.45;
        display: block;
    }

    .crm-price-box {
        width: 100%;
        justify-content: center;
        padding: 18px 20px;
        margin-bottom: 10px;
    }

    .crm-price-box .price {
        font-size: 34px;
    }

    .crm-price-box .text {
        font-size: 12px;
    }

    .crm-topbar {
        order: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-bottom: 20px;
    }

    .crm-topbar .crm-brand {
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    .crm-nav-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .crm-nav-link {
        width: 100%;
        height: 42px;
        font-size: 12px;
    }

    .crm-login-right {
        order: 2;
    }

    .crm-content {
        order: 3;
    }
}

@media(max-width: 576px) {
    .crm-login-page {
        padding: 22px 14px 24px;
    }

    .crm-brand-text {
        font-size: 27px;
    }

    .crm-brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .crm-brand-mark i {
        font-size: 18px;
    }

    .crm-form-control {
        height: 54px !important;
    }

    .crm-login-button {
        height: 54px;
    }
}