/* =========================================================================
   TESCO Portal — theme
   The tescobus.com design system (TescoBus.Web wwwroot/css/inventory.css)
   carried into the customer portal: navy header with the yellow rule,
   Source Sans Pro body, haboro display headings, field-blue accents, ink
   footer. Loaded LAST by Views/Shared/_PortalShell.cshtml so it wins over
   bootstrap.css / site.css / style2.css.

   Every rule below reads colors from the variables, never literals.
   ========================================================================= */

:root {
    /* tescobus.com tokens (same names, same values) */
    --color-ink: #0F1A2E;
    --color-ink-soft: #2A3447;
    --color-ink-muted: #5B6474;
    --color-rule: #D8DDE5;
    --color-paper: #FFFFFF;
    --color-mist: #F3F6F9;          /* portal page background (cool, not bone) */
    --color-accent: #1E5BA8;
    --color-accent-dk: #154480;
    --color-success: #1F6F4A;
    --hdr-navy: #0d2540;
    --hdr-navy-deep: #08182b;
    --hdr-yellow: #f5b400;
    --hdr-text: #ffffff;
    --hdr-text-dim: rgba(255, 255, 255, 0.78);
    --inv-field-blue: #70A3C2;
    --inv-field-blue-hover: #224E71;
    --font-display: "haboro-contrast-extended", "Source Sans Pro", sans-serif;
    --font-body: "Source Sans Pro", "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow-tile: 0 1px 2px rgba(15, 26, 46, 0.04), 0 8px 24px rgba(15, 26, 46, 0.06);
    --shadow-tile-hover: 0 2px 4px rgba(15, 26, 46, 0.06), 0 16px 40px rgba(15, 26, 46, 0.12);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --max-width: 1400px;
    --gutter: clamp(1rem, 3vw, 2.5rem);

    --surface-header:
        radial-gradient(ellipse 45% 90% at 50% 100%, rgba(35, 75, 120, 0.35) 0%, rgba(35, 75, 120, 0) 75%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.10) 100%),
        linear-gradient(180deg, #08182b 0%, #0d2540 55%, #0f2848 100%);
    --surface-ink:
        radial-gradient(ellipse 60% 70% at 50% 0%, rgba(35, 75, 120, 0.30) 0%, rgba(35, 75, 120, 0) 75%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.10) 100%),
        linear-gradient(180deg, #142036 0%, #0F1A2E 55%, #0a1424 100%);
    --surface-rail:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(110, 165, 200, 0.22) 0%, rgba(110, 165, 200, 0) 70%),
        linear-gradient(180deg, #1B3F5C 0%, #224E71 60%, #285880 100%);
    /* Page banners inside views (the old blue gradient headers) */
    --surface-banner:
        radial-gradient(ellipse 70% 120% at 85% 0%, rgba(112, 163, 194, 0.22) 0%, rgba(112, 163, 194, 0) 70%),
        linear-gradient(135deg, #0d2540 0%, #133559 55%, #224E71 100%);

    --pm-header-h: 86px;
}

/* ---- Smooth page-to-page navigation (Chromium/Edge 126+) ---------------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
.pm-header { view-transition-name: pm-header; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---- Base --------------------------------------------------------------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; scroll-behavior: smooth; }
html body.pm {
    margin: 0;
    background: var(--color-mist);
    color: var(--color-ink);
    font-family: var(--font-body) !important;
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.pm a { color: var(--color-accent); }
body.pm a:hover { color: var(--color-accent-dk); }
body.pm :focus-visible { outline: 3px solid var(--hdr-yellow); outline-offset: 2px; }

body.pm h1, body.pm h2, body.pm h3, body.pm h4, body.pm h5, body.pm h6,
body.pm .h1, body.pm .h2, body.pm .h3 { font-family: var(--font-body); color: inherit; }
body.pm .pm-main h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }

/* Legacy "fade in after JS" wrappers: content shows immediately now. */
body.pm .page-loading { opacity: 1 !important; transition: none !important; }

/* ---- Header (tescobus v3: nav left | brand center | utility right) ------ */
.pm-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    color: var(--hdr-text);
    transition: box-shadow 0.2s var(--ease-out);
}
.pm-header__band {
    background: var(--surface-header);
    border-bottom: 3px solid var(--hdr-yellow);
}
.pm-header.is-scrolled { box-shadow: 0 6px 24px rgba(8, 24, 43, 0.28); }
.pm-header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
    min-height: var(--pm-header-h);
    transition: min-height 0.2s var(--ease-out), padding 0.2s var(--ease-out);
}
.pm-header.is-scrolled .pm-header__bar { min-height: 64px; padding-top: 0.4rem; padding-bottom: 0.4rem; }

