/* =========================================================================
   Pleazz — shared auth skin (2026 design)

   Linked by application/views/2026/includes/headPublic.php for every view in
   its $sharedStylesheets map (login/login, login/companyLogin, login/buyerLogin)
   with a ?s= . filesize() buster. Nothing @imports this file: a screen that
   needs the skin is added to that map, so there is never a version string that
   has to be bumped and no cached parent that can hide an edit.

   SCOPING CONTRACT
   Every rule below is scoped to .login-2026, the <main> of the 2026 auth
   screens (login, companyLogin, buyerLogin all carry it -- it is the shared
   auth skin). Shell-level rules (canvas, header, language pill, theme switch)
   live in 2026/css/shell/public.css and are NOT repeated here.

   THEME NOTE
   updatePublicTheme() only adds/removes .public-light-mode client-side, so
   after a toggle without a reload <body> can carry both theme classes or
   neither. Dark is therefore keyed off the ABSENCE of .public-light-mode,
   never off .public-dark-mode. <html data-public-theme> is server-rendered
   only and goes stale on toggle -- it is not used here.

   ICON NOTE
   Font Awesome is pinned at 6.0.0 (headPublic.php). Only glyph names that
   exist in that release are used: fa-shield-alt (NOT fa-shield-halved),
   fa-bell-concierge, fa-ticket, fa-calendar-days, fa-credit-card,
   fa-bullhorn, fa-arrow-right, and \f0c2 (cloud) for the logo tile.
   ========================================================================= */


/* -------------------------------------------------------------------------
   1. Tokens
   ---------------------------------------------------------------------- */

.login-2026 {
    --l26-primary: #F37220;
    --l26-primary-2: #F5811F;
    --l26-primary-deep: #E8590C;
    --l26-primary-soft: rgba(243, 114, 32, .13);
    --l26-primary-line: rgba(243, 114, 32, .38);

    --l26-title: #FFFFFF;
    --l26-text: #A8A29E;
    --l26-muted: #8A837E;

    --l26-card: rgba(62, 56, 51, .72);
    --l26-card-line: rgba(255, 255, 255, .09);

    --l26-chip: rgba(255, 255, 255, .028);
    --l26-chip-line: rgba(255, 255, 255, .085);
    --l26-chip-text: #D6D3D1;

    --l26-tabs: rgba(255, 255, 255, .06);
    --l26-tab-on: #FFFFFF;
    --l26-tab-on-text: #1C1917;
    --l26-tab-off-text: #A8A29E;

    --l26-input: #FFFFFF;
    --l26-input-line: transparent;
    --l26-input-text: #1C1917;
    --l26-placeholder: #A8A29E;

    --l26-rule: rgba(255, 255, 255, .14);
    --l26-green: #22C55E;
    --l26-danger: #EF4444;

    --l26-radius-card: 20px;
    --l26-radius: 10px;

    display: block;
    font-family: 'Inter', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--l26-text);
}

body.public-light-mode .login-2026 {
    --l26-primary-soft: rgba(243, 114, 32, .10);
    --l26-primary-line: rgba(243, 114, 32, .30);

    --l26-title: #1C1917;
    --l26-text: #57534E;
    --l26-muted: #78716C;

    --l26-card: #FFFDFB;
    --l26-card-line: rgba(0, 0, 0, .05);

    --l26-chip: rgba(255, 255, 255, .62);
    --l26-chip-line: rgba(0, 0, 0, .06);
    --l26-chip-text: #44403C;

    --l26-tabs: #F2F0EE;
    --l26-tab-on: #FFFFFF;
    --l26-tab-on-text: #1C1917;
    --l26-tab-off-text: #78716C;

    --l26-input: #FFFFFF;
    --l26-input-line: #E7E5E4;
    --l26-input-text: #1C1917;
    --l26-placeholder: #A8A29E;

    --l26-rule: #E7E5E4;
}


/* -------------------------------------------------------------------------
   3. Layout
   ---------------------------------------------------------------------- */

.login-2026 .l26 {
    width: 100%;
    padding: 8px 0 72px;
}

.login-2026 .l26-grid {
    max-width: var(--l26-page);
    margin: 0 auto;
    padding-right: var(--l26-rail);
    padding-left: var(--l26-rail);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 448px;
    gap: 64px;
    align-items: center;
    min-height: calc(100vh - 210px);
}


/* -------------------------------------------------------------------------
   4. Left column
   ---------------------------------------------------------------------- */

