/* CMTS · Inicio de sesión (views/user/security/login.php) */
:root {
    --lg-ink: #231a2e;
    --lg-ink-2: #463b52;
    --lg-muted: #6b6178;
    --lg-line: #e7e1ee;
    --lg-field: #f5f3f8;
    --lg-brand: #532b78;
    --lg-brand-2: #643690;
    --lg-accent: #bb358c;
    --lg-gold: #e2c88f;
}

* { box-sizing: border-box; }
html, body.cmts-auth-body { height: 100%; }
body.cmts-auth-body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--lg-ink);
    background: #f5f3f8;
    -webkit-font-smoothing: antialiased;
}

.lg { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }

/* ------------------------------------------------ Panel de marca */
.lg-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 36px clamp(28px, 4vw, 56px);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(700px 360px at 110% -10%, rgba(187, 53, 140, .45), transparent 60%),
        radial-gradient(520px 320px at -10% 110%, rgba(226, 200, 143, .18), transparent 65%),
        linear-gradient(150deg, #2a1838 0%, #43225f 45%, #5e2d86 100%);
}
.lg-side::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.lg-side__glow {
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    z-index: -1;
    background:
        radial-gradient(circle, transparent 55%, rgba(255, 255, 255, .06) 56%, rgba(255, 255, 255, .06) 64%, transparent 65%),
        radial-gradient(circle, transparent 74%, rgba(255, 255, 255, .04) 75%, rgba(255, 255, 255, .04) 80%, transparent 81%);
}
.lg-logo { display: inline-flex; align-self: flex-start; padding: 10px 14px; background: #fff; border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.lg-logo img { display: block; height: 44px; width: auto; }

.lg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: var(--lg-gold); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.lg-side__copy h1 { margin: 14px 0 10px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; color: #fff; }
.lg-side__copy h1 span { display: block; color: var(--lg-gold); }
.lg-side__copy p { margin: 0; max-width: 46ch; color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.6; }

.lg-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lg-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .2s ease, transform .2s ease;
}
.lg-features li:hover { background: rgba(255, 255, 255, .11); transform: translateY(-2px); }
.lg-features__icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, rgba(187, 53, 140, .55), rgba(122, 74, 160, .55)); color: #fff; font-size: 17px; }
.lg-features strong { display: block; font-size: 13px; font-weight: 650; color: #fff; }
.lg-features small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .68); margin-top: 1px; }

.lg-roles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: rgba(255, 255, 255, .72); }
.lg-roles i { font-size: 16px; color: var(--lg-gold); }
.lg-roles b { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 11px; letter-spacing: .06em; }

/* ------------------------------------------------ Formulario */
.lg-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 32px 20px;
    background:
        radial-gradient(600px 300px at 80% 0%, rgba(122, 74, 160, .08), transparent 70%),
        #f5f3f8;
}
.lg-mobile-brand { display: none; }

.lg-card {
    width: 100%;
    max-width: 400px;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--lg-line);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(48, 28, 70, .10), 0 2px 6px rgba(48, 28, 70, .04);
    animation: lg-in .4s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes lg-in { from { transform: translateY(10px); } }

.lg-card__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.lg-card__icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: 19px; background: linear-gradient(135deg, var(--lg-brand), #8b3d95); box-shadow: 0 8px 18px rgba(83, 43, 120, .3); }
.lg-eyebrow { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lg-accent); }
.lg-card h2 { margin: 2px 0 2px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--lg-ink); }
.lg-card__head p { margin: 0; font-size: 13px; color: var(--lg-muted); }

