/* EagleIV by NeoRx - Pharmacist Review Workflow Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

/* Top Navigation Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.logo-highlight {
    color: #00bfa5;
}

.logo-subtitle {
    font-size: 14px;
    color: #666;
    margin-left: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.station-status {
    background: #00bfa5;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 50px);
}

/* Left Sidebar */
.sidebar-left {
    width: 220px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.queue-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.queue-count {
    background: #00bfa5;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.search-box {
    display: flex;
    align-items: center;
    margin: 12px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    gap: 8px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 100%;
}

.search-icon {
    color: #999;
}

.queue-list {
    flex: 1;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.queue-item:hover {
    background: #f9f9f9;
}

.queue-item.active {
    background: #e8f5f3;
    border-left: 3px solid #00bfa5;
}

.patient-initials {
    width: 32px;
    height: 32px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-right: 10px;
    flex-shrink: 0;
}

.patient-info {
    flex: 1;
    min-width: 0;
}

.patient-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.patient-med {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.patient-due {
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #e3f2fd;
    color: #1976d2;
}

.status-queued {
    background: #f5f5f5;
    color: #666;
}

.status-stat {
    background: #ffebee;
    color: #d32f2f;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f5f5f5;
    overflow: visible;
}

/* Workflow Technician page has no side columns — cap the content width so the
   timeline/next-step/materials-checklist/video stack doesn't stretch too wide. */
.main-content-tech {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.video-container {
    flex: 1.2;
    min-height: 0;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-viewer {
    flex: 1.3;
}

#workflow-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stage-video.hidden {
    display: none;
}

.stage-image-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d1a;
}

.stage-image-wrap.hidden {
    display: none;
}

.stage-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0d0d1a;
}

.stage-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: white;
    pointer-events: none;
}

.stage-caption-label {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.stage-caption-status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.stage-caption-status.status-verified {
    background: #00bfa5;
    color: white;
}

.stage-caption-status.status-flagged {
    background: #d32f2f;
    color: white;
}

.stage-caption-status.status-info {
    background: #2196f3;
    color: white;
}

/* Stage Navigator */
.stage-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.stage-nav-btn {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stage-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stage-nav-prev, .stage-nav-next {
    background: white;
    border-color: #d0d0d0;
    color: #333;
}

.stage-nav-prev:hover:not(:disabled),
.stage-nav-next:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
}

.stage-nav-approve {
    background: #00bfa5;
    color: white;
}

.stage-nav-approve:hover:not(:disabled) {
    background: #00a896;
}

.stage-nav-reject {
    background: white;
    border-color: #d32f2f;
    color: #d32f2f;
}

.stage-nav-reject:hover:not(:disabled) {
    background: #ffebee;
}

.view-toggle .mv-toggle-label {
    color: rgba(255, 255, 255, 0.85);
}

.timeline-container.timeline-top {
    margin-top: 0;
    margin-bottom: 16px;
}

/* Current-stage highlight (blue) on step log — pharmacist "you are here" indicator */
.step-item.current-stage {
    background: #e3f2fd !important;
    border-left: 3px solid #2196f3;
    padding-left: 8px;
    margin-left: -11px;
}

.step-item.current-stage .step-action {
    color: #0d47a1;
    font-weight: 600;
}

/* Timeline stage colors — green verified / red flagged / blue current */
.timeline-stage.verified .stage-dot {
    background: #00bfa5;
    box-shadow: 0 0 0 2px #00bfa5;
}

.timeline-stage.flagged .stage-dot {
    background: #d32f2f;
    box-shadow: 0 0 0 2px #d32f2f;
    animation: pulse 2s infinite;
}

.timeline-stage.current .stage-dot {
    background: #2196f3;
    box-shadow: 0 0 0 3px #2196f3, 0 0 0 6px rgba(33, 150, 243, 0.25);
    transform: scale(1.1);
}

.timeline-stage.current .stage-label {
    color: #0d47a1;
    font-weight: 700;
}

/* Verification panel — over-enlarged image + side detected objects/insight */
.verification-panel {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.verification-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.verification-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1.2px;
}

.verification-toggles {
    display: flex;
    gap: 16px;
}

/* 3-way segmented control: Images | Raw Video | Object Detection */
.view-mode-segmented {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.view-mode-segmented .seg-btn {
    appearance: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.view-mode-segmented .seg-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.view-mode-segmented .seg-btn.active {
    background: #2196f3;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.verification-body {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
    overflow-y: auto;
}

.verification-media {
    flex: 1;
    min-width: 0;
    position: relative;
    background: #0d0d1a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
}

.verification-side {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(26, 26, 46, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
}

.verification-side .evidence-panel {
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 18px;
}

.verification-side .evidence-panel:last-child {
    border-bottom: none;
}

.verification-side .evidence-section-title {
    margin-bottom: 10px;
}

/* Make the image take the entire media area */
.verification-media .stage-image-wrap {
    position: absolute;
    inset: 0;
}

.verification-media .stage-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.verification-media .stage-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0d0d1a;
    z-index: 1;
}

/* Click-to-enlarge affordance on the stage image */
.verification-media .stage-image { cursor: zoom-in; }

.stage-zoom-hint {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 2;
}

.verification-media:hover .stage-zoom-hint { opacity: 1; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.lightbox.hidden { display: none; }

.lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #0a0a14;
    color: #eee;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-caption {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lightbox-btn {
    background: #1f1f35;
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    min-width: 32px;
    transition: background 0.15s;
}

.lightbox-btn:hover { background: #2a2a45; }

.lightbox-zoom-level {
    font-family: monospace;
    color: #aaa;
    font-size: 12px;
    min-width: 48px;
    text-align: right;
    padding: 0 6px;
}

.lightbox-close {
    background: #3a1a1a;
    border-color: rgba(255, 100, 100, 0.3);
    margin-left: 8px;
}

.lightbox-close:hover { background: #5a2020; }

.lightbox-stage {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    cursor: grab;
    background:
        linear-gradient(45deg, #0d0d1a 25%, transparent 25%) 0 0/20px 20px,
        linear-gradient(-45deg, #0d0d1a 25%, transparent 25%) 0 0/20px 20px,
        #161626;
}

.lightbox-stage.dragging { cursor: grabbing; }

.lightbox-stage img {
    display: block;
    max-width: none;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 46, 0.9);
    transition: opacity 0.3s;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ready-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
}

/* Video Toolbar */
.video-toolbar {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mv-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.mv-toggle input {
    display: none;
}

.mv-toggle-slider {
    width: 34px;
    height: 18px;
    background: #555;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
}

.mv-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.mv-toggle input:checked + .mv-toggle-slider {
    background: #00bfa5;
}

.mv-toggle input:checked + .mv-toggle-slider::after {
    transform: translateX(16px);
}

.mv-toggle-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Timeline */
.timeline-container {
    background: white;
    border-radius: 12px;
    padding: 14px 20px 18px 20px;
    margin-top: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.timeline-title {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
}

.timeline-total {
    font-size: 11px;
    color: #666;
}

.timeline-track {
    position: relative;
    height: 90px;
    padding: 0 8px;
    margin-top: 10px;
    overflow: hidden;
}

.timeline-bar {
    position: absolute;
    top: 26px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.timeline-progress-fill {
    height: 100%;
    background: #00bfa5;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.timeline-stages {
    position: relative;
    height: 100%;
}

.timeline-stage {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 1;
    top: 20px;
}

.timeline-stage.label-above {
    top: auto;
    bottom: 40px;
    flex-direction: column-reverse;
}

.timeline-stage.label-above .stage-dot {
    margin-bottom: 0;
    margin-top: 8px;
}

.timeline-stage.label-above .stage-time {
    margin-top: 0;
    margin-bottom: 2px;
}

.stage-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e0e0e0;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.timeline-stage:hover .stage-dot {
    transform: scale(1.15);
}

.timeline-stage.completed .stage-dot {
    background: #00bfa5;
    box-shadow: 0 0 0 2px #00bfa5;
}

.timeline-stage.active .stage-dot {
    background: #ffc107;
    box-shadow: 0 0 0 2px #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.stage-label {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    text-align: center;
    line-height: 1.1;
    pointer-events: none;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-time {
    font-size: 9px;
    color: #999;
    font-family: monospace;
    margin-top: 2px;
    pointer-events: none;
}

/* Next Step (Workflow Technician page) — the page's key focus: real-time
   current/upcoming action, driven by the same workflowSteps data as the
   (pharmacist-only) step log. */
.next-step-container {
    border-color: #00bfa5;
    border-width: 2px;
}

.next-step-body {
    display: flex;
    gap: 24px;
}

.next-step-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.next-step-col-upcoming {
    opacity: 0.65;
}

.next-step-eyebrow {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.next-step-now {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.next-step-upcoming {
    font-size: 16px;
    font-weight: 500;
    color: #444;
    line-height: 1.3;
}

.next-step-status {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.next-step-status.in-progress {
    background: #e3f2fd;
    color: #1976d2;
}

.next-step-status.done {
    background: #e8f5e9;
    color: #2e7d32;
}

.next-step-status.flagged {
    background: #ffebee;
    color: #d32f2f;
}

/* Materials Checklist (Workflow Technician page) — read-only staging table sourced
   from the fosaprepitant guided-prep demo (technician-page-content/PrepDemo). Kept
   compact with its own internal scroll so the Evidence for Verification panel below
   it stays full size, same as on the Workflow page. */
.mc-container {
    margin-top: 16px;
    flex-shrink: 0;
}

#mc-body {
    max-height: 190px;
    overflow-y: auto;
    padding-right: 4px;
}

.mc-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.mc-row {
    display: grid;
    grid-template-columns: 28px 1.4fr 1fr 1.6fr 0.9fr;
    gap: 10px;
    align-items: start;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 13px;
}

.mc-row.mc-cols {
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mc-row.mc-satisfied {
    background: #fafafa;
}

.mc-row.mc-flagged {
    background: #fff8f0;
}

.mc-chk {
    color: #00bfa5;
    font-weight: 700;
    text-align: center;
}

.mc-name {
    font-weight: 600;
    color: #333;
}

.mc-rec,
.mc-min {
    color: #666;
    align-self: center;
}

.mc-act {
    color: #333;
}

.mc-quad {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    padding: 8px 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.mc-quad.mc-quad-bad {
    border-color: #ffcdd2;
    background: #fff5f5;
}

.mc-qcell {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
}

.mc-qlab {
    color: #999;
}

.mc-qval {
    font-weight: 600;
    color: #333;
}

.mc-qfoot {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.mc-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.mc-badge-exp {
    background: #ffebee;
    color: #d32f2f;
}

.mc-badge-ovr {
    background: #fff3e0;
    color: #85590a;
}

.mc-override-note {
    margin-top: 6px;
    font-size: 11.5px;
    color: #85590a;
}

.mc-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.mc-state-tag {
    background: #eee;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
}

.mc-state-tag.ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.mc-state-tag.warn {
    background: #fff3e0;
    color: #85590a;
}

.mc-na {
    color: #999;
    font-style: italic;
}

.mc-placeholder {
    padding: 20px 8px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

#mc-body.hidden,
.mc-placeholder.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .mc-row {
        grid-template-columns: 24px 1fr 1fr;
    }
    .mc-row.mc-cols {
        display: none;
    }
    .mc-min {
        grid-column: 2 / span 2;
    }
}

/* Right Sidebar */
.sidebar-right {
    width: 320px;
    background: white;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-right-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.order-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.expand-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
}

.patient-details {
    padding: 12px 20px;
    font-size: 12px;
    color: #666;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

/* Recipe Section */
.recipe-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.recipe-header span:first-child {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
}

.matched-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.recipe-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.recipe-label {
    font-size: 13px;
    color: #666;
}

.recipe-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.recipe-value.verified {
    color: #00bfa5;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Confidence Section */
.confidence-section {
    padding: 16px 20px;
    background: #f0fdf4;
    border-bottom: 1px solid #e0e0e0;
}

.confidence-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ai-icon {
    font-size: 16px;
}

.confidence-label {
    font-size: 13px;
    color: #666;
}

.confidence-value {
    font-size: 14px;
    font-weight: 700;
    color: #00bfa5;
}

.confidence-value.confidence-fail {
    color: #d32f2f;
}

.confidence-section.confidence-section-fail {
    background: #fff5f5;
    border-left: 3px solid #d32f2f;
}

.confidence-text {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* Instructions Section */
.instructions-section {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.instructions-header {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.instructions-text {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
}

/* Math Section */
.math-section {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.math-header {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.math-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.math-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
}

.math-label {
    color: #999;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}

.math-value {
    color: #333;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
    text-align: right;
}

/* Step Log Tabs */
.step-log-tabs {
    display: flex;
    padding: 0 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.tab-btn {
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #00bfa5;
    border-bottom-color: #00bfa5;
    font-weight: 600;
}

/* Step Log */
.step-log {
    display: flex;
    flex-direction: column;
}

.step-log-header {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
}

.step-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.step-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid #f5f5f5;
    gap: 8px;
}

.step-info {
    display: flex;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

/* Step Review Buttons */
.step-review-buttons {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.step-item:hover .step-review-buttons {
    opacity: 1;
}

.step-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.step-btn-approve {
    color: #00bfa5;
}

.step-btn-approve:hover {
    background: #e0f7f4;
    border-color: #00bfa5;
}

.step-btn-reject {
    color: #d32f2f;
}

.step-btn-reject:hover {
    background: #ffebee;
    border-color: #d32f2f;
}

.step-btn-rework {
    color: #ff9800;
}

.step-btn-rework:hover {
    background: #fff3e0;
    border-color: #ff9800;
}

/* Step Review States */
.step-item.step-approved {
    background: #e8f5e9;
    border-left: 3px solid #00bfa5;
    padding-left: 8px;
    margin-left: -11px;
}

.step-item.step-approved .step-review-buttons {
    opacity: 1;
}

.step-item.step-approved .step-btn-approve {
    background: #00bfa5;
    color: white;
    border-color: #00bfa5;
}

.step-item.step-rejected {
    background: #ffebee;
    border-left: 3px solid #d32f2f;
    padding-left: 8px;
    margin-left: -11px;
}

.step-item.step-rejected .step-review-buttons {
    opacity: 1;
}

.step-item.step-rejected .step-btn-reject {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.step-item.step-rejected .step-action {
    text-decoration: line-through;
    color: #d32f2f;
}

.step-item.step-rework {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    padding-left: 8px;
    margin-left: -11px;
}

.step-item.step-rework .step-review-buttons {
    opacity: 1;
}

.step-item.step-rework .step-btn-rework {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.step-action {
    color: #333;
}

.step-action.highlight {
    color: #2196f3;
    font-weight: 600;
}

.step-action.verified {
    color: #00bfa5;
    font-weight: 500;
}

.step-action.verified::before {
    content: "\2713  ";
}

.step-action.flagged {
    color: #d32f2f;
    font-weight: 600;
}

.step-action.flagged::before {
    content: "\26A0  ";
}

.step-time {
    color: #999;
    font-family: monospace;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reject {
    background: white;
    border: 2px solid #d32f2f;
    color: #d32f2f;
}

.btn-reject:hover {
    background: #ffebee;
    border-color: #b71c1c;
    color: #b71c1c;
}

.btn-rework {
    background: white;
    border: 2px solid #ff9800;
    color: #ff9800;
}

.btn-rework:hover {
    background: #fff3e0;
    border-color: #e65100;
    color: #e65100;
}

.btn-rework.active {
    background: #ffebee;
    border-color: #ef5350;
    color: #d32f2f;
}

.btn-rework.active:hover {
    background: #ffcdd2;
}

/* Rework mode styles */
.step-list.rework-mode .step-item {
    border-left: 3px solid transparent;
    margin-left: -3px;
    transition: all 0.2s;
}

.step-list.rework-mode .step-item:hover {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.step-item.reworked {
    background: #ffebee !important;
    border-left: 3px solid #d32f2f !important;
    margin-left: -3px;
    position: relative;
}

.step-item.reworked::before {
    content: "⚠ REWORK";
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 700;
    color: #d32f2f;
    background: #ffcdd2;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.step-item.reworked .step-action {
    color: #d32f2f;
    text-decoration: line-through;
    text-decoration-color: #d32f2f;
}

.btn-approve {
    background: #00bfa5;
    border: none;
    color: white;
}

.btn-approve:hover {
    background: #00a896;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Evidence Snapshot Overlay */
/* Evidence Snapshot - Horizontal Layout */
.evidence-snapshot-horizontal {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(26, 26, 46, 0.95);
    border-radius: 10px;
    margin: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    min-height: 0;
    overflow: visible;
    position: relative;
}

.evidence-panel {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.evidence-panel.evidence-image-panel {
    overflow: visible;
}

.evidence-image-panel {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    z-index: 100;
}

.evidence-objects-panel {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.evidence-insight-panel {
    flex: 2;
    min-width: 250px;
}

.evidence-section {
    margin-bottom: 12px;
}

.evidence-section:last-child {
    margin-bottom: 0;
}

.evidence-section-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.evidence-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

/* Snapshot Image Styles */
.evidence-image-panel .snapshot-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(0, 191, 165, 0.3);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
}

.snapshot-image {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: left center;
}

.snapshot-image:hover {
    transform: scale(4);
    z-index: 10000;
    position: relative;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
}

.detected-objects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.object-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 12px;
}

.object-item.active {
    background: rgba(0, 191, 165, 0.2);
    border-left: 3px solid #00bfa5;
}

.object-item.warning {
    background: rgba(255, 193, 7, 0.15);
    border-left: 3px solid #ffc107;
}

.object-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00bfa5;
    flex-shrink: 0;
}

.object-item.warning .object-dot {
    background: #ffc107;
}

.object-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
}

.object-confidence {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace;
}

.insight-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    padding: 10px 12px;
    background: rgba(0, 191, 165, 0.1);
    border-radius: 8px;
    border-left: 3px solid #00bfa5;
}

.insight-text.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

/* Scanning animation */
@keyframes scanning {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.object-item.scanning {
    animation: scanning 1.5s ease-in-out infinite;
}

.object-item.scanning .object-dot {
    background: #666;
}

/* Timeline Alert Markers */
.timeline-alert {
    position: absolute;
    top: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 2;
}

.timeline-alert .alert-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d32f2f;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #d32f2f;
    transition: all 0.2s;
}

.timeline-alert:hover .alert-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px #d32f2f, 0 0 8px rgba(211, 47, 47, 0.4);
}

.timeline-alert .alert-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #d32f2f;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 6px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-alert .alert-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #d32f2f;
}

.timeline-alert:hover .alert-tooltip {
    display: block;
}

/* ============================================================
   CAMERA SELECTOR (verification toolbar)
   ============================================================ */
.cam-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cam-selector-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cam-check-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    padding: 4px 9px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.12s, border-color 0.12s;
}

.cam-check-label:has(input:not(:disabled)):hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.cam-check-label:has(input:checked) {
    background: rgba(33, 150, 243, 0.18);
    border-color: rgba(33, 150, 243, 0.45);
}

.cam-check-label:has(input:disabled) {
    opacity: 0.45;
    cursor: not-allowed;
}

.cam-check-label input[type="checkbox"] {
    width: 13px;
    height: 13px;
    cursor: pointer;
    accent-color: #2196f3;
    flex-shrink: 0;
}
.cam-check-label input[type="checkbox"]:disabled { cursor: not-allowed; }

.cam-check-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
}

/* Center checkbox always appears active */
.cam-check-center {
    background: rgba(33, 150, 243, 0.18) !important;
    border-color: rgba(33, 150, 243, 0.45) !important;
    opacity: 1 !important;
    cursor: default !important;
}

/* Hide camera selector in image mode — controlled via JS .cam-selector-hidden */
.cam-selector.cam-selector-hidden {
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
   MULTI-CAMERA VIDEO CONTAINER
   ============================================================ */
.multi-cam-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 2px;
    background: #0a0a14;
}
.multi-cam-wrap.hidden { display: none; }

.cam-slot {
    flex: 1;
    position: relative;
    min-width: 0;
    display: flex;
    align-items: stretch;
    background: #0d0d1a;
    overflow: hidden;
}
.cam-slot.hidden { display: none; flex: 0; }

/* Thin separator line between visible slots */
.cam-slot + .cam-slot:not(.hidden) {
    border-left: 2px solid #0a0a14;
}

.cam-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0d0d1a;
    display: block;
}

/* Center video keeps native controls; overlay sits on top */
#cam-slot-center { position: relative; }
#cam-slot-center .video-overlay {
    position: absolute;
    inset: 0;
}

.cam-slot-badge {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(0, 0, 0, 0.52);
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    text-transform: uppercase;
}

/* ============================================================
   4-DISPOSITION ACTION BUTTONS (sidebar footer)
   ============================================================ */
.btn-disp-verify {
    background: #00bfa5;
    border: none;
    color: white;
}
.btn-disp-verify:hover { background: #009e8e; }

.btn-disp-rework {
    background: white;
    border: 2px solid #ff9800;
    color: #e65100;
}
.btn-disp-rework:hover { background: #fff3e0; }

.btn-disp-reject {
    background: white;
    border: 2px solid #d32f2f;
    color: #d32f2f;
}
.btn-disp-reject:hover { background: #ffebee; }

.btn-disp-cancel {
    background: white;
    border: 2px solid #90a4ae;
    color: #546e7a;
}
.btn-disp-cancel:hover { background: #eceff1; }

/* ============================================================
   DISPOSITION MODAL
   ============================================================ */
.disp-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.disp-modal.hidden { display: none; }

.disp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.50);
}

.disp-panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    width: 580px;
    max-width: calc(100vw - 40px);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

/* Color accent top border keyed on data-disp */
.disp-panel[data-disp="verify"] { border-top: 4px solid #00bfa5; }
.disp-panel[data-disp="rework"] { border-top: 4px solid #ff9800; }
.disp-panel[data-disp="reject"] { border-top: 4px solid #d32f2f; }
.disp-panel[data-disp="cancel"] { border-top: 4px solid #607d8b; }

.disp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.disp-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
}
.disp-panel[data-disp="verify"] .disp-title { color: #00897b; }
.disp-panel[data-disp="rework"] .disp-title { color: #e65100; }
.disp-panel[data-disp="reject"] .disp-title { color: #c62828; }
.disp-panel[data-disp="cancel"] .disp-title { color: #546e7a; }

.disp-close {
    background: none;
    border: none;
    font-size: 15px;
    color: #aaa;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}
.disp-close:hover { background: #f5f5f5; color: #555; }

/* ── Body (scrollable) ── */
.disp-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 0;
}

.disp-note {
    font-size: 12px;
    line-height: 1.6;
    padding: 9px 13px;
    border-radius: 0 5px 5px 0;
    margin-bottom: 16px;
    border-left: 3px solid #ccc;
    background: #f9f9f9;
    color: #555;
}
.disp-panel[data-disp="rework"] .disp-note { border-left-color: #ff9800; background: #fff8f0; color: #7c4700; }
.disp-panel[data-disp="reject"] .disp-note { border-left-color: #d32f2f; background: #fff5f5; color: #7f0000; }

/* ── Flat list (Verify, Cancel) ── */
.disp-flat-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ── Accordion groups (Rework, Reject) ── */
.disp-group {
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    margin-bottom: 6px;
    overflow: hidden;
}

.disp-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #fafafa;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    transition: background 0.12s;
}
.disp-group-header:hover,
.disp-group.is-open .disp-group-header { background: #f0f0f0; }

.disp-group-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.disp-group-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.disp-group-count {
    font-size: 11px;
    color: #bbb;
}

.disp-group-chevron {
    font-size: 10px;
    color: #bbb;
    transition: transform 0.2s;
}
.disp-group.is-open .disp-group-chevron { transform: rotate(90deg); }

.disp-group-items { display: none; }
.disp-group.is-open .disp-group-items { display: block; }

/* ── Shared item styles ── */
.disp-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.12s;
}
.disp-item:last-child { border-bottom: none; }
.disp-item:hover { background: #fafafa; }

/* Flat items get a card-like border */
.disp-flat-list .disp-item {
    border: 1px solid #e8e8e8;
    border-radius: 7px;
}
.disp-flat-list .disp-item:hover { border-color: #ccc; }

/* Selected bg keyed on data-disp */
.disp-panel[data-disp="verify"] .disp-item.is-selected { background: #e0f7f4; }
.disp-panel[data-disp="rework"] .disp-item.is-selected { background: #fff3e0; }
.disp-panel[data-disp="reject"] .disp-item.is-selected { background: #ffebee; }
.disp-panel[data-disp="cancel"] .disp-item.is-selected { background: #eceff1; }

.disp-flat-list .disp-item.is-selected { border-color: transparent; }

.disp-item-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Radio circle */
.disp-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.15s;
}
.disp-panel[data-disp="verify"] .disp-item.is-selected .disp-radio
    { border-color: #00bfa5; background: #00bfa5; box-shadow: inset 0 0 0 3px #fff; }
.disp-panel[data-disp="rework"] .disp-item.is-selected .disp-radio
    { border-color: #ff9800; background: #ff9800; box-shadow: inset 0 0 0 3px #fff; }
.disp-panel[data-disp="reject"] .disp-item.is-selected .disp-radio
    { border-color: #d32f2f; background: #d32f2f; box-shadow: inset 0 0 0 3px #fff; }
.disp-panel[data-disp="cancel"] .disp-item.is-selected .disp-radio
    { border-color: #607d8b; background: #607d8b; box-shadow: inset 0 0 0 3px #fff; }

.disp-item-label {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    flex: 1;
}

/* Dual-routing badge */
.disp-dual-badge {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    color: #e65100;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

/* Dual-routing explanatory note (expands on selection) */
.disp-dual-note {
    display: none;
    margin: 8px 0 2px 26px;
    padding: 7px 11px;
    font-size: 11.5px;
    color: #6d3200;
    background: #fff8f0;
    border: 1px solid #ffd699;
    border-radius: 5px;
    line-height: 1.55;
}
.disp-dual-note.is-visible { display: block; }

/* Item-level freetext (expands on selection) */
.disp-item-ft-wrap {
    display: none;
    margin: 8px 0 2px 26px;
}
.disp-item-ft-wrap.is-visible { display: block; }

/* Shared textarea */
.disp-ta {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
    min-height: 56px;
    outline: none;
    color: #333;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.disp-ta:focus { border-color: #2196f3; box-shadow: 0 0 0 2px rgba(33,150,243,0.12); }

/* ── Footer ── */
.disp-footer {
    border-top: 1px solid #e8e8e8;
    padding: 14px 20px;
    background: #fafafa;
    flex-shrink: 0;
}

.disp-global-ft-wrap { margin-bottom: 12px; }
.disp-global-ft-wrap.hidden { display: none; }

.disp-ft-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.disp-req { color: #d32f2f; }

.disp-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.disp-btn-sec {
    padding: 9px 18px;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    color: #555;
    transition: background 0.15s;
}
.disp-btn-sec:hover { background: #f0f0f0; }

.disp-btn-pri {
    padding: 9px 22px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: white;
    transition: filter 0.15s;
}
.disp-btn-pri:disabled { opacity: 0.35; cursor: not-allowed; }
.disp-btn-pri:not(:disabled):hover { filter: brightness(0.9); }
.disp-panel[data-disp="verify"] .disp-btn-pri { background: #00bfa5; }
.disp-panel[data-disp="rework"] .disp-btn-pri { background: #ff9800; }
.disp-panel[data-disp="reject"] .disp-btn-pri { background: #d32f2f; }
.disp-panel[data-disp="cancel"] .disp-btn-pri { background: #607d8b; }
