/* Template blue theme removed - colors/fonts come from the shared
   Peak NDT stylesheet (/css/style.css) served by the host. */

/* ── Customer layout: no staff sidebar, so the main content spans full width.
   style.css sizes .main via `calc(100% - var(--w-side-navigation))`, so zeroing the
   variable makes it full-width with no reserved gap on the left. */
.wrapper.no-sidebar {
    --w-side-navigation: 0px;
}
.wrapper.no-sidebar .main {
    width: 100% !important;
    margin-left: 0 !important;
}

/* ── Report create/edit form ───────────────────────────────────────────
   The shared .form-elements-Dimensional is `display:flex; align-items:center`
   (a single horizontal row). The report pages place multiple stacked .row
   blocks inside it (items, non-inspection items, technicians) and full-width
   field grids (client, procedure), so the row layout collapsed sideways and
   fields were squished. Stack the container's children vertically, full width. */
.form-elements-Dimensional {
    flex-direction: column;
    align-items: stretch;
}
.form-elements-Dimensional > .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ── Keep light-button text readable on hover ──────────────────────────
   style.css has a blanket ".btn:hover { color:#fff }" which makes white
   text on the still-light background of .btn-light unreadable. */
.btn.btn-light:hover,
.btn.btn-light:focus {
    color: #212529;
}

/* ── Report-type badge for Drill Pipe (DPR) ──────────────────────────
   style.css defines .report_SR_type (blue) and .report_DR_type (teal)
   but not DPR. Soft purple keeps it distinct from those + the pink/green
   report-name badges and the grey app background. */
.report_DPR_type {
    background-color: #b39ddb !important;
    color: #2c3e50;
    text-align: center;
    border-radius: 2px;
    border: 0.5px solid #3b45d8;
    padding: 0 4px;
}

/* ── Report-type badge for Non-API Drill Pipe (NAD) ──────────────────
   Keep the "NAD" label but highlight it like the other types. Warm amber
   keeps it distinct from SR (blue), DR (teal) and DPR (purple). */
.report_NAD_type {
    background-color: #f6c453 !important;
    color: #2c3e50;
    text-align: center;
    border-radius: 2px;
    border: 0.5px solid #c9962a;
    padding: 0 4px;
}

/* ── Collapsed sidebar (body.sidebar_small) ──────────────────────────
   style.css line 4431 (.sidebar ul li a .list-title-content span.list-title)
   sets display:inline-block + word-break:break-all with higher specificity
   than the collapse rule, so labels stay and wrap one letter per line.
   Hide the labels/badges outright when collapsed so only the icons show. */
body.sidebar_small .sidebar span.list-title,
body.sidebar_small .sidebar span.list-noti,
body.sidebar_small .sidebar .dropdown-list-head .list-title {
    display: none !important;
}

/* ── Sidebar label alignment (EXPANDED sidebar only) ──────────────────────────
   Give every icon the same fixed-width column so all the labels line up on the
   same x, regardless of the icon's intrinsic width (magnet vs ruler vs oil-well
   vs grip-lines) or whether it's an <i> glyph or the All Reports <img>. The <i>
   itself is made fixed-width (fa-fw style), which is what actually aligns the
   labels. Scoped to :not(.sidebar_small) so the collapsed/tablet icon-only state
   (which enlarges the icons via responsive.css) is left untouched. */
