/* Work Tracking — Shared/_PbStyles
   Extracted from Areas/ProductivityBooster/Views/Shared/_PbStyles.cshtml (page-scoped styles). */

#pbApp {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #f2f4f8;
    --surface-3: #e8ebf1;
    --border: #e5e7eb;
    --border-2: #d4d9e3;
    --text: #12151c;
    --text-2: #525a68;
    --text-3: #8a91a0;
    --accent: #4361ee;
    --accent-2: #3a54d4;
    --accent-soft: #eceffe;
    --accent-on: #ffffff;
    --success: #0e9f6e;
    --success-soft: #e7f7f0;
    --success-text: #0a7d56;
    --warning: #d97706;
    --warning-soft: #fcf2e3;
    --warning-text: #a85d04;
    --danger: #dc2626;
    --danger-soft: #fdebea;
    --danger-text: #b91c1c;
    --info: #2563eb;
    --info-soft: #e8efff;
    --info-text: #1d4ed8;
    --shadow: 0 1px 2px rgba(16,20,30,.04), 0 1px 3px rgba(16,20,30,.05);
    --shadow-lg: 0 24px 60px -16px rgba(16,20,30,.24);
    --overlay: rgba(18,21,28,.40);
    color: var(--text);
    font-family: Inter,-apple-system,"Segoe UI",Roboto,sans-serif;
    font-size: 13px;
    padding: 0px;
}

.pb-shell.pb-dark #pbApp {
    --bg: #090b10;
    --surface: #13161e;
    --surface-2: #1a1e28;
    --surface-3: #232834;
    --border: #e5e7eb;
    --border-2: #333a48;
    --text: #eef1f6;
    --text-2: #a6aebd;
    --text-3: #6c7484;
    --accent: #7d7bff;
    --accent-2: #9b99ff;
    --accent-soft: rgba(125,123,255,.15);
    --accent-on: #ffffff;
    --success: #2dd4a4;
    --success-soft: rgba(45,212,164,.14);
    --success-text: #3ce0b2;
    --warning: #f0a83a;
    --warning-soft: rgba(240,168,58,.15);
    --warning-text: #f6bb5d;
    --danger: #f1675c;
    --danger-soft: rgba(241,103,92,.16);
    --danger-text: #ff8479;
    --info: #5d8cff;
    --info-soft: rgba(93,140,255,.16);
    --info-text: #86a8ff;
    --shadow: 0 1px 2px rgba(0,0,0,.5);
    --shadow-lg: 0 28px 64px -16px rgba(0,0,0,.7);
    --overlay: rgba(2,4,8,.62);
}