.login-2026 .l26-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 17px;
    border: 1px solid var(--l26-primary-line);
    border-radius: 999px;
    background: var(--l26-primary-soft);
    color: var(--l26-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.login-2026 .l26-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.login-2026 .l26-dot-green {
    background: var(--l26-green);
    color: var(--l26-green);
}

.login-2026 .l26-title {
    max-width: 11ch;
    margin: 26px 0 0;
    color: var(--l26-title);
    font-size: clamp(40px, 5.1vw, 66px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.022em;
}

.login-2026 .l26-lead {
    max-width: 430px;
    margin: 32px 0 0;
    color: var(--l26-text);
    font-size: 17px;
    line-height: 1.62;
}

.login-2026 .l26-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin: 52px 0 0;
    padding: 0;
    list-style: none;
}

.login-2026 .l26-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 92px;
    padding: 13px 12px;
    border: 1px solid var(--l26-chip-line);
    border-radius: 12px;
    background: var(--l26-chip);
    color: var(--l26-chip-text);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.login-2026 .l26-chip i {
    font-size: 16px;
    color: var(--l26-primary);
}


/* -------------------------------------------------------------------------
   5. Card
   ---------------------------------------------------------------------- */

.login-2026 .l26-panel {
    display: flex;
    justify-content: flex-end;
}

.login-2026 .l26-card {
    width: 100%;
    max-width: 448px;
    padding: 40px;
    border: 1px solid var(--l26-card-line);
    border-radius: var(--l26-radius-card);
    background: var(--l26-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .34);
}

body.public-light-mode .login-2026 .l26-card {
    box-shadow: 0 24px 64px rgba(140, 90, 40, .12);
}


/* -------------------------------------------------------------------------
   6. Tabs
   The <ul> keeps id="loginForms" + role="tablist" and the buttons keep
   data-bs-toggle="pill" / data-bs-target -- login.js queries those exact
   selectors for #hash deep-linking and history.pushState.
   ---------------------------------------------------------------------- */

.login-2026 .l26-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 24px;
    padding: 4px;
    border-radius: 12px;
    background: var(--l26-tabs);
    list-style: none;
}

.login-2026 .l26-tabs .nav-item {
    flex: 1 1 0;
}

/* one level more specific than Bootstrap's .nav-pills .nav-link.active */
.login-2026 .l26-tabs .nav-link {
    width: 100%;
    padding: 9px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--l26-tab-off-text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    transition: background-color .18s ease, color .18s ease;
}

.login-2026 .l26-tabs .nav-link:hover {
    color: var(--l26-title);
}

.login-2026 .l26-tabs .nav-link.active {
    background: var(--l26-tab-on);
    color: var(--l26-tab-on-text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
}

.login-2026 .l26-tabs .nav-link:focus-visible {
    outline: 2px solid var(--l26-primary);
    outline-offset: 2px;
}


/* -------------------------------------------------------------------------
   7. Response messages
   #responseMessages is left BYTE-IDENTICAL in the markup, including its
   placeholder <div class="alert" role="alert"></div>. That placeholder is
   an empty Bootstrap alert and would otherwise reserve vertical space, so
   it is hidden here rather than removed from the view.
   displayResponseMessagges() replaces the container's innerHTML wholesale
   with .alert.alert-*.alert-dismissible markup containing a .btn-close.
   ---------------------------------------------------------------------- */

.login-2026 #responseMessages .alert:empty {
    display: none;
}

.login-2026 #responseMessages .alert {
    margin-bottom: 14px;
    border: 1px solid var(--l26-card-line);
    border-radius: var(--l26-radius);
    font-size: 13.5px;
}

.login-2026 #responseMessages .alert-danger {
    border-color: rgba(239, 68, 68, .35);
    background: rgba(239, 68, 68, .12);
    color: #FCA5A5;
}

.login-2026 #responseMessages .alert-success {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .12);
    color: #86EFAC;
}

.login-2026 #responseMessages .alert-warning {
    border-color: rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .12);
    color: #FCD34D;
}

.login-2026 #responseMessages .alert-info {
    border-color: rgba(59, 130, 246, .35);
    background: rgba(59, 130, 246, .12);
    color: #93C5FD;
}

/* Bootstrap's .btn-close is a dark SVG and is invisible on these
   translucent dark alerts. */
.login-2026 #responseMessages .btn-close {
    filter: invert(1) grayscale(1) brightness(1.9);
    opacity: .7;
}

body.public-light-mode .login-2026 #responseMessages .alert-danger  { background: rgba(239, 68, 68, .10); color: #B91C1C; }
body.public-light-mode .login-2026 #responseMessages .alert-success { background: rgba(34, 197, 94, .10); color: #15803D; }
body.public-light-mode .login-2026 #responseMessages .alert-warning { background: rgba(245, 158, 11, .10); color: #B45309; }
body.public-light-mode .login-2026 #responseMessages .alert-info    { background: rgba(59, 130, 246, .10); color: #1D4ED8; }

body.public-light-mode .login-2026 #responseMessages .btn-close {
    filter: none;
    opacity: .55;
}


/* -------------------------------------------------------------------------
   8. Fields
   Inputs keep .form-control so any Bootstrap validation wiring stays intact;
   these selectors are (0,2,0) and beat .form-control (0,1,0) regardless of
   source order.
   ---------------------------------------------------------------------- */

