/* ============================================================================
   crm-guest.css: crm5's sign-in shell, the inline <style> blocks of
   layouts/guest.blade.php (lines 86-191, and the password-eye rules at line 284),
   moved to a file for Reading Buddy's CSP. crm5's rules, unchanged, except the
   Blade values: --primary/--secondary and the font come from css/app.css's tokens,
   the background panel is crm5's default gradient, and $bgColor is crm5's default
   #f3f4f8. Regenerate with port-guest.mjs (see progress/V.md); Buddy's own changes
   go in /portal/portal.css.
   ============================================================================ */

:root { --primary: var(--crm-primary); --secondary: var(--crm-primary-light); }
*, body { font-family: var(--crm-font); }
html, body { height: 100%; margin: 0; background: #F3F2F7; }
.login-wrap { display: flex; min-height: 100vh; gap: 0; }
.login-form-panel {
    width: 480px; min-width: 380px; flex-shrink: 0;
    display: flex; flex-direction: column;
    background: #fff; box-shadow: 0 0 40px rgba(0,0,0,.10);
}
.login-form-inner {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; padding: 48px 48px 24px;
}
.login-bg-panel {
    flex: 1;
    background: linear-gradient(145deg, var(--crm-primary) 0%, #320066 55%, #0f0820 100%);
    background-color: #f3f4f8;
    position: relative; display: flex; align-items: flex-end;
    justify-content: flex-start; padding: 48px; overflow: hidden;
}
.login-bg-panel::before {
    content: ''; position: absolute; top: -80px; right: -80px;
    width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.10) 0%, transparent 70%);
    pointer-events: none;
}
.login-bg-panel::after {
    content: ''; position: absolute; bottom: 80px; left: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.07) 0%, transparent 70%);
    pointer-events: none;
}
.login-bg-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.08) 60%, transparent 100%); }
.login-bg-text { position: relative; z-index: 1; color: #fff; }
.login-bg-text h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -.02em; }
.login-bg-text p  { font-size: .97rem; opacity: .85; margin: 0; line-height: 1.6; max-width: 320px; }
.login-bg-features { position: absolute; top: 50%; left: 48px; right: 48px; transform: translateY(-50%); z-index: 1; display: flex; flex-direction: column; gap: 20px; }
.login-bg-feat { display: flex; align-items: flex-start; gap: 14px; }
.login-bg-feat-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    background: rgba(255,255,255,.14); display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; color: #fff; backdrop-filter: blur(4px);
}
.login-bg-feat-body h4 { font-size: .9rem; font-weight: 700; color: #fff; margin: 0 0 2px; }
.login-bg-feat-body p  { font-size: .78rem; color: rgba(255,255,255,.72); margin: 0; }

.login-head { margin-bottom: 28px; }
.login-brand-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.login-brand-logo { max-height: 54px; max-width: 220px; object-fit: contain; }
.login-brand { font-size: 1.5rem; font-weight: 800; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-badge {
    font-size: .65rem; font-weight: 700; background: var(--primary); color: #fff;
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .07em; flex-shrink: 0;
}
.login-tagline { font-size: .84rem; color: #999; margin-top: 6px; }

.auth-title { font-size: 1.15rem; font-weight: 700; color: #2b2b40; margin: 0 0 4px; }
.auth-subtitle { font-size: .84rem; color: #8b8ba7; margin: 0 0 20px; }

.form-control { border-radius: 12px; padding: 12px 14px; font-size: .9rem; border-color: #e0e0e8; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(83,3,131,.12); }
.form-label { font-size: .82rem; font-weight: 600; color: #444; margin-bottom: 4px; }
.form-check-label { font-size: .82rem; color: #666; }
.login-forgot { font-size: .78rem; color: var(--primary); text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none; color: #fff; border-radius: 12px; padding: 13px;
    font-size: .9rem; font-weight: 600; width: 100%;
    box-shadow: 0 4px 14px rgba(83,3,131,.3); transition: all .18s; cursor: pointer;
}
.btn-login:hover { filter: brightness(1.12); box-shadow: 0 6px 20px rgba(83,3,131,.4); transform: translateY(-1px); }
.login-alt-text { text-align: center; margin-top: 18px; font-size: .83rem; color: #888; }
.login-alt-text a { color: var(--primary); text-decoration: none; font-weight: 600; }
.login-alt-text a:hover { text-decoration: underline; }
.login-alt-link { display: block; text-align: center; margin-top: 18px; font-size: .8rem; color: #aaa; text-decoration: none; }
.login-alt-link:hover { color: var(--primary); }

.login-footer { padding: 16px 48px 20px; border-top: 1px solid #f0f0f6; }
.login-footer-text { font-size: .73rem; color: #bbb; text-align: center; }
.login-footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.login-footer-links a { font-size: .72rem; color: #bbb; text-decoration: none; }
.login-footer-links a:hover { color: var(--primary); }

/* ── Simple layout: centered card, no side panel ───────────────────── */
.login-wrap--simple {
    justify-content: center; align-items: center;
    background: #f3f4f8; padding: 24px;
}
.login-wrap--simple .login-form-panel {
    width: 460px; max-width: 100%;
    border-radius: 20px; overflow: hidden; min-height: auto;
    box-shadow: 0 16px 50px rgba(0,0,0,.16);
}
/* ── Image layout: pure image, no decorative orbs ──────────────────── */
.login-bg-panel--image::before,
.login-bg-panel--image::after { display: none; }

@media (max-width: 768px) {
    .login-bg-panel { display: none; }
    .login-form-panel { width: 100%; min-width: 0; }
    .login-form-inner { padding: 36px 28px 20px; }
    .login-footer { padding: 14px 28px 16px; }
}

/* Password show/hide — the eye the script below appends; crm-ui.css is not loaded by this layout, so its two rules live here (a stray box under every password field otherwise) */
.crm-pwd-wrap{position:relative;display:block}
.crm-pwd-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;padding:0;color:#aaa;cursor:pointer;font-size:1.05rem;line-height:1;z-index:5;transition:color .15s}
.crm-pwd-toggle:hover,.crm-pwd-toggle:focus-visible{color:var(--crm-primary,#530383);outline:none}
.crm-pwd-toggle-ig{background:#f8f8fc;border-color:#e0e0e8;color:#aaa;cursor:pointer;transition:color .15s}
.crm-pwd-toggle-ig:hover{color:var(--crm-primary,#530383)}
