/* Core Trade Max — Login page (scoped) */
.ctm-auth-login {
    --ctm-login-dark: #0F1729;
    --ctm-login-dark-2: #162033;
    --ctm-login-orange: #C8440C;
    --ctm-login-orange-light: #F97316;
    --ctm-login-text: #F8FAFC;
    --ctm-login-muted: #94A3B8;
    --ctm-login-border: rgba(148, 163, 184, 0.18);
    --ctm-login-card-bg: #FFFFFF;
    --ctm-login-input-bg: #F8FAFC;

    display: flex;
    min-height: 100vh;
    font-family: 'Inter', 'Maven Pro', system-ui, sans-serif;
    background: var(--ctm-login-dark);
}

/* ── Left brand panel ── */
.ctm-auth-login__brand {
    position: relative;
    flex: 0 0 46%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3.5rem;
    overflow: hidden;
    background: linear-gradient(145deg, #0F1729 0%, #162033 45%, #1a2744 100%);
}

.ctm-auth-login__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 100%);
    pointer-events: none;
}

.ctm-auth-login__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: ctmLoginGlow 8s ease-in-out infinite alternate;
}

.ctm-auth-login__glow--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: rgba(200, 68, 12, 0.35);
}

.ctm-auth-login__glow--2 {
    width: 320px;
    height: 320px;
    bottom: -60px;
    left: -60px;
    background: rgba(249, 115, 22, 0.2);
    animation-delay: -4s;
}

@keyframes ctmLoginGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    100% { transform: translate(20px, -15px) scale(1.08); opacity: 1; }
}

.ctm-auth-login__brand-inner {
    position: relative;
    z-index: 2;
    max-width: 440px;
    animation: ctmLoginFadeUp 0.7s ease both;
}

@keyframes ctmLoginFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-logo--login-panel {
    margin-bottom: 2.5rem;
}

.brand-logo--login-panel .brand-logo__core-trade {
    color: #FFFFFF;
}

.brand-logo--login-panel .brand-logo__max {
    color: #FB923C;
}

.brand-logo--login-panel .brand-logo__icon {
    height: 52px;
    max-height: 52px;
}

.brand-logo--login-panel .brand-logo__text {
    font-size: 1.5rem;
}

.ctm-auth-login__headline {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--ctm-login-text);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.ctm-auth-login__tagline {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ctm-login-muted);
    margin-bottom: 2.25rem;
}

.ctm-auth-login__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ctm-auth-login__features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.95rem;
    color: #CBD5E1;
    font-weight: 500;
}

.ctm-auth-login__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(200, 68, 12, 0.15);
    border: 1px solid rgba(200, 68, 12, 0.25);
    color: #FB923C;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ── Right form panel (admin-login style) ── */
.ctm-auth-login__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #0F1729;
    position: relative;
}

.ctm-auth-login__mobile-logo {
    margin-bottom: 1.5rem;
    animation: ctmLoginFadeUp 0.5s ease both;
}

.brand-logo--login-mobile .brand-logo__core-trade {
    color: #FFFFFF;
}

.brand-logo--login-mobile .brand-logo__max {
    color: #FB8931;
}

.ctm-auth-login__area {
    width: 100%;
    max-width: 480px;
    position: relative;
    animation: ctmLoginFadeUp 0.7s ease 0.1s both;
}

.ctm-auth-login__area::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -40px;
    top: -60px;
    border: 28px solid rgba(251, 137, 49, 0.15);
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

.ctm-auth-login__wrapper {
    position: relative;
    z-index: 1;
    background: #162032;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.ctm-auth-login__wrapper-top {
    padding: 2.5rem 1.75rem 2rem;
    text-align: center;
    background: #FB8931;
    position: relative;
    z-index: 1;
}

.ctm-auth-login__wrapper-top::after {
    content: "";
    position: absolute;
    bottom: -22px;
    left: 5px;
    right: 5px;
    z-index: -1;
    border-width: 22px 220px 0 220px;
    border-style: solid;
    border-color: #FB8931 transparent transparent transparent;
}

.ctm-auth-login__wrapper-top .title {
    font-size: 1.45rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.ctm-auth-login__wrapper-top .title strong {
    font-weight: 700;
}

.ctm-auth-login__wrapper-top p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    margin-bottom: 0;
    line-height: 1.55;
}