.pm-brand { justify-self: center; display: inline-flex; align-items: center; text-decoration: none; }
.pm-brand__logo { display: block; width: 220px; height: auto; transition: width 0.2s var(--ease-out); }
.pm-header.is-scrolled .pm-brand__logo { width: 170px; }

.pm-nav { display: flex; align-items: center; gap: 2rem; justify-self: start; margin: 0; padding: 0; list-style: none; }
.pm-nav__item { position: relative; }
.pm-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 0;
    padding: 0.5rem 0;
    color: var(--hdr-text) !important;
    font: 600 0.8125rem/1 var(--font-body);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}
.pm-nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -0.375rem;
    height: 3px;
    background: var(--hdr-yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms var(--ease-out);
}
.pm-nav__link:hover::after,
.pm-nav__item.is-open > .pm-nav__link::after,
.pm-nav__link.is-active::after { transform: scaleX(1); }
.pm-nav__caret { width: 10px; height: 10px; transition: transform 0.15s var(--ease-out); opacity: 0.8; }
.pm-nav__item.is-open .pm-nav__caret { transform: rotate(180deg); }

.pm-panel {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: -1.25rem;
    min-width: 240px;
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-top: 3px solid var(--hdr-yellow);
    box-shadow: 0 14px 30px rgba(15, 26, 46, 0.14);
    padding: 0.6rem 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s var(--ease-out), transform 0.15s var(--ease-out), visibility 0s linear 0.15s;
    z-index: 1040;
}
.pm-nav__item.is-open > .pm-panel {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
    transition: opacity 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}