body:not(.sidebar_small) .sidebar ul li a .list-title-content {
    display: flex;
    align-items: center;
    gap: 8px;
}
body:not(.sidebar_small) .sidebar ul li a .list-title-content > span:first-child,
body:not(.sidebar_small) .sidebar ul li a .list-title-content > img {
    flex: 0 0 22px;
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
body:not(.sidebar_small) .sidebar ul li a .list-title-content > span:first-child > i {
    display: inline-block;
    width: 22px;
    text-align: center;
    margin: 0;
}
body:not(.sidebar_small) .sidebar ul li a .list-title-content > img {
    height: 18px;
    object-fit: contain;
}

/* ── Larger, touch-friendly sidebar icons on small screens (phones & tablets) ──
   Keyed off VIEWPORT width (reliable) rather than the min/max-device-width blocks
   in style.css/responsive.css, which don't match many devices. !important so it
   beats those blocks and the desktop alignment rule above. Applies in both the
   collapsed rail and the expanded overlay; every icon shares a 44px column at a
   26px glyph size, so the <img> (All Reports) matches the <i> glyphs and all are
   comfortably tappable. */
@media (max-width: 1024px) {
    .sidebar .list-title-content > span:first-child,
    .sidebar .list-title-content > img,
    .sidebar .dropdown-list-head img {
        width: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .sidebar .list-title-content > span:first-child > i,
    .sidebar ul.list-menu a i,
    .sidebar .dropdown-list-head i {
        font-size: 26px !important;
        width: 44px !important;
        display: inline-block !important;
        text-align: center;
        margin: 0 !important;
    }
    .sidebar .list-title-content > img,
    .sidebar .dropdown-list-head img {
        height: 28px !important;
        object-fit: contain;
    }
}

/* ── Collapsed rail (icons only): center the icons under the centered Peak logo
   and add vertical breathing room between them. Scoped to body.sidebar_small so
   the expanded overlay (icon + label rows) stays left-aligned. */
@media (max-width: 1024px) {
    body.sidebar_small .sidebar ul.list-menu > li {
        margin-bottom: 14px !important;
    }
    body.sidebar_small .sidebar ul li a {
        display: flex !important;
        justify-content: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.sidebar_small .sidebar .list-title-content {
        justify-content: center !important;
    }
}

/* ── Duplicate serial-number highlight (report create/edit pages) ─────────────
   Applied to a serial input whose value is duplicated elsewhere on the page.
   Targets the class whether it lands on a raw <input>, a Radzen textbox root, or
   its inner <input>. */
.dup-serial,
.dup-serial input,
.dup-serial .rz-textbox,
input.dup-serial,
td.dup-serial {
    background-color: #fff3cd !important;
    border-color: #ffda6a !important;
}

/* ── Header alignment on small screens ───────────────────────────────────────
   Several responsive blocks pin the header's `.right` (user name + profile) at
   top:0 / top:-11px or add margin-top, so it doesn't line up with the nav buttons
   (which get margin-top:12px). Center it vertically against the header instead so
   the profile always sits on the same line as the buttons. Scoped to `.header .right`
   so it can't affect any other `.right` element. */
@media (max-width: 1024px) {
    .header .right {
        position: absolute !important;
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin-top: 0 !important;
        height: auto !important;
    }
}

/* ── Larger collapse button + click-outside-to-collapse (touch devices) ──────────
   Gated to touch (pointer: coarse) so a narrow desktop window - where the sidebar
   collapses to a rail rather than an overlay - never gets a content backdrop. */
.sidebar-backdrop { display: none; }

@media (any-pointer: coarse) {   /* any device WITH a touchscreen, keyboard/trackpad attached or not */
    /* Only ONE hamburger on touch devices: the header button toggles the sidebar. The duplicate
       close button inside the sidebar is hidden (tapping the backdrop also closes it). */
    .sidebar .close-icon { display: none !important; }

    /* Dim backdrop shown only while the sidebar overlay is expanded; clicking it
       (handler on the element) collapses the sidebar. */
    body.sidebar_small .sidebar { z-index: 1050; }
    body.sidebar_small .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1049;
        background: rgba(0, 0, 0, 0.12);   /* light dim - content stays readable */
    }

    /* Sidebar links: one vertical list filling the sidebar's height (below the logo). responsive.css made it a
       fixed 500px box scrolling BOTH ways on phones, which hid the later report types and let a slight finger
       movement register as a pan instead of a tap. */
    .sidebar-list {
        height: auto !important;
        max-height: calc(100dvh - 130px);
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
}

/* ── iPad / touch tablets: sidebar is an overlay WITH labels, never an icon-only rail ──────
   The legacy tablet rules in responsive.css are keyed on min/max-DEVICE-width, which iPadOS
   Safari (desktop-site mode, 1180-1366px viewports) does not match - so iPads were getting the
   desktop collapsed rail (icons, no text) and a header whose profile menu was absolutely
   positioned out of line with the nav links.

   Keyed on INPUT TYPE, not a pixel cap: any touch-only device (hover: none + pointer: coarse)
   at tablet width or above. No upper bound, because iPad logical widths keep growing and a
   max-width would silently exclude the larger models. Current iPad landscape viewports:
     iPad mini 6/7 ........ 1133   iPad 10th / Air 11" ..... 1180
     iPad Pro 11" ......... 1194   iPad Pro 11" M4 ......... 1210
     iPad Air 13" M2 ...... 1366   iPad Pro 12.9" .......... 1366
     iPad Pro 13" M4 ...... 1376   (Stage Manager / Split View can be anything narrower)
   Phones (< 768px) keep their existing rules in responsive.css.
   any-pointer (NOT pointer/hover): an iPad in a Magic Keyboard reports its PRIMARY pointer as
   fine-with-hover, which would exclude it; any-pointer: coarse is true whenever a touchscreen
   exists at all. Mouse-only laptops/desktops report no coarse pointer and are untouched. The
   1440px cap only keeps large touch-screen desktop monitors on the desktop layout. */
@media (any-pointer: coarse) {
    /* Sidebar: hidden off-canvas by default; the hamburger slides it in as a full-width overlay. */
    .sidebar {
        --w-side-navigation: 270px;
        width: 270px !important;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 1050;
        height: 100dvh;
    }
    body.sidebar_small .sidebar {
        transform: translateX(0);
        box-shadow: 0 0 24px rgb(13 38 76 / 25%);
    }
    /* Content always uses the full width; the overlay floats above it. */
    .main,
    .sidebar_small + .main,
    body.sidebar_small .main {
        width: 100% !important;
        margin-left: 0 !important;
    }
    /* Labels ALWAYS visible when the sidebar is open - this is what the icon rail was hiding. */
    .sidebar span.list-title,
    body.sidebar_small .sidebar span.list-title,
    .sidebar .nav-section-label {
        display: inline-block !important;
        font-size: 15px;
        white-space: normal;
        word-break: normal;
    }
    .sidebar ul li a,
    .sidebar ul li a .list-title-content {
        justify-content: flex-start !important;
        gap: 10px;
        min-height: 44px;              /* comfortable touch target */
        align-items: center;
    }
    .sidebar ul li a i,
    .sidebar .list-title-content img {
        width: 24px;
        text-align: center;
        margin: 0 !important;
        font-size: 18px;
    }
    .sidebar .logo img:nth-child(1) { display: block !important; width: 150px; }
    .sidebar .logo img:nth-child(2) { display: none !important; }

}

/* Header alignment: tablets and up (phones keep their own header rules in responsive.css). */
@media (min-width: 768px) and (max-width: 1440px) and (any-pointer: coarse) {
    /* Header: one flex row, everything vertically centred, profile menu back in normal flow. */
    .header {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center !important;
        justify-content: space-between;
        row-gap: 6px;
        max-height: unset;
    }
    .header .left {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
    }
    .header .right,
    .right {
        position: static !important;   /* responsive.css absolutely positions this on tablets */
        margin-left: auto;
        display: flex;
        align-items: center;
    }
    .header .right-head { float: none; }
    .header .right-head ul li { padding-left: 12px; }
    .main .header .left .report-section {
        margin-top: 0 !important;
        padding-left: 0;
        align-items: center;
    }
    .main .header .left .report-section ul.report-list-section {
        margin: 0 0 0 8px !important;
        gap: 4px 12px;
        align-items: center;
        flex-wrap: wrap;
    }
    .report-section ul.report-list-section li,
    .report-section ul.report-list-section li a.cstm-icon-header,
    li.report-types .dropdown.drop-down,
    li.report-types .dropdown.drop-down .dropdown-toggle {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        line-height: 1.2;
    }
    .report-section ul.report-list-section li a.cstm-icon-header,
    li.report-types .dropdown.drop-down .dropdown-toggle {
        font-size: 15px;
        padding: 6px 4px;
    }
    .user-menu-toggle { min-height: 40px; }
    .user-menu-name { display: inline; }
    /* Dropdown panels: let Bootstrap position them instead of the hard-coded tablet transforms. */
    li.report-types .dropdown.drop-down .dropdown-menu,
    .right-head .dropdown-menu {
        transform: none !important;
        inset: auto 0 auto auto !important;
        top: 100% !important;
        margin-top: 4px;
    }
    li.report-types .dropdown.drop-down .dropdown-menu { inset: auto auto auto 0 !important; }
}

/* ── Grid text at the app's normal size (Radzen default is quite small) ── */
.app-font-grid .rz-grid-table,
.app-font-grid .rz-cell-data,
.app-font-grid .rz-column-title-content,
.app-font-grid .rz-column-title {
    font-size: 0.95rem;
}

/* ── My Reports / dashboard Radzen grids: pale-green header row ── */
.my-reports-grid .rz-grid-table thead th,
.my-reports-grid .rz-datatable-thead th {
    background-color: #eaf7ec;
}

/* ── Drill Pipe runsheet: compact, spreadsheet-tight sizing ──────────────── */
.dp-excel {
    font-size: 0.7rem;
}
.dp-excel th,
.dp-excel td {
    padding: 0 0.15rem;
    vertical-align: middle;
}
.dp-excel thead th {
    font-size: 0.62rem;
    letter-spacing: 0.01em;
    line-height: 1.1;
}
/* The `td` raises specificity above the legacy `.custm-pd .form-control` rule
   (style.css: height 45px + big padding) that otherwise wins on the inputs and makes
   the rows tall - leaving whitespace around the shorter selects. */
.dp-excel td .form-control,
.dp-excel td .form-select {
    font-size: 0.7rem;
    padding: 0 0.2rem;
    height: 1.4rem;
    min-height: 0;
    line-height: 1.1;
    border-radius: 2px;
    /* Grow to fit the typed text instead of clipping it - compact when short,
       wider when the value is long (no truncation). */
    field-sizing: content;
    width: auto;
    min-width: 2.6rem;
}
.dp-excel td.dp-num .form-control { text-align: right; }
.dp-excel td.dp-wide .form-control { min-width: 8rem; }
.dp-excel td .form-select { min-width: 3.4rem; padding-right: 1.4rem; }
.dp-excel td.dp-act { width: 2rem; }
.dp-excel td.dp-act-media { width: 3.6rem; }
/* Computed %RBW cell: read-only text (not an <input>) so it reliably refreshes when the
   header nominal wall / %RBW changes. Right-aligned to match the numeric input columns. */
.dp-excel td.dp-rbw { text-align: right; padding: 0 0.3rem; min-width: 3.4rem; white-space: nowrap; font-size: 0.75rem; }
/* Duplicate joint#/serial warning + out-of-tolerance (tol-fail) highlight. */
.dp-excel .dp-dupe { background: #ffe1e1 !important; box-shadow: inset 0 0 0 1px #dc3545; }
.dp-excel .tol-fail { background: #ffe1e1 !important; box-shadow: inset 0 0 0 1px #dc3545; }
.dp-excel .btn-sm { padding: 0.05rem 0.3rem; font-size: 0.7rem; }
/* Trim the number-spinner clutter to reclaim width. */
.dp-excel input[type="number"] { -moz-appearance: textfield; }
.dp-excel input[type="number"]::-webkit-outer-spin-button,
.dp-excel input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Approval-status icons in the data grids ──────────────────────────────
   The default green (approved) vs dark-grey (pending) pair is hard to tell
   apart. Use a clearer traffic-light instead: green = done, amber = pending,
   red = disapproved. Scoped to the grids so other icons are unaffected. */
.dp-reports-grid i.text-success {
    color: #2e9e5b !important;   /* approved - clear green */
}
.dp-reports-grid i.text-danger {
    color: #d64550 !important;   /* disapproved - softer red */
}
.dp-reports-grid i.text-secondary,
.dp-reports-grid i.text-muted {
    color: #e0a72c !important;   /* pending - amber (was dark grey) */
}

/* ── Logo "scan" loader (LogoLoader.razor) ──────────────────────────────
   The logo shows dim + grayscale (un-inspected); a green beam sweeps across
   and a color copy is revealed in its wake - an NDT-scan metaphor. */
.logo-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 1rem;
}
.logo-loader__mark {
    position: relative;
    width: 300px;
    max-width: 70vw;
}
.logo-loader__mark img {
    display: block;
    width: 100%;
}
/* Base: the "un-scanned" logo. */
.logo-loader__base {
    filter: grayscale(1);
    opacity: 0.28;
}
/* Color copy, revealed only through a moving band (the scan window). */
.logo-loader__scan {
    position: absolute;
    inset: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 32%, transparent 50%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 32%, transparent 50%);
    -webkit-mask-size: 220% 100%;
            mask-size: 220% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    animation: logo-scan 1.8s ease-in-out infinite;
}
/* Bright leading beam. */
.logo-loader__beam {
    position: absolute;
    top: -6%;
    bottom: -6%;
    width: 3px;
    background: #4caf50;
    box-shadow: 0 0 12px 3px rgba(76, 175, 80, 0.75);
    animation: logo-beam 1.8s ease-in-out infinite;
}
.logo-loader__text {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    /* letter-spacing adds a trailing gap after the last glyph; indent by the
       same amount so the text stays optically centered under the logo. */
    text-indent: 0.3em;
    text-transform: uppercase;
    color: #2e7d32;
    animation: logo-pulse 1.8s ease-in-out infinite;
}
@keyframes logo-scan {
    0%   { -webkit-mask-position: 135% 0; mask-position: 135% 0; }
    100% { -webkit-mask-position: -35% 0; mask-position: -35% 0; }
}
@keyframes logo-beam {
    0%   { left: 100%; opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { left: 0%; opacity: 0; }
}
@keyframes logo-pulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .logo-loader__scan,
    .logo-loader__beam { animation: none; }
    .logo-loader__base { opacity: 0.55; }
}

/* Overlay scoped to the content card while its data loads - centers the loader
   within that card. It does NOT cover the app chrome (sidebar / top nav). */
.data-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
}

/* Full-screen busy overlay (save/update): dims the whole page and centers the
   branded loader so it's the clear focus. Sits above app chrome and content but
   below Radzen dialogs (which start ~1050+). */
.app-busy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Keep the search bar above the grid's loading overlay so it's visible and usable
   immediately, instead of being hidden behind the loader during the initial fetch. */
.search-above-loader {
    position: relative;
    z-index: 6;
}

/* ── Grid search bar emphasis ───────────────────────────────────────────────
   The list/dashboard pages share one search input (type=search, form-control-sm,
   w-auto). Flat and tiny, it was easy to miss - give it a pill shape, a magnifier
   icon, a clear border, a subtle shadow, and a green focus ring so it reads as a
   real, prominent search control. The Tool Search screen uses a different
   input-group (no .form-control-sm.w-auto) and is intentionally left untouched. */
input[type="search"].form-control-sm.w-auto {
    min-width: 260px;
    height: auto;
    padding: .5rem .95rem .5rem 2.3rem;
    font-size: .95rem;
    border: 1px solid #cfd6dd;
    border-radius: 999px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236c757d' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5l4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: .85rem center;
    background-size: 1rem 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="search"].form-control-sm.w-auto::placeholder {
    color: #9aa4b0;
}

input[type="search"].form-control-sm.w-auto:focus {
    border-color: var(--green, #00a11b);
    box-shadow: 0 0 0 .2rem rgba(0, 161, 27, .18);
    outline: none;
}

/* The "Search:" label beside it - a touch bolder/darker so the pair reads as a
   deliberate search affordance rather than muted helper text. Scoped to the exact
   search-row container the grids use, so no other labels are affected. */
.d-flex.justify-content-end.align-items-center.py-2 > label {
    font-weight: 600;
    color: #3e4b59;
}

/* ── Header "New Reports" dropdown alignment ──────────────────────────
   The shared style.css lays this item out as a column-flex wrapper around an
   inline-flex dropdown, so the toggle sits off the baseline of the sibling
   nav links and the visible menu nudges it on click. Normalize it to match
   the .cstm-icon-header items and keep the menu out of normal flow. */
.report-section ul.report-list-section li.report-types {
    align-items: center;
}
.report-section ul.report-list-section li.report-types .icon-added-header {
    flex-direction: row;
    justify-content: center;
}
.report-section ul.report-list-section li.report-types .dropdown.drop-down {
    align-items: center;
}
.report-section ul.report-list-section li.report-types span.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
}
/* Absolutely positioned so showing it never reflows / shifts the toggle.
   (Offset is handled by style.css's transform on this menu.) */
.report-section ul.report-list-section li.report-types .dropdown.drop-down .dropdown-menu {
    position: absolute;
}

h1:focus {
    outline: none;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Theme Radzen's primary to the Peak NDT brand green ──
   The Radzen "Default" theme ships an orange primary (--rz-primary: #ff6d41), which made
   all primary buttons/accents orange. Override to the brand green (style.css --dark-green
   / --green) so Radzen primary buttons match the rest of the app. Loads after the Radzen
   theme, so these win. */
:root {
    --rz-primary: #008315;
    --rz-primary-dark: #006f12;
    --rz-primary-darker: #005a0f;
    --rz-primary-light: #00a11b;
    --rz-primary-lighter: rgba(0, 161, 27, 0.16);
}

/* ── Also theme Radzen's SECONDARY ramp to the brand green ──
   The Default theme's secondary is blue (#35a0d7). That blue is what surfaced as the
   highlights on RadzenTabs (the selected tab's top border + focus colour) and on
   RadzenDropDown selected items - none of which follow --rz-primary. Point the whole
   secondary ramp at the same green so those accents match the rest of the app. */
:root {
    --rz-secondary: #008315;
    --rz-secondary-dark: #006f12;
    --rz-secondary-darker: #005a0f;
    --rz-secondary-light: #00a11b;
    --rz-secondary-lighter: rgba(0, 161, 27, 0.2);
    /* Text/icon colour that sits on those green fills (dropdown selected item, etc.). */
    --rz-on-secondary: #fff;
    --rz-on-secondary-light: #fff;
    --rz-on-secondary-dark: #fff;
    --rz-on-secondary-darker: #fff;
}

/* Belt-and-suspenders: force the primary button colours in case a rule uses a literal. */
.rz-button.rz-primary {
    background-color: var(--rz-primary);
    border-color: var(--rz-primary);
    color: #fff;
}

.rz-button.rz-primary:hover:not(:disabled):not(.rz-state-disabled) {
    background-color: var(--rz-primary-dark);
    border-color: var(--rz-primary-dark);
}

/* Enforce the brand green on Bootstrap primary buttons app-wide (Bootstrap's default is
   blue). Keeps every primary action on-theme without touching each page's markup. */
.btn-primary {
    background-color: var(--rz-primary);
    border-color: var(--rz-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--rz-primary-dark);
    border-color: var(--rz-primary-dark);
    color: #fff;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--rz-primary);
    border-color: var(--rz-primary);
    color: #fff;
}

.btn-outline-primary {
    color: var(--rz-primary);
    border-color: var(--rz-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    background-color: var(--rz-primary);
    border-color: var(--rz-primary);
    color: #fff;
}

/* Smaller axis/label text on charts with long category names (client / technician),
   so large customer names don't overflow or truncate. */
.chart-sm-labels text {
    font-size: 0.72rem;
}

/* Angle the horizontal (bottom) category axis labels - e.g. "MMM yyyy" - so month/year
   text reads diagonally instead of overlapping. Only the bottom axis uses text-anchor
   "middle"; the currency (value) axis uses "end", so it stays flat. */
.chart-x-diagonal .rz-tick-text[text-anchor="middle"] {
    transform: translateY(10px) rotate(-35deg);
    transform-box: fill-box;
    transform-origin: 50% 50%;
}

/* Radzen renders the dropdown value as a block label pinned to the top of a
   column flexbox; with the base theme's body line-height (shorter than the
   field) the selected text sits high in the box. Center the in-flow label
   vertically - the trigger chevron is absolutely positioned, so it's unaffected. */
.rz-dropdown { justify-content: center; }

/* Technician employee dropdown: give the selected name breathing room from the
   field's left edge (Radzen pins the label flush) and keep it vertically centered. */
.tech-emp-dd .rz-dropdown-label,
.tech-emp-dd .rz-inputtext {
    padding-left: .6rem;
    display: flex;
    align-items: center;
}

/* ── Technician row ────────────────────────────────────────────────────
   Don't let the row stretch the full page width; a form control's worth is
   plenty. Match the % box height to the dropdown so its number lines up with
   the name text, and center that number. */
.tech-row {
    max-width: 620px;
    /* The dropdown renders at 38px; drive the numeric from the same theme variable
       so the theme's own internal min-height matches (my explicit heights alone
       didn't beat Radzen's internal sizing on the numeric). */
    --rz-input-height: 2.375rem;
}
.tech-pct {
    width: 96px;
}
/* Pin the dropdown, the numeric wrapper, and the numeric's inner input to one
   height (border-box so borders count) so all three are flush. RadzenNumeric's
   inner input renders taller (~45px) and pokes past its wrapper, so the wrapper is
   also hard-clamped with max-height + overflow so nothing can exceed 38px. */
.tech-row .rz-dropdown,
.tech-row .rz-numeric.tech-pct,
.tech-row .rz-numeric.tech-pct .rz-numeric-input {
    height: 2.375rem !important;
    min-height: 2.375rem !important;
    max-height: 2.375rem !important;
    box-sizing: border-box !important;
}
.tech-row .rz-numeric.tech-pct {
    overflow: hidden;
    display: inline-flex;
    align-items: center;
}
.tech-row .rz-numeric.tech-pct .rz-numeric-input {
    line-height: 2.375rem;
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
}

/* ── Account (user) dropdown ───────────────────────────────────────────
   Themed replacement for the plain Bootstrap dropdown: pill toggle with an
   avatar, a "signed in as" header, aligned icon column, and brand-green hover. */
.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .6rem;
    border-radius: 999px;
    color: #2b2f33;
    text-decoration: none;
    font-weight: 600;
    transition: background-color .15s ease;
}
.user-menu-toggle:hover,
.user-menu-toggle:focus,
.user-menu .show > .user-menu-toggle {
    background-color: var(--rz-primary-lighter);
    color: #2b2f33;
}
.user-menu-toggle::after { display: none; } /* drop Bootstrap's default caret */
.user-menu-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--rz-primary);
    color: #fff;
    font-size: .8rem;
    flex: 0 0 auto;
}
.user-menu-name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-caret {
    font-size: .65em;
    color: #8a9099;
    transition: transform .15s ease;
}
.user-menu .show > .user-menu-toggle .user-menu-caret { transform: rotate(180deg); }

/* Menu container */
.user-menu-dd {
    min-width: 260px;
    padding: .35rem;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
    margin-top: .4rem;
}

/* Header row */
.user-menu-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .6rem .5rem;
}
.user-menu-header-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
    font-size: 1rem;
    flex: 0 0 auto;
}
.user-menu-header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.user-menu-header-label {
    font-size: .72rem;
    color: #8a9099;
    line-height: 1.1;
}
.user-menu-header-email {
    font-weight: 600;
    color: #2b2f33;
    font-size: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Items */
.user-menu-dd .dropdown-item {
    display: flex;
    align-items: center;
    gap: .1rem;
    padding: .55rem .6rem;
    border-radius: 8px;
    font-weight: 500;
    color: #33383d;
}
.user-menu-dd .dropdown-item:hover,
.user-menu-dd .dropdown-item:focus {
    background-color: var(--rz-primary-lighter);
    color: var(--rz-primary-dark);
}
.user-menu-dd .umenu-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    color: #8a9099;
    flex: 0 0 auto;
}
.user-menu-dd .dropdown-item:hover .umenu-ico,
.user-menu-dd .dropdown-item:focus .umenu-ico {
    color: var(--rz-primary);
}
.user-menu-dd .dropdown-divider {
    margin: .35rem .3rem;
    border-top-color: rgba(0, 0, 0, .08);
}

