/* ========================================
   BLOCK 2: Page-Specific CSS (pvi-photographer-profile-donut)
   (this page only; extracted from the fragment's
    inline <style> — Block 1 lives in pvi-master-frame.css)
   ======================================== */

/* ── Token shim — DELETE WHEN BLOCK 1 ADOPTS IT ───────────────────
   --red. scoreColor() in pvi-shared.js returns var(--green) /
   var(--orange) / var(--red); Block 1 supplies the first two but not
   --red, so anything painted from it would resolve to nothing. Aliased
   to --dull-red, the frame's existing danger accent — no new hex, and
   already the right value on the day Block 1 declares --red itself.
   Scoped to .pv-content so nothing leaks into the frame chrome. The
   same shim is declared on pvi-unassigned-photographers.css; both go
   in one edit when the token lands in Block 1. ── */
.pv-content { --red: var(--dull-red); font-size: 0.875rem; }

        main { flex: 1; }



        .pv-content { padding: 1.5rem; }

        /* Breadcrumb */
        .pv-breadcrumb { font-size: 0.78rem; color: #6c757d; margin-bottom: 1rem; }
        .pv-breadcrumb a { color: #2e9e6b; text-decoration: none; }

        /* Profile card */
        .pv-profile-card {
            background: #fff; border: 1px solid #dde1ea; border-radius: 8px;
            padding: 1.25rem; margin-bottom: 1.5rem;
            display: flex; flex-direction: column; gap: 1rem;
        }
        /* Identity: name + grade circle in the same row */
        .pvc-identity { width: 100%; }
        .pvc-name-row {
            display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
        }
        .pvc-name { font-size: 1.2rem; font-weight: 700; margin: 0; flex: 1; min-width: 0; }
        /* Badges row: code · team · rank */
        .pvc-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; align-items: center; }
        .code-badge {
            display: inline-block; background: #252b3b; color: #c8d0e0;
            font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px;
        }
        .team-badge {
            display: inline-block; background: #e8f5ee; color: #1a6b3a;
            font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px;
        }
        .rank-team-badge {
            display: inline-block; background: #fff8e1; color: #7a5000;
            font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px;
        }

        /* Stat pills — 3-per-row grid on any width */
        .pv-stat-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
        .pv-stat-pill {
            background: #f4f6f9; border: 1px solid #dde1ea; border-radius: 6px;
            padding: 0.5rem 0.65rem; text-align: center;
            flex: 1 1 calc(33% - 0.35rem); min-width: 80px;
        }
        .pv-stat-pill .stat-num { font-size: 1.15rem; font-weight: 700; color: #1b1f2e; }
        .pv-stat-pill .stat-lbl { font-size: 0.63rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; line-height: 1.25; }

        /* Grade circle — inline in the name row */
        .pv-grade-big {
            display: flex; align-items: center; justify-content: center;
            width: 70px; height: 70px; border-radius: 50%;
            font-size: 1.55rem; font-weight: 900; color: #fff; flex-shrink: 0;
        }

        /* Section header */
        .pv-section-title {
            font-size: 1rem; font-weight: 700; color: #1b1f2e;
            border-left: 4px solid var(--green);
            padding-left: 0.65rem; margin-bottom: 1rem;
        }

        /* Trend summary strip — horizontal scroll, no wrapping */
        .pv-trend-strip {
            background: #fff; border: 1px solid #dde1ea; border-radius: 8px;
            padding: 1rem 1rem 0.85rem; margin-bottom: 1.5rem;
            display: flex; flex-wrap: nowrap; gap: 0.6rem; align-items: flex-start;
            overflow-x: auto; -webkit-overflow-scrolling: touch;
            scrollbar-width: thin; scrollbar-color: #dde1ea transparent;
        }
        .pv-trend-job {
            flex: 0 0 154px;
            border: 1px solid #eef0f5; border-radius: 6px;
            padding: 0.6rem 0.6rem 0.55rem; position: relative;
            text-align: center;
        }
        .pv-trend-job.latest { border-color: #2e9e6b; border-width: 2px; }

        /* Top row: folder code left, shoot date right */
        .tj-top-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.35rem; }
        .tj-folder { font-size: 0.75rem; font-weight: 700; color: #1b1f2e; }
        .tj-date   { font-size: 0.65rem; color: #6c757d; }

        /* Donut ring wrapper + centred grade badge */
        .tj-donut-wrap { position: relative; width: 116px; height: 116px; margin: 0 auto 0.4rem; }
        .tj-donut-wrap svg { display: block; }
        .tj-center {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 60px; height: 60px; border-radius: 50%;
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
        }
        /* Grade number — always white on the coloured badge */
        .tj-grade { font-size: 1.3rem; font-weight: 900; color: #fff; line-height: 1; }
        /* FA trend arrows — force white so they read on the coloured badge */
        .tj-trend,
        .tj-trend * { font-size: 0.68rem !important; color: #fff !important; line-height: 1; }

        /* Stats row below the donut */
        .tj-stats { line-height: 1.4; }
        .tj-subj  { font-size: 0.72rem; color: #343a40; }
        .tj-time  { font-size: 0.68rem; color: #6c757d; }

        /* Job history table */
        .pv-table-wrap { overflow-x: auto; }
        /* Scale the table (not the wrapper) to fit between 1400 px and ~1850 px.
           Zooming the scroll-container itself shifts the scroll origin and clips the
           left edge; zooming the inner table keeps the wrapper un-zoomed so overflow
           calculation stays correct. */
        @media (min-width: 1401px) and (max-width: 1850px) {
            .pv-data-table { zoom: 0.78; }
        }
        .pv-data-table {
            width: 100%; border-collapse: collapse;
            background: #fff; border: 1px solid #dde1ea; border-radius: 6px; overflow: hidden;
        }
        .pv-data-table th {
            background: #252b3b; color: #c8d0e0;
            font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
            padding: 0.55rem 0.55rem; white-space: normal;
            max-width: 90px; vertical-align: bottom; line-height: 1.2;
        }
        /* ── Sortable headers (Full Job History) ──
           Same affordance as the Adjustment History table below. Scoped to
           th[data-sort], so the Reassign header stays plain. Arrow glyphs
           are the FontAwesome 6 Free fa-sort / fa-sort-up / fa-sort-down
           codepoints, drawn off the aria-sort attribute pvSortTables sets,
           so no arrow characters live in the markup. The th already wraps
           onto two lines at this width; the arrow sits in its own
           padding-right gutter rather than in the text flow, so a wrapped
           label does not push it off the cell. ── */
        .pv-data-table thead th[data-sort] {
            position: relative; padding-right: 1.1rem;
            cursor: pointer; user-select: none; -webkit-user-select: none;
        }
        .pv-data-table thead th[data-sort]:hover { background: #2e3550; color: #fff; }
        .pv-data-table thead th[data-sort]:focus-visible {
            outline: 2px solid var(--dull-blue); outline-offset: -2px;
            box-shadow: inset 0 0 0 4px var(--focus-ring-blue);
        }
        .pv-data-table thead th[data-sort]::after {
            font-family: "Font Awesome 6 Free"; font-weight: 900;
            content: "\f0dc";
            position: absolute; right: 0.25rem; bottom: 0.55rem;
            font-size: 0.7em; opacity: 0.35;
        }
        .pv-data-table thead th[data-sort][aria-sort="ascending"]::after  { content: "\f0de"; opacity: 1; }
        .pv-data-table thead th[data-sort][aria-sort="descending"]::after { content: "\f0dd"; opacity: 1; }

        .pv-data-table td {
            padding: 0.45rem 0.55rem; border-bottom: 1px solid #eef0f5;
            white-space: nowrap; font-size: 0.82rem; vertical-align: middle;
        }
        .pv-data-table tr:last-child td { border-bottom: none; }
        .pv-data-table tr:hover td { background: #f8f9ff; }

        .scored {
            display: inline-block; text-align: center; font-weight: 700; color: #fff;
            border-radius: 4px; padding: 0.2rem 0.45rem; min-width: 38px;
        }
        .scored a { color: inherit; text-decoration: none; }

        .pct-green  { background: #d4f5e2; color: #1a6b3a; font-size: 0.72rem; border-radius: 3px; padding: 2px 5px; font-weight: 600; }
        .pct-orange { background: #fef3dd; color: #7a5000; font-size: 0.72rem; border-radius: 3px; padding: 2px 5px; font-weight: 600; }
        .pct-red    { background: #fde8e8; color: #7a1a1a; font-size: 0.72rem; border-radius: 3px; padding: 2px 5px; font-weight: 600; }

        /* ── Band drill-down links (%Green / %Orange / %Red) ──
           The three pills open the gallery filtered to Good / Okay / Miss.
           color: inherit keeps each pill's own readable-on-tint text color
           rather than taking the link blue, the same arrangement .scored a
           uses above — a blue number inside a green pill would read as a
           different kind of value, not as a link.

           The affordance is the underline on hover and focus, not a resting
           one: twenty-two underlined cells per row is a page of rules. The
           pointer cursor comes with the anchor.

           NO display RULE, deliberately. These pills are inline spans, so a
           block anchor inside one takes the span out of its own line box and
           the pill renders pinched around the digits. The hit target is the
           text rather than the full pill, which is what .scored a above
           already settles for; widening it would mean moving the padding
           onto the anchor and is not worth the layout risk on a cell this
           small. ── */
        .pct-green a, .pct-orange a, .pct-red a {
            color: inherit; text-decoration: none;
        }
        .pct-green a:hover, .pct-orange a:hover, .pct-red a:hover { text-decoration: underline; }
        .pct-green a:focus-visible, .pct-orange a:focus-visible, .pct-red a:focus-visible {
            outline: 2px solid var(--dull-blue); outline-offset: 2px; text-decoration: underline;
        }

        .pv-footer {
            border-top: 1px solid #dde1ea; padding: 0.75rem 1.25rem;
            text-align: center; font-size: 0.78rem; color: #6c757d;
            background: #fff; margin-top: 2rem;
        }
        .pv-footer a { color: #6c757d; text-decoration: none; }

        @media (max-width: 768px) {
            .pv-content { padding: 0.75rem; }
        }

        /* ≥600 px: identity column left, stat pills right */
        @media (min-width: 600px) {
            .pv-profile-card { flex-direction: row; align-items: flex-start; gap: 1.5rem; }
            .pvc-identity {
                flex: 0 0 210px;
                border-right: 1px solid #eef0f5;
                padding-right: 1.25rem;
            }
            .pv-stat-pills { flex: 1; }
            .pv-stat-pill { flex: 1 1 calc(50% - 0.25rem); }
        }
        /* ≥900 px: all five pills in one row */
        @media (min-width: 900px) {
            .pv-stat-pill { flex: 1 1 0; min-width: 0; }
        }

        /* ── Selection checkbox column ── */
        .cb-col { width: 36px !important; min-width: 36px; text-align: center !important; padding: 0.3rem 0.25rem !important; }
        /* The header cell is now the "Reassign" label rather than a
           checkbox, so it needs room for the word; body cells keep 36px. */
        .pv-data-table th.cb-col { width: auto !important; min-width: 72px; max-width: none; }
        .pv-sel { cursor: pointer; width: 16px; height: 16px; accent-color: var(--red); vertical-align: middle; }
        .pv-data-table tr.row-selected td { background: var(--dull-red-bg); }
        /* Selected beats hover — without this the tint disappears under the
           cursor on the one row the user is about to act on. */
        .pv-data-table tr.row-selected:hover td { background: var(--dull-red-bg); }

        /* ── Selection tray (between the section title and the table) ──
           Same shell as #selBar on pvi-unassigned-photographers. The
           destructive and write actions live here rather than in a
           persistent bar, so Hide and Re-Assign are unreachable until a
           job is actually ticked. ── */
        .pv-sel-tray { background: var(--dark-grey); border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 1rem; }
        .pv-sel-tray-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.75rem; }
        .sel-tray-label { color: var(--light-grey); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
        .sel-tray-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1; min-width: 0; }
        .sel-tag { background: var(--mid-grey); color: var(--light-grey); font-size: 0.76rem; padding: 0.2rem 0.6rem; border-radius: 4px; display: inline-flex; align-items: center; gap: 0.35rem; }
        .sel-tag .rm-tag { cursor: pointer; color: var(--light-grey); border: none; background: none; padding: 0; font-size: 1.1rem; line-height: 1; }
        .sel-tag .rm-tag:hover { color: var(--white); }
        .sel-tray-count { color: var(--light-grey); font-size: 0.72rem; white-space: nowrap; font-style: italic; }
        .sel-tray-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

        /* Re-assign target — sized to fit a code plus a name without pushing
           the button off the tray row */
        .pv-reassign-select { font-size: 0.8rem; width: auto; min-width: 150px; max-width: 220px; }

        /* ── Re-Assign button ──
           Green from the frame token, not Bootstrap's .btn-success (#198754),
           so the action matches --green everywhere else in the system. ── */
        .pv-btn-reassign { background-color: var(--green); border: none; color: var(--white); font-weight: 600; }
        .pv-btn-reassign:hover,
        .pv-btn-reassign:focus { background-color: var(--green-hover); color: var(--white); }
        .pv-btn-reassign:focus-visible { outline: none; box-shadow: 0 0 0 .2rem var(--focus-ring-blue); }
        .pv-btn-reassign:disabled { background-color: var(--green); color: var(--white); opacity: .5; cursor: not-allowed; }

        /* Stack the tray on narrow screens so the select and the buttons
           do not shear off the right edge. */
        @media (max-width: 600px) {
            .pv-sel-tray-inner { flex-direction: column; align-items: stretch; }
            .pv-sel-tray .sel-tray-actions { justify-content: flex-end; }
        }

        /* ── Adjustment History (under the trend strip) ─────────────────
           Chrome copied from .pv-hist-table on pvi-grade-adjustment.css so
           the two tables read as the same thing. Same cluster palette
           literals as the rest of this file (the report-chrome debt noted
           there), no new hex. ── */
        .pv-adj-hist-wrap { margin-bottom: 1.5rem; }
        /* Beats the ≤1400px `.pv-table-wrap { overflow: visible }` below,
           which exists for the pivoted job table. This table is not pivoted,
           so it scrolls inside its own box instead of pushing the page wide. */
        .pv-table-wrap.pv-adj-hist-wrap { overflow-x: auto; }

        .pv-hist-table {
            width: 100%; border-collapse: collapse;
            background: #fff; border: 1px solid #dde1ea; border-radius: 6px; overflow: hidden;
        }
        .pv-hist-table th {
            background: #252b3b; color: #c8d0e0;
            font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
            padding: 0.5rem 0.65rem; white-space: nowrap; text-align: left;
        }
        .pv-hist-table td {
            padding: 0.5rem 0.65rem; border-bottom: 1px solid #eef0f5;
            font-size: 0.82rem; vertical-align: middle; white-space: nowrap;
        }
        .pv-hist-table tr:last-child td { border-bottom: none; }
        .pv-hist-table tr:hover td { background: #f8f9ff; }
        .pv-hist-table .hist-reason { min-width: 220px; max-width: 420px; white-space: normal; }
        .pv-hist-table .adj-open-col { text-align: right; }

        /* Resting grey for the two grade badges, painted by the page JS.
           Scoped to this table: the job-history .scored cells get their
           color inline from the server and must not pick this up. White
           text on no background would make a grade vanish if the script
           never ran. */
        #adj-hist-table .scored { background: var(--mid-grey); }

        .scored-sm { font-size: 0.8rem; }

        /* Sortable headers — same affordance as pvi-grade-adjustment.css.
           Scoped to th[data-sort], so Reason and Adjustment stay plain.
           Arrow glyphs are the FontAwesome 6 Free fa-sort / fa-sort-up /
           fa-sort-down codepoints, drawn off the aria-sort attribute that
           pvSortTables sets. */
        .pv-hist-table thead th[data-sort] {
            position: relative; padding-right: 1.15rem;
            cursor: pointer; user-select: none; -webkit-user-select: none;
        }
        .pv-hist-table thead th[data-sort]:hover { background: #2e3550; color: #fff; }
        .pv-hist-table thead th[data-sort]:focus-visible {
            outline: 2px solid var(--dull-blue); outline-offset: -2px;
            box-shadow: inset 0 0 0 4px var(--focus-ring-blue);
        }
        .pv-hist-table thead th[data-sort]::after {
            font-family: "Font Awesome 6 Free"; font-weight: 900;
            content: "\f0dc";
            position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
            font-size: 0.7em; opacity: 0.35;
        }
        .pv-hist-table thead th[data-sort][aria-sort="ascending"]::after  { content: "\f0de"; opacity: 1; }
        .pv-hist-table thead th[data-sort][aria-sort="descending"]::after { content: "\f0dd"; opacity: 1; }

        /* Signed difference — class arrives from adj_diff_class */
        .diff-up   { color: var(--green); font-weight: 700; }
        .diff-down { color: var(--dull-red); font-weight: 700; }
        .diff-same { color: #6c757d; }

        /* Open link to the job's grade adjustment page. Amber outline to
           match the grade adjustment page's own Save button. */
        .pv-btn-adj-open {
            border: 1px solid var(--amber-warn); color: var(--amber-warn-text);
            background: var(--white); font-weight: 600; white-space: nowrap;
        }
        .pv-btn-adj-open:hover,
        .pv-btn-adj-open:focus { background: var(--amber-warn-bg); color: var(--amber-warn-text); border-color: var(--amber-warn); }
        .pv-btn-adj-open:focus-visible { outline: none; box-shadow: 0 0 0 .2rem var(--focus-ring-blue); }

        .pv-empty-state {
            background: #fff; border: 1px dashed #dde1ea; border-radius: 6px;
            padding: 0.85rem 1rem; font-size: 0.82rem; color: #6c757d;
            margin-bottom: 1.5rem;
        }

        /* Visibility tokens resolve to the bare hidden attribute, which any
           author display rule outranks. Declared so the table and its empty
           state can never both show. */
        .pv-adj-hist-wrap[hidden],
        .pv-adj-hist-empty[hidden] { display: none !important; }

        /* ── Column-pivot navigator (breakpoint: 1400px) ── */
        @media (max-width: 1400px) {
            .pv-table-wrap { overflow: visible; }
            .pv-pivot { margin-bottom: 1.5rem; }
            .pv-pivot-nav {
                display: flex; align-items: center; gap: 0.5rem;
                margin-bottom: 0.5rem;
            }
            .pv-pivot-nav .pv-nav-pg {
                flex: 1; text-align: center; font-size: 0.78rem; color: #6c757d;
            }
            .pv-pivot-tbl {
                width: 100%; border-collapse: separate; border-spacing: 0;
                font-size: 0.82rem;
            }
            .pv-pivot-tbl thead th {
                background: #f6f8fc; border-bottom: 2px solid #dde1ea;
                padding: 0.4rem 0.3rem; white-space: normal;
                vertical-align: middle; text-align: center;
                width: 100px; min-width: 100px; max-width: 100px;
            }
            .pv-pivot-tbl tbody td {
                padding: 0.3rem 0.3rem; border-bottom: 1px solid #f0f2f8;
                vertical-align: middle; word-break: break-word;
            }
            .pv-pivot-tbl tbody tr:last-child td { border-bottom: none; }
            .pv-pl {
                position: sticky; left: 0; background: #f6f8fc;
                border-right: 2px solid #dde1ea; font-size: 0.65rem;
                font-weight: 700; color: #6c757d; text-transform: uppercase;
                letter-spacing: 0; white-space: normal; word-break: break-word;
                z-index: 2; width: 90px; min-width: 90px; max-width: 90px;
                padding: 0.3rem 0.35rem;
            }
            .pv-pivot-tbl thead .pv-pl { z-index: 3; }
            .pv-pc { text-align: center; width: 100px; min-width: 100px; max-width: 100px; }
            .pv-pivot-cb-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
            .pv-pivot-cb { cursor: pointer; width: 15px; height: 15px; accent-color: var(--red); margin-top: 3px; }
            .pv-pl-hdr { display: flex; flex-direction: column; gap: 3px; font-size: 0.68rem; font-weight: 700; color: #9ba5c0; text-transform: uppercase; letter-spacing: .04em; line-height: 1.2; }
        }
    
