/* Reuses the incumbent BFC theme and the project's compiled daisyUI prefix. */
@media screen {
  .premium-ui :is(.app-nav .bfc-menu, .queue-scope-switch, .branch-filter).bfc-motion-navigation {
    position: relative;
    isolation: isolate;
  }
  .premium-ui .bfc-selection-marker {
    position: absolute;
    inset: 0 auto auto 0;
    display: block;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    background: var(--color-base-100);
    transform-origin: 0 0;
    box-shadow: 0 3px 8px #263b5515;
  }
  .premium-ui .app-nav .bfc-selection-marker {
    background: var(--bfc-orange);
    border-radius: 14px;
    box-shadow: 0 4px 8px #18171720;
  }
  .premium-ui .bfc-selection-marker[hidden] { display: none; }
  .premium-ui .bfc-motion-navigation > :not(.bfc-selection-marker) { position: relative; z-index: 1; }
  .premium-ui .app-nav .bfc-motion-navigation .premium-nav-link[aria-current='page'],
  .premium-ui .queue-scope-switch.bfc-motion-navigation .queue-scope-option.active,
  .premium-ui .branch-filter.bfc-motion-navigation .branch-chip.active {
    background: transparent !important;
    box-shadow: none;
  }
  .premium-ui .queue-scope-switch.bfc-motion-navigation {
    background: var(--color-base-200);
    border-radius: 14px;
    padding: 4px;
  }
  .premium-ui .premium-trip-controls .queue-scope-option { min-height: 44px; }
  .premium-ui .queue-scope-option.active > b {
    background: #fff0e4;
    color: #704016;
    border-radius: 6px;
  }
  .premium-ui .queue-scope-option > b { padding: 3px 7px; font-variant-numeric: tabular-nums; }
  .premium-ui .queue-scope-option.active strong { font-weight: 750; }
  .premium-ui :is(.premium-trip-controls, .review-submit) :is(button, a.bfc-btn),
  .premium-ui .premium-trip-header-actions button {
    transition: transform 100ms cubic-bezier(.16,1,.3,1), background-color 120ms, color 120ms, box-shadow 120ms;
  }
  .premium-ui :is(.premium-trip-controls, .review-submit) :is(button, a.bfc-btn):active:not(:disabled),
  .premium-ui .premium-trip-header-actions button:active:not(:disabled) { transform: translateY(1px); }
  .premium-ui #erp-review-form .review-submit .bfc-feedback-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 10px;
    min-width: 238px !important;
    min-height: 48px !important;
    border-radius: 12px;
    box-shadow: 0 3px 7px #66370d18 !important;
    opacity: 1;
  }
  .premium-ui .bfc-button-label { white-space: nowrap; }
  .premium-ui .bfc-feedback-icon { width: 18px; height: 18px; flex: 0 0 18px; }
  .premium-ui .bfc-feedback-next { margin-left: 4px; }
  .premium-ui #erp-review-form .review-submit .bfc-feedback-button[data-feedback-state='busy'] {
    background: var(--bfc-orange) !important;
    color: #3c2515 !important;
    cursor: wait;
    box-shadow: none !important;
  }
  .premium-ui #erp-review-form .review-submit .bfc-feedback-button[data-feedback-state='ready']:disabled { opacity: .55; }
  .premium-ui .bfc-loading circle { opacity: .22; }
  .premium-ui .bfc-loading { animation: bfc-feedback-turn .85s linear infinite; }
  .premium-ui #erp-review-form .review-submit .bfc-feedback-button[data-feedback-state='saved'] {
    background: var(--color-success) !important;
    color: var(--color-success-content) !important;
  }
  .premium-ui #erp-review-form .review-submit .bfc-feedback-button[data-feedback-state='error'] {
    background: #fff0e4 !important;
    color: #83430b !important;
    box-shadow: inset 0 0 0 1px #d19961 !important;
  }
  @media (max-width: 600px) {
    .premium-ui #erp-review-form .review-submit .bfc-feedback-button { width: 100%; min-width: 0 !important; }
    .premium-ui .queue-scope-switch.bfc-motion-navigation { width: 100%; }
  }
  @media (prefers-reduced-motion: reduce) {
    .premium-ui .bfc-loading { animation: none; }
    .premium-ui :is(.premium-trip-controls, .review-submit, .premium-trip-header-actions) :is(button, a.bfc-btn) { transition: none; transform: none !important; }
  }
}
@keyframes bfc-feedback-turn { to { transform: rotate(1turn); } }

/* Keep the shell stationary. Only the changing work region blends. */
:root { view-transition-name:none; }
#app-main { view-transition-name:bfc-content; }
::view-transition-group(bfc-content) { animation-duration:150ms; }
::view-transition-old(bfc-content) { animation:bfc-content-out 90ms ease-out both; }
::view-transition-new(bfc-content) { animation:bfc-content-in 150ms ease-out both; }
@keyframes bfc-content-out { to { opacity:0; } }
@keyframes bfc-content-in { from { opacity:0; } }
.premium-ui .bfc-review-read-ahead { background:var(--color-base-100,#fff) !important; border-radius:14px; overflow:hidden; }
.premium-ui .bfc-review-read-ahead .read-ahead-heading { padding:18px 22px; border-bottom:1px solid var(--review-line,#dde3e9); }
.premium-ui .bfc-review-read-ahead .read-ahead-heading h1 { font-size:24px; font-weight:800; margin:0 0 6px; color:var(--review-ink,#29313d); }
.premium-ui .bfc-review-read-ahead .read-ahead-heading p { margin:0; font-size:12px; color:var(--review-muted,#4d5b6b); }
.premium-ui .bfc-review-read-ahead .premium-review-fields { max-height:clamp(260px,calc(100dvh - 340px),620px) !important; overflow:auto; }
.premium-ui .bfc-review-read-ahead input:disabled, .premium-ui .bfc-review-read-ahead select:disabled { opacity:1; color:var(--review-ink,#29313d) !important; -webkit-text-fill-color:var(--review-ink,#29313d); background:var(--color-base-200,#f0f3f5) !important; }
.premium-ui .bfc-review-read-ahead .review-evidence-preview:empty { display:none; }
.premium-ui .bfc-review-read-ahead .premium-crop-zoom { display:block; cursor:default; }
.premium-ui .bfc-review-read-ahead [data-review-evidence].is-loading { min-height:64px; }
.premium-ui .bfc-review-read-ahead [data-review-evidence].is-ready img { display:block; }
.premium-ui .app-toast[data-save-state] { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; max-width:min(380px,calc(100vw - 32px)); padding:12px 16px; font-size:12px; color:var(--color-base-content); background:var(--color-base-100); box-shadow:0 8px 24px #1d32421a; border:0; border-radius:10px; }
.premium-ui .app-toast[data-save-state=pending]::before { content:""; width:14px; height:14px; flex:0 0 14px; border:2px solid #d9e1e7; border-top-color:var(--color-primary); border-radius:50%; animation:bfc-receipt-spin 1s linear infinite; }
.premium-ui .app-toast[data-save-state=error] { color:var(--color-error-content); background:var(--color-error); }
.premium-ui .app-toast[data-save-state=error] a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
@keyframes bfc-receipt-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) {
  ::view-transition-group(bfc-content), ::view-transition-old(bfc-content), ::view-transition-new(bfc-content) { animation:none; }
  .premium-ui .app-toast[data-save-state=pending]::before { animation:none; }
}
@media(max-width:600px) { .premium-ui .bfc-review-read-ahead .read-ahead-heading { padding:16px; } }
