/* Additional authored CodeXR controls, adapted to the native BFC Cloud. */
@media screen {
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .premium-main-frame {
    background:#f7f8fadb !important;
  }
  .premium-ui .bfc-components-review .review-workbench {
    display:flex; flex-direction:column; overflow:hidden;
    height:min(840px,calc(100svh - 104px)); position:sticky; top:84px;
  }
  .premium-ui .bfc-components-review .review-workbench > .review-head { flex:none; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) {
    display:flex; flex:1; flex-direction:column; min-height:0;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit {
    flex:none; position:relative; inset:auto; z-index:auto;
    background:var(--review-surface) !important; backdrop-filter:none; box-shadow:none;
    border-top:1px solid var(--review-line) !important; border-bottom:1px solid var(--review-line);
    grid-template-columns:minmax(0,1fr) auto; padding:12px 22px !important;
    gap:12px 20px; background:#fff !important;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit p {
    font-size:12px !important; line-height:1.5; overflow-wrap:anywhere;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit > [data-review-save-feedback] { grid-column:1/-1; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit [data-next-review-retry] {
    grid-column:1/-1; justify-self:start; min-height:44px; white-space:normal;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[type=submit] {
    display:inline-flex; justify-content:center; gap:9px;
    grid-column:2; grid-row:1; align-items:center;
    min-width:208px !important; width:208px !important; height:44px !important; min-height:44px !important;
    padding:10px 16px !important; border-radius:9px !important; border:0 !important;
    background:var(--color-primary) !important; color:var(--color-primary-content) !important;
    box-shadow:none !important;
    font-size:13px !important; font-weight:700; line-height:1.3;
    transition:background-color 120ms;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[type=submit]:hover:not(:disabled) {
    background:color-mix(in srgb,var(--color-primary),#132535 13%) !important; box-shadow:none !important;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit .bfc-button-label { text-align:center; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[data-feedback-state=busy] {
    background:var(--color-primary) !important; color:var(--color-primary-content) !important; box-shadow:none !important;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[data-feedback-state=error] {
    background:#fff0df !important; color:#825019 !important; box-shadow:inset 0 0 0 1px #d4b083 !important;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[data-feedback-state=saved] {
    background:#e9f5ed !important; color:#286342 !important; box-shadow:none !important;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-evidence-preview.is-loading {
    position:relative; background:#edf1f5 !important; isolation:isolate; overflow:hidden;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-evidence-preview.is-loading::before {
    content:''; position:absolute; inset:0; z-index:-1; pointer-events:none;
    background:linear-gradient(100deg,transparent 25%,#ffffff9e 50%,transparent 75%);
    transform:translateX(-100%); animation:bfc-evidence-sweep 1.6s ease-in-out infinite;
  }
  @keyframes bfc-evidence-sweep { to { transform:translateX(100%); } }
  @media (prefers-reduced-motion:reduce) {
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-evidence-preview.is-loading::before { animation:none; transform:none; background:transparent; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[type=submit] { transition:none; }
  }
  .premium-ui .bfc-components-review .review-scrollport {
    overflow:auto; min-height:0; flex:1; scrollbar-gutter:stable; scrollbar-width:thin;
    scrollbar-color:#aebbc8 transparent; scroll-padding-block:8px; padding-bottom:14px;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-form-field { scroll-margin-top:8px; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .erp-value input:not([type=hidden]),
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .erp-value select { font-size:13px !important; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-field-evidence > summary {
    min-height:32px !important; padding:5px 0 !important; transition:color 120ms;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-field-evidence > summary:hover { color:var(--review-ink) !important; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-crop-zoom {
    position:relative; transition:background-color 120ms,box-shadow 120ms;
  }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-crop-zoom:hover {
    background:#eef3f7 !important; box-shadow:inset 0 0 0 1px #a9bbcd !important;
  }
  .premium-ui .bfc-components-review .premium-paper-pane .document-thumb {
    display:block; width:100%; padding:10px 10px 0 !important; background:#e9eef2 !important;
    border-radius:9px !important; box-shadow:none !important;
  }
  .premium-ui .bfc-components-review .review-photo-caption {
    margin:10px -10px 0; padding:11px; min-height:40px;
    background:#fff; color:#445365; font-size:11px; border-radius:0 0 9px 9px;
    transition:background-color 120ms,color 120ms;
  }
  .premium-ui .bfc-components-review .document-thumb:hover .review-photo-caption { background:#e2ecf5; color:#214d74; }
  .premium-ui:has(.bfc-components-review) .document-dialog { border-radius:14px; box-shadow:0 20px 64px #16253640; }
  .premium-ui:has(.bfc-components-review) .document-dialog-head { padding:12px 16px; background:#fff; }
  .premium-ui:has(.bfc-components-review) .document-dialog-actions {
    gap:4px; padding:4px; background:#edf1f4; border-radius:10px;
  }
  .premium-ui:has(.bfc-components-review) .document-dialog-actions .compact {
    border:0 !important; background:#fff !important; color:#3c4d60 !important; border-radius:7px !important;
    min-height:40px !important; min-width:40px !important; box-shadow:0 2px 5px #1e334910 !important;
  }
  .premium-ui:has(.bfc-components-review) .document-dialog-actions .compact:hover { background:#dfe8f1 !important; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-rate-settings { margin:0 22px; width:auto; max-width:calc(100% - 44px); }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-rate-settings > summary { min-height:44px; font-size:12px; }
  .premium-ui .bfc-components-trips .queue-toolbar { align-items:end; gap:12px; }
  .premium-ui .bfc-components-trips .queue-toolbar > label { font-size:11px; gap:6px; color:#4d5b6b; }
  .premium-ui .bfc-components-trips .queue-toolbar > label:has(.review-search-surface) { flex:1; min-width:220px; }
  .premium-ui .review-search-surface {
    display:flex; align-items:center; width:100%; height:44px; padding:0 14px; gap:10px;
    background:#fff; border:1px solid #d7dee7; border-radius:10px; color:#586575;
    transition:background-color 140ms,border-color 140ms,box-shadow 140ms;
  }
  .premium-ui .review-search-surface > svg { width:17px; height:17px; flex:none; }
  .premium-ui .review-search-surface:focus-within { border-color:var(--color-primary); background:#f8fbfd; box-shadow:0 3px 10px #1767a018; }
  .premium-ui .review-search-surface > input.form-control {
    border:0 !important; box-shadow:none !important; background:transparent !important;
    flex:1; min-width:0; width:100%; height:42px; padding:0 !important; font-size:13px !important;
  }
  .premium-ui .review-search-surface > input::placeholder { color:#687485; }
  .premium-ui .bfc-components-trips .queue-toolbar :is(select,button[type=submit]) { height:44px !important; min-height:44px !important; border-radius:10px !important; font-size:12px !important; }
  .premium-ui .bfc-components-trips .branch-group { background:#fff; border-radius:14px; padding:0; margin:22px 0; box-shadow:0 12px 32px #26364b0b; overflow:hidden; }
  .premium-ui .bfc-components-trips .branch-group-head { padding:18px 20px; margin:0; border-bottom:1px solid #e4e9ee; }
  .premium-ui .bfc-components-trips .branch-group-head h2 { font-size:14px !important; }
  .premium-ui .bfc-components-trips .queue-list { gap:0 !important; }
  .premium-ui .bfc-components-trips .queue-trip-group {
    border-radius:0 !important; background:transparent !important; border-bottom:1px solid #e9edf1 !important;
    box-shadow:none !important; transition:background-color 140ms;
  }
  .premium-ui .bfc-components-trips .queue-trip-group:last-child { border-bottom:0 !important; }
  .premium-ui .bfc-components-trips .queue-trip-group:hover,
  .premium-ui .bfc-components-trips .queue-trip-group:focus-within { background:#f7f9fb !important; }
  .premium-ui .bfc-components-trips .queue-trip-summary { padding:20px !important; }
  .premium-ui .bfc-components-trips .premium-trip-header-actions {
    display:inline-flex; align-items:center; width:max-content; max-width:100%; justify-self:end;
    padding:4px; border-radius:10px; background:#edf1f4; gap:4px;
  }
  .premium-ui .bfc-components-trips .premium-trip-header-actions > .premium-trip-track { flex:none; width:44px; min-width:44px; height:44px; }
  .premium-ui .bfc-components-trips .premium-trip-header-actions > .queue-trip-toggle { flex:none; width:auto; min-width:90px; white-space:nowrap; }
  .premium-ui .bfc-components-trips .premium-trip-header-actions :is(a,button) {
    background:#fff !important; border:0 !important; border-radius:7px !important; color:#42576d !important;
    min-height:44px !important; font-size:12px !important; box-shadow:none !important;
  }
  .premium-ui .bfc-components-trips .premium-trip-header-actions button[aria-expanded=true] { color:#214d74 !important; background:#dce9f4 !important; }
  .premium-ui .bfc-components-trips .queue-trip-chevron { transition:transform 150ms cubic-bezier(.16,1,.3,1); }
  .premium-ui .bfc-components-trips ::selection { background:#ffd6bf; color:#29313d; }
  .premium-ui .bfc-components-trips :is(a,button,input,select,summary):focus-visible { outline:3px solid #1767a0 !important; outline-offset:3px !important; }
  /* CodeXR glass console: the approved yard photograph actually sits behind the
     frosted tint. Text/evidence reading panes keep their original white paper. */
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) {
    --bfc-shell-glass:#242730b8;
    --bfc-yard-image:url('/static/premium/bfc-truck-yard.webp');
    --bfc-glass-highlight:inset 0 1px 0 #ffffff45,inset 0 -1px 0 #11151b1a;
  }
  .premium-ui .bfc-components-review .cmt-match-card > .review-head,
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar {
    position:relative; isolation:isolate;
    background:#363941 var(--bfc-yard-image) center / cover fixed no-repeat !important;
  }
  .premium-ui .bfc-components-review .cmt-match-card > .review-head::before,
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar::before {
    content:''; position:absolute; inset:0; z-index:-1; border-radius:inherit;
    background:var(--bfc-shell-glass);
    -webkit-backdrop-filter:blur(16px) saturate(120%);
    backdrop-filter:blur(16px) saturate(120%);
    pointer-events:none;
  }
  .premium-ui .bfc-components-review .cmt-match-card > .review-head::after,
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar::after {
    content:''; position:absolute; inset:0; border-radius:inherit;
    box-shadow:var(--bfc-glass-highlight); pointer-events:none;
  }
  .premium-ui .bfc-components-review .review-trip-facts dt { color:#ecf0f5; }
  .premium-ui .bfc-components-review .cmt-match-card > .review-head > .badge {
    background:#ffffff1f; color:#fff; box-shadow:inset 0 1px 0 #ffffff1f;
  }
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar {
    overflow:hidden; box-shadow:0 8px 24px #1118201c;
  }
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar > span {
    font-size:11px; letter-spacing:.025em;
  }
  .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar > a {
    color:#ffe7d8 !important;
  }
  /* Apple-style dock chassis, adapted to fixed native previous/next targets.
     No magnification or pointer tracking; both links keep their native URLs. */
  .premium-ui .bfc-components-review .premium-request-navigation .request-number-nav {
    display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:0 14px;
    padding:4px; border-radius:12px;
    background:#ffffff75; box-shadow:inset 0 1px 0 #ffffffc7,0 3px 12px #26364b08;
  }
  .premium-ui .bfc-components-review .request-number-nav > .request-nav-arrow {
    grid-row:1/3; min-height:44px !important; min-width:44px !important; height:44px !important;
    border:0 !important; border-radius:9px !important; background:#ffffffa8 !important;
    box-shadow:inset 0 1px 0 #fff,0 2px 5px #26364b0a !important;
    transition:background-color 140ms,box-shadow 140ms;
  }
  .premium-ui .bfc-components-review .request-number-nav > .request-nav-arrow:first-child { grid-column:1; }
  .premium-ui .bfc-components-review .request-number-nav > .request-nav-arrow:last-child { grid-column:3; }
  .premium-ui .bfc-components-review .request-number-nav > .kicker { grid-column:2; grid-row:1; align-self:end; line-height:1.4; }
  .premium-ui .bfc-components-review .request-number-nav > small { grid-column:2; grid-row:2; align-self:start; line-height:1.4; }
  .premium-ui .bfc-components-review .request-number-nav > .request-nav-arrow:hover {
    background:#fff !important; box-shadow:inset 0 1px 0 #fff,0 4px 10px #26364b1a !important;
  }
  .premium-ui .bfc-components-review .premium-request-navigation > .back-link { min-height:44px; display:inline-flex; align-items:center; }
  .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-form-field:focus-within {
    background:#f4f8fc !important; border-radius:8px !important;
    box-shadow:inset 0 0 0 1px #c6d8e6 !important;
  }
  .premium-ui .bfc-components-review .premium-paper-pane .document-thumb {
    background:#edf1f5 !important;
  }
  @supports not (backdrop-filter:blur(1px)) {
    .premium-ui .bfc-components-review .cmt-match-card > .review-head::before,
    .premium-ui:has(:is(.bfc-components-review,.bfc-components-trips)) .preview-bar::before { background:#242730f0; }
  }
  @media (max-width:900px) {
    .premium-ui .bfc-components-review .review-workbench { height:auto; max-height:none; overflow:visible; position:relative; top:auto; }
    .premium-ui .bfc-components-review .review-scrollport { overflow:visible; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-form-field { scroll-margin-top:100px; }
  }
  @media (max-width:700px) {
    .premium-ui .bfc-components-trips .queue-trip-summary { grid-template-columns:minmax(0,1fr) max-content; }
  }
  @media (max-width:600px) {
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit { padding:12px 16px !important; grid-template-columns:1fr !important; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[type=submit] { grid-column:1; grid-row:1; width:100% !important; min-width:0 !important; height:44px !important; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .review-submit button[type=submit] { width:100% !important; min-width:0 !important; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-field-evidence > summary { min-height:44px !important; padding:12px 0 !important; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .master-option { min-height:44px !important; padding:10px !important; }
    .premium-ui .bfc-components-review :is(#erp-review-form, .bfc-review-read-ahead) .premium-rate-settings { margin:0 16px; max-width:calc(100% - 32px); }
    .premium-ui .bfc-components-trips .queue-toolbar > label:has(.review-search-surface) { min-width:0; flex-basis:100%; }
    .premium-ui .bfc-components-trips .branch-group-head { padding:16px; }
    .premium-ui .bfc-components-trips .queue-trip-summary { padding:16px !important; }
    .premium-ui .bfc-components-trips .premium-trip-header-actions :is(a,button) { min-height:44px !important; }
    .premium-ui:has(.bfc-components-review) .document-dialog-actions .compact { width:44px !important; min-width:44px !important; height:44px !important; }
  }
  @media (prefers-reduced-motion:reduce) {
    .premium-ui :is(.bfc-components-review,.bfc-components-trips) *,
    .premium-ui:has(.bfc-components-review) .document-dialog * { transition:none !important; animation:none !important; scroll-behavior:auto !important; }
  }
}

@media screen {
  .premium-ui .bfc-components-review .premium-quality-notes {
    grid-column:1/-1; margin:0 28px; border-bottom:1px solid #e4e9ef;
    color:#78512b; font-size:13px;
  }
  .premium-ui .bfc-components-review .premium-quality-notes > summary {
    min-height:44px; display:flex; align-items:center; cursor:pointer;
  }
  .premium-ui .bfc-components-review .premium-quality-notes > summary:focus-visible {
    outline:2px solid #386697; outline-offset:3px; border-radius:4px;
  }
  .premium-ui .bfc-components-review .premium-quality-notes .bfc-collapse-content {
    padding:0 0 12px; max-width:75ch;
  }
  .premium-ui .bfc-components-review .premium-quality-notes p {margin:0; line-height:1.6;}
  @media (max-width:600px) {
    .premium-ui .bfc-components-review .premium-quality-notes {margin:0 16px;}
  }
}