/* Log out reads as a destructive action on hover */
.user-menu-dd .umenu-logout:hover,
.user-menu-dd .umenu-logout:focus {
    background-color: rgba(220, 53, 69, .1);
    color: #c02636;
}
.user-menu-dd .umenu-logout:hover .umenu-ico,
.user-menu-dd .umenu-logout:focus .umenu-ico {
    color: #c02636;
}

/* Dim the whole page when a nav dropdown (account menu, New Reports) is open so it
   reads as the focus. Bootstrap adds `.show` to the menu; the backdrop is its next
   sibling, so no :has() is needed. The toggle + menu are lifted above the backdrop. */
.user-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, visibility .15s ease;
    z-index: 1000;
}
.dropdown-menu.show ~ .user-menu-backdrop {
    opacity: 1;
    visibility: visible;
}
/* Account menu: keep its toggle + menu bright above the dim. */
.user-menu-toggle {
    position: relative;
    z-index: 1001;
}
.user-menu-dd {
    z-index: 1001;
}
/* New Reports: keep its toggle, caret, and menu bright above the dim. */
.report-types .dropdown.drop-down .dropdown-toggle,
.report-types .dropdown.drop-down .down-icon {
    position: relative;
    z-index: 1001;
}
.report-types .dropdown.drop-down .dropdown-menu {
    z-index: 1001;
}

