/* ============================================
   PRIMOS Engineering Queue Styles
   Engineering tabs, tables, modal, status badges
   ============================================ */

    /* ==================== ENGINEERING QUEUE STYLES ==================== */

    /* Engineering Sub-tabs */
    .eng-sub-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 20px;
      background: #f5f5f5;
      padding: 4px;
      border-radius: 8px;
      flex-wrap: wrap;
    }

    .eng-tab-btn {
      padding: 10px 18px;
      border: none;
      background: transparent;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      color: #666;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .eng-tab-btn:hover {
      background: rgba(255,255,255,0.5);
      color: #333;
    }

    .eng-tab-btn.active {
      background: white;
      color: #1a73e8;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .eng-tab-btn .count-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      height: 20px;
      padding: 0 6px;
      margin-left: 6px;
      background: #e8e8e8;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 600;
    }

    .eng-tab-btn.active .count-badge {
      background: #e8f0fe;
      color: #1a73e8;
    }

    .eng-tab-btn .count-badge.urgent {
      background: #fce8e6;
      color: #c5221f;
    }

    /* Active Timer Bar */
    .eng-timer-bar {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 12px 20px;
      background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
      color: white;
      border-radius: 8px;
      margin-bottom: 20px;
      box-shadow: 0 2px 8px rgba(26,115,232,0.3);
    }

    .eng-timer-bar .timer-icon {
      font-size: 24px;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .eng-timer-bar .timer-info {
      flex: 1;
    }

    .eng-timer-bar .timer-label {
      font-size: 12px;
      opacity: 0.9;
    }

    .eng-timer-bar .timer-job {
      font-weight: 600;
      font-size: 15px;
    }

    .eng-timer-bar .timer-elapsed {
      font-family: 'SF Mono', Monaco, monospace;
      font-size: 24px;
      font-weight: 600;
      letter-spacing: 1px;
    }

    .eng-timer-bar .timer-stop-btn {
      padding: 8px 16px;
      background: rgba(255,255,255,0.2);
      border: 1px solid rgba(255,255,255,0.3);
      color: white;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
      transition: all 0.2s;
    }

    .eng-timer-bar .timer-stop-btn:hover {
      background: rgba(255,255,255,0.3);
    }

    /* ============================================
       ENGINEERING QUEUE METRICS BAR
       Clean minimal design matching In Progress Orders
       ============================================ */

    .eng-metrics-bar {
      display: flex;
      gap: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .eng-metric-card {
      display: flex;
      align-items: center;
      gap: 12px;
      background: white;
      border: 2px solid #e0e0e0;
      border-radius: 10px;
      padding: 14px 18px;
      cursor: pointer;
      transition: all 0.2s ease;
      min-width: 100px;
    }

    .eng-metric-card:hover {
      border-color: #bbb;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .eng-metric-card.active {
      border-color: #8B1538;
      background: #fdf6f8;
    }

    /* All card - vertical layout */
    .eng-metric-card.eng-all {
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 12px 20px;
    }

    .eng-metric-card.eng-all .eng-metric-count {
      font-size: 28px;
      font-weight: 700;
      color: #333;
    }

    .eng-metric-card.eng-all .eng-metric-label {
      font-size: 11px;
      color: #666;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* Color indicator swatch */
    .eng-metric-indicator {
      width: 24px;
      height: 24px;
      border-radius: 4px;
      flex-shrink: 0;
      border: 2px solid rgba(0,0,0,0.1);
    }

    .eng-metric-indicator.green {
      background: #4caf50;
      border-color: #388e3c;
    }

    .eng-metric-indicator.yellow {
      background: #ffc107;
      border-color: #ffa000;
    }

    .eng-metric-indicator.gray {
      background: #9ca3af;
      border-color: #6b7280;
    }

    .eng-metric-indicator.blue {
      background: #3b82f6;
      border-color: #2563eb;
    }

    .eng-metric-indicator.teal {
      background: #14b8a6;
      border-color: #0d9488;
    }

    .eng-metric-indicator.purple {
      background: #8b5cf6;
      border-color: #7c3aed;
    }

    /* Metric info text */
    .eng-metric-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .eng-metric-count {
      font-size: 20px;
      font-weight: 700;
      color: #333;
      line-height: 1;
    }

    .eng-metric-label {
      font-size: 11px;
      color: #666;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    /* Active state color variations */
    .eng-metric-card[data-queue="standard"].active {
      border-color: #4caf50;
      background: #f1f8f1;
    }

    .eng-metric-card[data-queue="has_scans"].active {
      border-color: #ffc107;
      background: #fffdf1;
    }

    .eng-metric-card[data-queue="no_scans"].active {
      border-color: #9ca3af;
      background: #f9fafb;
    }

    .eng-metric-card[data-queue="working_3d"].active {
      border-color: #3b82f6;
      background: #eff6ff;
    }

    .eng-metric-card[data-queue="working_2d"].active {
      border-color: #14b8a6;
      background: #f0fdfa;
    }

    .eng-metric-card[data-queue="complete"].active {
      border-color: #8b5cf6;
      background: #faf5ff;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
      .eng-metrics-bar {
        flex-wrap: wrap;
      }
      .eng-metric-card {
        flex: 1 1 auto;
        min-width: 90px;
      }
      .eng-metric-count {
        font-size: 18px;
      }
    }

    /* ============================================
       END ENGINEERING QUEUE HEADER REDESIGN
       ============================================ */

    /* Engineering Queue - Uses same patterns as production tables */

    /* Engineering Queue Table */
    .eng-queue-table {
      width: 100%;
      border-collapse: collapse;
    }

    .eng-queue-table th,
    .eng-queue-table td {
      padding: 12px 10px;
      text-align: left;
      border-bottom: 1px solid #e8e8e8;
    }

    .eng-queue-table th {
      background: #f8f9fa;
      font-weight: 600;
      font-size: 11px;
      text-transform: uppercase;
      color: #666;
      letter-spacing: 0.3px;
      white-space: nowrap;
    }

    .eng-queue-table tbody tr {
      cursor: pointer;
      transition: background 0.15s;
    }

    .eng-queue-table tbody tr:hover {
      background: #f5f8ff;
    }

    .eng-queue-table .col-health {
      width: 40px;
      min-width: 40px;
      max-width: 40px;
      padding: 12px 8px 12px 12px;
      text-align: center;
      vertical-align: middle;
    }

    .eng-queue-table .col-health .health-swatch {
      display: inline-block;
      width: 20px;
      height: 20px;
      border-radius: 4px;
      margin: 0;
      vertical-align: middle;
    }

    .eng-queue-table .col-pd {
      width: 100px;
    }

    .eng-queue-table .col-job {
      width: 80px;
    }

    .eng-queue-table .col-customer {
      min-width: 150px;
    }

    .eng-queue-table .col-aircraft {
      width: 100px;
    }

    .eng-queue-table .col-product {
      min-width: 180px;
    }

    .eng-queue-table .col-bedding {
      width: 80px;
      text-align: center;
    }

    .eng-queue-table .col-status {
      width: 120px;
    }

    .eng-queue-table .col-type {
      width: 100px;
    }

    .eng-queue-table .col-meas-date {
      width: 90px;
    }

    .eng-queue-table .col-eng-due {
      width: 90px;
    }

    .eng-queue-table .col-item-desc {
      min-width: 180px;
    }

    .eng-due-urgent {
      color: #c5221f;
      font-weight: 600;
    }

    .eng-queue-table .pd-number {
      font-weight: 600;
      color: #1a73e8;
    }

    .eng-queue-table .job-number {
      font-size: 12px;
      color: #666;
      font-family: 'SF Mono', Monaco, monospace;
    }

    .eng-queue-table .customer-name {
      font-weight: 500;
      color: #333;
      max-width: 180px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .eng-queue-table .aircraft-info {
      font-size: 13px;
      color: #555;
    }

    .eng-queue-table .product-info {
      font-size: 13px;
      color: #333;
      max-width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .eng-queue-table .bedding-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 24px;
      height: 24px;
      background: #e8f0fe;
      color: #1a73e8;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
    }

    .eng-queue-table .bedding-badge.empty {
      background: #f1f3f4;
      color: #999;
    }

    /* Engineering Type Badges */
    .eng-type-badge {
      display: inline-block;
      font-size: 10px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .eng-type-standard {
      background: #e8f0fe;
      color: #1a73e8;
    }

    .eng-type-custom_3d {
      background: #fce8e6;
      color: #c5221f;
    }

    .eng-type-modification {
      background: #fef7e0;
      color: #ea8600;
    }

    .eng-type-pending {
      background: #f1f3f4;
      color: #5f6368;
    }

    /* Engineering Status Badges */
    .eng-status-badge {
      display: inline-block;
      font-size: 11px;
      font-weight: 500;
      padding: 3px 8px;
      border-radius: 4px;
    }

    .eng-status-pending_review { background: #f1f3f4; color: #5f6368; }
    .eng-status-waiting_data { background: #fef7e0; color: #ea8600; }
    .eng-status-ready_3d { background: #e8f0fe; color: #1a73e8; }
    .eng-status-3d_in_progress { background: #e6f4ea; color: #188038; }
    .eng-status-3d_review { background: #fce8e6; color: #c5221f; }
    .eng-status-ready_2d { background: #e8f0fe; color: #1a73e8; }
    .eng-status-2d_in_progress { background: #e6f4ea; color: #188038; }
    .eng-status-2d_review { background: #fce8e6; color: #c5221f; }
    .eng-status-complete { background: #e6f4ea; color: #188038; }
    .eng-status-on_hold { background: #f1f3f4; color: #5f6368; }

    /* New Queue-based Status Badges */
    .eng-status-standard { background: #e6f4ea; color: #188038; font-weight: 600; }
    .eng-status-waiting { background: #fef7e0; color: #ea8600; font-weight: 600; }
    .eng-status-scans { background: #fff3cd; color: #856404; font-weight: 600; }
    .eng-status-3d-active { background: #cce5ff; color: #004085; font-weight: 600; }
    .eng-status-2d-active { background: #d4edda; color: #155724; font-weight: 600; }
    .eng-status-2d-ready { background: #e8f0fe; color: #1a73e8; font-weight: 600; }

    /* Bedding Queue Table */
    .eng-bedding-table {
      width: 100%;
      border-collapse: collapse;
    }

    .eng-bedding-table th,
    .eng-bedding-table td {
      padding: 12px;
      text-align: left;
      border-bottom: 1px solid #e0e0e0;
    }

    .eng-bedding-table th {
      background: #f8f9fa;
      font-weight: 600;
      font-size: 12px;
      text-transform: uppercase;
      color: #666;
    }

    .eng-bedding-table tbody tr:hover {
      background: #f5f8ff;
    }

    .bedding-status-badge {
      display: inline-block;
      font-size: 11px;
      font-weight: 500;
      padding: 4px 10px;
      border-radius: 4px;
    }

    .bedding-status-waiting_mattress_eng {
      background: #fef7e0;
      color: #ea8600;
    }

    .bedding-status-ready_for_production {
      background: #e6f4ea;
      color: #188038;
    }

    .bedding-status-in_production {
      background: #e8f0fe;
      color: #1a73e8;
    }

    .bedding-status-complete {
      background: #f1f3f4;
      color: #5f6368;
    }

    /* Dimension Input Component */
    .dimension-entry {
      background: #f8f9fa;
      border-radius: 8px;
      padding: 20px;
      margin: 16px 0;
    }

    .dimension-entry h4 {
      margin: 0 0 8px 0;
      font-size: 14px;
      color: #333;
    }

    .dim-source-note {
      font-size: 13px;
      color: #888;
      font-style: italic;
      margin-bottom: 12px;
    }

    .dim-source-note.auto-filled {
      color: #188038;
    }

    .dimension-row {
      display: flex;
      gap: 24px;
      margin: 16px 0;
      flex-wrap: wrap;
    }

    .dimension-input-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .dimension-input-group label {
      font-size: 12px;
      font-weight: 600;
      color: #666;
      text-transform: uppercase;
    }

    .dimension-inputs {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .dim-whole {
      width: 60px;
      padding: 8px;
      font-size: 16px;
      border: 1px solid #ddd;
      border-radius: 4px;
      text-align: center;
    }

    .dim-fraction {
      width: 70px;
      padding: 8px;
      font-size: 14px;
      border: 1px solid #ddd;
      border-radius: 4px;
    }

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

    .shape-select {
      margin-top: 12px;
    }

    .shape-select label {
      font-size: 12px;
      font-weight: 600;
      color: #666;
      text-transform: uppercase;
      display: block;
      margin-bottom: 6px;
    }

    .shape-select select {
      padding: 8px 12px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
    }

    /* Engineering Queue Empty State */
    .eng-empty-state {
      text-align: center;
      padding: 60px 20px;
      color: #666;
    }

    .eng-empty-state .empty-icon {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.5;
    }

    .eng-empty-state h3 {
      margin: 0 0 8px 0;
      color: #333;
    }

    .eng-empty-state p {
      margin: 0;
      font-size: 14px;
    }

    /* Engineering Detail Modal */
    /* Engineering Detail Modal - Redesigned */
    .eng-detail-modal-redesign {
      max-width: 850px;
      width: 95%;
      position: relative;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 25px 80px rgba(0,0,0,0.35);
    }

    .eng-modal-header {
      background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
      color: white;
      padding: 28px 32px;
      position: relative;
    }

    .eng-modal-header .modal-close-corner {
      position: absolute;
      top: 12px;
      right: 12px;
      background: rgba(255,255,255,0.2);
      border: none;
      color: white;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      font-size: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
      z-index: 10;
    }

    .eng-modal-header .modal-close-corner:hover {
      background: rgba(255,255,255,0.3);
    }

    .eng-modal-header-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      padding-right: 40px;
    }

    .eng-modal-header-left {
      flex: 1;
    }

    .eng-modal-pd-number {
      font-size: 16px;
      opacity: 0.9;
      margin-bottom: 6px;
      font-weight: 600;
      letter-spacing: 0.5px;
    }

    .eng-modal-title {
      font-size: 26px;
      font-weight: 700;
      margin: 0 0 12px 0;
      line-height: 1.3;
    }

    .eng-modal-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      font-size: 15px;
      opacity: 0.9;
    }

    .eng-modal-meta span {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .eng-modal-header-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 8px;
    }

    .eng-source-badge {
      display: inline-flex;
      align-items: center;
      padding: 10px 18px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .eng-source-badge.standard { background: #6b7280; color: white; }
    .eng-source-badge.no_scans { background: #f59e0b; color: #1a1a1a; }
    .eng-source-badge.has_scans { background: #22c55e; color: white; }

    .eng-modal-save-btn {
      background: #8B1538;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s;
    }

    .eng-modal-save-btn:hover {
      background: #a01d42;
    }

    .eng-save-btn-container {
      display: flex;
      justify-content: center;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid #e0e0e0;
    }

    .eng-modal-body {
      padding: 28px 32px;
      background: #f8f9fa;
      max-height: 70vh;
      overflow-y: auto;
    }

    /* Status Change Section - Prominent */
    .eng-status-section {
      background: white;
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .eng-status-section-title {
      font-size: 13px;
      text-transform: uppercase;
      color: #555;
      font-weight: 700;
      letter-spacing: 0.5px;
      margin-bottom: 16px;
    }

    .eng-status-row {
      display: flex;
      gap: 16px;
      align-items: flex-end;
    }

    .eng-status-field {
      flex: 1;
    }

    .eng-status-field label {
      display: block;
      font-size: 12px;
      color: #555;
      margin-bottom: 6px;
      font-weight: 500;
    }

    .eng-status-select {
      width: 100%;
      padding: 12px 14px;
      font-size: 14px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      background: white;
      cursor: pointer;
      transition: border-color 0.2s;
    }

    .eng-status-select:focus {
      outline: none;
      border-color: #8B1538;
    }

    .eng-status-select:hover {
      border-color: #bbb;
    }

    /* Info Cards */
    .eng-info-card {
      background: white;
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .eng-info-card-title {
      font-size: 13px;
      text-transform: uppercase;
      color: #555;
      font-weight: 700;
      letter-spacing: 0.5px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .eng-info-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
    }

    .eng-info-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .eng-info-item .label {
      font-size: 12px;
      color: #777;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .eng-info-item .value {
      font-size: 16px;
      color: #333;
      font-weight: 600;
    }

    /* Health indicator */
    .eng-health-indicator {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
    }

    .eng-health-indicator.green { background: #dcfce7; color: #166534; }
    .eng-health-indicator.yellow { background: #fef3c7; color: #92400e; }
    .eng-health-indicator.red { background: #fee2e2; color: #991b1b; }

    .eng-health-indicator .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }

    .eng-health-indicator.green .dot { background: #22c55e; }
    .eng-health-indicator.yellow .dot { background: #f59e0b; }
    .eng-health-indicator.red .dot { background: #ef4444; }

    .eng-health-note {
      margin-top: 8px;
      padding: 8px 12px;
      background: #fff7ed;
      border-left: 3px solid #f59e0b;
      border-radius: 0 6px 6px 0;
      font-size: 13px;
      color: #92400e;
    }

    /* Late/On-Time Badges */
    .eng-late-badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .eng-late-badge.on-time {
      background: #dcfce7;
      color: #166534;
    }

    .eng-late-badge.late {
      background: #fee2e2;
      color: #991b1b;
    }

    .eng-late-badge.overdue {
      background: #fef3c7;
      color: #92400e;
      animation: pulse-warning 2s ease-in-out infinite;
    }

    @keyframes pulse-warning {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.7; }
    }

    /* Date value styling for overdue/late */
    .eng-info-item .value.eng-overdue {
      color: #dc2626;
      font-weight: 700;
    }

    .eng-info-item .value.eng-late {
      color: #dc2626;
    }

    .eng-info-item .value.eng-on-time {
      color: #166534;
    }

    /* Bedding Table */
    .eng-bedding-list {
      margin-top: 8px;
    }

    .eng-bedding-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid #eee;
    }

    .eng-bedding-item:last-child {
      border-bottom: none;
    }

    .eng-bedding-info {
      flex: 1;
    }

    .eng-bedding-product {
      font-size: 14px;
      font-weight: 500;
      color: #333;
    }

    .eng-bedding-type {
      font-size: 12px;
      color: #666;
    }

    .eng-bedding-sku {
      font-size: 11px;
      color: #999;
      font-family: monospace;
    }

    .eng-bedding-qty {
      font-size: 13px;
      color: #666;
      margin-right: 12px;
    }

    .eng-bedding-status {
      padding: 4px 10px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
    }

    .eng-bedding-status.waiting { background: #fef3c7; color: #92400e; }
    .eng-bedding-status.ready { background: #dcfce7; color: #166534; }
    .eng-bedding-status.complete { background: #dbeafe; color: #1e40af; }

    /* Button Group Controls - Proposal Builder Style */
    .eng-btn-group {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .eng-btn-option {
      padding: 14px 20px;
      background: #f5f5f5;
      border: 2px solid transparent;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      color: #555;
      cursor: pointer;
      transition: all 0.2s;
      flex: 1;
      min-width: 120px;
      text-align: center;
    }

    .eng-btn-option:hover {
      background: #e9ecef;
      border-color: #dee2e6;
      color: #333;
    }

    .eng-btn-option.selected {
      background: #8B1538;
      color: white;
      border-color: #8B1538;
    }

    .eng-btn-option.selected:hover {
      background: #6d1029;
      border-color: #6d1029;
    }

    /* Work Controls Section */
    .eng-work-controls {
      background: white;
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .eng-work-controls-title {
      font-size: 13px;
      text-transform: uppercase;
      color: #555;
      font-weight: 700;
      letter-spacing: 0.5px;
      margin-bottom: 16px;
    }

    .eng-work-status {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
      padding: 16px;
      background: #f8f9fa;
      border-radius: 10px;
    }

    .eng-work-status-icon {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
    }

    .eng-work-status-icon.idle {
      background: #e5e7eb;
      color: #6b7280;
    }

    .eng-work-status-icon.active {
      background: #dbeafe;
      color: #1d4ed8;
      animation: pulse-icon 2s ease-in-out infinite;
    }

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

    .eng-work-status-info {
      flex: 1;
    }

    .eng-work-status-label {
      font-size: 12px;
      color: #777;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      margin-bottom: 4px;
    }

    .eng-work-status-value {
      font-size: 20px;
      font-weight: 700;
      color: #333;
    }

    .eng-work-status-value.active {
      color: #1d4ed8;
    }

    .eng-work-timer {
      font-family: 'SF Mono', Monaco, 'Consolas', monospace;
      font-size: 28px;
      font-weight: 700;
      color: #1d4ed8;
      letter-spacing: 2px;
    }

    .eng-work-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .eng-work-btn {
      padding: 16px 28px;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex: 1;
      min-width: 140px;
    }

    .eng-work-btn.start-3d {
      background: #1d4ed8;
      color: white;
      border: none;
    }

    .eng-work-btn.start-3d:hover {
      background: #1e40af;
    }

    .eng-work-btn.start-2d {
      background: #059669;
      color: white;
      border: none;
    }

    .eng-work-btn.start-2d:hover {
      background: #047857;
    }

    .eng-work-btn.stop {
      background: #dc2626;
      color: white;
      border: none;
    }

    .eng-work-btn.stop:hover {
      background: #b91c1c;
    }

    .eng-work-btn.complete {
      background: #8B1538;
      color: white;
      border: none;
    }

    .eng-work-btn.complete:hover {
      background: #6d1029;
    }

    .eng-work-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .eng-work-btn-icon {
      font-size: 18px;
    }

    /* Source Type Buttons */
    .eng-source-btn-group {
      display: flex;
      gap: 10px;
    }

    .eng-source-btn {
      padding: 14px 20px;
      background: #f5f5f5;
      border: 2px solid transparent;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      color: #555;
      cursor: pointer;
      transition: all 0.2s;
      flex: 1;
      text-align: center;
    }

    .eng-source-btn:hover {
      background: #e9ecef;
      border-color: #dee2e6;
    }

    .eng-source-btn.selected.standard {
      background: #6b7280;
      color: white;
      border-color: #6b7280;
    }

    .eng-source-btn.selected.no_scans {
      background: #f59e0b;
      color: #1a1a1a;
      border-color: #f59e0b;
    }

    .eng-source-btn.selected.has_scans {
      background: #22c55e;
      color: white;
      border-color: #22c55e;
    }

    /* Hide the old dropdown elements in redesigned modal */
    .eng-detail-modal-redesign .eng-status-select {
      display: none;
    }

    /* Legacy styles for other uses */
    .eng-detail-modal {
      max-width: 700px;
    }

    .eng-detail-section {
      margin-bottom: 24px;
    }

    .eng-detail-section h4 {
      font-size: 12px;
      text-transform: uppercase;
      color: #666;
      margin: 0 0 12px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid #e0e0e0;
    }

    .eng-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }

    .eng-detail-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .eng-detail-item .label {
      font-size: 11px;
      color: #888;
      text-transform: uppercase;
    }

    .eng-detail-item .value {
      font-size: 14px;
      color: #333;
    }

    .eng-edit-input {
      padding: 8px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
      width: 100%;
      box-sizing: border-box;
    }

    .eng-edit-input:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    }

    .eng-notes-textarea {
      width: 100%;
      min-height: 80px;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
      resize: vertical;
      font-family: inherit;
    }

    .eng-notes-textarea:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    }

    .eng-detail-section.editing .eng-view-mode {
      display: none !important;
    }

    .eng-detail-section.editing .eng-edit-mode {
      display: block !important;
    }

    /* ==================== END ENGINEERING QUEUE STYLES ==================== */