.ctm-auth-login__wrapper-body {
    padding: 2.75rem 2rem 2rem;
    background: #162032;
}

/* Form — admin dark style */
.ctm-auth-login__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ctm-auth-login__wrapper-body .form-group {
    margin-bottom: 0;
}

.ctm-auth-login__wrapper-body label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.45rem;
}

.ctm-auth-login__wrapper-body .form-control {
    height: 50px !important;
    background: #1A2332 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
    font-size: 0.95rem;
    padding: 0.65rem 1rem !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ctm-auth-login__wrapper-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.ctm-auth-login__wrapper-body .form-control:focus {
    background: #1A2332 !important;
    border-color: #FB8931 !important;
    box-shadow: 0 0 0 0.2rem rgba(251, 137, 49, 0.2) !important;
    color: #FFFFFF !important;
}

.ctm-auth-login__wrapper-body .custom--checkbox label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.88rem;
    cursor: pointer;
}

.ctm-auth-login__forgot {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: underline;
    transition: color 0.2s;
}

.ctm-auth-login__forgot:hover {
    color: #FFFFFF !important;
}

.ctm-auth-login__options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ctm-auth-login__options .custom--checkbox label {
    margin-bottom: 0;
}

.ctm-auth-login__submit {
    height: 50px !important;
    margin-top: 0.35rem;
    border: none !important;
    border-radius: 6px !important;
    background: #FB8931 !important;
    color: #FFFFFF !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.2s !important;
}

.ctm-auth-login__submit:hover,
.ctm-auth-login__submit:focus,
.ctm-auth-login__submit:active {
    background: #E97A2B !important;
    color: #FFFFFF !important;
    transform: none !important;
    box-shadow: none !important;
}

.ctm-auth-login__signup {
    text-align: center;
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 0.88rem;
    color: #94A3B8;
}

.ctm-auth-login__signup a {
    font-weight: 600;
    color: #FB8931 !important;
    text-decoration: none;
    margin-left: 0.25rem;
}

.ctm-auth-login__signup a:hover {
    color: #E97A2B !important;
    text-decoration: underline;
}

.ctm-auth-login__copyright {
    margin-top: 1.75rem;
    font-size: 0.78rem;
    color: #64748B;
    text-align: center;
}

.ctm-auth-login__captcha {
    margin: 0;
}

.ctm-auth-login__wrapper-body .my-2 {
    margin-bottom: 0.5rem !important;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .ctm-auth-login {
        flex-direction: column;
    }

    .ctm-auth-login__brand {
        display: none;
    }

    .ctm-auth-login__main {
        min-height: 100vh;
        background: #0F1729;
    }

    .ctm-auth-login__wrapper-top::after {
        display: none;
    }

    .ctm-auth-login__wrapper-body {
        padding: 2rem 1.25rem 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .ctm-auth-login__wrapper-top {
        padding: 2rem 1rem 1.5rem;
    }

    .ctm-auth-login__wrapper-top .title {
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    .ctm-auth-login__form-row {
        grid-template-columns: 1fr;
    }
}

/* ── Register page extras ── */
.ctm-auth-login--register .ctm-auth-login__main {
    padding: 1.5rem;
    justify-content: flex-start;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .ctm-auth-login--register .ctm-auth-login__main {
        justify-content: center;
    }
}

.ctm-auth-login--register .ctm-auth-login__area {
    max-width: 520px;
}

.ctm-auth-login__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ctm-auth-login__referral {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(251, 137, 49, 0.12);
    border: 1px solid rgba(251, 137, 49, 0.22);
    border-radius: 6px;
}

.ctm-auth-login__referral i {
    color: #FB8931;
    font-size: 1.1rem;
}

.ctm-auth-login__referral strong {
    color: #FB8931;
    font-weight: 700;
}

.ctm-auth-login__agree {
    margin-top: -0.25rem;
}

.ctm-auth-login__agree .custom--checkbox label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

.ctm-auth-login__agree .custom--checkbox label a {
    color: #FB8931;
    font-weight: 600;
    text-decoration: none;
}

.ctm-auth-login__agree .custom--checkbox label a:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .ctm-auth-login__form-row {
        grid-template-columns: 1fr;
    }
}
