/* Enhanced Desktop/Tablet Job Entries Table */
/* Two-tier row design - no horizontal scrolling! */

@media (min-width: 769px) {
  /* Container */
  #jobEntriesCard {
    max-height: calc(100vh - 380px);
    min-height: 500px;
    display: flex;
    flex-direction: column;
  }
  
  #jobEntriesTableWrap {
    flex: 1;
    overflow: auto;
    border-radius: 12px;
    background: #2d3748;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  /* Light theme job table fixes */
  [data-theme="light"] #jobEntriesTableWrap {
    background: #f8fafc;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Header styling */
  #jobEntriesTable thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
  }
  
  #jobEntriesTable thead tr {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  }
  
  #jobEntriesTable thead th {
    color: #93c5fd !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
  }

  /* Light theme table header fixes */
  [data-theme="light"] #jobEntriesTable thead tr {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  }
  
  [data-theme="light"] #jobEntriesTable thead th {
    color: #ffffff !important;
  }
  
  /* Main row (first row of pair) - grey gradient */
  #jobEntriesTable tbody tr.job-row-main {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
    transition: all 0.3s ease !important;
  }
  
  #jobEntriesTable tbody tr.job-row-main:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
  }

  /* Light theme job row fixes */
  [data-theme="light"] #jobEntriesTable tbody tr.job-row-main {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
  }
  
  [data-theme="light"] #jobEntriesTable tbody tr.job-row-main:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
  }
  
  /* Detail row (second row of pair) - darker background */
  #jobEntriesTable tbody tr.job-row-detail {
    background: rgba(0, 0, 0, 0.2) !important;
    border-bottom: 8px solid #2d3748 !important;
  }

  /* Light theme detail row fixes */
  [data-theme="light"] #jobEntriesTable tbody tr.job-row-detail {
    background: rgba(0, 0, 0, 0.03) !important;
    border-bottom: 8px solid #f8fafc !important;
  }
  
  #jobEntriesTable tbody tr.job-row-main:hover + tr.job-row-detail {
    background: rgba(0, 0, 0, 0.3) !important;
  }

  /* Light theme hover detail row fixes */
  [data-theme="light"] #jobEntriesTable tbody tr.job-row-main:hover + tr.job-row-detail {
    background: rgba(0, 0, 0, 0.05) !important;
  }
  
  /* Date - small */
  #jobEntriesTable tbody td:nth-child(1) {
    color: var(--muted, #9ca3af) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
  }
  
  /* RO Number - BIG and BOLD */
  #jobEntriesTable tbody td:nth-child(2) {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: #3b82f6 !important;
  }
  
  #jobEntriesTable tbody td:nth-child(2):hover {
    color: #60a5fa !important;
  }
  
  /* Service badges styling */
  .svc-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    font-size: 0.8rem;
    color: #93c5fd;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
  }
  
  .svc-badge strong {
    color: #dbeafe;
    font-weight: 800;
  }
  
  /* Approval button styling - like mobile */
  .approval-btn.approved:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5) !important;
  }
  
  .approval-btn.not-approved:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4) !important;
  }
  
  /* Footer styling */
  #jobEntriesTable tfoot {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
  }
  
  #jobEntriesTable tfoot tr {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4) !important;
  }
  
  #jobEntriesTable tfoot td {
    color: #dbeafe !important;
    font-weight: 700 !important;
  }
  
  #jobEntriesTable tfoot td:first-child {
    color: #93c5fd !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
  }
  
  /* Scrollbar */
  #jobEntriesTableWrap::-webkit-scrollbar {
    width: 8px;
  }
  
  #jobEntriesTableWrap::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
  
  #jobEntriesTableWrap::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 4px;
  }
}
