/* Sign-in pages (views/login.php, views/coresys_forget_password_form.php): company image
 * on the left / behind the card on phones, form panel on the right. */
:root { --brand-a: #26D0CE; --brand-b: #1A2980; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --danger: #dc2626; }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: Roboto, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: #0b1430; -webkit-font-smoothing: antialiased; }
.lg { display: flex; min-height: 100vh; min-height: 100dvh; }

/* left: company image + brand */
.lg-hero { position: relative; flex: 1 1 58%; overflow: hidden; background: linear-gradient(135deg, var(--brand-b), var(--brand-a)); }
.lg-hero .img { position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; transform: scale(1.06); animation: heroIn 1.4s ease-out forwards; }
.lg-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(26, 41, 128, .55) 0%, rgba(15, 23, 42, .25) 45%, rgba(15, 23, 42, .75) 100%); }
.lg-hero .brand { position: absolute; left: 48px; right: 48px; bottom: 48px; z-index: 1; color: #fff; animation: rise .9s .2s ease-out both; }
.lg-hero .brand h1 { margin: 0 0 8px; font-size: 34px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.lg-hero .brand p { margin: 0; font-size: 15px; opacity: .85; max-width: 460px; line-height: 1.5; }

/* right: form panel */
.lg-panel { flex: 0 0 min(480px, 42%); background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px 48px; box-shadow: -10px 0 40px rgba(15, 23, 42, .18); position: relative; z-index: 1; }
.lg-card { width: 100%; max-width: 360px; animation: rise .7s ease-out both; }
.lg-logo { display: block; height: 52px; width: auto; max-width: 200px; object-fit: contain; margin: 0 0 28px; }
.lg-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.lg-card .sub { margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #334155; }
.ctl { position: relative; }
.ctl svg.ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none; transition: color .2s; }
.ctl input { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 46px 0 44px; font: inherit; font-size: 15px; color: var(--ink); background: #f8fafc; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; }
.ctl input::placeholder { color: #a3adbd; }
.ctl input:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
.ctl input:focus ~ svg.ic, .ctl:focus-within svg.ic { color: #3b82f6; }
.fld.bad .ctl input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.fld .err { display: none; color: var(--danger); font-size: 12px; margin-top: 6px; }
.fld.bad .err { display: block; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.eye:hover { color: #475569; background: #eef2f7; }
.eye svg { width: 20px; height: 20px; }
.caps { display: none; margin-top: 6px; font-size: 12px; color: #b45309; }
.caps.on { display: block; }

.row-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 13px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #475569; user-select: none; }
.chk input { width: 16px; height: 16px; accent-color: #2563eb; margin: 0; }
.row-opt a { color: #2563eb; text-decoration: none; font-weight: 500; }
.row-opt a:hover { text-decoration: underline; }

.btn { position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer;
    background: linear-gradient(90deg, var(--brand-b), #2563eb 55%, var(--brand-a)); background-size: 200% 100%; background-position: 0 0;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .3); transition: background-position .5s ease, transform .15s ease, box-shadow .2s; }
.btn:hover { background-position: 100% 0; box-shadow: 0 10px 24px rgba(37, 99, 235, .38); }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: progress; opacity: .85; }
.btn .spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; vertical-align: -3px; margin-right: 8px; }
.btn.busy .spin { display: inline-block; }

.alert { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 13px; line-height: 1.45; margin-bottom: 18px; }
.alert.show { display: flex; animation: shake .4s ease; }
.alert.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.captcha { margin: 0 0 18px; display: flex; justify-content: center; }
.foot { margin-top: 28px; font-size: 12px; color: #94a3b8; text-align: center; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes heroIn { to { transform: scale(1); } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* tablets & phones: the image fills the screen, the form floats on it as a card */
@media (max-width: 900px) {
    .lg { position: relative; align-items: center; justify-content: center; padding: 24px 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
    .lg-hero { position: fixed; inset: 0; }
    .lg-hero .brand { display: none; }
    .lg-panel { flex: 0 1 440px; width: 100%; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 22px; padding: 32px 26px; box-shadow: 0 24px 60px rgba(2, 6, 23, .35); }
    .lg-logo { margin: 0 auto 20px; height: 46px; }
    .lg-card { max-width: none; }
    .lg-card h2, .lg-card .sub { text-align: center; }
}
@media (max-width: 380px) {
    .lg-panel { padding: 26px 18px; border-radius: 18px; }
    .lg-card h2 { font-size: 21px; }
    .row-opt { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-height: 620px) and (max-width: 900px) { .lg { align-items: flex-start; } }