#pbApp {
    background: var(--bg, #f5f6f9);
    min-height: calc(100vh - 53px);
}

    #pbApp .cardbox-8-15 {
        padding: 10px 15px;
    }

    /* Empty state */
    #pbApp .pb-empty {
        text-align: center;
        padding: 48px 24px;
        color: var(--text-3);
    }

        #pbApp .pb-empty svg {
            display: block;
            margin: 0 auto 12px;
            opacity: .35;
        }

        #pbApp .pb-empty p {
            font-size: 13px;
            line-height: 1.6;
            max-width: 380px;
            margin: 0 auto;
        }

    #pbApp .pb-mono {
        font-family: "JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
        font-variant-numeric: tabular-nums;
    }
    /* ── Page header ──────────────────────────────── */
    #pbApp .pb-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        padding: 8px 15px;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
        position: relative;
        z-index: 222;
    }

    #pbApp .pb-head-l {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0;
    }

    #pbApp .pb-head-r {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    #pbApp .pb-head-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #4361ee 0%, #3a54d4 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        box-shadow: 0 0 0 1px rgba(67,97,238,.22), 0 4px 14px rgba(67,97,238,.28);
    }

    #pbApp .pb-h1 {
        font-size: 16px;
        font-weight: 600;
        letter-spacing: -0.025em;
        margin: 0;
        line-height: 1.25;
        color: var(--text);
    }

    #pbApp .pb-sub {
        color: var(--text-2);
        margin: 0px;
        font-size: 12px;
        line-height: 1.5;
    }

    #pbApp .pb-overline {
        font-size: 10px;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--accent);
    }

    #pbApp .pb-head .pb-overline {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 3px;
    }

        #pbApp .pb-head .pb-overline::before {
            content: '›';
            color: var(--accent);
            font-weight: 600;
            font-size: 13px;
            line-height: 1;
            opacity: 0.75;
            text-transform: none;
            letter-spacing: 0;
        }

    #pbApp .pb-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(16,20,30,.06), 0 1px 2px rgba(16,20,30,.04);
        padding: 20px;
        transition: box-shadow .15s ease;
    }

        #pbApp .pb-card:not([style*="padding:0"]):hover {
            box-shadow: 0 4px 16px rgba(16,20,30,.08), 0 1px 4px rgba(16,20,30,.06);
        }

    /* Buttons */
    #pbApp .pb-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 8px 14px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        border: 1px solid var(--accent);
        background: var(--surface);
        color: var(--accent);
        cursor: pointer;
        transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
        text-decoration: none;
        white-space: nowrap;
    }

        /* White label on the filled hover, in both themes. --surface is white in light
           mode but near-black in dark, where it left dark text on an accent fill. */
        #pbApp .pb-btn:hover {
            background: var(--accent-2);
            color: var(--accent-on);
            border-color: var(--border-2);
        }

        #pbApp .pb-btn.pri {
            background: #4361ee;
            border-color: #4361ee;
            color: #ffffff;
            box-shadow: 0 1px 2px rgba(67,97,238,.28), 0 2px 8px rgba(67,97,238,.14);
            letter-spacing: -0.01em;
        }

            #pbApp .pb-btn.pri:hover {
                background: #3a54d4;
                border-color: #3a54d4;
                color: #fff;
                box-shadow: 0 2px 4px rgba(58,84,212,.32), 0 4px 14px rgba(58,84,212,.20);
            }

        #pbApp .pb-btn.ghost {
            border-color: var(--accent);
            background: #fff;
            color: var(--accent);
        }

            #pbApp .pb-btn.ghost:hover {
                background: var(--accent-2);
                color: var(--accent-on);
                border-color: transparent;
                box-shadow: none;
            }

        #pbApp .pb-btn.danger {
            color: var(--danger-text);
            border-color: var(--danger-soft);
            background: var(--danger-soft);
        }

            #pbApp .pb-btn.danger:hover {
                background: var(--danger);
                border-color: var(--danger);
                color: #fff;
            }

        #pbApp .pb-btn:disabled, #pbApp .pb-btn[disabled] {
            opacity: .45;
            cursor: not-allowed;
            pointer-events: none;
        }

    /* Pills / badges */
    #pbApp .pb-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 3px 9px;
        border-radius: 99px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.6;
        white-space: nowrap;
    }

        #pbApp .pb-pill .pb-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            flex-shrink: 0;
        }

        #pbApp .pb-pill.accent {
            background: var(--accent-soft);
            color: var(--accent-2);
        }

        #pbApp .pb-pill.ok {
            background: var(--success-soft);
            color: var(--success-text);
        }

        #pbApp .pb-pill.warn {
            background: var(--warning-soft);
            color: var(--warning-text);
        }

        #pbApp .pb-pill.bad {
            background: var(--danger-soft);
            color: var(--danger-text);
        }

        #pbApp .pb-pill.info {
            background: var(--info-soft);
            color: var(--info-text);
        }

        #pbApp .pb-pill.muted {
            background: var(--surface-3);
            color: var(--text-3);
        }

    /* Avatar */
    #pbApp .pb-av {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 700;
        color: var(--accent-on);
        background: linear-gradient(135deg,var(--accent),var(--accent-2));
        box-shadow: 0 2px 6px rgba(67,97,238,.22);
        flex-shrink: 0;
    }

    /* Table */
    #pbApp .pb-tbl {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

        #pbApp .pb-tbl thead th {
            background: var(--surface-2);
            text-align: left;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-3);
            padding: 9px 16px;
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 1;
        }

            #pbApp .pb-tbl thead th:first-child {
                border-radius: 12px 0 0 0;
            }

            #pbApp .pb-tbl thead th:last-child {
                border-radius: 0 12px 0 0;
            }

        #pbApp .pb-tbl tbody td {
            padding: 11px 16px;
            border-bottom: 1px solid var(--border);
            font-size: 13px;
            color: var(--text);
            vertical-align: middle;
        }

        #pbApp .pb-tbl tbody tr:last-child td {
            border-bottom: none;
        }

        #pbApp .pb-tbl tbody tr {
            transition: background .08s ease;
        }

            #pbApp .pb-tbl tbody tr:hover {
                background: var(--surface-2);
                cursor: default;
            }

    /* Scrolling table shell — wrap a .pb-tbl in .pb-tscroll and the header row stays
       pinned while the rows scroll under it. thead th above is already
       position:sticky, but sticky needs a scrolling ancestor to pin against: the
       .pb-card these tables sit in clips overflow, so without a bounded-height
       wrapper the header has nothing to stick to and rides away with the page.
       The max-height subtracts what the page header, metric strip and filter bar
       occupy above the card, so on a normal viewport the whole card — header, rows
       and pager — fits without scrolling the page at all. The floor keeps a usable
       number of rows on a short screen, where the page scrolls to reach the pager. */
    #pbApp .pb-tscroll {
        overflow: auto;
        max-height: max(380px, calc(100vh - 390px));
    }

        #pbApp .pb-tscroll table thead th {
            position: sticky;
            top: 0;
            z-index: 4;
            background: var(--surface-2);
        }

    /* Seat meter */
    #pbApp .pb-meter {
        height: 8px;
        border-radius: 99px;
        background: var(--surface-3);
        overflow: hidden;
        display: flex;
    }

        #pbApp .pb-meter .seg-used {
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            transition: width .3s ease;
        }

        #pbApp .pb-meter .seg-pending {
            background: var(--warning);
            transition: width .3s ease;
        }

    /* Right-side drawer */
    #pbApp .pb-overlay {
        position: fixed;
        inset: 0;
        background: var(--overlay);
        opacity: 0;
        visibility: hidden;
        transition: opacity .22s ease, visibility .22s ease;
        z-index: 1050;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

        #pbApp .pb-overlay.open {
            opacity: 1;
            visibility: visible;
        }

    #pbApp .pb-drawer {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 560px;
        max-width: 96vw;
        background: var(--surface);
        border-left: 1px solid var(--border);        
        transform: translateX(calc(100% + 4px));
        transition: transform .34s cubic-bezier(.22,1,.36,1);
        z-index: 1051;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

        #pbApp .pb-drawer.open {
            transform: translateX(0);
        }
        /* Header: solid accent band with an optional identity tile.
       Every text colour in here is pinned to an explicit light value. An earlier accent
       header regressed precisely because .pb-overline keeps its accent colour by
       default and went invisible against the band — do not remove these overrides. */
        #pbApp .pb-drawer .dh {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 15px 15px 12px;
            border-bottom: none;
            position: relative;
            flex-shrink: 0;
            gap: 13px;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
        }

            #pbApp .pb-drawer .dh::before {
                display: none;
            }
            /* Optional — a drawer without .dh-icon simply has no tile. */
            #pbApp .pb-drawer .dh .dh-icon {
                width: 38px;
                height: 38px;
                border-radius: 10px;
                flex-shrink: 0;
                background: rgba(255,255,255,.16);
                border: 1px solid rgba(255,255,255,.24);
                color: #ffffff;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            #pbApp .pb-drawer .dh .dh-left {
                flex: 1;
                min-width: 0;
            }

            #pbApp .pb-drawer .dh .pb-overline {
                color: rgba(255,255,255,.76);
            }

                #pbApp .pb-drawer .dh .pb-overline::before {
                    display: none;
                }

            #pbApp .pb-drawer .dh .dh-title {
                font-size: 19px;
                font-weight: 700;
                color: #ffffff;
                letter-spacing: -0.025em;
                line-height: 1.25;
            }

            #pbApp .pb-drawer .dh .dh-sub {
                font-size: 11px;
                color: rgba(255,255,255,.82);
                margin-top: 2px;
                line-height: 1.55;
            }

            #pbApp .pb-drawer .dh .pb-mono {
                color: #ffffff;
            }

            #pbApp .pb-drawer .dh .pb-btn.ghost {
                width: 32px;
                height: 32px;
                padding: 8px;
                border-radius: 8px;
                background: rgba(0, 0, 0, 0.096);
                border: 1px solid rgba(255, 255, 255, 0.265);
                color: #ffffff;
            }

                #pbApp .pb-drawer .dh .pb-btn.ghost:hover {
                    background: rgba(0,0,0,.34);
                    color: #ffffff;
                    border-color: rgba(255,255,255,.34);
                }

        /* Body primitives a drawer can opt into. */
        /* Standing note: what happens on save / what the drawer will do. */
        #pbApp .pb-drawer .pb-dnote {
            display: flex;
            gap: 9px;
            align-items: flex-start;
            margin-bottom: 18px;
            background: var(--info-soft);
            border: 1px solid rgba(37,99,235,.18);
            border-radius: 10px;
            padding: 11px 13px;
            font-size: 12px;
            color: var(--info-text);
            line-height: 1.55;
        }

            #pbApp .pb-drawer .pb-dnote svg {
                flex-shrink: 0;
                margin-top: 1px;
            }
        /* Section headers use the module's existing numbered accent overline
       (<div class="pb-overline">1 &middot; Name</div>) — see _NewTicketDrawer and
       _ReportIssueDrawer. Deliberately not a second, competing primitive. */
        /* Label row: required marker, and an "Optional" tag pushed to the right. */
        #pbApp .pb-drawer .pb-field > label {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        #pbApp .pb-drawer .pb-field .req {
            color: var(--danger);
            font-weight: 700;
        }

        #pbApp .pb-drawer .pb-field .opt {
            margin-left: auto;
            font-size: 11px;
            font-weight: 500;
            color: var(--text-3);
            text-transform: none;
            letter-spacing: normal;
        }
        /* Helper line under a control. */
        #pbApp .pb-drawer .pb-hint {
            display: flex;
            gap: 5px;
            align-items: flex-start;
            margin-top: 6px;
            font-size: 11px;
            color: var(--text-3);
            line-height: 1.5;
        }

            #pbApp .pb-drawer .pb-hint svg {
                flex-shrink: 0;
                margin-top: 1px;
                opacity: .8;
            }
        /* Side-by-side pair for two short fields. */
        #pbApp .pb-drawer .pb-drow {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

