/* =============================================================================
   LOGIN — a sign-in screen, not the app shell with nothing in it
   ---------------------------------------------------------------------------
   This page used to render the full logged-in chrome: #wrapper (background
   #202020) plus `#page-wrapper { margin-left: 260px }`, which is why a black
   column sat down the left of the login box with nothing in it — the space the
   sidebar would have occupied, on a page that has no sidebar. The red brand
   block and the grey bar above it were the same leftover.

   Self-contained on purpose. The app skin (unisoft_admin/assets/css/custom.css)
   describes logged-in chrome; a sign-in page shares none of it, and coupling
   them means every future change to one has to be checked against the other.
   ============================================================================= */
:root {
    --a-brand:   #b91c1c;
    --a-brand-d: #991b1b;
    --a-ink:     #0f172a;
    --a-body:    #334155;
    --a-muted:   #64748b;
    --a-faint:   #94a3b8;
    --a-line:    #e2e8f0;
}
html, body { height: 100%; }
body.fms-auth-body {
    margin: 0; background: #f6f8fb; color: var(--a-body);
    font-family: "Open Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.fms-auth { min-height: 100vh; display: flex; }

/* --- brand half ----------------------------------------------------------- */
.fms-auth-brand {
    flex: 0 0 44%; max-width: 560px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 48px 52px; color: #e2e8f0;
    background: linear-gradient(160deg, #111827 0%, #0b1220 62%, #16060a 100%);
}
/* A slow red glow behind the mark, so the panel is not a flat black rectangle. */
.fms-auth-brand::before {
    content: ""; position: absolute; width: 620px; height: 620px; right: -240px; top: -180px;
    border-radius: 50%; background: radial-gradient(circle, rgba(185,28,28,.36) 0%, rgba(185,28,28,0) 68%);
}
.fms-auth-brand > * { position: relative; }
.fms-auth-mark {
    width: 66px; height: 66px; padding: 11px; border-radius: 18px; background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10); margin-bottom: 22px;
}
.fms-auth-title { margin: 0; font-size: 32px; font-weight: 700; color: #fff; letter-spacing: -.4px; }
.fms-auth-sub   { margin: 8px 0 30px; font-size: 15px; color: #94a3b8; line-height: 1.5; max-width: 30ch; }
.fms-auth-list  { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fms-auth-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: #cbd5e1; line-height: 1.45; }
.fms-auth-list i {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; font-size: 12px;
    background: rgba(239,68,68,.16); color: #f87171; margin-top: 1px;
}
.fms-auth-foot { margin-top: 38px; font-size: 12px; color: #64748b; }

/* --- form half ------------------------------------------------------------ */
.fms-auth-main {
    flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 40px 24px;
}
.fms-auth-card { width: 100%; max-width: 396px; }
.fms-auth-logo { display: none; }            /* phone only — see the media query */
.fms-auth-h    { margin: 0 0 6px; font-size: 25px; font-weight: 700; color: var(--a-ink); letter-spacing: -.3px; }
.fms-auth-p    { margin: 0 0 26px; font-size: 14px; color: var(--a-muted); }

.fms-auth-field { position: relative; margin-bottom: 14px; }
.fms-auth-field > i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: var(--a-faint); pointer-events: none; transition: color .15s ease;
}
.fms-auth-field input {
    width: 100%; box-sizing: border-box; height: 50px; padding: 0 16px 0 42px;
    border: 1px solid var(--a-line); border-radius: 12px; background: #fff;
    font-family: inherit; font-size: 14.5px; color: var(--a-ink); outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fms-auth-field input::placeholder { color: var(--a-faint); }
.fms-auth-field input:focus { border-color: #fca5a5; box-shadow: 0 0 0 4px rgba(185,28,28,.10); }
.fms-auth-field input:focus + i, .fms-auth-field:focus-within > i { color: var(--a-brand); }
/* The eye sits inside the field, so it needs room at the right that the icon rule does not give. */
.fms-auth-field.has-toggle input { padding-right: 46px; }
.fms-auth-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: 0; background: none; border-radius: 9px;
    color: var(--a-faint); font-size: 14px; cursor: pointer; padding: 0;
}
.fms-auth-eye:hover { color: var(--a-body); background: #f1f5f9; }

/* "Keep me signed in on this device" (2026-10-15): the whole row is the tap target, 44px tall. */
.fms-auth-remember {
    display: flex; align-items: center; gap: 10px; min-height: 44px; margin: -2px 0 12px; padding: 0 2px;
    font-size: 13.5px; font-weight: 500; color: var(--a-body); cursor: pointer; user-select: none; }
.fms-auth-remember input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--a-brand); cursor: pointer; }

.fms-auth-btn {
    width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(180deg, var(--a-brand), var(--a-brand-d)); color: #fff;
    font-family: inherit; font-size: 15px; font-weight: 650; letter-spacing: .2px;
    box-shadow: 0 2px 6px rgba(185,28,28,.28); transition: filter .15s ease, transform .06s ease;
}
.fms-auth-btn:hover  { filter: brightness(1.08); }
.fms-auth-btn:active { transform: translateY(1px); }
.fms-auth-btn.is-ghost {
    background: #fff; color: var(--a-body); border: 1px solid var(--a-line); box-shadow: none; }
.fms-auth-btn.is-ghost:hover { background: #f8fafc; filter: none; }

.fms-auth-alt { margin-top: 16px; text-align: center; }
.fms-auth-link {
    border: 0; background: none; padding: 4px; font-family: inherit; font-size: 13.5px;
    font-weight: 600; color: var(--a-muted); cursor: pointer; text-decoration: none;
}
.fms-auth-link:hover { color: var(--a-brand); text-decoration: underline; }
.JError { display: block; color: var(--a-brand); font-size: 12.5px; margin: 5px 2px 0; }

@media (max-width: 899px) {
    /* One column. The brand panel becomes a short header rather than disappearing — the person
       signing in should still see whose system this is. */
    .fms-auth { flex-direction: column; }
    .fms-auth-brand { flex: 0 0 auto; max-width: none; padding: 26px 22px 22px;
                      align-items: center; text-align: center; }
    .fms-auth-brand::before { right: -180px; top: -320px; }
    .fms-auth-mark  { width: 54px; height: 54px; margin-bottom: 14px; }
    .fms-auth-title { font-size: 24px; }
    .fms-auth-sub   { margin: 6px 0 0; max-width: none; font-size: 13.5px; }
    .fms-auth-list, .fms-auth-foot { display: none; }
    .fms-auth-main  { padding: 30px 20px 44px; align-items: flex-start; }
    .fms-auth-card  { max-width: 420px; }
}
@media (max-width: 420px) {
    .fms-auth-field input, .fms-auth-btn { height: 48px; }
}