.lg-alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; background: #fdeeec; color: #8f2a20; border: 1px solid #f4cdc8; border-left: 4px solid #c0392b; }
.lg-alert[data-success="true"] { background: #edf7ee; color: #1e4f21; border-color: #cfe7d1; border-left-color: #2f7d32; }

.lg-form { display: grid; gap: 14px; }
.lg-field { display: grid; gap: 6px; }
.lg-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lg-field label { font-size: 12px; font-weight: 650; color: var(--lg-ink-2); }
.lg-link { font-size: 12px; font-weight: 600; color: var(--lg-brand-2); text-decoration: none; }
.lg-link:hover { color: var(--lg-accent); text-decoration: underline; }

.lg-input {
    position: relative;
    display: flex;
    align-items: center;
    height: 44px;
    background: var(--lg-field);
    border: 1px solid transparent;
    border-radius: 11px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lg-input:hover { background: #efebf4; }
.lg-input:focus-within { background: #fff; border-color: #9d72bf; box-shadow: 0 0 0 4px rgba(122, 74, 160, .14); }
.lg-input > i { width: 42px; flex: none; text-align: center; font-size: 17px; color: #948aa0; transition: color .15s ease; }
.lg-input:focus-within > i { color: var(--lg-brand-2); }
.lg-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--lg-ink); padding: 0 12px 0 0; }
.lg-input input::placeholder { color: #a79db4; }
.lg-input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--lg-field) inset; -webkit-text-fill-color: var(--lg-ink); }
.lg-input__toggle { flex: none; width: 40px; height: 100%; border: 0; background: transparent; color: #948aa0; font-size: 17px; cursor: pointer; border-radius: 0 11px 11px 0; }
.lg-input__toggle:hover { color: var(--lg-brand-2); }
.lg-input--code input { letter-spacing: .5em; font-weight: 700; font-size: 18px; }

.lg-caps { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: #a15c07; }
.lg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--lg-ink-2); cursor: pointer; user-select: none; }
.lg-check input { width: 16px; height: 16px; accent-color: var(--lg-brand); }

.lg-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(120deg, #43225f, #643690 55%, #8b3d95);
    box-shadow: 0 10px 22px rgba(83, 43, 120, .3);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.lg-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(83, 43, 120, .36); filter: saturate(1.1); }
.lg-submit:active { transform: translateY(0); }
.lg-submit i { transition: transform .2s ease; }
.lg-submit:hover i { transform: translateX(3px); }
.lg-submit:disabled { opacity: .7; cursor: progress; transform: none; }

.lg-back { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 1px solid var(--lg-line); border-radius: 11px; background: #fff; color: var(--lg-ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lg-back:hover { background: #f6f1fa; color: var(--lg-brand); }
.lg-hint { margin: 0; font-size: 12px; color: var(--lg-muted); }

.lg-help { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px; border-radius: 12px; background: #faf8fc; border: 1px solid var(--lg-line); }
.lg-help i { font-size: 18px; color: var(--lg-brand-2); margin-top: 1px; }
.lg-help p { margin: 0; font-size: 12px; color: var(--lg-muted); line-height: 1.5; }
.lg-help strong { display: block; color: var(--lg-ink-2); font-weight: 650; }

.lg-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: #948aa0; }
.lg-footer i { vertical-align: -2px; }

:where(.lg a, .lg button, .lg input):focus-visible { outline: 2px solid #7a4aa0; outline-offset: 2px; }

/* ------------------------------------------------ Responsive */
@media (max-width: 1100px) { .lg-features { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
    .lg { grid-template-columns: 1fr; }
    .lg-side { display: none; }
    .lg-main { justify-content: flex-start; padding-top: 28px; min-height: 100vh; background: linear-gradient(180deg, #43225f 0, #5e2d86 210px, #f5f3f8 210px); }
    .lg-mobile-brand { display: block; padding: 8px 12px; background: #fff; border-radius: 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
    .lg-mobile-brand img { display: block; height: 40px; width: auto; }
}
@media (max-width: 420px) { .lg-card { padding: 22px 18px; border-radius: 18px; } .lg-card h2 { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .lg-card { animation: none; } .lg *, .lg *::before { transition: none !important; } }
