.crm-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
    background: #fbfaff;
    color: #0f172a;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.crm-login-page,
.crm-login-page *,
.crm-login-page *::before,
.crm-login-page *::after {
    box-sizing: border-box;
}

.crm-login-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 48px;
    background:
        radial-gradient(circle at 18% 18%, rgba(79, 70, 229, 0.16), transparent 28%),
        linear-gradient(135deg, #efeaff 0%, #f7f4ff 48%, #ede9fe 100%);
}

.crm-login-preview {
    width: min(720px, 100%);
    aspect-ratio: 1.52;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #4338ca, #5b50ff);
    box-shadow: 0 28px 70px rgba(67, 56, 202, 0.28);
}

.crm-login-device {
    width: 82%;
    min-height: 68%;
    padding: 10px;
    border-radius: 14px;
    background: #0b1020;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.34);
}

.crm-login-device-screen {
    height: 100%;
    min-height: 260px;
    display: grid;
    grid-template-columns: 120px 1fr;
    overflow: hidden;
    border-radius: 10px;
    background: #f8f9fb;
}

.crm-login-device-nav {
    padding: 16px 12px;
    background: #111827;
}

.crm-login-device-dot {
    width: 56px;
    height: 8px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #5b50ff;
}

.crm-login-device-line {
    height: 8px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.crm-login-device-body {
    padding: 18px;
}

.crm-login-device-top {
    height: 18px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.crm-login-device-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.crm-login-device-card,
.crm-login-device-chart,
.crm-login-device-table {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.crm-login-device-card {
    height: 58px;
}

.crm-login-device-chart {
    height: 104px;
    background:
        linear-gradient(145deg, transparent 54%, rgba(91, 80, 255, 0.18) 55%),
        #ffffff;
}

.crm-login-device-table {
    height: 104px;
}

.crm-login-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(28px, 5vw, 76px);
    background: #ffffff;
}

.crm-login-card {
    width: 100%;
    max-width: 420px;
}

.crm-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.crm-login-brand img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 8px;
}

.crm-login-title {
    margin: 0;
    color: #0f172a;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.14;
}

.crm-login-subtitle {
    margin: 8px 0 26px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.crm-login-field {
    margin-bottom: 16px;
}

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

.crm-login-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.crm-login-forgot {
    margin-bottom: 7px;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.crm-login-forgot:hover,
.crm-login-forgot:focus {
    color: #3730a3;
    text-decoration: underline;
}

.crm-login-input-wrap {
    position: relative;
}

.crm-login-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.crm-login-pin-input {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-align: center;
}

.crm-login-input[type="password"],
.crm-login-input.has-toggle {
    padding-right: 44px;
}

.crm-login-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.crm-login-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 38px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    transform: translateY(-50%);
}

.crm-login-password-toggle:hover,
.crm-login-password-toggle:focus {
    background: #f1f5f9;
    color: #0f172a;
    outline: none;
}

.crm-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 22px;
}

.crm-login-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
}

.crm-login-check input {
    width: 14px;
    height: 14px;
    accent-color: #4f46e5;
}

.crm-login-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 16px 28px rgba(79, 70, 229, 0.22);
}

.crm-login-submit:hover,
.crm-login-submit:focus {
    background: #3730a3;
    outline: none;
}

.crm-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 18px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.crm-login-divider::before,
.crm-login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.crm-login-secondary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.crm-login-secondary {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #dbe3ee;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.crm-login-secondary:hover,
.crm-login-secondary:focus {
    border-color: #4f46e5;
    color: #4f46e5;
    text-decoration: none;
}

.crm-login-register {
    margin-top: 22px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.crm-login-register a {
    color: #4f46e5;
    font-weight: 800;
    text-decoration: none;
}

.crm-login-register a:hover,
.crm-login-register a:focus {
    text-decoration: underline;
}

.crm-login-support {
    margin-top: 34px;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
}

.crm-login-validation {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
}

.crm-login-validation ul {
    margin: 0;
    padding-left: 16px;
}

.crm-login-note {
    margin: 0 0 16px;
    padding: 11px 12px;
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.08);
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.crm-login-note-soft {
    background: #f8fafc;
    border-color: #dbe3ee;
    color: #475569;
}

.crm-login-stepper {
    display: grid;
    grid-template-columns: 28px 1fr 28px 1fr 28px;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
}

.crm-login-stepper span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
}

.crm-login-stepper span.is-active {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.18);
}

.crm-login-stepper i {
    height: 2px;
    border-radius: 999px;
    background: #e2e8f0;
}

.crm-login-field-error {
    display: block;
    margin-top: 6px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 920px) {
    .crm-login-page {
        grid-template-columns: 1fr;
    }

    .crm-login-media {
        display: none;
    }

    .crm-login-auth {
        min-height: 100vh;
        padding: 28px 18px;
    }
}
