/* ============================================================
   Electroline ERP - Login UI (scoped, self-contained)
   Scope: everything is namespaced under .el-login so it cannot
   leak into / be affected by existing site.css / form.css.
   No external framework dependency. Bootstrap 5 safe.
   ============================================================ */

.el-login *,
.el-login *::before,
.el-login *::after {
    box-sizing: border-box;
}

.el-login {
    --el-blue: #0b4ea2;
    --el-blue-dark: #063a7a;
    --el-blue-deep: #042a59;
    --el-yellow: #f9c200;
    --el-text: #1f2937;
    --el-muted: #6b7280;
    --el-border: #d8dee9;
    --el-danger: #d92d20;
    --el-radius: 16px;

    position: fixed;
    inset: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--el-text);
    background: linear-gradient(135deg, #eef3fb 0%, #dfe9f7 45%, #e8eefb 100%);
    overflow: auto;
}

/* ---- soft decorative blobs on the page background ---- */
.el-login::before,
.el-login::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(8px);
    opacity: .35;
    z-index: 0;
    pointer-events: none;
}
.el-login::before {
    width: 380px; height: 380px;
    top: -120px; left: -110px;
    background: radial-gradient(circle at center, #bcd4f5, transparent 70%);
}
.el-login::after {
    width: 460px; height: 460px;
    bottom: -160px; right: -140px;
    background: radial-gradient(circle at center, #cfe0f8, transparent 70%);
}

/* ---- the card ---- */
.el-login .el-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    display: flex;
    background: #ffffff;
    border-radius: var(--el-radius);
    overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(6, 42, 89, .35),
                0 8px 24px -12px rgba(6, 42, 89, .25);
}

/* ============================================================
   LEFT - branding section
   ============================================================ */
.el-login .el-brand {
    position: relative;
    flex: 0 0 44%;
    max-width: 44%;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(249, 194, 0, .18), transparent 45%),
        linear-gradient(155deg, var(--el-blue) 0%, var(--el-blue-dark) 55%, var(--el-blue-deep) 100%);
    overflow: hidden;
}

/* subtle dark overlay + lightning accent line */
.el-login .el-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.22));
    z-index: 0;
}
.el-login .el-brand::after {
    content: "";
    position: absolute;
    width: 260px; height: 260px;
    right: -90px; top: 40%;
    background: radial-gradient(circle, rgba(249,194,0,.22), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.el-login .el-brand > * { position: relative; z-index: 1; }

.el-login .el-brand-logo-plate {
    align-self: flex-start;
    background: #ffffff;
    padding: 16px 22px;
    border-radius: 14px;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35);
}
.el-login .el-brand-logo-plate img {
    display: block;
    width: 230px;
    max-width: 100%;
    height: auto;
}

.el-login .el-brand-copy h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .2px;
}
.el-login .el-brand-copy p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .85);
    max-width: 340px;
}

.el-login .el-brand-features {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.el-login .el-brand-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, .92);
}
.el-login .el-brand-features svg {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    color: var(--el-yellow);
}

.el-login .el-brand-foot {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .7);
}

/* ============================================================
   RIGHT - form section
   ============================================================ */
.el-login .el-form-pane {
    flex: 1 1 56%;
    max-width: 56%;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.el-login .el-poweredby {
    display: block;
    height: 22px;
    width: auto;
    margin: 0 0 26px auto;
    opacity: .85;
}

.el-login .el-form-logo {
    display: none;          /* shown only on mobile (see media query) */
    height: 46px;
    width: auto;
    margin: 0 auto 18px;
}

.el-login .el-form-head {
    margin-bottom: 26px;
}
.el-login .el-form-head h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--el-text);
}
.el-login .el-form-head p {
    margin: 0;
    font-size: 14px;
    color: var(--el-muted);
}

/* ---- fields ---- */
.el-login .el-field { margin-bottom: 18px; }

.el-login .el-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.el-login .el-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.el-login .el-input-wrap > .el-ic-left {
    position: absolute;
    left: 14px;
    width: 18px; height: 18px;
    color: var(--el-muted);
    pointer-events: none;
}

