/* MCM Auth - split screen modern (Login & Register) */
.auth-wrapper {
    padding: 100px 0 60px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #f1f5f9;
    background-image:
        radial-gradient(ellipse 750px 350px at 15% 10%, rgba(14,165,233,.08), transparent 60%),
        radial-gradient(ellipse 600px 300px at 90% 90%, rgba(245,158,11,.07), transparent 60%);
}
.auth-container {
    max-width: 840px;
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
}
.auth-split {
    display: flex;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(2,6,23,.07), 0 4px 12px rgba(2,6,23,.04);
    border: 1px solid rgba(226,232,240,.9);
    min-height: auto;
}
.auth-split.auth-anim {
    animation: authIn .55s cubic-bezier(.16,1,.3,1) both;
}
@keyframes authIn {
    from { opacity:0; transform: translateY(14px) scale(.985); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}

/* LEFT branding — foto MCM dengan overlay gelap */
.auth-branding {
    flex: 0 0 42%;
    max-width: 42%;
    background-color: #0c4a6e;
    color: #fff;
    padding: 30px 26px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-branding-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
}
/* Overlay gradient gelap untuk keterbacaan teks */
.auth-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(12, 74, 110, 0.82) 0%,
        rgba(14, 116, 144, 0.72) 50%,
        rgba(12, 74, 110, 0.88) 100%
    );
    z-index: 1;
    pointer-events: none;
}
.auth-branding::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.30) 100%
    );
    z-index: 1;
    pointer-events: none;
}
.auth-branding-deco {
    position:absolute;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.14);
    pointer-events:none;
    z-index: 2;
}
.auth-branding-deco.deco-1{ width:150px; height:150px; right:20px; bottom:50px; }
.auth-branding-deco.deco-2{ width:90px; height:90px; right:55px; bottom:85px; background: rgba(255,255,255,.07); border:none; }
.auth-branding-inner{ position:relative; z-index:2; }
.auth-brand-badge{
    display:inline-flex; align-items:center; gap:8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    padding:6px 12px 6px 8px;
    border-radius: 999px;
    font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
    margin-bottom:16px;
}
.auth-brand-badge img{ height:22px; width:auto; filter: brightness(0) invert(1); }
.auth-brand-title{
    color:#fff !important;
    font-size:1.32rem; line-height:1.3; font-weight:800;
    margin:0 0 10px; letter-spacing:-.015em;
}
.auth-brand-sub{
    color: rgba(255,255,255,.86);
    font-size:.83rem; line-height:1.55; margin:0 0 18px;
}
.auth-brand-features{
    list-style:none; padding:0; margin:0 0 20px;
    display:flex; flex-direction:column; gap:10px;
}
.auth-brand-features li{
    display:flex; align-items:flex-start; gap:10px;
    font-size:.8rem; line-height:1.45; color: rgba(255,255,255,.92);
}
.auth-brand-features li i{
    flex:0 0 28px; width:28px; height:28px;
    display:inline-flex; align-items:center; justify-content:center;
    background: rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.18);
    border-radius:8px; font-size:.78rem;
}
.auth-brand-visual{
    display:flex; align-items:center; gap:12px; margin-top:4px;
}
.auth-visual-card{
    width:58px; height:58px; border-radius:14px;
    background: rgba(255,255,255,.95); color:#0c4a6e;
    display:flex; align-items:center; justify-content:center;
    font-size:24px; box-shadow:0 8px 20px rgba(2,6,23,.14);
    transform: rotate(-6deg);
}
.auth-visual-card.small{
    width:44px; height:44px; font-size:17px; border-radius:12px;
    background: linear-gradient(135deg,#f59e0b,#fbbf24); color:#fff;
    transform: rotate(7deg); margin-left:-6px;
    box-shadow:0 8px 18px rgba(245,158,11,.3);
}
.auth-brand-foot{
    margin-top:16px; padding-top:14px;
    border-top:1px solid rgba(255,255,255,.15);
    display:flex; align-items:center; gap:8px;
    font-size:.73rem; color: rgba(255,255,255,.72);
}
.auth-brand-foot i{ color:#fbbf24; }

/* RIGHT form panel */
.auth-form-panel{
    flex: 1 1 58%;
    padding: 28px 28px 22px;
    display:flex; flex-direction:column; justify-content:center;
    background:#fff;
}
.auth-form-head{ margin-bottom:16px; }
.auth-form-head h3{
    font-size:1.32rem; font-weight:800; letter-spacing:-.015em;
    color:#0f172a; margin:0 0 4px;
}
.auth-form-head p{ font-size:.82rem; color:#64748b; margin:0; line-height:1.45; }
.auth-alert{
    border-radius:10px; padding:8px 12px; font-size:.8rem;
    border:1px solid #fecaca; background:#fef2f2; color:#b91c1c;
    margin-bottom:14px;
}
.auth-field{ margin-bottom:12px; }
.auth-field.mb-lg{ margin-bottom:16px; }
.auth-label{
    font-size:.75rem; font-weight:700; letter-spacing:.015em;
    color:#334155; margin-bottom:5px; display:flex; align-items:center; gap:5px;
}
.auth-label i{ color:#94a3b8; font-size:.75rem; }
.auth-input, .auth-input.form-control{
    border-radius:10px !important;
    padding:8px 12px !important;
    font-size:.86rem;
    border:1.5px solid #e2e8f0 !important;
    background:#fff !important;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}
.auth-input::placeholder{ color:#94a3b8; }
.auth-input:focus, .auth-input.form-control:focus{
    border-color:#0ea5e9 !important;
    box-shadow:0 0 0 3px rgba(14,165,233,.13) !important;
    background:#fff !important;
    outline:none;
}
.auth-input.is-invalid{
    border-color:#ef4444 !important;
    box-shadow:0 0 0 4px rgba(239,68,68,.11) !important;
}
.auth-input.is-valid{
    border-color:#22c55e !important;
    box-shadow:0 0 0 4px rgba(34,197,94,.10) !important;
}
.auth-input-group{
    display:flex; align-items:stretch;
}
.auth-input-group .auth-input{
    border-top-right-radius:0 !important; border-bottom-right-radius:0 !important;
    border-right:0 !important; flex:1 1 auto;
}
.auth-eye-btn{
    border:1.5px solid #e2e8f0; border-left:0 !important;
    background:#fff; color:#94a3b8;
    border-top-right-radius:12px; border-bottom-right-radius:12px;
    padding:0 14px; display:inline-flex; align-items:center; justify-content:center;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
    cursor:pointer;
}
.auth-eye-btn:hover{ color:#0ea5e9; background:#f8fafc; }
.auth-eye-btn:focus{ box-shadow:none; outline:none; }
.auth-input-group:focus-within .auth-eye-btn{
    border-color:#0ea5e9; box-shadow:0 0 0 4px rgba(14,165,233,.13);
}
.auth-input-group:focus-within .auth-input{ box-shadow:none !important; }
.auth-feedback{
    font-size:.74rem; line-height:1.4; margin-top:7px;
    color:#ef4444; display:none;
}
.auth-feedback.show{ display:block; }
.auth-feedback.ok{ color:#16a34a; }
.auth-hint{ font-size:.72rem; color:#94a3b8; margin-top:6px; line-height:1.4; }

/* password strength */
.pw-strength{ display:flex; gap:6px; margin-top:10px; }
.pw-strength span{ height:4px; flex:1; border-radius:999px; background:#e2e8f0; transition: background .25s ease, opacity .25s; }
.pw-strength-label{ font-size:.73rem; font-weight:700; min-height:1.1em; margin-top:6px; letter-spacing:.02em; }
.pw-strength-label.weak{ color:#ef4444; }
.pw-strength-label.fair{ color:#f59e0b; }
.pw-strength-label.good{ color:#0ea5e9; }
.pw-strength-label.strong{ color:#16a34a; }

/* button */
.auth-btn{
    width:100%; border:none; border-radius:999px !important;
    padding:10px 20px !important; font-weight:700 !important; font-size:.88rem !important;
    background: linear-gradient(135deg, #0c4a6e, #0ea5e9) !important;
    color:#fff !important;
    box-shadow:0 8px 18px -4px rgba(14,165,233,.42);
    transition: transform .18s ease, box-shadow .2s ease, opacity .2s ease, filter .2s ease !important;
    position:relative; overflow:hidden;
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.auth-btn::before{
    content:''; position:absolute; inset:0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.22), transparent);
    transform: translateX(-100%); transition: transform .6s ease;
}
.auth-btn:hover{ transform: translateY(-1px) scale(1.005); box-shadow:0 12px 22px -4px rgba(14,165,233,.48); filter: brightness(1.03); }
.auth-btn:hover::before{ transform: translateX(100%); }
.auth-btn:active{ transform: scale(.99); box-shadow:0 4px 10px -4px rgba(14,165,233,.4); }
.auth-btn:disabled{ opacity:.72; transform:none; cursor:not-allowed; box-shadow:0 6px 14px -8px rgba(14,165,233,.3); }
.auth-btn .btn-spinner{
    width:15px; height:15px; border:2px solid rgba(255,255,255,.35); border-top-color:#fff;
    border-radius:50%; display:inline-block; animation: authSpin .7s linear infinite;
}
@keyframes authSpin{ to{ transform: rotate(360deg); } }

.auth-divider{
    display:flex; align-items:center; gap:12px; margin:12px 0 0;
    color:#94a3b8; font-size:.75rem;
}
.auth-divider::before, .auth-divider::after{
    content:''; flex:1; height:1px; background:#e2e8f0;
}
.auth-switch{
    text-align:center; font-size:.82rem; color:#64748b; margin:12px 0 0;
}
.auth-switch a{
    font-weight:700; color:#0ea5e9; text-decoration:none;
    border-bottom:1px solid transparent; transition: color .2s, border-color .2s;
}
.auth-switch a:hover{ color:#0c4a6e; border-bottom-color: currentColor; }
.auth-terms{ font-size:.7rem; color:#94a3b8; text-align:center; margin-top:10px; line-height:1.45; }
.auth-terms a{ color:#64748b; font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.auth-terms a:hover{ color:#0c4a6e; }

/* responsive */
@media (max-width: 991.98px){
    .auth-wrapper{
        padding-top: 96px !important;
        padding-bottom: 80px !important;
        min-height: auto;
        display: block;
    }
    .auth-container{
        max-width: 520px;
        margin: 0 auto;
        padding-left: 16px;
        padding-right: 16px;
    }
    .auth-split{
        flex-direction: column;
        border-radius: 18px;
        min-height: auto;
        margin: 0;
        box-shadow: 0 8px 24px rgba(2,6,23,.06);
    }
    .auth-branding{
        max-width: 100%;
        flex: 0 0 auto;
        padding: 24px 20px 20px;
    }
    .auth-brand-badge{
        margin-bottom: 12px;
        padding: 5px 12px 5px 8px;
        font-size: .65rem;
    }
    .auth-brand-title{
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
    .auth-brand-sub{
        margin-bottom: 0;
        font-size: .82rem;
    }
    .auth-brand-features{ display: none; }
    .auth-brand-visual{ display: none; }
    .auth-brand-foot{ display: none; }
    .auth-form-panel{
        padding: 22px 20px 24px;
    }
    .auth-form-head h3{
        font-size: 1.25rem;
    }
}
@media (max-width: 575.98px){
    .auth-wrapper{
        padding-top: 90px !important;
        padding-bottom: 80px !important;
    }
    .auth-container{
        padding-left: 12px;
        padding-right: 12px;
    }
    .auth-branding{
        padding: 20px 16px 18px;
    }
    .auth-brand-badge{
        font-size: .62rem;
        padding: 4px 10px 4px 6px;
        margin-bottom: 10px;
    }
    .auth-form-panel{
        padding: 20px 16px 20px;
    }
}
/* Ensure fixed chat widget never covers form inputs */
.auth-container { position: relative; z-index: 1; }