@media (max-width:560px) {
    #pbApp .pb-drawer .pb-drow {
        grid-template-columns: 1fr;
    }
}

#pbApp .pb-drawer .db {
    padding: 12px 18px;
    overflow-y: auto;
    flex: 1;
}

#pbApp .pb-drawer .df {
    padding: 8px 15px 8px 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    background: var(--surface-2);
    flex-shrink: 0;
}
/* Section group helper — use pb-dsect inside .db for visual grouping */
#pbApp .pb-drawer .pb-dsect {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

#pbApp .pb-drawer .pb-dsect-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3);
    margin-bottom: 12px;
}

/* Form fields */
#pbApp .pb-field {
    margin-bottom: 16px;
}

    #pbApp .pb-field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-2);
        margin-bottom: 6px;
    }

#pbApp .pb-input, #pbApp .pb-select, #pbApp .pb-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-2);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color .12s, box-shadow .12s;
}

    #pbApp .pb-input:focus, #pbApp .pb-select:focus, #pbApp .pb-textarea:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(67,97,238,.18);
    }

#pbApp .pb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 16px;
}

#pbApp .pb-metric {
    position: relative;
    overflow: hidden;
}

    #pbApp .pb-metric::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
        border-radius: 12px 12px 0 0;
        opacity: 0;
        transition: opacity .15s;
    }

    #pbApp .pb-metric:hover::after {
        opacity: 1;
    }

    #pbApp .pb-metric .pb-mlabel {
        color: var(--text-3);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    #pbApp .pb-metric .pb-mval {
        font-size: 28px;
        font-weight: 700;
        letter-spacing: -0.03em;
        margin-top: 8px;
        line-height: 1;
    }