/* high specificity so existing global input rules can't override */
.el-login .el-input-wrap input.el-input {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 44px 0 44px;
    font-size: 14.5px;
    color: var(--el-text);
    background: #f8fafc;
    border: 1.5px solid var(--el-border);
    border-radius: 10px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.el-login .el-input-wrap input.el-input::placeholder { color: #9aa3b2; }
.el-login .el-input-wrap input.el-input:hover { border-color: #b9c4d6; }
.el-login .el-input-wrap input.el-input:focus {
    background: #fff;
    border-color: var(--el-blue);
    box-shadow: 0 0 0 4px rgba(11, 78, 162, .14);
}

/* show / hide password button */
.el-login .el-toggle-pass {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: none;
    background: transparent;
    color: var(--el-muted);
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
}
.el-login .el-toggle-pass:hover { color: var(--el-blue); background: #eef3fb; }
.el-login .el-toggle-pass svg { width: 19px; height: 19px; }

/* ---- options row ---- */
.el-login .el-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
    flex-wrap: wrap;
}
.el-login .el-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}
.el-login .el-remember input {
    width: 16px; height: 16px;
    margin: 0;
    accent-color: var(--el-blue);
    cursor: pointer;
}
.el-login .el-forgot {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--el-blue);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.el-login .el-forgot:hover { text-decoration: underline; }

.el-login .el-forgot-note {
    display: none;
    margin: -10px 0 16px;
    font-size: 12.5px;
    color: var(--el-muted);
    background: #f1f5fb;
    border: 1px solid #dbe6f5;
    border-radius: 8px;
    padding: 9px 12px;
}
.el-login .el-forgot-note.show { display: block; }

/* ---- submit ---- */
.el-login .el-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1763c7 0%, var(--el-blue) 50%, var(--el-blue-dark) 100%);
    box-shadow: 0 12px 24px -10px rgba(11, 78, 162, .65);
    transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.el-login .el-submit:hover {
    filter: brightness(1.06);
    box-shadow: 0 16px 30px -10px rgba(11, 78, 162, .7);
    transform: translateY(-1px);
}
.el-login .el-submit:active { transform: translateY(0); }
.el-login .el-submit svg { width: 18px; height: 18px; }

/* ---- error message ---- */
.el-login .el-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 11px 14px;
    font-size: 13.5px;
    color: var(--el-danger);
    background: #fdeceb;
    border: 1px solid #f7c9c5;
    border-radius: 10px;
}
.el-login .el-error svg { flex: 0 0 auto; width: 18px; height: 18px; }

/* ---- footer ---- */
.el-login .el-copy {
    margin-top: 26px;
    text-align: center;
    font-size: 12.5px;
    color: #9aa3b2;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet / small laptop : narrow the branding panel */
@media (max-width: 900px) {
    .el-login .el-card { max-width: 760px; min-height: 0; }
    .el-login .el-brand { padding: 36px 30px; }
    .el-login .el-form-pane { padding: 38px 36px; }
    .el-login .el-brand-copy h2 { font-size: 26px; }
    .el-login .el-brand-logo-plate img { width: 190px; }
}

/* Mobile / portrait tablet : stack -> hide left panel, show logo in form */
@media (max-width: 768px) {
    .el-login { padding: 16px; align-items: flex-start; }
    .el-login .el-card {
        flex-direction: column;
        max-width: 460px;
        margin: auto;
    }
    .el-login .el-brand { display: none; }
    .el-login .el-form-pane {
        flex: 1 1 auto;
        max-width: 100%;
        padding: 32px 26px;
    }
    .el-login .el-form-logo { display: block; }
    .el-login .el-poweredby { margin: 0 auto 18px; }
    .el-login .el-form-head { text-align: center; }
}

@media (max-width: 420px) {
    .el-login .el-form-pane { padding: 26px 20px; }
    .el-login .el-form-head h1 { font-size: 21px; }
    .el-login .el-input-wrap input.el-input { height: 46px; }
}

/* Short screens : let the card scroll instead of clipping */
@media (max-height: 640px) {
    .el-login { align-items: flex-start; }
    .el-login .el-card { min-height: 0; }
}
