﻿/* ── Root overflow guard ────────────────────────────────────────────
   Prevent mobile browsers from widening the viewport to fit overflowing
   content. overflow-x:clip (not hidden) preserves position:fixed behaviour.
─────────────────────────────────────────────────────────────────────── */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}

.vp-portal-shell {
    min-height: calc(100vh - 68px);
    padding: 32px 24px 64px;
    background: var(--color-gray-04);
}

.vp-portal-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Wide screens: the 1180px cap strands most of a 1440p/4K display in margin.
   Scale the working width with the viewport — tables, boards, and the detail
   two-pane all benefit; running text inside panels keeps its own caps. */
@media (min-width: 1600px) {
    .vp-portal-container { max-width: 1500px; }
}
@media (min-width: 2200px) {
    .vp-portal-container { max-width: 1840px; }
}

.vp-portal-loader-shell {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.vp-portal-loader {
    width: 100%;
    justify-content: center;
}

.vp-portal-hero,
.vp-portal-panel,
.vp-portal-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-02);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(34, 48, 41, 0.06);
}

.vp-portal-hero {
    padding: 32px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.vp-portal-eyebrow {
    margin: 0 0 10px;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0b7d4d; /* AA-passing brand green for small uppercase text (green token = 3.15:1) */
}

.vp-portal-title {
    margin: 0;
    font-family: "Serrif Medium", "Serrif Regular Placeholder", Arial, serif;
    font-size: 34px;
    color: var(--color-midnight);
}

.vp-portal-subtitle {
    margin: 12px 0 0;
    max-width: 700px;
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
    color: var(--color-midnight);
    line-height: 1.6;
}

.vp-portal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.vp-portal-shell .vp-btn {
    box-sizing: border-box;
    min-height: var(--btn-height);
    height: var(--btn-custom-height, var(--btn-height));
    padding: var(--btn-padding, 10px 20px);
    font-size: var(--font-size-body, 16px);
    line-height: 1;
}

.vp-portal-actions .vp-btn {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    align-self: center;
}

/* Keep hero actions on one line without shrinking their height */
.vp-portal-hero .vp-portal-actions {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.vp-portal-actions.vp-portal-actions--row {
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
}

.vp-portal-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.vp-portal-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    color: var(--color-midnight);
    background: var(--color-gray-03);
}

.vp-portal-nav a.active {
    background: var(--color-bright-green);
}

.vp-portal-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.vp-portal-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.vp-portal-panel {
    padding: 28px;
}

.vp-portal-panel-files {
    position: relative;
}

.vp-portal-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

/* Muted text uses --vp-text-secondary (#6b736f, AA 4.88:1 on white) instead of
   gray-01 (#909893, 2.96:1 — fails WCAG AA). Same swap applied portal-wide. */
.vp-portal-panel-copy {
    margin: 8px 0 0;
    color: var(--vp-text-secondary, #6b736f);
    line-height: 1.55;
}

.vp-portal-panel.wide {
    grid-column: span 8;
}

.vp-portal-panel.side {
    grid-column: span 4;
}

.vp-portal-panel.half {
    grid-column: span 6;
}

.vp-portal-panel.full {
    grid-column: 1 / -1;
}

.vp-portal-panel h2,
.vp-portal-panel h3 {
    margin: 0 0 18px;
    font-family: "Serrif Medium", "Serrif Regular Placeholder", Arial, serif;
    color: var(--color-midnight);
}

.vp-portal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.vp-portal-meta-item span,
.vp-portal-stat-label {
    display: block;
    margin-bottom: 8px;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
}

.vp-portal-meta-item strong,
.vp-portal-stat-value {
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 18px;
    color: var(--color-midnight);
}

.vp-portal-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.vp-portal-card {
    padding: 20px;
}

.vp-portal-contact-selector {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.vp-portal-contact-selector > :first-child {
    flex: 1;
    min-width: 0;
}

a.vp-portal-stat-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.vp-portal-stat-link:hover {
    border-color: var(--color-bright-green, #a3e96b);
    box-shadow: 0 10px 30px rgba(34, 48, 41, 0.12);
}

.vp-portal-banner {
    padding: 14px 16px;
    border-radius: 12px;
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
}

.vp-portal-banner.info {
    background: var(--color-light-purple-50);
    border: 1px solid var(--color-light-purple);
    color: var(--color-midnight);
}

.vp-portal-banner.success {
    background: var(--color-mint-50);
    border: 1px solid var(--color-mint);
    color: var(--color-midnight);
}

.vp-portal-banner.error {
    background: var(--color-beige-50);
    border: 1px solid var(--color-red);
    color: var(--color-midnight);
}

/* Was referenced by the awaiting-approval notice but never defined, so that
   banner rendered as bare floating text (Kelly's readability complaint). Amber
   pair matches the assignment-modal requirement checklist. */
.vp-portal-banner.warning {
    background: var(--color-pale-yellow-50, #FFFDD8);
    border: 1px solid var(--color-amber-line, #e6cfa8);
    color: var(--color-midnight);
}

/* Scroll wrapper — lets the table scroll horizontally within the panel
   instead of pushing the panel (and page) wider on mobile */
.vp-portal-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vp-portal-table {
    width: 100%;
    border-collapse: collapse;
}

.vp-portal-table th,
.vp-portal-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--color-gray-03);
    text-align: left;
    vertical-align: top;
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
    color: var(--color-midnight);
}

.vp-portal-table th {
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 13px;
}

.vp-portal-table tr:last-child td {
    border-bottom: none;
}

.vp-portal-table tr.vp-portal-table-row--expiring-soon td {
    background: var(--color-pale-yellow-50);
}

.vp-portal-table tr.vp-portal-table-row--expiring-critical td {
    background: var(--color-beige-50);
}

.vp-portal-table tr.vp-portal-table-row--expiring-critical td:first-child {
    border-left: 3px solid var(--color-red);
}

.vp-portal-banner__list {
    margin: 8px 0 8px 18px;
    padding: 0;
    font-size: 14px;
}

.vp-portal-banner__date {
    color: var(--vp-text-secondary, #6b736f);
    margin-left: 4px;
}

.vp-portal-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    background: var(--color-light-purple-50);
    color: var(--color-midnight);
    /* Hairline edge so a chip stays legible on same-tone panels (contrast pass). */
    border: 1px solid color-mix(in srgb, var(--color-midnight, #223029) 10%, transparent);
}

.vp-portal-badge.success {
    background: var(--color-mint);
}

.vp-portal-badge.warning {
    background: var(--color-pale-yellow-50);
}

.vp-portal-badge.danger {
    /* Red-tinted, not beige — Blocked / Overdue / SLA now read as an alert while
       staying AA (dark-red text on a light-red wash). */
    background: color-mix(in srgb, var(--color-red, #f9574d) 15%, #fff);
    color: color-mix(in srgb, var(--color-red, #f9574d) 60%, #000);
    border-color: color-mix(in srgb, var(--color-red, #f9574d) 40%, transparent);
}

/* Dedicated SLA-breach chip — the loudest badge on the list: solid deep red,
   white text (AA), and a soft outer ring so it catches the eye first. */
.vp-portal-badge.vp-portal-badge--sla-breached {
    background: color-mix(in srgb, var(--color-red, #f9574d) 80%, #000);
    color: #fff;
    border-color: color-mix(in srgb, var(--color-red, #f9574d) 55%, #000);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-red, #f9574d) 22%, transparent);
}

/* ── Ticket-status color families (Kelly's feedback) ──
   Four visually distinct families so a list scans at a glance:
     Submitted            → purple  (queued, nothing happening yet)
     In Review / In Progress → sky  (Verapath actively working — Jira-style blue)
     Awaiting Customer    → yellow  (ball is in the customer's court)
     Resolved / Closed    → mint    (done; Closed is the lighter, dimmer shade)
   Kept as their own classes so the shared success/warning/danger variants
   (approval, severity, priority badges) are untouched. */
.vp-portal-badge.info {
    background: var(--color-light-purple);
}

.vp-portal-badge.working {
    background: var(--color-sky, #d8e7f5);
}

.vp-portal-badge.waiting {
    background: var(--color-pale-yellow);
}

.vp-portal-badge.closed {
    background: var(--color-mint-50);
    color: color-mix(in srgb, var(--color-midnight) 78%, transparent);
}

.vp-portal-empty {
    padding: 18px;
    border-radius: 12px;
    background: var(--color-gray-04);
    color: var(--vp-text-secondary, #6b736f);
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
}

.vp-portal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.vp-portal-form-grid .full-width {
    grid-column: 1 / -1;
}

.vp-portal-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.vp-portal-checkbox-card {
    padding: 20px;
    border: 1px solid var(--color-gray-02);
    border-radius: 12px;
    background: var(--color-white);
}

.vp-portal-checkbox-card .vp-checkbox-field {
    width: 100%;
}

.vp-portal-checkbox-card .vp-checkbox-row {
    align-items: center;
}

.vp-portal-checkbox-card .vp-checkbox__label {
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
    color: var(--color-midnight);
}

.vp-portal-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vp-portal-key-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.vp-portal-key-value {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vp-portal-key-value span {
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
}

.vp-portal-key-value p {
    margin: 0;
    color: var(--color-midnight);
    line-height: 1.6;
}

/* ── Request-detail readability (Summary groups + Assignment rail) ──
   Scoped to the detail page's two columns so other portal panels that reuse
   .vp-portal-key-value (comments, documents) keep their current look. */
.vp-portal-detail-main .vp-portal-key-value,
.vp-portal-detail-rail .vp-portal-key-value {
    gap: 3px;
}
.vp-portal-detail-main .vp-portal-key-value p,
.vp-portal-detail-rail .vp-portal-key-value p {
    font-size: 14px;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
}
.vp-portal-detail-main .vp-portal-key-value--strong p {
    font-weight: 600;
}
.vp-portal-detail-main .vp-portal-key-grid {
    gap: 12px 24px;
}

/* Labeled sub-groups (People / Schedule / Classification). */
.vp-portal-key-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.vp-portal-key-group + .vp-portal-key-group {
    margin-top: 4px;
}
.vp-portal-key-group-title {
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-gray-03, #e0e3e2);
}

/* De-emphasized "None / Not assigned / Not tracked / Not provided" placeholders. */
.vp-portal-value-muted {
    color: var(--vp-text-secondary, #6b736f);
    font-style: normal;
}

/* Assignment rail: compact inline rows (label left, value right) with hairline
   dividers so the facts scan top-to-bottom fast. */
.vp-portal-detail-rail .vp-portal-key-value {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-gray-03, #e0e3e2);
}
.vp-portal-detail-rail .vp-portal-key-value:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.vp-portal-detail-rail .vp-portal-key-value span {
    flex: 0 0 auto;
}
.vp-portal-detail-rail .vp-portal-key-value p {
    text-align: right;
    font-weight: 600;
    min-width: 0;
}
/* Long values (approval line, resolution note) wrap full width instead of inline. */
.vp-portal-detail-rail .vp-portal-key-value--block {
    flex-direction: column;
    align-items: stretch;
}
.vp-portal-detail-rail .vp-portal-key-value--block p {
    text-align: left;
    font-weight: 400;
}

[data-theme="dark"] .vp-portal-key-group-title,
:root[data-theme="dark"] .vp-portal-key-group-title,
[data-theme="dark"] .vp-portal-detail-rail .vp-portal-key-value,
:root[data-theme="dark"] .vp-portal-detail-rail .vp-portal-key-value {
    border-color: rgba(255, 255, 255, 0.12);
}

.vp-portal-document-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vp-portal-document-card {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--color-gray-03);
    background: var(--color-gray-04);
}

.vp-portal-document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.vp-portal-document-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vp-portal-document-header p {
    margin: 6px 0 0;
    color: var(--vp-text-secondary, #6b736f);
    line-height: 1.5;
}

.vp-portal-inline-button {
    width: auto;
}

.vp-portal-upload-actions {
    margin-bottom: 24px;
}

.vp-portal-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(3px);
    border-radius: 16px;
    z-index: 2;
}

.vp-portal-document-versions {
    margin-top: 12px;
}

.vp-portal-document-versions summary {
    cursor: pointer;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    color: var(--color-midnight);
}

.vp-portal-document-version-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.vp-portal-document-version {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 0;
    border-top: 1px solid var(--color-gray-03);
}

.vp-portal-document-version:first-child {
    border-top: none;
    padding-top: 0;
}

.vp-portal-document-version p {
    margin: 4px 0 0;
    color: var(--vp-text-secondary, #6b736f);
}

.vp-portal-deleted-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-gray-03);
}

.vp-portal-document-card--deleted {
    background: var(--color-beige-50);
}

.vp-portal-request-snippet {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--color-gray-04);
}

.vp-portal-request-snippet span {
    color: var(--vp-text-secondary, #6b736f);
    font-size: 13px;
}

.vp-portal-request-snippet p {
    margin: 0;
    line-height: 1.5;
}

.vp-portal-inline-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.vp-portal-inline-form .input-group {
    min-width: 180px;
}

.vp-portal-link {
    color: var(--color-midnight);
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
}

/* Expand/collapse toggle for parent rows in the request tables. */
.vp-portal-tree-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    color: var(--color-midnight);
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: var(--font-size-label);
    text-decoration: underline;
    white-space: nowrap;
}

/* Marker on indented sub-request rows. */
.vp-portal-tree-child {
    color: var(--vp-text-secondary, #6b736f);
    margin-right: 4px;
}

.vp-portal-table-title-link {
    color: var(--color-midnight);
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    text-decoration: none;
}

.vp-portal-table-title-link:hover {
    text-decoration: underline;
}

.vp-portal-table-title-link:focus-visible {
    /* color-green, not bright-green: 3.15:1 vs 1.46:1 — the ring must be visible. */
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
    border-radius: 4px;
    text-decoration: underline;
}

.vp-portal-table-button {
    min-width: 0;
}

.vp-portal-table .vp-btn {
    width: auto;
    white-space: nowrap;
}

/* Customer login page fallback styles.
   Keep these global so the login experience still renders correctly
   if the scoped CustomerLoginPage bundle is stale or missing after publish. */
.vp-cl-page {
    min-height: calc(100vh - 68px);
    padding: 80px 24px 40px;
    background: var(--color-gray-04);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.vp-cl-card {
    width: min(560px, 100%);
    background: var(--color-white);
    border: 1px solid var(--color-gray-02);
    border-radius: 16px;
    padding: 32px 36px 36px;
    box-shadow: 0 12px 30px rgba(34, 48, 41, 0.08);
}

.vp-cl-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.vp-cl-logo {
    display: block;
    width: 148px;
    max-width: 100%;
    height: auto;
}

.vp-cl-admin-btn {
    font-size: 13px !important;
    height: 36px !important;
    padding: 0 14px !important;
}

.vp-cl-title,
.vp-cl-greeting {
    margin: 0 0 10px;
    font-family: "Serrif Medium", "Serrif Regular Placeholder", Arial, serif;
    font-size: 28px;
    color: var(--color-midnight);
}

.vp-cl-greeting {
    margin-bottom: 6px;
}

.vp-cl-subtitle,
.vp-cl-account,
.vp-cl-empty-state__message {
    margin: 0 0 24px;
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 15px;
    color: var(--color-midnight);
    line-height: 1.6;
}

.vp-cl-account {
    margin-bottom: 22px;
    color: var(--color-gray-01);
    line-height: 1.5;
}

.vp-cl-empty-state__message {
    margin: 0;
}

.vp-cl-ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 10px 20px;
    background: var(--color-midnight);
    color: var(--color-white);
    border-radius: 6px;
    text-decoration: none;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 15px;
    transition: opacity 0.15s ease;
}

.vp-cl-ms-btn:hover {
    opacity: 0.88;
}

.vp-cl-loader {
    display: flex;
    justify-content: center;
    padding: 24px 0 8px;
}

.vp-cl-workspaces {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vp-cl-workspace-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--color-gray-02);
    border-radius: 12px;
    text-decoration: none;
    background: var(--color-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vp-cl-workspace-link:hover {
    border-color: var(--color-bright-green);
    box-shadow: 0 4px 12px rgba(163, 233, 107, 0.18);
}

.vp-cl-workspace-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--color-mint);
    color: var(--color-midnight);
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp-cl-workspace-title {
    flex: 1;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 15px;
    color: var(--color-midnight);
}

.vp-cl-workspace-arrow {
    flex-shrink: 0;
    color: var(--color-gray-01);
    transition: transform 0.15s ease;
}

.vp-cl-workspace-link:hover .vp-cl-workspace-arrow {
    transform: translateX(2px);
    color: var(--color-midnight);
}

.vp-cl-banner {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-family: "Season Sans Regular", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.vp-cl-banner.info {
    background: var(--color-light-purple-50);
    border: 1px solid var(--color-light-purple);
    color: var(--color-midnight);
}

.vp-cl-banner.error {
    background: var(--color-beige-50);
    border: 1px solid var(--color-red);
    color: var(--color-midnight);
}

.vp-cl-empty-state {
    display: grid;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-beige-50) 100%);
    border: 1px solid var(--color-gray-03);
    border-radius: 16px;
}

.vp-cl-empty-state__eyebrow {
    margin: 0;
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0b7d4d;
}

.vp-cl-empty-state__action {
    justify-self: start;
    text-decoration: none;
}

@media (max-width: 960px) {
    .vp-portal-panel.wide,
    .vp-portal-panel.side,
    .vp-portal-panel.half,
    .vp-portal-panel.full {
        grid-column: 1 / -1;
    }

    .vp-portal-hero {
        flex-direction: column;
    }

    .vp-portal-meta,
    .vp-portal-stat-grid,
    .vp-portal-stat-row,
    .vp-portal-form-grid,
    .vp-portal-checkbox-grid,
    .vp-portal-key-grid {
        grid-template-columns: 1fr;
    }

    .vp-portal-panel-header,
    .vp-portal-document-header,
    .vp-portal-document-version {
        flex-direction: column;
    }
}

/* Sidebar layout offset */
.vp-portal-main {
    margin-left: 220px;
    transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100dvh;
}

.vp-portal-main--collapsed {
    margin-left: 72px;
}

/* Mobile header bar (hidden on desktop) */
.vp-portal-mobile-header {
    display: none;
}

/* Sidebar wrapper (no-op on desktop; sidebar is position:fixed) */
.vp-portal-nav-wrapper {
    /* nothing needed on desktop */
}

/* Mobile nav backdrop */
.vp-portal-nav-backdrop {
    display: none;
}

@media (max-width: 960px) {
    .vp-portal-main,
    .vp-portal-main--collapsed {
        margin-left: 0;
        padding-top: 56px;
        min-height: 100dvh;
    }

    /* Fixed top bar with logo + hamburger/X — always on top */
    .vp-portal-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        height: 56px;
        background: var(--color-midnight, #223029);
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        box-sizing: border-box;
        /* overflow:clip on html/body now prevents viewport expansion;
           the header itself must NOT clip so the 44px button renders fully */
        overflow: visible;
    }

    .vp-portal-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border: 1.5px solid rgba(255, 255, 255, 0.4);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s;
    }

    .vp-portal-mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.6);
    }

    /* Sidebar hidden by default on mobile */
    .vp-portal-nav-wrapper {
        display: none;
    }

    /* Drawer drops below the fixed header bar and fills the rest of the screen */
    .vp-portal-nav-wrapper--open {
        display: block;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 250;
        overflow: hidden;
        animation: vp-mobile-nav-slide-down 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes vp-mobile-nav-slide-down {
        from { transform: translateY(-100%); }
        to   { transform: translateY(0); }
    }

}

/* ── Phone breakpoint (≤640px) ──────────────────────────────────────────────
   The 960px breakpoint above handles sidebar collapse and grid stacking for
   tablets. These rules refine layout for phone-sized screens (390–640px).
──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* Tighten shell side padding so panels fill more of the narrow screen */
    .vp-portal-shell {
        padding: 16px 12px 48px;
    }

    /* Reduce panel/hero/card internal padding */
    .vp-portal-panel,
    .vp-portal-hero,
    .vp-portal-card {
        padding: 18px 16px;
        border-radius: 12px;
    }

    /* Panel header: stack title and action button vertically */
    .vp-portal-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Hero: tighten gap so buttons are closer to the title */
    .vp-portal-hero {
        gap: 16px;
    }

    /* Action buttons: wrap naturally, smaller gap */
    .vp-portal-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Heading: scale with viewport width down to a comfortable minimum */
    .vp-portal-title {
        font-size: clamp(22px, 6vw, 32px);
    }

    /* Table: tighter cell padding on small screens */
    .vp-portal-table th,
    .vp-portal-table td {
        padding: 10px 8px;
        font-size: 14px;
    }

    /* Checkbox and key-value grids: single column */
    .vp-portal-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .vp-portal-key-grid {
        grid-template-columns: 1fr;
    }

    /* Form grid: ensure single column on phones */
    .vp-portal-form-grid {
        grid-template-columns: 1fr;
    }

    /* Banners: allow text to wrap without overflow */
    .vp-portal-banner {
        word-break: break-word;
    }

    .vp-cl-card {
        padding: 24px 20px 28px;
    }

    .vp-cl-card-header {
        gap: 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .vp-cl-empty-state {
        padding: 20px;
    }

    .vp-cl-empty-state__action {
        width: 100%;
        justify-self: stretch;
        text-align: center;
    }
}

@media (max-width: 440px) {
    /* Very small phones: collapse stat grids to single column */
    .vp-portal-stat-row,
    .vp-portal-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Rendered rich-text content (bullets, links) from request and comment bodies */
.vp-portal-rich-text {
    color: var(--color-midnight, #223029);
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
}

.vp-portal-rich-text p {
    margin: 0 0 8px;
}

.vp-portal-rich-text p:last-child {
    margin-bottom: 0;
}

.vp-portal-rich-text ul,
.vp-portal-rich-text ol {
    margin: 0 0 8px;
    padding-left: 20px;
}

.vp-portal-rich-text li {
    margin: 2px 0;
}

/* #0b7d4d: the darkest brand-adjacent green that passes AA (5.18:1 on white);
   the old hover swapped to bright-green #a3e96b — 1.46:1, links vanished. */
.vp-portal-rich-text a {
    color: #0b7d4d;
    text-decoration: underline;
}

.vp-portal-rich-text a:hover {
    color: var(--color-midnight, #223029);
}

.vp-portal-rich-text blockquote {
    margin: 0 0 8px;
    padding: 6px 12px;
    border-left: 3px solid var(--color-gray-02, #b9c0be);
    color: var(--vp-text-secondary, #6b736f);
}

.vp-portal-rich-text h1,
.vp-portal-rich-text h2,
.vp-portal-rich-text h3,
.vp-portal-rich-text h4,
.vp-portal-rich-text h5,
.vp-portal-rich-text h6 {
    margin: 6px 0 4px;
    font-weight: 600;
}

.vp-portal-comments-modal {
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.vp-portal-comments-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
}

.vp-portal-comments-heading {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-midnight, #223029);
}

.vp-portal-comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--color-light-purple, #e5daf4);
    color: var(--color-midnight, #223029);
    font-size: 13px;
    font-weight: 600;
}

.vp-portal-comments-scroll {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 160px;
    max-height: 45vh;
    padding-right: 4px;
}

.vp-portal-comment-card {
    background: var(--color-white, #ffffff);
    border-color: var(--color-gray-02, #b9c0be);
}

.vp-portal-comments-composer {
    flex: 0 0 auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-gray-02, #b9c0be);
}

.vp-portal-comments-composer-heading {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-midnight, #223029);
}

.vp-portal-comments-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.vp-portal-history-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vp-portal-history-panel h2 {
    margin: 0;
}

.vp-portal-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.vp-portal-history-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-left: 3px solid var(--color-bright-green, #a3e96b);
    background: var(--color-gray-04, #f7f7f7);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    line-height: 1.4;
}

.vp-portal-history-when {
    color: var(--vp-text-secondary, #6b736f);
    font-size: 12px;
}

.vp-portal-history-actor {
    color: var(--color-midnight, #223029);
    font-weight: 600;
}

.vp-portal-history-action {
    color: var(--color-midnight, #223029);
}

.vp-portal-comments-panel-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vp-portal-comment-edited {
    color: var(--vp-text-secondary, #6b736f);
    margin-left: 4px;
}

.vp-portal-document-version-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vp-contact-note-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vp-note-edit-button {
    border: 1px solid var(--color-gray-02);
    background: var(--color-gray-03);
    color: var(--color-midnight);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-family: "SeasonSans-SemiBold", sans-serif;
    cursor: pointer;
}

    .vp-note-edit-button:hover {
        background: var(--color-gray-02);
    }

.vp-note-modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vp-note-modal-label {
    color: var(--color-midnight);
    font-size: 14px;
    font-family: "SeasonSans-SemiBold", sans-serif;
}

.vp-note-modal-textarea {
    
    min-height: 59px;
    width: 100%;
    display: block;
    border: none;
    border-radius: 6px;
    padding: 18px 12px;
    background: var(--color-gray-04);
    font-family: "SeasonSans-Regular", sans-serif;
    font-size: 14px;
    color: var(--color-midnight);
    resize: none;
}

    .vp-note-modal-textarea:focus {
        outline: 2px solid var(--color-green);
        border-color: var(--color-green);
    }

.vp-note-preview-box {
    min-height: 59px;
    border: none;
    border-radius: 6px;
    padding: 12px;
    background: var(--color-gray-04);
    color: var(--color-midnight);
    font-family: "SeasonSans-Regular", sans-serif;
    display: flex;
    align-items: center;
    flex: 1;
}

/* Supporting Files overlay (NewTicketPage). Kept always-mounted so the
   FileInput's <InputFile> JS state survives open/close. Toggled via CSS
   visibility rather than DOM removal. */
.vp-portal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.vp-portal-overlay.is-closed {
    visibility: hidden;
    pointer-events: none;
}

.vp-portal-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.vp-portal-overlay__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Desktop gets real working width — 640px read as a thin strip on large
       displays (the comment composer and files list are work surfaces). */
    width: min(1080px, calc(100vw - 48px));
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    background: var(--color-white, #ffffff);
    color: var(--color-midnight, #223029);
    border: 1px solid var(--color-gray-02, #b9c0be);
    border-radius: 22px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.vp-portal-overlay__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-gray-03, #e0e3e2);
    flex-shrink: 0;
}

.vp-portal-overlay__title {
    flex: 1;
    font-size: 22px;
    font-family: "Serrif Medium", "Serrif Regular Placeholder", Georgia, serif;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-midnight, #223029);
}

.vp-portal-overlay__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--color-gray-01, #909893);
    flex-shrink: 0;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.vp-portal-overlay__close:hover {
    background: var(--color-gray-03, #e0e3e2);
    color: var(--color-midnight, #223029);
}

.vp-portal-overlay__body {
    flex: 1;
    padding: 24px 20px;
    overflow-y: auto;
}

.vp-portal-overlay__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-gray-03, #e0e3e2);
    flex-shrink: 0;
}

/* ── Request board (P2.2) ─────────────────────────────────────────────────
   The shared kanban component styles itself with RIA-vocabulary --vp-* vars
   (hardcoded fallbacks otherwise); bridge them to the portal palette here. */
.vp-portal-board {
    --vp-card-alt: var(--color-beige, #f6f4ef);
    --vp-card-bg: var(--color-white, #ffffff);
    --vp-border-soft: var(--color-gray-300, #d7d5cf);
    --vp-content-text: var(--color-midnight, #1c2b3a);
    --vp-up: var(--color-green, #2e7d32);
    --vp-down: var(--color-red, #b3261e);
}

.vp-board-filters {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.vp-board-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vp-board-card__number {
    font-size: var(--font-size-label, 12px);
    color: var(--color-gray-600, #6b6a66);
    letter-spacing: 0.02em;
}

.vp-board-card__subject {
    margin: 6px 0;
    font-weight: 600;
    color: var(--color-midnight, #1c2b3a);
}

.vp-board-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: var(--font-size-label, 12px);
    color: var(--color-gray-600, #6b6a66);
}

.vp-board-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.vp-board-card__chips:empty {
    display: none;
}

/* ── Bulk-operation controls in the admin tables' bulk bar (P2.4) ───────── */
.vp-bulk-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.vp-bulk-controls__group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vp-bulk-controls__select,
.vp-bulk-controls__date {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-gray-300, #d7d5cf);
    border-radius: 8px;
    background: var(--color-white, #ffffff);
    color: var(--color-midnight, #1c2b3a);
    font-size: 13px;
}

/* ── List-page facets + saved-view editor (P2.5) ─────────────────────────── */
.vp-portal-facets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.vp-portal-facets__search {
    height: 36px;
    min-width: 260px;
    padding: 0 12px;
    border: 1px solid var(--color-gray-300, #d7d5cf);
    border-radius: 10px;
    background: var(--color-white, #ffffff);
    color: var(--color-midnight, #1c2b3a);
    font-size: 14px;
}

.vp-view-edit {
    align-items: flex-end;
    margin: 10px 0;
}

/* ── Threaded comment replies + mention composer (P3.3) ─────────────────── */
.vp-portal-comment-card--reply {
    margin-left: 32px;
    border-left: 3px solid var(--color-gray-300, #d7d5cf);
}

.vp-reply-cancel {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    text-decoration: underline;
}

/* ── Admin Insights dashboard (P3.4) ─────────────────────────────────────── */
.vp-insights-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vp-insights-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

/* ── KB deflection panel on New Request ──────────────────────────────────── */
.vp-deflect {
    border: 1px solid var(--color-gray-02, #d7d5cf);
    border-left: 4px solid var(--btn-primary-bg, #a3e96b);
    background: var(--color-gray-04, #f7f8f6);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 4px 0 18px;
}

.vp-deflect__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.vp-deflect__icon {
    font-size: 20px;
    line-height: 1.2;
    flex: 0 0 auto;
}

.vp-deflect__title {
    margin: 0;
    font-size: 15px;
    color: var(--color-midnight);
}

.vp-deflect__lede {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--vp-text-secondary, #6b736f);
}

.vp-deflect__group-label {
    margin: 14px 0 6px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
}

.vp-deflect__list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vp-deflect__ticket {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.vp-deflect__follow {
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
    padding: 0;
}

.vp-deflect__confirm {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--color-midnight);
    background: color-mix(in srgb, var(--btn-primary-bg, #a3e96b) 22%, transparent);
    padding: 8px 10px;
    border-radius: 8px;
}

[data-theme="dark"] .vp-deflect,
:root[data-theme="dark"] .vp-deflect {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
    border-left-color: var(--btn-primary-bg, #a3e96b);
}

/* ── Inline @-mention picker (comment composer) ──────────────────────────── */
/* Anchor for the inline @-mention popover: the popover is absolutely positioned
   inside this, so it tracks the caret even when the composer sits in a
   transform-centered modal (fixed positioning breaks there). */
.vp-mention-host {
    position: relative;
}

.vp-mention-pop {
    position: absolute;
    z-index: 1200;
    min-width: 240px;
    max-width: 340px;
    max-height: 232px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--color-gray-02, #d7d5cf);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(34, 48, 41, .22);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Nudge just below the caret line so it reads as attached to the "@". */
    margin-top: 4px;
}
.vp-mention-pop__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: none;
    border: none;
    border-radius: 7px;
    padding: 6px 10px;
    cursor: pointer;
}
.vp-mention-pop__item:hover,
.vp-mention-pop__item.is-active {
    background: var(--color-gray-04, #f2f3f1);
}
.vp-mention-pop__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-midnight, #223029);
}
.vp-mention-pop__email {
    font-size: 12px;
    color: var(--vp-text-secondary, #6b736f);
}
[data-theme="dark"] .vp-mention-pop,
:root[data-theme="dark"] .vp-mention-pop {
    background: #1e2622;
    border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .vp-mention-pop__item:hover,
[data-theme="dark"] .vp-mention-pop__item.is-active,
:root[data-theme="dark"] .vp-mention-pop__item:hover,
:root[data-theme="dark"] .vp-mention-pop__item.is-active {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .vp-mention-pop__name,
:root[data-theme="dark"] .vp-mention-pop__name {
    color: rgba(255, 255, 255, 0.9);
}

/* ── Admin-context banner: makes the cross-client admin view unmistakable and
   gives a one-click way back to a normal customer workspace. ── */
.vp-admin-context {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 8px 14px;
    border: 1px solid var(--color-amber-line, #e6cfa8);
    border-left: 4px solid var(--color-midnight, #223029);
    border-radius: 10px;
    /* was gray-04 (#f7f8f6) — indistinguishable from the white page, so the banner
       had no presence and its secondary-gray text was hard to read. Amber gives it
       a clear "you are in admin mode" surface with AA-legible midnight text. */
    background: var(--color-pale-yellow-50, #FFFDD8);
}
.vp-admin-context__badge {
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-midnight, #223029);
    background: color-mix(in srgb, var(--color-midnight, #223029) 12%, transparent);
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.vp-admin-context__text {
    font-size: 13px;
    color: var(--color-midnight, #223029);
}
.vp-admin-context__exit {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-midnight, #223029);
    text-decoration: none;
    white-space: nowrap;
}
.vp-admin-context__exit:hover { text-decoration: underline; }
[data-theme="dark"] .vp-admin-context,
:root[data-theme="dark"] .vp-admin-context {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
    border-left-color: rgba(255, 255, 255, 0.55);
}
[data-theme="dark"] .vp-admin-context__badge,
:root[data-theme="dark"] .vp-admin-context__badge {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .vp-admin-context__exit,
:root[data-theme="dark"] .vp-admin-context__exit {
    color: rgba(255, 255, 255, 0.9);
}

/* ── Ticket number label in request lists ── */
.vp-portal-ticket-number {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--vp-text-secondary, #6b736f);
    margin-bottom: 1px;
}

/* ── Prominent list search + facet toolbar ── */
.vp-portal-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}
.vp-portal-search {
    position: relative;
    flex: 1 1 320px;
    min-width: 240px;
}
.vp-portal-search__icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-gray-01, #8a938d);
    pointer-events: none;
}
.vp-portal-search__input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 42px;
    font-family: inherit;
    font-size: 15px;
    color: var(--color-midnight, #223029);
    background: #fff;
    border: 1.5px solid var(--color-gray-02, #d7d5cf);
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.vp-portal-search__input::placeholder {
    color: var(--vp-placeholder-color, #6b736f);
}
.vp-portal-search__input:focus {
    outline: none;
    /* color-green, not bright-green: the focused border must clear 3:1. */
    border-color: var(--color-green, #2f7d5b);
    box-shadow: 0 0 0 3px rgba(47, 125, 91, .16);
}
.vp-portal-toolbar__filters {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}
.vp-portal-filter-select {
    min-width: 150px;
}
@media (max-width: 640px) {
    .vp-portal-toolbar__filters { width: 100%; }
    .vp-portal-filter-select { flex: 1 1 0; min-width: 0; }
}

/* ── Ticket detail: Jira/ADO two-pane layout ── */
.vp-portal-detail-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
    margin-top: 4px;
}
.vp-portal-detail-main,
.vp-portal-detail-rail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.vp-portal-detail-rail {
    position: sticky;
    top: 16px;
}
@media (max-width: 900px) {
    .vp-portal-detail-2col { grid-template-columns: 1fr; }
    .vp-portal-detail-rail { position: static; }
}
/* On wide screens give the rail a little more room so the extra container
   width is shared between the main column and the Assignment/History rail. */
@media (min-width: 1600px) {
    .vp-portal-detail-2col { grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
}
@media (min-width: 2200px) {
    .vp-portal-detail-2col { grid-template-columns: minmax(0, 1fr) 420px; }
}

/* ── Ticket detail: "More" overflow menu ── */
.vp-portal-more {
    position: relative;
    display: inline-block;
}
.vp-portal-more > summary {
    list-style: none;
    cursor: pointer;
}
.vp-portal-more > summary::-webkit-details-marker { display: none; }
.vp-portal-more > summary::marker { content: ""; }
/* The toggle is a hand-written <summary>, so Blazor's SCOPED .vp-btn--secondary
   rule never reaches it (no b-xxxx scope attr) — it rendered transparent on white.
   Give it the secondary-button surface explicitly, light + dark. */
.vp-portal-more__toggle {
    /* The toggle is a hand-written <summary>, so VerapathButton's SCOPED styles
       (font-weight, flex centering) never reach it and it read lighter + the
       glyph sat at the top. Set them explicitly so it matches the sibling buttons. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-weight: var(--btn-font-weight, 700);
    line-height: 1;
    background: var(--btn-secondary-bg, #e0e3e2);
    color: var(--btn-secondary-text, #223029);
    border: 1px solid transparent;
}
.vp-portal-more__toggle:hover,
.vp-portal-more[open] > .vp-portal-more__toggle {
    background: var(--btn-secondary-bg-hover, #b9c0be);
}
[data-theme="dark"] .vp-portal-more__toggle,
:root[data-theme="dark"] .vp-portal-more__toggle {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.16);
}
[data-theme="dark"] .vp-portal-more__toggle:hover,
[data-theme="dark"] .vp-portal-more[open] > .vp-portal-more__toggle,
:root[data-theme="dark"] .vp-portal-more__toggle:hover,
:root[data-theme="dark"] .vp-portal-more[open] > .vp-portal-more__toggle {
    background: rgba(255, 255, 255, 0.16);
}
.vp-portal-more__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--color-gray-02, #d7d5cf);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(34, 48, 41, .16);
}
.vp-portal-more__panel .vp-btn {
    width: 100%;
    justify-content: flex-start;
    border-color: transparent;
}
.vp-portal-more__panel .vp-btn:hover:not(:disabled) {
    background: var(--color-gray-04, #f2f3f1);
}

/* ── Assignment modal: highlighted requirement checklist ── */
.vp-portal-requirement {
    border: 1px solid var(--color-amber-line, #e6cfa8);
    background: var(--color-amber-bg, #fbf3e5);
    border-radius: 10px;
    padding: 12px 14px;
    margin: -2px 0 2px;
}
.vp-portal-requirement__title {
    margin: 0 0 8px;
    font-size: 13.5px;
    color: var(--color-midnight, #223029);
}
.vp-portal-requirement__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vp-portal-requirement__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
}
.vp-portal-requirement__mark {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.vp-portal-requirement__list li.is-met { color: #3a4a42; }
.vp-portal-requirement__list li.is-met .vp-portal-requirement__mark {
    /* bright-green made the white check invisible (~1.4:1) — the fallback
       #2f7d5b shows the intended dark green all along. */
    background: var(--color-green, #0ea665);
    color: #fff;
}
.vp-portal-requirement__list li.is-missing { color: #8a5a12; font-weight: 600; }
.vp-portal-requirement__list li.is-missing .vp-portal-requirement__mark {
    /* Same brown as the is-missing label: white-on-it 5.91:1 (was 2.76:1 on #d98a1f). */
    background: #8a5a12;
    color: #fff;
}

/* ── Required-field highlight (any modal, not just Assignment) ─────────────────
   Lands via AdditionalClass on a field root (.vp-dropdown / .vp-field /
   .vp-date-picker). Soft amber wash + left accent so the input the transition
   still needs stands out, matching the requirement checklist's amber. */
.vp-portal-field--needed {
    border-radius: 12px;
    padding: 8px 10px;
    margin-inline: -10px;
    background: var(--color-amber-bg, #fbf3e5);
    box-shadow: inset 3px 0 0 var(--color-amber-line, #e6cfa8);
}
[data-theme="dark"] .vp-portal-field--needed,
:root[data-theme="dark"] .vp-portal-field--needed {
    background: color-mix(in srgb, var(--color-amber-line, #e6cfa8) 14%, transparent);
    box-shadow: inset 3px 0 0 var(--color-amber-line, #e6cfa8);
}

/* ── Small ⋯ overflow toggle + softened Delete (comment actions) ──────────────
   Delete moved off the row into this menu; it's muted until hovered so it reads
   as "available", not "dangerous by default". */
.vp-portal-more--sm > .vp-portal-more__toggle {
    min-width: 0;
    height: 28px;
    padding: 2px 9px;
    font-size: 17px;
    line-height: 1;
    border-radius: 8px;
}
.vp-portal-more--sm .vp-portal-more__panel { min-width: 168px; }
.vp-portal-more__panel .vp-btn.vp-portal-more__danger {
    color: color-mix(in srgb, var(--color-red, #f9574d) 78%, #000);
}
.vp-portal-more__panel .vp-btn.vp-portal-more__danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--color-red, #f9574d) 12%, transparent);
    color: color-mix(in srgb, var(--color-red, #f9574d) 72%, #000);
}

/* ── Top-of-form KB deflect: sky-tinted help callout (was a gray aside) ───────── */
.vp-deflect--top {
    background: color-mix(in srgb, var(--color-sky, #d8e7f5) 45%, #fff);
    border-color: color-mix(in srgb, var(--color-sky, #d8e7f5) 88%, var(--color-midnight, #223029));
    border-left: 4px solid color-mix(in srgb, var(--color-sky, #d8e7f5) 52%, var(--color-midnight, #223029));
    margin: 0 0 20px;
    box-shadow: 0 2px 10px rgba(34, 48, 41, .06);
}
[data-theme="dark"] .vp-deflect--top,
:root[data-theme="dark"] .vp-deflect--top {
    background: rgba(120, 170, 230, 0.10);
    border-color: rgba(255, 255, 255, 0.12);
    border-left-color: color-mix(in srgb, var(--color-sky, #d8e7f5) 70%, #fff);
}

/* ── Request board: modern grab affordance + card lift + clearer drop targets ── */
.vp-portal-board .vp-kanban__card { transition: box-shadow .15s ease, transform .15s ease; }
.vp-portal-board .vp-kanban__card[draggable="true"] { cursor: grab; }
.vp-portal-board .vp-kanban__card[draggable="true"]:active { cursor: grabbing; }
.vp-portal-board .vp-kanban__card:hover {
    box-shadow: 0 8px 22px rgba(34, 48, 41, .14);
    transform: translateY(-2px);
}
.vp-portal-board .vp-kanban__card:focus-visible {
    outline: 2px solid var(--btn-primary-bg, #a3e96b);
    outline-offset: 2px;
}
/* Hovered column gets a neutral wash; only legal targets get the green ring, so
   an illegal drop reads as "not here" before the toast confirms why. */
.vp-portal-board .vp-kanban__column.is-dropping {
    background: color-mix(in srgb, var(--color-midnight, #223029) 5%, transparent);
}
.vp-portal-board .vp-kanban__column.is-droptarget {
    outline: 2px dashed color-mix(in srgb, var(--color-green, #0ea665) 60%, transparent);
    outline-offset: -4px;
}

/* ── Board move toast: floats over the columns, visible at any scroll depth ──── */
.vp-board-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 1300;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: min(560px, calc(100vw - 32px));
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-gray-02, #d7d5cf);
    box-shadow: 0 16px 44px rgba(34, 48, 41, .28);
    animation: vp-board-toast-in .22s ease-out;
}
@keyframes vp-board-toast-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .vp-board-toast { animation: none; }
}
.vp-board-toast--error {
    border-color: color-mix(in srgb, var(--color-red, #f9574d) 55%, transparent);
    border-left: 5px solid var(--color-red, #f9574d);
}
.vp-board-toast--success {
    border-color: color-mix(in srgb, var(--color-green, #0ea665) 45%, transparent);
    border-left: 5px solid var(--color-green, #0ea665);
}
.vp-board-toast__icon { font-size: 18px; line-height: 1.3; flex: 0 0 auto; }
.vp-board-toast--error .vp-board-toast__icon { color: var(--color-red, #f9574d); }
.vp-board-toast--success .vp-board-toast__icon { color: var(--color-green, #0ea665); }
.vp-board-toast__body { display: flex; flex-direction: column; gap: 2px; }
.vp-board-toast__title {
    font-family: "Season Sans SemiBold", "Season Sans Regular Placeholder", Arial, sans-serif;
    font-size: 14px;
    color: var(--color-midnight, #223029);
}
.vp-board-toast__text { font-size: 13px; line-height: 1.45; color: var(--vp-text-secondary, #6b736f); }
.vp-board-toast__close {
    margin-left: 6px;
    padding: 0 2px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--vp-text-secondary, #6b736f);
}
.vp-board-toast__close:hover { color: var(--color-midnight, #223029); }
[data-theme="dark"] .vp-board-toast,
:root[data-theme="dark"] .vp-board-toast {
    background: #1d2a23;
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .vp-board-toast__title,
:root[data-theme="dark"] .vp-board-toast__title { color: rgba(255, 255, 255, 0.92); }
[data-theme="dark"] .vp-board-toast__text,
:root[data-theme="dark"] .vp-board-toast__text { color: rgba(255, 255, 255, 0.70); }

/* ── Bulk action bar: match the Set buttons to the 32px filter controls ────────
   The buttons were inheriting the shared 44px/16px portal button size and dwarfed
   the 32px selects. 3-class selector beats `.vp-portal-shell .vp-btn`. */
.vp-portal-shell .vp-bulk-controls .vp-btn {
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1;
}

/* ── Row action ⋯ menu (Technical / Agent list rows) ──────────────────────────
   The table wrapper scrolls (overflow-x:auto), which would clip an open dropdown.
   When a row menu is open, let the wrapper show it — but ONLY on desktop (≥961px),
   where the table doesn't overflow horizontally. On narrow viewports the table
   scrolls sideways; un-clipping there would kill that scroll and snap the table,
   so we leave the wrapper scrollable and accept a clipped panel on mobile. */
@media (min-width: 961px) {
    .vp-portal-table-wrapper:has(details.vp-portal-more--row[open]) {
        overflow: visible;
    }
}
.vp-portal-more--row { display: inline-block; }
.vp-portal-more--row > .vp-portal-more__toggle {
    /* Compact square ⋯ — overrides the 44px shared button height/width so it
       doesn't render tall-and-long with the dots stuck at the top. */
    width: 36px;
    min-width: 36px;
    height: 34px;
    padding: 0;
    font-size: 18px;
    letter-spacing: 1px;
}

/* ── Contrast round 3: any banner/callout whose surface ≈ the page ────────────
   Ensure text on the neutral admin/info surfaces stays AA-legible. */
.vp-admin-context__badge { color: var(--color-midnight, #223029); }

/* ── Board card → in-place detail drawer (Jira-style) ─────────────────────────
   Softer scrim than the default drawer so the board reads through behind it;
   the --full modifier expands the panel toward full-screen while keeping a sliver
   of board visible at the left. */
.vp-drawer__backdrop.vp-board-detail {
    background: rgba(34, 48, 41, 0.20);
    backdrop-filter: none;
}
.vp-drawer__panel.vp-board-detail--full {
    width: min(1180px, 94vw) !important;
    max-width: 94vw;
}
.vp-board-detail__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.vp-board-detail__toggle { min-height: 34px; }
.vp-board-detail__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vp-board-detail__subject {
    margin: 4px 0 14px;
    font-size: 20px;
    color: var(--color-midnight, #223029);
}
.vp-board-detail__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 0;
    border-top: 1px solid var(--color-gray-02, #e2e6df);
    border-bottom: 1px solid var(--color-gray-02, #e2e6df);
}
.vp-board-detail__meta dt {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
    margin-bottom: 2px;
}
.vp-board-detail__meta dd { margin: 0; font-weight: 600; color: var(--color-midnight, #223029); }
.vp-board-detail__section h4 {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
}
.vp-board-detail__desc { color: var(--color-midnight, #223029); line-height: 1.55; }
.vp-board-detail__desc img { max-width: 100%; height: auto; }

/* ── Insights dashboard: labeled section bands + card-header chrome ────────────
   Mirrors the design-system dashboards — a colored eyebrow + title band per
   section, and muted uppercase chart-card headers, so it reads as a considered
   dashboard rather than a stack of plain panels. */
.vp-insights-band { margin: 28px 0 10px; }
.vp-insights-band__eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-green, #0ea665);
}
.vp-insights-band__title {
    margin: 4px 0 2px;
    font-size: 19px;
    color: var(--color-midnight, #223029);
}
.vp-insights-band__desc {
    margin: 0;
    font-size: 13px;
    color: var(--vp-text-secondary, #6b736f);
    max-width: 68ch;
}
.vp-insights-grid article > h2 {
    margin: 0 0 12px;
    font-size: 12.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--vp-text-secondary, #6b736f);
    font-weight: 700;
}
[data-theme="dark"] .vp-insights-band__title,
:root[data-theme="dark"] .vp-insights-band__title { color: rgba(255, 255, 255, 0.92); }

/* ── @-mention chip — highlights the @Name in the composer and posted comment,
   Jira-style, so it's clear a person is tagged. Rendered from a Quill inline blot
   (span.vp-mention), the only class the rich-text sanitizer lets through. */
.vp-portal-rich-text .vp-mention,
.ql-editor .vp-mention {
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--color-midnight, #223029);
    background: color-mix(in srgb, var(--btn-primary-bg, #a3e96b) 42%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-midnight, #223029) 10%, transparent);
    white-space: nowrap;
}
[data-theme="dark"] .vp-portal-rich-text .vp-mention,
[data-theme="dark"] .ql-editor .vp-mention,
:root[data-theme="dark"] .vp-portal-rich-text .vp-mention,
:root[data-theme="dark"] .ql-editor .vp-mention {
    color: #eef1ec;
    background: color-mix(in srgb, var(--btn-primary-bg, #a3e96b) 26%, transparent);
}