/* Section title (replaces inline style="font-size:15px;font-weight:700") */
#pbApp .pb-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* Spacing utilities */
#pbApp .pb-mb-8 {
    margin-bottom: 8px;
}

#pbApp .pb-mb-12 {
    margin-bottom: 12px;
}

#pbApp .pb-mb-16 {
    margin-bottom: 16px;
}

#pbApp .pb-mb-20 {
    margin-bottom: 15px;
}

#pbApp .pb-mt-16 {
    margin-top: 16px;
}

#pbApp .pb-mt-20 {
    margin-top: 20px;
}

/* Tab button (used in People, Productivity for switching panes) */
#pbApp .pb-tab {
    border-color: var(--border-2);
    background: var(--surface);
    color: var(--text-2);
}

    #pbApp .pb-tab.active, #pbApp .pb-tab.pri {
        background: #4361ee;
        border-color: #4361ee;
        color: #fff;
        box-shadow: 0 1px 2px rgba(67,97,238,.28), 0 2px 8px rgba(67,97,238,.14);
    }

/* Two-column grid with responsive collapse */
#pbApp .pb-2col {
    display: grid;
    gap: 16px;
    grid-template-columns: 1.7fr 1fr;
}

@media (max-width:900px) {
    #pbApp .pb-2col {
        grid-template-columns: 1fr;
    }
}