.pm-panel a {
    display: block;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    color: var(--color-ink-soft) !important;
    text-decoration: none !important;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: color 0.15s var(--ease-out), background 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.pm-panel a:hover, .pm-panel a:focus-visible, .pm-panel a.is-active {
    color: var(--color-accent) !important;
    background: var(--color-mist);
    border-left-color: var(--hdr-yellow);
}

.pm-utility { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.pm-utility__top { display: flex; align-items: center; gap: 0.65rem; font: 600 0.9rem/1 var(--font-body); }
.pm-utility__top a { color: var(--hdr-text) !important; text-decoration: none !important; }
.pm-utility__top a:hover { color: var(--hdr-yellow) !important; }
.pm-utility__sep { color: var(--hdr-text-dim); }
.pm-utility__bot { display: flex; align-items: center; gap: 1rem; font: 600 0.6875rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; }
.pm-utility__bot a { color: var(--hdr-text) !important; text-decoration: none !important; }
.pm-utility__bot a:hover { color: var(--hdr-yellow) !important; }
.pm-utility__hello { color: var(--hdr-text-dim); }
.pm-utility__hello strong { color: var(--hdr-yellow); font-weight: 600; }
.pm-utility__btn {
    border: 1px solid rgba(245, 180, 0, 0.7);
    padding: 0.4rem 0.75rem;
    border-radius: 2px;
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.pm-utility__btn:hover { background: var(--hdr-yellow); color: var(--hdr-navy) !important; }


/* Hamburger (mobile) */
.pm-burger { display: none; background: transparent; border: 0; color: var(--hdr-text); padding: 0.4rem; cursor: pointer; justify-self: start; }
.pm-burger svg { display: block; }
.pm-burger__close { display: none !important; }
.pm-header.is-mobile-open .pm-burger__open { display: none !important; }
.pm-header.is-mobile-open .pm-burger__close { display: block !important; }

/* Top-of-page progress bar shown while the next page loads */
.pm-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--hdr-yellow), #ffd34d);
    box-shadow: 0 0 8px rgba(245, 180, 0, 0.6);
    z-index: 2000; opacity: 0; pointer-events: none;
    transition: width 0.25s var(--ease-out), opacity 0.3s var(--ease-out);
}
.pm-progress.is-active { opacity: 1; }

/* ---- Main ---------------------------------------------------------------- */
.pm-main { flex: 1 0 auto; width: 100%; overflow-x: clip; }
body.pm #searchResultText { white-space: nowrap; }
.pm-main > .pm-page { max-width: var(--max-width); margin: 0 auto; padding: 2rem var(--gutter) 3.5rem; }

/* Legacy in-view chrome (old sidebars / navbars / yellow strips that some
   staff pages render themselves) — the shell now provides all of that. */
.pm-main .yellow_strip,
.pm-main .yellow_strip_footer,
.pm-main nav.navbar,
.pm-main #sidebar,
.pm-main #sidebarCollapse,
.pm-main .topButton,
.pm-main .copyright,
.pm-main .copyright_mobile { display: none !important; }
.pm-main #content { width: 100% !important; margin-left: 0 !important; }
.pm-main .wrapper { display: block; }

/* Page hero for pages built on the shell (tescobus .article-hero, navy) */
.pm-hero {
    background: var(--surface-banner);
    color: var(--hdr-text);
    border-bottom: 3px solid var(--hdr-yellow);
}
.pm-hero__inner { max-width: var(--max-width); margin: 0 auto; padding: clamp(2.25rem, 5vw, 3.75rem) var(--gutter) clamp(2rem, 4vw, 3rem); }
.pm-hero__eyebrow { font: 600 0.75rem/1 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--hdr-yellow); margin: 0 0 0.9rem; }
.pm-hero__title { font-family: var(--font-display) !important; font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 0.75rem; color: #fff; }
.pm-hero__lede { max-width: 62ch; font-size: clamp(1rem, 1.4vw, 1.125rem); color: var(--hdr-text-dim); margin: 0; }

/* ---- Footer (tescobus ink footer) ----------------------------------------- */
.pm-footer { flex-shrink: 0; background: var(--surface-ink); color: #B8C0CC; border-top: 3px solid var(--hdr-yellow); margin-top: 0; }
.pm-footer__top { max-width: var(--max-width); margin: 0 auto; padding: 3rem var(--gutter) 2rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.pm-footer__brand { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin: 0 0 0.6rem; }
.pm-footer p { margin: 0.2rem 0; font-size: 0.9rem; }
.pm-footer__heading { font: 600 0.72rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: #fff; margin: 0 0 0.9rem !important; }
.pm-footer ul { list-style: none; margin: 0; padding: 0; }
.pm-footer a { display: inline-block; color: #B8C0CC !important; padding: 0.28rem 0; font-size: 0.9rem; text-decoration: none !important; transition: color 0.15s var(--ease-out); }
.pm-footer a:hover { color: #fff !important; }
.pm-footer__phone a { color: var(--hdr-yellow) !important; font-weight: 600; }
.pm-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.pm-footer__bottom-inner { max-width: var(--max-width); margin: 0 auto; padding: 1.1rem var(--gutter); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: #8A94A6; }

/* ---- Bootstrap 4 components re-skinned to the tescobus palette ---------- */
body.pm .btn { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em; border-radius: 4px; transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out), border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out); }
body.pm .btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
body.pm .btn-primary:hover, body.pm .btn-primary:focus { background: var(--color-accent-dk); border-color: var(--color-accent-dk); color: #fff; }
body.pm .btn-outline-primary { color: var(--color-accent); border-color: var(--color-accent); }
body.pm .btn-outline-primary:hover { background: var(--color-accent); color: #fff; }
body.pm .btn-warning { background: var(--hdr-yellow); border-color: var(--hdr-yellow); color: var(--hdr-navy); }
body.pm .btn-secondary { background: var(--color-ink-soft); border-color: var(--color-ink-soft); }
body.pm .btn-info { background: var(--inv-field-blue-hover); border-color: var(--inv-field-blue-hover); color: #fff; }
body.pm .bg-primary { background-color: var(--color-accent) !important; }
body.pm .text-primary { color: var(--color-accent) !important; }
body.pm .badge-primary { background: var(--color-accent); }
body.pm .form-control, body.pm .custom-select, body.pm select, body.pm input[type="text"], body.pm input[type="search"], body.pm input[type="email"], body.pm input[type="password"], body.pm input[type="date"], body.pm input[type="number"], body.pm textarea {
    font-family: var(--font-body);
    border-color: var(--color-rule);
    transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
body.pm .form-control:focus, body.pm .custom-select:focus, body.pm select:focus, body.pm input:focus, body.pm textarea:focus {
    border-color: var(--inv-field-blue);
    box-shadow: 0 0 0 3px rgba(112, 163, 194, 0.28);
    outline: none;
}
body.pm .table thead th { border-bottom: 2px solid var(--hdr-yellow); font-weight: 600; }
body.pm .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(112, 163, 194, 0.07); }
body.pm .table-hover tbody tr:hover { background-color: rgba(112, 163, 194, 0.14); }
body.pm .page-item.active .page-link { background: var(--color-accent); border-color: var(--color-accent); }
body.pm .page-link { color: var(--color-accent); }
body.pm .nav-tabs .nav-link.active { border-top: 3px solid var(--hdr-yellow); color: var(--color-ink); }
body.pm .card { border-color: var(--color-rule); box-shadow: var(--shadow-tile); }
body.pm .modal-header { background: var(--surface-banner); color: #fff; border-bottom: 3px solid var(--hdr-yellow); }
body.pm .modal-header .close { color: #fff; text-shadow: none; opacity: 0.85; }
body.pm .dropdown-menu { border-color: var(--color-rule); border-top: 3px solid var(--hdr-yellow); box-shadow: 0 14px 30px rgba(15, 26, 46, 0.14); border-radius: 0; }
body.pm .dropdown-item:hover { background: var(--color-mist); color: var(--color-accent); }

/* Old site.css components that still appear inside staff pages */

/* Shared interaction polish for the card/tile patterns the views use */
body.pm .stat-card, body.pm .qr-stat-card, body.pm .info-card, body.pm .table-card, body.pm .portal-card, body.pm .rep-card {
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
    .pm-header__bar { padding: 0.6rem 1.25rem; gap: 1rem; }
    .pm-nav { gap: 1.4rem; }
    .pm-brand__logo { width: 180px; }
}
@media (max-width: 900px) {
    :root { --pm-header-h: 64px; }
    .pm-header__bar { grid-template-columns: auto 1fr auto; }
    .pm-burger { display: inline-flex; }
    .pm-brand { justify-self: center; }
    .pm-brand__logo, .pm-header.is-scrolled .pm-brand__logo { width: 150px; }
    .pm-utility__top .pm-utility__phone, .pm-utility__top .pm-utility__sep, .pm-utility__bot .pm-utility__site { display: none; }
    .pm-utility__bot .pm-utility__hello { display: none; }
    /* Nav becomes a drawer under the header */
    .pm-header .pm-nav--primary { display: none; }
    .pm-header.is-mobile-open .pm-nav--primary { display: block; }
    .pm-header.is-mobile-open { max-height: 100vh; overflow-y: auto; }
    .pm-header .pm-nav--primary {
        grid-column: 1 / -1;
        order: 5;
        padding: 0.5rem 0 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .pm-nav--primary .pm-nav__item { display: block; }
    .pm-nav--primary .pm-nav__link { width: 100%; justify-content: space-between; padding: 0.95rem 0; font-size: 0.85rem; }
    .pm-nav__link::after { display: none; }
    .pm-panel, .pm-nav__item.is-open > .pm-panel {
        position: static; transform: none; box-shadow: none; border: 0; min-width: 0;
        background: transparent; padding: 0 0 0.5rem 0.75rem; display: none;
        opacity: 1; visibility: visible; pointer-events: auto;
    }
    .pm-nav__item.is-open > .pm-panel { display: block; }
    .pm-nav--primary .pm-panel a { color: var(--hdr-text-dim) !important; border-left: 2px solid rgba(255, 255, 255, 0.15); }
    .pm-nav--primary .pm-panel a:hover { color: #fff !important; background: transparent; border-left-color: var(--hdr-yellow); }
    .pm-footer__top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
    .pm-footer__top { grid-template-columns: 1fr; }
    .pm-utility__bot .pm-utility__btn { padding: 0.35rem 0.55rem; }
}

@media print {
    .pm-header, .pm-footer, .pm-progress { display: none !important; }
    html body.pm { background: #fff; }
}

/* ---- Sign-in / password pages (_LayoutLogin) ------------------------------ */
.pm-auth {
    position: relative;
    min-height: calc(100vh - var(--pm-header-h) - 3px);
    display: flex;
    align-items: center;
    background:
        linear-gradient(100deg, rgba(8, 24, 43, 0.94) 0%, rgba(13, 37, 64, 0.86) 45%, rgba(13, 37, 64, 0.55) 100%),
        url("/media/TESCO_aerial.jpg") center / cover no-repeat,
        var(--hdr-navy);
    color: #fff;
}
.pm-auth__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
    display: grid;
    grid-template-columns: 1.15fr minmax(320px, 420px);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
.pm-auth__inner--single { grid-template-columns: minmax(0, 480px); justify-content: center; }
.pm-auth__copy .pm-hero__title { max-width: 16ch; }
.pm-auth__points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.7rem; }
.pm-auth__points li { display: flex; gap: 0.75rem; align-items: baseline; color: var(--hdr-text-dim); }
.pm-auth__points li::before { content: ""; flex: 0 0 auto; width: 18px; height: 3px; background: var(--hdr-yellow); transform: translateY(-4px); }
.pm-auth__card {
    background: var(--color-paper);
    color: var(--color-ink);
    border-top: 4px solid var(--hdr-yellow);
    box-shadow: 0 24px 60px rgba(4, 12, 24, 0.45);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: 2px;
}
.pm-auth__card h1, .pm-auth__card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.85rem; margin: 0 0 0.35rem; color: var(--color-ink); }
.pm-auth__card .pm-auth__sub { color: var(--color-ink-muted); margin: 0 0 1.5rem; }
.pm-field { margin-bottom: 1.1rem; }
.pm-field label { display: block; font: 600 0.75rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-ink-soft); margin-bottom: 0.5rem; }
.pm-field input {
    width: 100%; height: 48px; padding: 0 0.9rem; font-size: 1rem; color: var(--color-ink);
    border: 1px solid var(--color-rule); border-radius: 2px; background: #fff;
}
.pm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%; height: 50px; border: 0; border-radius: 2px; cursor: pointer;
    background: var(--color-accent); color: #fff !important;
    font: 600 0.85rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
    transition: background 0.15s var(--ease-out), transform 0.15s var(--ease-out);
    text-decoration: none !important;
}
.pm-btn:hover { background: var(--color-accent-dk); }
.pm-btn:active { transform: translateY(1px); }
.pm-btn[aria-busy="true"] { opacity: 0.8; pointer-events: none; }
.pm-btn--auto { width: auto; padding: 0 1.75rem; }
.pm-btn--yellow { background: var(--hdr-yellow); color: var(--hdr-navy) !important; }
.pm-btn--yellow:hover { background: #ffc61a; }
.pm-alert { border-left: 4px solid #C8102E; background: #fdf0f2; color: #7a0a1c; padding: 0.75rem 1rem; margin: 0 0 1.25rem; font-weight: 600; }
.pm-auth__meta { margin: 1.25rem 0 0; font-size: 0.92rem; color: var(--color-ink-muted); }
.pm-auth__meta a { font-weight: 600; }
.pm-auth .reset-wrapper { min-height: 0 !important; background: none !important; padding: 2.5rem 1rem !important; width: 100%; }
@media (max-width: 900px) {
    .pm-auth__inner { grid-template-columns: 1fr; }
    .pm-auth__copy .pm-auth__points { display: none; }
}

/* ---- Portal home (Views/Home/Index) --------------------------------------- */
.pm-home { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; }
.pm-home__section + .pm-home__section { margin-top: 3rem; }
.pm-home__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--color-rule); padding-bottom: 0.75rem; margin: 0 0 1.5rem; }
.pm-home__heading h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: 0; color: var(--color-ink); }
.pm-home__heading p { margin: 0; color: var(--color-ink-muted); font-size: 0.95rem; }
/* Three primary cards (two destinations each) over two full-width strips
   (one destination each), so every row lines up. */
.pm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.pm-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: 4px;
    box-shadow: var(--shadow-tile); overflow: hidden;
    transition: box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.pm-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--hdr-navy); transition: background 0.2s var(--ease-out); }
.pm-card:hover, .pm-card:focus-within { box-shadow: var(--shadow-tile-hover); transform: translateY(-3px); border-color: #c5ccd7; }
.pm-card:hover::before, .pm-card:focus-within::before { background: var(--hdr-yellow); }
.pm-card__body { padding: 1.75rem 1.75rem 1.25rem; flex: 1 1 auto; }
.pm-card__icon {
    width: 52px; height: 52px; display: grid; place-items: center; border-radius: 4px;
    background: var(--surface-header, var(--hdr-navy)); background-color: var(--hdr-navy);
    color: var(--hdr-yellow); font-size: 1.3rem; margin-bottom: 1.1rem;
}
.pm-card__title { font-family: var(--font-display) !important; font-weight: 400; font-size: 1.45rem; line-height: 1.15; color: var(--color-ink); margin: 0 0 0.5rem; }
.pm-card__desc { margin: 0; color: var(--color-ink-muted); font-size: 0.98rem; line-height: 1.5; }
.pm-card__links { list-style: none; margin: 0; padding: 0; background: var(--color-mist); border-top: 1px solid var(--color-rule); }
.pm-card__links li + li { border-top: 1px solid var(--color-rule); }
.pm-card__links a {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.95rem 1.75rem; color: var(--color-ink-soft) !important; font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.pm-card__links a i { font-size: 0.75rem; color: var(--color-accent); transition: transform 0.15s var(--ease-out); }
.pm-card__links a:hover, .pm-card__links a:focus-visible { background: #fff; color: var(--color-accent) !important; }
.pm-card__links a:hover i, .pm-card__links a:focus-visible i { transform: translateX(4px); }

.pm-strips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.pm-strip {
    display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem 1.75rem;
    background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: 4px;
    box-shadow: var(--shadow-tile); color: var(--color-ink) !important; text-decoration: none !important;
    transition: box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.pm-strip:hover, .pm-strip:focus-visible { box-shadow: var(--shadow-tile-hover); transform: translateY(-2px); }
.pm-strip__icon {
    flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
    background: var(--color-mist); color: var(--inv-field-blue-hover); font-size: 1.3rem;
}
.pm-strip__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.pm-strip__title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; }
.pm-strip__desc { color: var(--color-ink-muted); font-size: 0.95rem; line-height: 1.45; }
.pm-strip__cta {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.55rem; height: 42px; padding: 0 1.15rem;
    border: 1px solid var(--color-accent); border-radius: 2px; color: var(--color-accent);
    font: 600 0.78rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.pm-strip:hover .pm-strip__cta { background: var(--color-accent); color: #fff; }
.pm-strip--navy { background: var(--surface-banner); border-color: transparent; color: #fff !important; }
.pm-strip--navy .pm-strip__icon { background: rgba(255, 255, 255, 0.1); color: var(--hdr-yellow); }
.pm-strip--navy .pm-strip__desc { color: var(--hdr-text-dim); }
.pm-strip--navy .pm-strip__cta { background: var(--hdr-yellow); border-color: var(--hdr-yellow); color: var(--hdr-navy); }
.pm-strip--navy:hover .pm-strip__cta { background: #ffc61a; color: var(--hdr-navy); }

.pm-strip--feature { margin-bottom: 1.5rem; border-left: 4px solid var(--hdr-yellow); }
.pm-strip--feature .pm-strip__icon { background: var(--hdr-navy); color: var(--hdr-yellow); }

@media (max-width: 1000px) {
    .pm-cards { grid-template-columns: 1fr 1fr; }
    .pm-strips { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .pm-cards { grid-template-columns: 1fr; }
    .pm-home__heading { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .pm-strip { flex-wrap: wrap; }
    .pm-strip__cta { width: 100%; justify-content: center; }
}
.pm-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.pm-actions .pm-btn { width: auto; padding: 0 1.5rem; height: 46px; }
.pm-btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.6); }
.pm-btn--ghost:hover { background: #fff; color: var(--hdr-navy) !important; }

/* ---- Telematics: the dashboards drew their own logo + nav bar ------------- */
.pm-telematics #dashboardContent .logo-section,
.pm-telematics #dashboardContent .nav-menu,
.pm-telematics .global-header { display: none !important; }
.pm-telematics .pm-main { display: flex; flex-direction: column; }