/* ── Customer dashboard: name-as-switcher ──────────────────────────────
   The bold client name doubles as the client switcher. Styled like the h3 it
   replaces, with a caret to signal it's interactive. Reuses .user-menu-backdrop
   to dim the page while open. */
/* Fancy client switcher: an icon chip + label/name stack + caret chip, on a raised
   gradient card with a green accent, hover lift, animated sheen, and a green ring on open. */
.customer-switch-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .95rem .5rem .5rem;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff 0%, #f2f5f8 100%);
    box-shadow: 0 6px 16px rgba(20, 30, 40, .10), 0 1px 0 rgba(255, 255, 255, .9) inset;
    overflow: hidden;
    transition: transform .18s cubic-bezier(.2, .8, .3, 1), box-shadow .18s ease, border-color .18s ease;
}
/* Moving sheen that sweeps across on hover. */
.customer-switch-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
    transform: skewX(-18deg);
    transition: left .55s ease;
    pointer-events: none;
}
.customer-switch-btn:hover {
    transform: translateY(-2px);
    border-color: var(--rz-primary-light);
    box-shadow: 0 12px 26px rgba(0, 131, 21, .18), 0 1px 0 rgba(255, 255, 255, .9) inset;
}
.customer-switch-btn:hover::before {
    left: 130%;
}
/* Open state: pressed slightly + a green focus ring. */
.customer-switch-btn[aria-expanded="true"] {
    transform: translateY(0);
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 3px var(--rz-primary-lighter), 0 6px 16px rgba(0, 131, 21, .15);
}

