:root {
    --primary: #0F172A;
    --primary-hover: #1E293B;
    --accent: #22D3EE;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
}

.login-visual {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    min-height: 100vh;
}

.login-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: crmFade 21s infinite;
}

.login-slide:nth-child(1) { background-image: url('../images/backgr1.png'); animation-delay: 0s; }
.login-slide:nth-child(2) { background-image: url('../images/backgr2.png'); animation-delay: 7s; }
.login-slide:nth-child(3) { background-image: url('../images/backgr3.png'); animation-delay: 14s; }

.login-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
}

.visual-caption {
    position: absolute;
    z-index: 2;
    left: 56px;
    right: 56px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    color: #fff;
    text-align: left;
}

.visual-caption h1 {
    font-size: clamp(4rem, 8vw, 4.9rem);
    line-height: 1;
    margin: 0 0 14px;
    font-weight: 700;
	color: #fff;
}

.visual-caption p {
    max-width: 580px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 1.05rem;
    line-height: 1.65;
	color: #999;
}

@keyframes crmFade {
    0% { opacity: 0; transform: scale(1.03); }
    13.333% { opacity: 1; }
    33.333% { opacity: 1; }
    46.666% { opacity: 0; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.03); }
}

.login-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #fff;
}

.form-box {
    width: 100%;
    max-width: 420px;
}

.brand-lockup {
    margin-bottom: 46px;
}

.brand-lockup img {
    width: min(280px, 78vw);
    height: auto;
    display: block;
}

.brand-lockup p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-weight: 500;
}

.form-box h2 {
    margin: 0 0 8px;
    font-size: 1.8rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

.form-box .subtitle {
    margin: 0 0 30px;
    color: var(--text-muted);
    line-height: 1.55;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px 14px 46px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-size: .96rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .16);
}

.input-group:focus-within i { color: var(--primary); }

.btn-submit {
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: 8px;
    margin-top: 8px;
    background: var(--primary);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .18);
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .22);
}

.btn-submit i { color: var(--accent); }

.copyright-footer {
    margin-top: 34px;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.7;
}

@media (max-width: 980px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { min-height: 260px; }
    .visual-caption { left: 28px; right: 28px; top: 50%; }
    /*.visual-caption p { display: none; }*/
    .login-panel { min-height: auto; padding: 36px 22px; }
    .brand-lockup { margin-bottom: 30px; }
}