/* Inline flex row utility */
#pbApp .pb-row-flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Card section header row */
#pbApp .pb-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

@media (prefers-reduced-motion:reduce) {
    #pbApp .pb-btn, #pbApp .pb-overlay, #pbApp .pb-drawer, #pbApp .pb-toggle .sl, #pbApp .pb-toggle .sl:before,
    #pbApp .pb-input, #pbApp .pb-select, #pbApp .pb-textarea {
        transition: none;
    }
}

* {
    scrollbar-width: thin;
}


::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c6c6c6;
}

/* ---- Searchable combobox (BUG-001) -------------------------------------
   The assignee pickers were plain <select>s. That was fine while the list
   came from PB.Membership and held one or two names; sourcing it from the
   company roster instead turned it into 80+ entries you had to scroll.
   Used by the Bug Reporting filter, the issue drawer's assign control and
   the Report-issue drawer. Keeps a hidden input carrying the value, so any
   code already reading .value and listening for 'change' keeps working. */

#pbApp .pb-combo {
    position: relative;
}

#pbApp .pb-combo-search {
    width: 100%;
    cursor: text;
}

#pbApp .pb-combo.on .pb-combo-search {
    border-color: var(--accent);
}

#pbApp .pb-combo-menu {
    position: absolute;
    z-index: 1200;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 280px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(16,20,30,.14);
    padding: 4px;
}

#pbApp .pb-combo-menu[hidden] {
    display: none;
}

#pbApp .pb-combo-opt {
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pbApp .pb-combo-opt:hover,
#pbApp .pb-combo-opt.act {
    background: var(--accent-soft);
    color: var(--accent);
}

#pbApp .pb-combo-opt.sel {
    font-weight: 600;
}

#pbApp .pb-combo-opt .sub {
    display: block;
    font-size: 10.5px;
    color: var(--text-3);
}

#pbApp .pb-combo-empty {
    padding: 10px;
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
}