/* Leading icon chip. */
.customer-switch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--rz-primary-light), var(--rz-primary-dark));
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 3px 8px rgba(0, 131, 21, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
    flex: 0 0 auto;
}

/* Label + name stack. */
.customer-switch-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    min-width: 0;
}
.customer-switch-label {
    font-size: .64rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 600;
    color: #9aa4b0;
}
.customer-switch-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: #232830;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s ease;
}
.customer-switch-btn:hover .customer-switch-name {
    color: var(--rz-primary-dark);
}

/* Trailing caret chip that spins on open. */
.customer-switch-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef1f4;
    color: #6b7480;
    font-size: .7rem;
    flex: 0 0 auto;
    transition: transform .25s ease, background .15s ease, color .15s ease;
}
.customer-switch-btn:hover .customer-switch-caret {
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
}
.customer-switch-btn[aria-expanded="true"] .customer-switch-caret {
    transform: rotate(180deg);
    background: var(--rz-primary);
    color: #fff;
}

/* Dropdown items: active row uses the brand green. */
.customer-switch-item {
    display: flex;
    align-items: center;
}
.customer-switch .dropdown-header {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9aa4b0;
}
.customer-switch .dropdown-menu {
    min-width: 240px;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
    z-index: 1001;
}
.customer-switch-btn {
    position: relative;
    z-index: 1001;
}
.customer-switch .dropdown-item.active {
    background-color: var(--rz-primary);
}

