/* =============================================================================
   Auth pages. Brand colour comes from --brand-1/--brand-2, emitted per-request
   from the resolved tenant branding, so re-theming is data, not CSS.
     - .cfp-login-* : every account page (sign in, forgot / reset / change
                      password, access denied): video backdrop + glass card.
     - .cfp-auth-*  : the plain white card, still used by the error page.
   ============================================================================= */

:root {
    --brand-1: #E1591A;                /* overridden inline from tenant branding */
    --brand-2: #F08A3C;
    --tint-050: #FEeee2;
    --tint-200: #F6C79E;
    --auth-bg: #f3efe9;
    --auth-card: #ffffff;
    --auth-text: #241a12;
    --auth-muted: #7a6a5c;
    --auth-border: #ece5dc;
    --auth-field-border: #ddd3c8;
    --auth-error-bg: #fdecec;
    --auth-error-text: #b3261e;
}

* { box-sizing: border-box; }

/* ---- simple white-card pages ---------------------------------------------- */
.cfp-auth-body {
    margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--auth-bg);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--auth-text); padding: 24px;
}
.cfp-auth-card {
    width: 100%; max-width: 440px; background: var(--auth-card);
    border: 1px solid var(--auth-border); border-radius: 16px; overflow: hidden;
    box-shadow: 0 12px 34px rgba(40, 22, 8, 0.10);
}
.cfp-auth-inner { padding: 26px 36px 30px; }
.cfp-auth-title { text-align: center; margin-bottom: 22px; }
.cfp-auth-title h1 { font-size: 20px; font-weight: 600; margin: 0 0 3px; letter-spacing: -0.01em; color: var(--brand-1); }
.cfp-auth-title p { font-size: 13px; color: var(--auth-muted); margin: 0; }
.cfp-auth-form label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.cfp-auth-form input[type="email"], .cfp-auth-form input[type="password"] {
    width: 100%; height: 44px; padding: 0 14px; margin-bottom: 18px; font-size: 15px;
    color: var(--auth-text); background: #fff; border: 1px solid var(--auth-field-border);
    border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.cfp-auth-form input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent); }
.cfp-auth-btn {
    width: 100%; height: 46px; border: 0; border-radius: 10px; color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    transition: filter .15s, transform .05s;
}
.cfp-auth-btn:hover { filter: brightness(1.06); }
.cfp-auth-btn:active { transform: scale(0.99); }
.cfp-auth-links { margin-top: 18px; text-align: center; font-size: 14px; }
.cfp-auth-links a { color: var(--brand-2); font-weight: 600; text-decoration: none; }
.cfp-auth-links a:hover { text-decoration: underline; }
.cfp-auth-error { background: var(--auth-error-bg); color: var(--auth-error-text); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
.cfp-auth-info { background: var(--tint-050); color: var(--brand-1); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.cfp-auth-note { font-size: 13px; color: var(--auth-muted); margin: 0 0 18px; line-height: 1.5; }
.cfp-auth-footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--auth-border); text-align: center; font-size: 12px; color: var(--auth-muted); }

/* =============================================================================
   Sign-in and forgot-password: a looping fleet-network video behind a frosted
   "liquid glass" card. The poster (the video's first frame) shows while the
   video loads, and instead of it for people who ask for reduced motion.
   ============================================================================= */
.cfp-login {
    margin: 0; min-height: 100vh; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--auth-text);
    background: #fff url(/media/fleet-network-poster.jpg) center / cover no-repeat;
}
.cfp-login-video {
    position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none;
}
/* a faint warm wash, so the white glass has something to sit on */
.cfp-login-wash {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(60% 55% at 50% 50%, rgba(240,138,60,.10), transparent 70%),
        linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(250,240,232,.35) 100%);
}

/* liquid-glass card */
.cfp-login-card {
    position: relative; z-index: 2; width: 100%; max-width: 420px; padding: 34px 36px 26px;
    border-radius: 24px; overflow: hidden;
    background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.34));
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow:
        0 24px 60px rgba(120, 50, 10, .16),
        0 2px 6px rgba(120, 50, 10, .06),
        inset 0 1px 0 rgba(255,255,255,.9),
        inset 0 -1px 0 rgba(255,255,255,.35);
    animation: cfp-card-in .7s cubic-bezier(.2,.7,.2,1) both;
}
/* the slow sheen sweeping across the glass */
.cfp-login-card::before {
    content: ""; position: absolute; inset: -40%; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.45) 50%, transparent 60%);
    animation: cfp-sheen 9s ease-in-out infinite;
}
/* rim light along the top edge */
.cfp-login-card::after {
    content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, #fff, transparent);
}
.cfp-login-card > * { position: relative; }
@keyframes cfp-sheen { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes cfp-card-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

.cfp-login-head { text-align: center; margin-bottom: 22px; }
.cfp-login-logo { display: block; height: 44px; width: auto; margin: 0 auto 14px; }
.cfp-login-head h1 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.01em; }

.cfp-login-form label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.cfp-login-form input[type="email"], .cfp-login-form input[type="password"] {
    width: 100%; height: 46px; padding: 0 14px; margin-bottom: 16px; font: inherit; font-size: 15px;
    color: var(--auth-text); background: rgba(255,255,255,.55);
    border: 1px solid rgba(160,120,90,.28); border-radius: 12px;
    outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.cfp-login-form input::placeholder { color: #a39385; }
.cfp-login-form input:focus {
    background: rgba(255,255,255,.85); border-color: var(--brand-2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent);
}
.cfp-login-btn {
    width: 100%; height: 48px; border: 0; border-radius: 12px; color: #fff; font: inherit; font-size: 15px; font-weight: 600;
    cursor: pointer; margin-top: 4px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-1) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.35);
    transition: filter .15s, transform .05s;
}
.cfp-login-btn:hover { filter: brightness(1.06); }
.cfp-login-btn:active { transform: scale(0.99); }
.cfp-login-links { margin-top: 16px; text-align: center; font-size: 14px; }
.cfp-login-links a { color: var(--brand-1); font-weight: 600; text-decoration: none; }
.cfp-login-links a:hover { text-decoration: underline; }
.cfp-login-error { background: rgba(253,236,236,.85); border: 1px solid rgba(179,38,30,.25); color: var(--auth-error-text); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.cfp-login-info { background: rgba(254,238,226,.85); border: 1px solid rgba(225,89,26,.22); color: #8a3a10; border-radius: 12px; padding: 11px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.cfp-login-note { font-size: 13.5px; color: var(--auth-muted); line-height: 1.55; margin: 0 0 18px; }
.cfp-login-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(160,120,90,.18); text-align: center; font-size: 12px; color: var(--auth-muted); }

@media (prefers-reduced-motion: reduce) {
    .cfp-login-video { display: none; }
    .cfp-login-card, .cfp-login-card::before { animation: none !important; }
    .cfp-login-card::before { display: none; }
}
@media (max-width: 480px) { .cfp-login-card { padding: 28px 22px 22px; border-radius: 20px; } }