.login-2026 .l26-field {
    margin: 0 0 18px;
}

.login-2026 .l26-label {
    display: block;
    margin: 0 0 8px;
    color: var(--l26-title);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .075em;
    line-height: 1.2;
    text-transform: uppercase;
}

.login-2026 .l26-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-2026 .l26-label-row .l26-link {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.login-2026 .l26-input-wrap {
    position: relative;
}

.login-2026 .l26-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--l26-input-line);
    border-radius: var(--l26-radius);
    background: var(--l26-input);
    color: var(--l26-input-text);
    font-size: 15px;
    line-height: 42px;
    outline: none;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.login-2026 .l26-input::placeholder {
    color: var(--l26-placeholder);
    opacity: 1;
}

.login-2026 .l26-input:focus {
    border-color: var(--l26-primary);
    background: var(--l26-input);
    color: var(--l26-input-text);
    box-shadow: 0 0 0 3px rgba(243, 114, 32, .18);
}

.login-2026 .l26-input-pw {
    padding-right: 48px;
}

/* The eye stays an <img> whose src is swapped by toggleInputType(), which
   finds the field via previousElementSibling -- the <input> must remain the
   immediately preceding sibling. view-off.png / view-on.png are pure white
   (drawn for the old dark inputs), so they are darkened for the white field. */
.login-2026 .l26-eye {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 18px;
    height: auto;
    transform: translateY(-50%);
    cursor: pointer;
    filter: brightness(0) saturate(0);
    opacity: .42;
    transition: opacity .18s ease;
}

.login-2026 .l26-eye:hover {
    opacity: .72;
}

/* .invalid-feedback keeps Bootstrap's display:none until validation marks the
   field; only presentation is set here so that behaviour is unchanged. */
.login-2026 .l26-invalid {
    margin-top: 7px;
    color: var(--l26-danger);
    font-size: 12.5px;
    font-weight: 500;
}


/* -------------------------------------------------------------------------
   9. Submit
   ---------------------------------------------------------------------- */

.login-2026 .l26-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    margin: 24px 0 0;
    padding: 0 20px;
    border: 0;
    border-radius: var(--l26-radius);
    background: linear-gradient(90deg, var(--l26-primary-2) 0%, var(--l26-primary-deep) 100%);
    color: #FFFFFF;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: filter .18s ease, transform .12s ease;
}

.login-2026 .l26-submit:hover {
    filter: brightness(1.06);
    color: #FFFFFF;
}

.login-2026 .l26-submit:active {
    transform: translateY(1px);
}

.login-2026 .l26-submit:focus-visible {
    outline: 2px solid var(--l26-primary);
    outline-offset: 3px;
}

.login-2026 .l26-submit i {
    font-size: 12.5px;
}


/* -------------------------------------------------------------------------
   10. Card footer
   ---------------------------------------------------------------------- */

.login-2026 .l26-signup {
    margin: 18px 0 0;
    color: var(--l26-text);
    font-size: 13px;
    text-align: center;
}

.login-2026 .l26-link {
    color: var(--l26-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-2026 .l26-link:hover {
    color: var(--l26-primary);
    text-decoration: underline;
}

.login-2026 .l26-or {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 22px 0;
    color: var(--l26-muted);
    font-size: 11.5px;
    letter-spacing: .09em;
}

.login-2026 .l26-or::before,
.login-2026 .l26-or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--l26-rule);
}

.login-2026 .l26-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    color: var(--l26-muted);
    font-size: 12px;
}

.login-2026 .l26-secure .fa-shield-alt {
    font-size: 11.5px;
    opacity: .85;
}


/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1199.98px) {
    .login-2026 .l26-grid {
        grid-template-columns: minmax(0, 1fr) 420px;
        gap: 40px;
    }
}

@media (max-width: 991.98px) {
    .login-2026 .l26-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        min-height: 0;
        padding-top: 24px;
    }

    .login-2026 .l26-panel {
        justify-content: flex-start;
    }

    .login-2026 .l26-card {
        max-width: 540px;
    }

    .login-2026 .l26-title {
        max-width: none;
    }

    .login-2026 .l26-chips {
        margin-top: 36px;
    }
}

@media (max-width: 575.98px) {
    /* side gutters come from --l26-rail on .l26-grid, so only the
       vertical padding is set here */
    .login-2026 .l26 {
        padding: 4px 0 48px;
    }

    .login-2026 .l26-card {
        padding: 20px;
    }

    .login-2026 .l26-lead {
        margin-top: 24px;
        font-size: 15.5px;
    }

    .login-2026 .l26-chips {
        gap: 8px;
    }

    .login-2026 .l26-chip {
        flex: 1 1 28%;
        min-width: 0;
        padding: 13px 8px;
    }
}