/* ── Generate Custom Report dialog ─────────────────────────────────────
   Branded field labels + helper text to match the app's form styling. */
.gcr-dialog .gcr-label {
    display: block;
    font-weight: 600;
    color: #2b2f33;
    margin-bottom: .35rem;
}
.gcr-dialog .gcr-help {
    font-size: .8rem;
    color: #8a9099;
    margin-top: .3rem;
}
/* Radzen radio list laid out with comfortable spacing. */
.gcr-dialog .rz-radiobutton-box {
    margin-right: .4rem;
}
.gcr-footer {
    border-top: 1px solid rgba(0, 0, 0, .08);
    padding-top: 1rem;
}

/* Technician page: avatar + KPI stats. */
.tech-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
    font-size: 1.4rem;
    flex: 0 0 auto;
}
.tech-stat {
    min-width: 120px;
}

/* Full-viewport branded loader shown while the app resolves the user's role, so no
   staff chrome is ever flashed at a customer during login / page loads. */
.app-initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 3000;
}
/* Read-only impersonation banner (admin "View as user"). Sits at the top of the main content. */
.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    /* PeakNDT brand green */
    background: linear-gradient(90deg, #008215 0%, #00a11b 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    padding: 10px 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.impersonation-banner__msg {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.impersonation-banner__msg strong {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* White "READ-ONLY" pill so the mode is unmistakable against the green. */
.impersonation-banner__tag {
    display: inline-block;
    background: #fff;
    color: #008215;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 999px;
}

/* Prominent white pill button - reads clearly as an action, not text. */
.impersonation-banner__return {
    background: #fff;
    color: #008215;
    border: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    padding: 7px 18px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}

.impersonation-banner__return:hover:not(:disabled) {
    background: #eafff0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.impersonation-banner__return:active:not(:disabled) {
    transform: translateY(1px);
}

.impersonation-banner__return:disabled {
    opacity: .7;
    cursor: default;
}

/* Read-only impersonation: every create/add/edit/clone control stays VISIBLE but disabled.
   Controls tagged .impersonation-hide are greyed out and made inert while the body carries the
   .impersonating class (set from ImpersonationGuard). We tag explicitly rather than
   match on href so we never affect content links that merely point at a write route. */
body.impersonating .impersonation-hide {
    /* Show-but-disabled while impersonating (read-only): admins can see the user's full UI, but
       nothing is actionable. Writes are blocked server-side by ReadOnlyImpersonationMiddleware. */
    opacity: .45;
    filter: grayscale(1);
    pointer-events: none;
    cursor: not-allowed;
    user-select: none;
}
/* Dropdown toggles (New Reports) are spans/anchors - make the whole control inert, not just the icon. */
body.impersonating .impersonation-hide .dropdown-toggle,
body.impersonating .impersonation-hide .dropdown-menu { pointer-events: none; }

/* -- PDF preview (AppPdfViewer / Gotho.BlazorPdf) --
   The viewer can be shorter than the space it is given, which left the page's grey
   wrapper showing as a large empty box below it. Make the viewer FILL the height it is given:
   toolbar on top, the dark page area stretching to the bottom, and a tall/zoomed page scrolling
   inside it rather than growing the page. */
.app-pdf-viewer {
    display: flex;
    flex-direction: column;
}
.app-pdf-viewer .blazorpdf-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 0;
}
.app-pdf-viewer .blazorpdf-pdf {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* -- View Report: General Details card (the report form's GENERAL DETAILS section) -- */
.report-general-details .rgd-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
    margin-bottom: 2px;
}
.report-general-details .rgd-value {
    font-weight: 500;
    color: #212529;
    overflow-wrap: anywhere;   /* long PO / lease strings wrap instead of widening the card */
}

/* -- Header "New Reports" menu: always opens straight down, on every screen size --
   The toggle has data-bs-display="static", so Bootstrap no longer runs Popper on it (Popper flipped the
   menu ABOVE the header on short windows, and style.css's fixed translate(-37px, 33px) then pushed the
   top items off-screen). Undo that legacy offset and anchor the menu under the toggle. This is the
   fallback: js/new-reports-menu.js positions the open menu against the window (escaping the header
   strip, which scrolls sideways and clips on phones) and caps its height so it scrolls instead of
   running past the bottom. */
li.report-types .dropdown.drop-down {
    position: relative;
}
li.report-types .dropdown.drop-down .dropdown-menu {
    transform: none !important;
    inset: 100% auto auto 0 !important;
    margin-top: 4px !important;
    max-height: calc(100vh - 120px);   /* fallback before the script sizes it exactly */
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* -- Drill pipe runsheet: keep the joint number (JT#) column visible while scrolling right --
   Sticky at the scroll container's left edge: it sits in its normal place until a horizontal scroll
   would carry it off-screen, then stays pinned while the rest of the row scrolls under it. Opaque
   background so cells don't show through; the shadow stands in for the right border, which collapsed
   table borders don't carry along with a sticky cell. */
.dp-excel th.dp-sticky-jt,
.dp-excel td.dp-sticky-jt {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--bs-body-bg, #fff);
    box-shadow: inset -1px 0 0 #dee2e6, 3px 0 4px -2px rgba(0, 0, 0, 0.18);
}
.dp-excel thead th.dp-sticky-jt {
    z-index: 3;   /* header cell stays above the pinned body cells */
}

/* -- Report editors: alternating row shading (every other item / joint row light gray) --
   Gives a clear break between rows while entering a report. Duplicate / out-of-tolerance highlights
   use !important, so they still show on a shaded row. */
:root { --rpt-row-alt: #f1f3f5; }

/* Drill pipe runsheets (API + non-API): every other joint row, including its inputs (which otherwise
   cover the cell with white) and the pinned JT# cell. */
.dp-excel tbody tr.dp-item-row:nth-of-type(even) > td,
.dp-excel tbody tr.dp-item-row:nth-of-type(even) > td .form-control,
.dp-excel tbody tr.dp-item-row:nth-of-type(even) > td .form-select,
.dp-excel tbody tr.dp-item-row:nth-of-type(even) > td.dp-sticky-jt {
    background-color: var(--rpt-row-alt);
}

/* Standard / Dimensional item rows and non-inspection item rows (div rows; the page marks every other
   row with .rpt-item-alt). Light padding so the band reads as a row, not just the gaps between inputs. */
.rpt-item-row {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    border-radius: 4px;
}
.rpt-item-row.rpt-item-alt {
    background-color: var(--rpt-row-alt);
}

/* View Report: Admin Edit - blue, so it reads as distinct from the normal (grey/red) edit actions. */
.btn-admin-edit {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.btn-admin-edit:hover,
.btn-admin-edit:focus {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* ── Phone header "Go to" dropdown ──────────────────────────────────────────────────────────────
   Only shown on phones (below); the desktop/tablet link row is hidden there instead. */
.header-nav-mobile { display: none; }
.header-nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid #d6dbe1;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    min-height: 40px;
}
.header-nav-mobile-toggle i { color: var(--rz-primary, #008315); }
.header-nav-mobile-menu {
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 15px;
}
.header-nav-mobile-menu .dropdown-item { padding: 8px 16px; }
.header-nav-mobile-menu .dropdown-item i { width: 18px; text-align: center; color: var(--rz-primary, #008315); }
.header-nav-mobile-menu .dropdown-item.active,
.header-nav-mobile-menu .dropdown-item:active { background-color: #e8f4ea; color: var(--rz-primary, #008315); }

/* ── Phones (iPhone-width) ──────────────────────────────────────────────────────────────────────
   Header: one compact row - menu button, the "Go to" dropdown (New Reports + header pages, instead of a
   row of links that doesn't fit), and the user avatar without the name.
   Charts: shorter, smaller tick text, angled category labels. */
@media (max-width: 575.98px) {
    .main .header {
        flex-wrap: nowrap !important;
        align-items: center !important;
        column-gap: 8px;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .main .header .left,
    .main .header .left .report-section {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row !important;   /* responsive.css stacks it in a column on phones */
        align-items: center !important;
        gap: 10px;
        margin: 0 !important;
    }
    .main .header .left .report-section ul.report-list-section { display: none !important; }
    .header-nav-mobile { display: inline-block; }
    .main .header .right {
        flex: 0 0 auto;
        position: static !important;     /* responsive.css absolutely positions it on phones */
        transform: none !important;
    }
    .header .right-head ul li { padding-left: 4px; }
    .user-menu-name,
    .user-menu-toggle::after { display: none !important; }

    /* Charts: fit the phone screen. */
    .rz-chart.invoice-chart { height: 260px !important; }
    .chart-sm-labels text { font-size: 0.62rem; }
    .chart-x-diagonal .rz-tick-text[text-anchor="middle"] {
        transform: translateY(12px) rotate(-50deg);
    }
    /* room for the angled labels, which hang below the chart's own box */
    .content_body.card-box.chart-x-diagonal { padding-bottom: 44px !important; }
    /* Value per client / technician tables: wrap long names instead of cutting them to a few letters. */
    .chart-sm-labels .rz-data-grid .rz-cell-data {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.25;
    }
}
