/* ============================================================
   Trang đăng nhập — bố cục chia đôi, phong cách doanh nghiệp
   ============================================================ */
:root {
    --ink: #0f172a; --muted: #64748b; --line: #d9deea; --brand: #4f46e5; --brand-d: #4338ca;
    --navy: #0b1020; --font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body.auth-body {
    font-family: var(--font); background: #fff; color: var(--ink);
    min-height: 100vh; min-height: 100dvh; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.auth-wrapper, .auth-container { width: 100%; min-height: 100vh; min-height: 100dvh; }
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: none; }
input:focus, input:focus-visible, button:focus, button:focus-visible { outline: none; }

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

/* ---------- Cột giới thiệu ---------- */
.login-brand {
    position: relative; overflow: hidden; color: #eef0ff;
    padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 36px;
    background-color: #1e1b4b;
    background-image:
        radial-gradient(520px 360px at 8% 0%, rgba(14, 165, 198, .45), transparent 70%),
        radial-gradient(560px 420px at 100% 100%, rgba(236, 72, 153, .32), transparent 70%),
        radial-gradient(520px 420px at 80% 10%, rgba(139, 92, 246, .45), transparent 70%),
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(145deg, #312e81 0%, #4338ca 55%, #1e1b4b 100%);
    background-size: auto, auto, auto, 44px 44px, 44px 44px, auto;
}
.brand-body { max-width: 460px; }
.brand-headline { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: #fff; }
.brand-lead { margin-top: 12px; font-size: 15px; color: #c7cdf5; }
.brand-features { list-style: none; margin-top: 30px; display: grid; gap: 16px; }
.brand-features li { display: flex; gap: 14px; align-items: flex-start; }
.bf-icon {
    flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fde68a;
}
.brand-features li:nth-child(2) .bf-icon { color: #67e8f9; }
.brand-features li:nth-child(3) .bf-icon { color: #f9a8d4; }
.brand-features li:nth-child(4) .bf-icon { color: #86efac; }
.bf-icon svg, .field-icon svg, .field-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-features strong { display: block; font-size: 14px; font-weight: 600; color: #fff; }
.brand-features span:not(.bf-icon) { display: block; font-size: 13px; color: #c0c6ee; }

.brand-preview {
    position: relative; height: 112px; padding: 16px 18px; border-radius: 12px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.bp-line { position: absolute; left: 18px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); }
.bp-line-1 { top: 16px; width: 90px; } .bp-line-2 { top: 30px; width: 54px; background: rgba(255,255,255,.08); }
.bp-bars { position: absolute; right: 18px; left: 18px; bottom: 14px; height: 56px; display: flex; align-items: flex-end; gap: 10px; }
.bp-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #67e8f9, #818cf8); opacity: .95; }
.bp-bars i:nth-child(even) { background: linear-gradient(180deg, #f9a8d4, #a78bfa); }

/* ---------- Cột biểu mẫu ---------- */
.login-panel {
    display: grid; place-items: center; padding: clamp(24px, 5vw, 56px);
    background: radial-gradient(600px 400px at 100% 0%, #eef2ff, transparent 70%), radial-gradient(500px 360px at 0% 100%, #ecfeff, transparent 70%), #f8fafc;
}
.login-card {
    width: 100%; max-width: 420px; padding: clamp(24px, 4vw, 36px); background: #fff;
    border: 1px solid #e5e9f5; border-top: 4px solid var(--brand); border-radius: 16px;
    box-shadow: 0 20px 45px -18px rgba(49, 46, 129, .25), 0 2px 6px rgba(15, 23, 42, .05);
}
.login-emblem {
    display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px;
    color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 8px 18px rgba(99, 102, 241, .35);
}
.login-emblem svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.login-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.login-head p { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.login-form { margin-top: 28px; display: grid; gap: 18px; }

.field label { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 600; color: #334155; }
.field-control { position: relative; }
.field-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; display: grid; pointer-events: none; }
.field-control input {
    width: 100%; height: 46px; padding: 0 44px 0 42px; border: 1px solid var(--line); border-radius: 10px;
    font-family: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.field-control input::placeholder { color: #a3adc2; }
.field-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
    display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #7b869c; cursor: pointer;
}
.field-toggle .ft-hide, .field-toggle.is-on .ft-show { display: none; }
.field-toggle.is-on .ft-hide { display: grid; }
.field-toggle .ft-show { display: grid; }
.field-hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.field-warn { color: #b45309; }

.login-remember { display: flex; align-items: center; gap: 9px; font-size: 14px; color: #475569; cursor: pointer; }
.login-remember input { width: 16px; height: 16px; accent-color: var(--brand); }

.login-submit {
    position: relative; height: 48px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
    box-shadow: 0 8px 18px -6px rgba(79, 70, 229, .55);
    font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.login-submit:disabled { cursor: progress; background: var(--brand-d); }
.ls-spinner { display: none; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: ls-spin .7s linear infinite; }
.login-submit.is-loading .ls-label { visibility: hidden; }
.login-submit.is-loading .ls-spinner { display: block; }
@keyframes ls-spin { to { transform: rotate(360deg); } }

.login-secure { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e8ebf3; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #64748b; }
.login-secure svg { width: 15px; height: 15px; flex-shrink: 0; stroke: #16a34a; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-panel { align-items: start; padding-top: clamp(32px, 9vh, 72px); }
}
@media (max-width: 480px) { .field-control input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .ls-spinner { animation-duration: 1.6s; } * { transition: none !important; } }
