/*common elements*/
body{
  background:#4c4c4c;
  
}
main{
  background:#f3f3f3;
}
input, select{
  background:rgb(253, 253, 253);
}

.hidden{
  display:none;
}
.error{
  color: #f00;
  padding: 3px 5px;
  border: 1px solid #fff;
}
.error-border{
  border: 3px solid #f00 !important;
}
.loginform{
  text-align: center;
}
.w3-button.active{
  background-color: #d36028 !important;
}
.loadingicon{
  display:none;
}

.eqmtUseInfo .jobList {
  vertical-align: middle;
}

.btnAddJobUse, .btnRemoveJobUse {
  border: 1px solid transparent;
  font-weight: normal;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btnRemoveJobUse {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.btnAddJobUse {
  width: auto;
  min-width: 140px;
  height: auto;
  padding: 6px 12px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  background-color: #4CAF50 !important;
  color: white !important;
  border-color: #45a049;
  position: relative;
}

/* Removed ::before pseudo-element since JavaScript now handles the + symbol */



.btnRemoveJobUse {
  background-color: #f44336 !important;
  color: white !important;
  border-color: #da190b;
}

.error-border {
  border: 2px solid #f44336 !important;
}

.general-cost-code {
  background-color: #f5f5f5 !important;
  color: #666 !important;
  cursor: not-allowed !important;
  opacity: 0.8;
  font-size: 12px;
}

.general-cost-code option {
  color: #666 !important;
}

.myEquipAddUse th {
  background-color: #f5f5f5;
  font-weight: bold;
  text-align: center;
}

.myEquipAddUse td {
  vertical-align: middle;
  padding: 8px;
}

/* Back Charge Indicators */
.back-charge-badge {
  background-color: #d32f2f !important;
  color: white !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 10px !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.back-charge-warning {
  background-color: #fff3e0 !important;
  border: 1px solid #ff9800 !important;
  color: #e65100 !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  margin-bottom: 10px !important;
  font-size: 12px !important;
}

.back-charge-warning i {
  margin-right: 6px !important;
  color: #ff9800 !important;
}

/* Import CSV Styles */
.csv-upload-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 768px) {
  .csv-upload-container {
    padding: 10px;
  }
  
  .csv-upload-form {
    padding: 20px;
  }
  
  .csv-upload-button {
    width: 100%;
    margin-top: 10px;
  }
}

.csv-upload-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.csv-file-input {
  border: 2px dashed #ddd;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.3s ease;
  margin-bottom: 20px;
}

.csv-file-input:hover {
  border-color: #2196F3;
}

.csv-file-input input[type="file"] {
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
}

.csv-file-input p {
  margin: 10px 0 0 0;
  color: #666;
  font-size: 14px;
}

.csv-upload-button {
  background: #2196F3 !important;
  color: white !important;
  padding: 12px 30px !important;
  font-size: 16px !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease !important;
}

.csv-upload-button:hover {
  background: #1976D2 !important;
}

.csv-upload-button:disabled {
  background: #ccc !important;
  cursor: not-allowed !important;
}

.csv-output {
  margin-top: 20px;
}

.csv-success {
  background: #d4edda !important;
  border: 1px solid #c3e6cb !important;
  color: #155724 !important;
  padding: 15px !important;
  border-radius: 6px !important;
  margin-bottom: 15px !important;
}

.csv-error {
  background: #f8d7da !important;
  border: 1px solid #f5c6cb !important;
  color: #721c24 !important;
  padding: 15px !important;
  border-radius: 6px !important;
  margin-bottom: 15px !important;
}

.csv-error-download {
  background: #fff3cd !important;
  border: 1px solid #ffeaa7 !important;
  color: #856404 !important;
  padding: 20px !important;
  border-radius: 6px !important;
  margin-top: 20px !important;
}

.csv-error-download h3 {
  margin-top: 0 !important;
  color: #856404 !important;
}

.csv-error-download button,
.csv-error-download-button {
  background: #dc3545 !important;
  color: white !important;
  padding: 10px 20px !important;
  border-radius: 4px !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease !important;
}

.csv-error-download button:hover,
.csv-error-download-button:hover {
  background: #c82333 !important;
}

.csv-loading {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.csv-template-link {
  background: #28a745 !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin-bottom: 20px !important;
  transition: background-color 0.3s ease !important;
}

.csv-template-link:hover {
  background: #218838 !important;
  text-decoration: none !important;
}

.additional-cost-code {
  background-color: #f9f9f9;
}

.additional-cost-code td:first-child {
  font-style: italic;
  color: #666;
}

/* Dashboard specific styles */
.btnAddJobUse:hover {
  background-color: #45a049 !important;
  border-color: #3d8b40;
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  cursor: pointer;
}

.btnRemoveJobUse:hover {
  background-color: #da190b !important;
  border-color: #c41810;
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btnAddJobUse:disabled {
  background-color: #cccccc !important;
  color: #666666 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  border-color: #bbbbbb;
  box-shadow: none;
  transform: none;
}

/* Active state styling for better visual feedback */
.btnAddJobUse:active, .btnRemoveJobUse:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Focus state styling for accessibility */
.btnAddJobUse:focus, .btnRemoveJobUse:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3), 0 2px 4px rgba(0,0,0,0.1);
}

.btnRemoveJobUse:focus {
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.3), 0 2px 4px rgba(0,0,0,0.1);
}

/* Table styling improvements */
.myEquipAddUse {
  border-collapse: collapse;
  width: 100%;
}

.myEquipAddUse tr:hover {
  background-color: #f0f0f0;
}

/* Cost code selection styling */
.sltJob:not(.general-cost-code) {
  background-color: white !important;
  color: black !important;
}

.sltJob:not(.general-cost-code):focus {
  border-color: #4CAF50;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Locked selection styling */
.sltJob.locked-selection {
  background-color: #f8f8f8 !important;
  color: #333 !important;
  cursor: not-allowed !important;
  opacity: 0.9;
  border-color: #ccc;
}

.sltJob.locked-selection:focus {
  border-color: #ccc !important;
  box-shadow: none !important;
}

/* Cost code counter styling - only for "no codes" state */
.cost-code-counter.no-codes {
  color: #999;
  font-style: italic;
  background-color: #f8f8f8;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  font-size: 11px;
  text-align: center;
  display: block;
}

/* Button container styling */
.btnAddJobUse {
  margin-bottom: 8px;
  text-align: center;
}

/* Hidden button styling */
.btnAddJobUse[style*="display: none"] {
  margin-bottom: 0;
}

/* Container styling when button is hidden */
.no-button-container {
  text-align: center;
}

/* Enhanced button spacing and alignment */
.btnAddJobUse, .btnRemoveJobUse {
  margin: 2px;
  vertical-align: middle;
}

/* Button group styling for better visual cohesion */
.btnAddJobUse + .cost-code-counter {
  margin-top: 8px;
}

/* Alternating project row colors for better visual separation */
.myEquipAddUse tr.eqmtUseInfo:nth-child(even) {
  background-color: #f8f9fa;
}

.myEquipAddUse tr.eqmtUseInfo:nth-child(odd) {
  background-color: #ffffff;
}

/* Additional cost code rows - different alternating colors */
.myEquipAddUse tr.additional-cost-code:nth-child(even) {
  background-color: #fff3e0;
}

.myEquipAddUse tr.additional-cost-code:nth-child(odd) {
  background-color: #fff8e1;
}

.myEquipAddUse tr.eqmtUseInfo:hover {
  background-color: #e3f2fd !important;
}

/* Hover effect for additional cost code rows */
.myEquipAddUse tr.additional-cost-code:hover {
  background-color: #ffe0b2 !important;
}

/* Additional visual separation for project rows */
.myEquipAddUse tr.eqmtUseInfo {
  border-bottom: 1px solid #e0e0e0;
}

.myEquipAddUse tr.eqmtUseInfo:last-child {
  border-bottom: none;
}

/* Enhanced project name styling */
.myEquipAddUse tr.eqmtUseInfo .jobList {
  font-weight: 600;
  color: #2c3e50;
  padding: 8px 4px;
}

/* Subtle border between projects */
.myEquipAddUse tr.eqmtUseInfo td {
  border-right: 1px solid #f0f0f0;
  padding: 8px 4px;
}

.myEquipAddUse tr.eqmtUseInfo td:last-child {
  border-right: none;
}

/* ===== BILLING PAGE EQUIPMENT ROW STYLES ===== */
/* Project container spacing for better visual separation */
.project-container {
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 3px solid #d0d0d0;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.project-container:last-child {
    margin-bottom: 30px;
    border-bottom: none;
}

/* Add extra spacing between project containers */
.project-container + .project-container {
    margin-top: 40px;
}

/* Equipment row styling for clear visual separation */
.equipment-row {
    margin-bottom: 40px;
    border-bottom: 3px solid #cccccc;
    background-color: #fafafa;
}

.equipment-row:last-child {
    border-bottom: none;
    margin-bottom: 20px;
}

.equipment-row td {
    padding: 20px 8px;
    border-bottom: 1px solid #e8e8e8;
}

.equipment-row:hover {
    background-color: #f5f5f5;
}

/* Cost code section styling - part of equipment section but indented */
.cost-code-section {
    background-color: #f8f8f8;
    border-left: 4px solid #6c757d;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 0 0 4px 4px;
}

.cost-code-section td {
    padding: 15px 20px;
    background-color: #f8f8f8;
}

/* Cost code breakdown table styling */
.cost-code-section table {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Make the equipment name stand out more */
.equipment-row td:first-child {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding-left: 12px;
}

/* Add subtle shadow to equipment rows */
.equipment-row {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Ensure cost code section connects visually to equipment row */
.equipment-row + .cost-code-section {
    margin-top: -1px;
    border-top: 1px solid #e0e0e0;
}

/* Spacer row styling for clear separation between equipment sections */
.equipment-spacer {
    height: 30px;
    background-color: transparent !important;
    border: none !important;
}

.equipment-spacer td {
    padding: 0 !important;
    border: none !important;
    background-color: transparent !important;
}

/* Cost code row styling - visually distinct from main equipment rows */
.cost-code-row {
    background-color: #f8f9fa !important;
    border-left: 4px solid #6c757d !important;
}

.cost-code-row td:first-child {
    padding-left: 20px !important;
}

.cost-code-row:hover {
    background-color: #e9ecef !important;
}

/* ===== BILLING PAGE PRINT STYLES ===== */
/* Print styles to hide UI elements and format like invoice */
/* CSS Variables for easy spacing adjustment */
:root {
  --equipment-section-spacing: 30px; /* Adjust this value to change spacing between equipment sections */
}

/* Hide print header on screen view */
.print-header {
  display: none;
}

@media print {
  /* Basic print reset - only reset problematic properties */
  * {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
    float: none !important;
    clear: none !important;
    overflow: visible !important;
  }
  
  /* Preserve table structure */
  table, tr, td, th, thead, tbody {
    display: table !important;
  }
  
  tr {
    display: table-row !important;
  }
  
  td, th {
    display: table-cell !important;
  }
  
  thead {
    display: table-header-group !important;
  }
  
  tbody {
    display: table-row-group !important;
  }
  
  /* Force landscape orientation with compact margins for spreadsheet style */
  @page {
    size: landscape !important;
    margin: 0.25in 0.25in 0.5in 0.25in !important;
    /* Top margin smaller to allow more room for header+content */
  }
  
  /* Print header that appears on every page - consolidated definition */
  .print-header {
    display: flex !important;
    position: relative !important;
    width: 100% !important;
    background: white !important;
    border-bottom: 2px solid #000 !important;
    padding: 8px 12px !important;
    align-items: center !important;
    justify-content: space-between !important;
    /* Don't break after header - keep with content */
    page-break-after: avoid !important;
    break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    /* Don't break before header */
    page-break-before: avoid !important;
    break-before: avoid !important;
    margin-bottom: 5px !important;
    margin-top: 0 !important;
    padding-top: 8px !important;
    /* Compact header height */
    height: auto !important;
    min-height: 0.7in !important;
    max-height: 0.9in !important;
  }
  
  /* Header content is set directly in HTML, not via CSS */
  
  .print-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
  }
  
  .print-header-logo {
    height: 45px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }
  
  .print-header-title {
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
  }
  
  .print-header-billing-cycle {
    font-size: 12px !important;
    color: #333 !important;
    margin-top: 4px !important;
  }
  
  .print-header-right {
    text-align: right !important;
  }
  
  .print-header-project {
    font-size: 14px !important;
    font-weight: bold !important;
    margin-bottom: 4px !important;
  }
  
  .print-header-page {
    font-size: 11px !important;
    color: #666 !important;
  }
  
  /* No need for top padding since header is not fixed */
  body {
    padding-top: 0 !important;
  }
  
  /* Ensure content doesn't get cut off */
  .print-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Hide project title h3 in print view - but allow .no-print to override */
  .project-container h3:not(.no-print),
  .print-content h3:not(.no-print) {
    display: none !important;
  }
  
  /* Outer no-break wrapper - first layer of protection */
  .print-no-break-wrapper {
    display: block !important;
    position: relative !important;
    /* CRITICAL: Never break inside this wrapper */
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    /* Don't break before or after */
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Inner wrapper that keeps header and content together as single unit */
  .print-header-content-wrapper {
    display: block !important;
    position: relative !important;
    /* CRITICAL: Never break inside this wrapper - header and content must stay together */
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    /* Don't break before or after */
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Ensure header doesn't create its own break context */
  .print-header-content-wrapper > .print-header {
    page-break-after: avoid !important;
    break-after: avoid !important;
    margin-bottom: 0 !important;
  }
  
  /* Ensure content doesn't create its own break context */
  .print-header-content-wrapper > .project-container {
    page-break-before: avoid !important;
    break-before: avoid !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Page wrapper that groups header and content together */
  .print-page-wrapper {
    display: block !important;
    position: relative !important;
    /* Don't break before or after wrapper by default */
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    /* Ensure wrapper starts at top */
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Apply page break BEFORE wrapper - forces wrapper (header + content) to new page */
  .print-page-wrapper.print-page-break-after {
    page-break-before: always !important;
    break-before: page !important;
    page-break-after: avoid !important;
  }
  
  /* JavaScript-inserted break elements - hidden in screen, visible in print */
  .js-print-break {
    display: none !important;
  }
  
  @media print {
    .js-print-break {
      display: block !important;
      page-break-before: always !important;
      break-before: page !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      line-height: 0 !important;
      font-size: 0 !important;
      overflow: hidden !important;
      visibility: hidden !important;
    }
  }
  
  /* Critical: Ensure content starts immediately after header on same page - no break between */
  .print-header + .project-container,
  .print-header-content-wrapper .print-header + .project-container {
    page-break-before: avoid !important;
    break-before: avoid !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    /* Force to stay with header */
    orphans: 999 !important;
    widows: 999 !important;
  }
  
  /* Ensure content can break if needed, but tries to stay with header */
  .print-content {
    page-break-inside: auto !important;
    display: block !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Hide website header and navigation completely */
  header, nav, .w3-top, .w3-bar, .w3-sidebar, .w3-overlay, #mobileHamburger, #hamburgerBtn {
    display: none !important;
  }
  
  /* Hide all UI controls */
  .no-print,
  .no-print h3,
  h3.no-print,
  .project-container .no-print,
  .print-content .no-print {
    display: none !important;
  }
  
  /* Hide form elements */
  #sltCycleYear, #sltCycle, #txtStartDate, #txtEndDate, #sltJob,
  #btnRunReport, #btnClear, .btnAcceptCharge, #btnAcceptAllCharges {
    display: none !important;
  }
  
  /* Hide labels and form containers */
  .w3-quarter, .w3-padding, .w3-right {
    display: none !important;
  }
  
  /* Hide the entire form section */
  .w3-row {
    display: none !important;
  }
  
  /* Format the billing report for print */
  .w3-container {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Make tables more invoice-like with smaller fonts */
  .w3-table {
    border-collapse: collapse !important;
    width: 100% !important;
    font-size: 10px !important;
  }
  
  .w3-table th, .w3-table td {
    border: 1px solid #000 !important;
    padding: 4px 6px !important;
    text-align: left !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
  
  .w3-table th {
    background-color: #f0f0f0 !important;
    font-weight: bold !important;
    font-size: 11px !important;
  }
  
  /* Remove w3 styling for print */
  .w3-bordered, .w3-striped, .w3-hoverable {
    border: 1px solid #000 !important;
  }
  
  /* Format cost code breakdown table with smaller fonts - but allow nested tables */
  .w3-small {
    font-size: 9px !important;
  }
  
  /* Ensure nested rate tables in w3-small are visible and compact */
  .w3-small table {
    display: table !important;
    font-size: 6px !important;
  }
  
  /* Ensure proper page breaks */
  .w3-container {
    page-break-inside: avoid !important;
  }
  
  /* Page break rules are now handled more specifically above */
  
  /* Format main tables for print */
  .w3-table {
    border-collapse: collapse !important;
    width: 100% !important;
    border: 1px solid #000 !important;
  }
  
  .w3-table th,
  .w3-table td {
    border: 1px solid #000 !important;
    padding: 4px 6px !important;
    text-align: left !important;
    background-color: white !important;
  }
  
  .w3-table th {
    background-color: #f0f0f0 !important;
    font-weight: bold !important;
  }
  
  /* Hide action buttons in tables */
  .btnAcceptCharge, .btnAcceptAllCharges {
    display: none !important;
  }
  
  /* Hide the final column (action buttons column) in print view */
  .w3-table th:last-child,
  .w3-table td:last-child {
    display: none !important;
  }
  
  /* Hide page title but show project headers */
  h1 {
    display: none !important;
  }
  
  /* Show project titles in print - but not .no-print elements */
  h3:not(.no-print) {
    display: block !important;
    font-size: 14px !important;
    font-weight: bold !important;
    margin: 20px 0 10px 0 !important;
    padding: 0 !important;
    color: #000 !important;
    background: none !important;
    border: none !important;
  }
  
  /* Show billing cycle info with each project */
  .billing-cycle-info {
    display: block !important;
    font-size: 11px !important;
    margin: 5px 0 15px 0 !important;
    padding: 0 !important;
    color: #666 !important;
    background: none !important;
    border: none !important;
    text-align: left !important;
  }
  
  /* Smart page break control for projects */
  .project-container {
    margin-bottom: 0 !important;
    /* Keep project header and content together */
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  /* Single project should have no page breaks */
  .project-container:only-child {
    page-break-before: auto !important;
    page-break-after: auto !important;
    break-before: auto !important;
    break-after: auto !important;
  }
  
  /* First project shouldn't have a page break before it */
  .project-container:first-child {
    page-break-before: auto !important;
  }
  
  /* Ensure proper spacing after project content */
  .project-table {
    margin-bottom: 20px !important;
  }
  
  /* Prevent page breaks within individual charge tables */
  .project-table {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  /* Ensure table rows don't break across pages */
  .project-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  /* Add some spacing between projects for visual separation */
  .project-container + .project-container {
    margin-top: 20px !important;
  }
  
  /* Force page breaks between projects for better print layout */
  .project-container:not(:first-child) {
    page-break-before: always !important;
  }
  
  /* Special handling for single project to avoid blank first page */
  .project-container:only-child {
    page-break-before: auto !important;
    page-break-after: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Ensure single project starts immediately without extra spacing */
  .project-container:only-child h3 {
    margin-top: 0 !important;
  }
  
  /* Remove background colors and borders for clean print */
  .w3-light-gray, .w3-white, .w3-border {
    background-color: white !important;
    border: 1px solid #000 !important;
  }
  
  /* Ensure proper spacing */
  br, hr {
    display: none !important;
  }
  
  /* Compact table spacing for landscape */
  .w3-table td {
    padding: 3px 4px !important;
  }
  
  /* Reduce margins and padding for landscape layout */
  .w3-container {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Compact cost code breakdown table */
  .w3-light-gray {
    padding: 3px 6px !important;
  }
  
  /* Ensure tables fit in landscape */
  table {
    max-width: 100% !important;
    font-size: 9px !important;
  }
  
  /* Compact equipment names */
  .w3-table a {
    font-size: 9px !important;
    line-height: 1.1 !important;
  }
  
  /* Compact rates table */
  .w3-table .w3-small {
    font-size: 8px !important;
  }
  
  /* Remove any extra spacing */
  * {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Ensure body has no margins for landscape */
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  
  /* Show cost code rows in print */
  .cost-code-row {
    display: table-row !important;
    background-color: white !important;
    border-bottom: 1px solid #000 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .cost-code-row td {
    padding: 4px 6px !important;
    border-bottom: 1px solid #000 !important;
    background-color: white !important;
  }
  
  .cost-code-row td:first-child {
    background-color: white !important;
    border-left: none !important;
    padding-left: 6px !important;
  }
  
  /* Hide equipment spacer rows in print */
  .equipment-spacer {
    display: none !important;
  }
  
  /* Remove equipment row styling for clean print */
  .equipment-row {
    background-color: white !important;
    border-bottom: 1px solid #000 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .equipment-row td {
    padding: 4px 6px !important;
    border-bottom: 1px solid #000 !important;
    background-color: white !important;
  }
  
  .equipment-row td:first-child {
    background-color: white !important;
    border-left: none !important;
    padding-left: 6px !important;
  }
  
  /* Format the charges table (rates table) for print - compact spreadsheet style */
  /* Note: More specific styles for .w3-white.w3-border are defined in SPREADSHEET-STYLE section below */
  
  /* Remove hover effects and shadows for print */
  .equipment-row:hover {
    background-color: white !important;
  }
  
  /* Billing cycle info is now shown in print - see rules above */
  
  /* Hide button container in print to prevent empty rows */
  .button-container {
    display: none !important;
  }
  
  /* Hide only completely empty tables, but keep project headers visible */
  /* Only hide tables that have no data rows (only headers) */
  .w3-table:has(thead:only-child) {
    display: none !important;
  }
  
  /* Hide empty tbody elements */
  tbody:empty {
    display: none !important;
  }
  
  /* Don't hide project containers - let them show with titles and dates */
  /* This ensures all projects are visible even if they have no equipment charges */
  
  /* Prevent page breaks within tables */
  .w3-table tr {
    page-break-inside: avoid !important;
  }
  
  /* Ensure project containers are properly displayed in print */
  .project-container {
    display: block !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  /* Ensure project titles are visible in print */
  .project-container h3 {
    display: block !important;
    margin: 20px 0 10px 0 !important;
    page-break-after: avoid !important;
  }
  
  /* Ensure billing cycle info is visible in print */
  .project-container .billing-cycle-info {
    display: block !important;
    margin: 5px 0 15px 0 !important;
    page-break-after: avoid !important;
  }
  
  /* ===== SPREADSHEET-STYLE PRINT LAYOUT ===== */
  /* Show rate breakdown tables but make them compact */
  .w3-white.w3-border {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #000 !important;
    margin: 0 !important;
    font-size: 6px !important;
  }
  
  /* Hide expandable rate breakdown sections (daily details) */
  .w3-hide,
  [id^="rateBreakdown_"],
  [onclick*="toggleRateBreakdown"] {
    display: none !important;
  }
  
  /* Make nested rate tables readable with at least 11px font */
  .w3-table .w3-small table,
  .w3-white.w3-border {
    font-size: 11px !important;
    border-collapse: collapse !important;
  }
  
  .w3-white.w3-border th,
  .w3-white.w3-border td {
    padding: 4px 6px !important;
    border: 1px solid #000 !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }
  
  .w3-white.w3-border th {
    background-color: #f0f0f0 !important;
    font-weight: bold !important;
    font-size: 11px !important;
  }
  
  .w3-white.w3-border th:first-child {
    text-align: right !important;
    padding-right: 8px !important;
  }
  
  /* Make equipment names multi-line and readable */
  .equipment-row td:first-child,
  .cost-code-row td:first-child {
    font-size: 11px !important;
    line-height: 1.4 !important;
    padding: 6px 8px !important;
    vertical-align: top !important;
  }
  
  /* Allow line breaks in equipment names - multi-line display */
  .equipment-row td:first-child br,
  .cost-code-row td:first-child br {
    display: block !important;
  }
  
  /* Make equipment details readable on separate lines */
  .equipment-row td:first-child small,
  .cost-code-row td:first-child small {
    display: block !important;
    font-size: 10px !important;
    margin: 2px 0 !important;
    line-height: 1.3 !important;
  }
  
  /* Make cost code label visible and readable */
  .cost-code-row td:first-child small {
    font-style: italic !important;
    color: #333 !important;
    font-weight: normal !important;
  }
  
  /* Simplify equipment name display */
  .equipment-row td:first-child a,
  .cost-code-row td:first-child a {
    font-size: 11px !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    color: #000 !important;
  }
  
  /* Make charges column readable */
  .project-table thead th:nth-child(2) {
    font-size: 11px !important;
    padding: 6px 4px !important;
  }
  
  .equipment-row td:nth-child(2),
  .cost-code-row td:nth-child(2) {
    padding: 6px 4px !important;
    vertical-align: top !important;
  }
  
  /* Hide charges column for equipment total rows only */
  /* Note: Cost code and project totals use colspan="2" for first cell, so td:nth-child(2) is the amount column for those rows */
  .equipment-total-row td:nth-child(2) {
    display: none !important;
  }
  
  /* Make final charge column readable */
  .equipment-row td:nth-child(3),
  .cost-code-row td:nth-child(3),
  .equipment-total-row td:nth-child(3) {
    font-size: 11px !important;
    padding: 6px 8px !important;
    text-align: right !important;
    font-weight: normal !important;
  }
  
  /* For cost code and project totals, the amount is in td:nth-child(2) because first cell has colspan="2" */
  .cost-code-total-row td:nth-child(2),
  .project-total-row td:nth-child(2) {
    font-size: 11px !important;
    padding: 6px 8px !important;
    text-align: right !important;
    font-weight: normal !important;
  }
  
  /* Make all table cells readable */
  .project-table td,
  .project-table th {
    padding: 6px 8px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    vertical-align: top !important;
  }
  
  /* Make table headers readable */
  .project-table thead th {
    font-size: 12px !important;
    padding: 8px 8px !important;
    font-weight: bold !important;
    background-color: #f0f0f0 !important;
  }
  
  /* Make equipment total rows readable with spacing after each equipment section */
  /* Use padding-bottom on all cells to create visual separation between equipment sections */
  /* Adjust --equipment-section-spacing variable above to change spacing */
  .equipment-total-row td {
    padding: 6px 8px var(--equipment-section-spacing) 8px !important;
    font-size: 11px !important;
    border-top: 1px solid #000 !important;
  }
  
  .equipment-total-row td:nth-child(3) {
    font-weight: bold !important;
    font-size: 12px !important;
  }
  
  /* Make cost code total rows readable */
  .cost-code-total-row td {
    padding: 5px 8px !important;
    font-size: 11px !important;
    border-top: 1px solid #ccc !important;
  }
  
  /* Cost code total amount is in td:nth-child(2) because first cell has colspan="2" */
  .cost-code-total-row td:nth-child(2) {
    font-weight: normal !important;
    font-size: 11px !important;
  }
  
  /* Make project total row stand out and readable */
  .project-total-row td {
    padding: 8px 8px !important;
    font-size: 12px !important;
    border-top: 2px solid #000 !important;
    background-color: #f0f0f0 !important;
  }
  
  /* Project total amount is in td:nth-child(2) because first cell has colspan="2" */
  .project-total-row td:nth-child(2) {
    font-weight: bold !important;
    font-size: 13px !important;
  }
  
  /* Remove all extra spacing between rows */
  .equipment-spacer {
    display: none !important;
  }
  
  /* Readable project headers */
  .project-container h3 {
    font-size: 14px !important;
    margin: 15px 0 8px 0 !important;
    padding: 0 !important;
  }
  
  .billing-cycle-info {
    font-size: 11px !important;
    margin: 5px 0 12px 0 !important;
    padding: 0 !important;
  }
  
  /* Make tables more spreadsheet-like with tighter borders */
  .project-table {
    border-collapse: collapse !important;
    border: 1px solid #000 !important;
    margin-bottom: 10px !important;
  }
  
  .project-table td,
  .project-table th {
    border: 1px solid #000 !important;
  }
  
  /* Make body readable */
  body {
    font-size: 11px !important;
  }

}

/* Sticky table headers for scrollable containers */
.w3-card .w3-table thead th {
  position: sticky;
  top: 0;
  background-color: #f1f1f1;
  z-index: 1;
  border-bottom: 2px solid #ddd;
}

/* Ensure sticky headers work properly in scrollable containers */
.w3-card[style*="overflow-y:scroll"] .w3-table thead th {
  position: sticky;
  top: 0;
  background-color: #f1f1f1;
  z-index: 1;
  border-bottom: 2px solid #ddd;
}

/* Dashboard iPad-friendly enhancements */
.equipment-detail-item {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0;
  padding: 4px;
  margin: 1px 0;
  text-align: center;
  min-height: 32px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

/* Ensure grid columns align properly with varying heights */
.w3-col.l2.m2.s4 {
  display: flex;
  flex-direction: column;
}

/* Equipment details grid container */
.equipment-details-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  clear: both; 
}

/* Additional word wrapping for very long values */
.equipment-detail-item .detail-value {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Ensure consistent spacing even with varying content heights */
.equipment-detail-item {
  flex: 1;
  min-width: 0; /* Allow flex items to shrink below content size */
}

.equipment-detail-item strong {
  color: #495057;
  font-size: 0.7em;
  margin-bottom: 2px;
  display: block;
}

.detail-value {
  color: #212529;
  font-size: 0.8em;
  font-weight: 500;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
  max-width: 100%;
  display: block;
  margin-top: 1px;
}

.equipment-image {
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.maintenance-warning {
  font-size: 0.8em;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Enhanced table styling for iPad */
.myEquipAddUse {
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.myEquipAddUse thead th {
  background-color: #f8f9fa !important;
  color: #495057;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.myEquipAddUse tbody tr:hover {
  background-color: #f8f9fa;
}

/* iPad-friendly button enhancements */
.btnNotUsed, .btnAddJobUse {
  min-height: 40px;
  min-width: 100px;
  transition: all 0.2s ease;
}

.btnNotUsed:hover, .btnAddJobUse:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
  .equipment-detail-item {
    min-height: 28px;
    padding: 3px;
  }
  
  .detail-value {
    font-size: 0.75em;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  .w3-col.s4 {
    margin-bottom: 4px;
  }
}

/* Extra small screen adjustments */
@media (max-width: 480px) {
  .equipment-detail-item {
    min-height: 24px;
    padding: 2px;
  }
  
  .detail-value {
    font-size: 0.7em;
    line-height: 1.1;
  }
  
  .equipment-detail-item strong {
    font-size: 0.65em;
  }
}

/* Navigation optimization */
#mainNavMenu .w3-button {
  padding: 8px 12px !important;
  font-size: 14px;
  height: 38px;
  line-height: 22px;
  display: flex;
  align-items: center;
}

#mainNavMenu .w3-dropdown-hover .w3-button {
  padding: 8px 12px !important;
  height: 38px;
  line-height: 22px;
  display: flex;
  align-items: center;
}

/* Ensure right-aligned buttons stay on same line */
#mainNavMenu .w3-right {
  white-space: nowrap;
}

/* Ensure logo and nav alignment */
#mainNavMenu {
  height: 38px;
}

#mainNavMenu .w3-bar-item:first-child {
  height: 38px;
  display: flex;
  align-items: center;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Ensure dropdown items maintain proper alignment */
#mainNavMenu .w3-dropdown-content .w3-bar-item {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Preserve w3-right positioning */
#mainNavMenu .w3-right {
  margin-left: auto !important;
}

/* Responsive navigation adjustments */
@media (max-width: 1200px) {
  #mainNavMenu .w3-button {
    padding: 6px 10px !important;
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  #mainNavMenu .w3-button {
    padding: 5px 8px !important;
    font-size: 12px;
  }
}

/* Enhanced card styling */
.myEquipItem {
  border-radius: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.myEquipItem:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* Submitted Equipment Section Styling */
#submittedEquipmentSection {
  border-left: 8px solid #ff9800;
  background-color: #fff3e0;
  padding-left: 20px;
  margin-left: 0;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
}

#submittedEquipmentSection h3 {
  color: #e65100;
  font-weight: 600;
  margin-bottom: 20px;
}

.submitted-equipment-item {
  background-color: white;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(255, 152, 0, 0.1);
}

.submitted-equipment-item:hover {
  box-shadow: 0 4px 8px rgba(255, 152, 0, 0.2);
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

/* Dashboard-specific styling */

/* Locked selection styling */
.locked-selection {
    background-color: #f0f8f0 !important;
    color: #2e7d32 !important;
    border-color: #4caf50 !important;
    cursor: not-allowed !important;
}

.submitted-data-display {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745 !important;
    margin-top: 10px;
    padding: 12px;
    border-radius: 4px;
}

/* Collapsible section styling */
.usage-summary-content, .notes-content {
    transition: all 0.3s ease;
}

.usage-toggle-icon, .notes-toggle-icon {
    font-weight: bold;
    margin-right: 5px;
}

/* Compact padding for usage entries */
.w3-padding-tiny {
    padding: 4px !important;
}

.w3-margin-tiny {
    margin: 4px !important;
}

/* Collapsible button styling */
.w3-button.w3-blue-grey {
    background-color: #607d8b !important;
    color: white !important;
    border: none;
    font-size: 11px;
    padding: 6px 8px;
    margin-bottom: 8px;
}

.w3-button.w3-blue-grey:hover {
    background-color: #455a64 !important;
}

/* Modal styling */
#addUseModal .w3-modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#addUseModal .w3-orange {
    background-color: #ff9800 !important;
}

.project-toggle-icon {
    font-weight: bold;
    margin-right: 8px;
    font-size: 14px;
}

.project-content {
    transition: none !important;
}

/* iPad-friendly input styling */
.modal-hours, .modal-miles, .modal-notes {
    min-height: 44px;
    font-size: 16px;
    border-radius: 4px;
}

.modal-hours:focus, .modal-miles:focus, .modal-notes:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

/* Search functionality styling */
#searchToggleBtn {
    transition: all 0.3s ease;
    border: none;
    padding: 8px 12px;
}

#searchToggleBtn:hover {
    background-color: #546e7a !important;
    transform: scale(1.05);
}

#searchInput {
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
}

#searchInput:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
    outline: none;
}

#searchCloseBtn {
    transition: all 0.2s ease;
    border: none;
    min-width: 24px;
    height: 24px;
    line-height: 1;
    margin-top: 4px;
    margin-right: 6px;
}

#searchCloseBtn:hover {
    background-color: #d32f2f !important;
    transform: scale(1.1);
}

/* Transfer badge styling - more rectangular/square design */
.transfer-badge {
    border-radius: 2px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border: 1px solid #d32f2f !important;
    background-color: #f44336 !important;
    color: white !important;
}

/* Past date transfer badge - more subtle */
.transfer-badge.past-date {
    background-color: #6c757d !important;
    border-color: #495057 !important;
    font-size: 9px !important;
    padding: 2px 6px !important;
}

/* Transfer information styling */
.transfer-info {
    background-color: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    color: #495057;
}

.transfer-info i {
    margin-right: 6px;
    color: #6c757d;
}

/* Usage summary toggle button styling */
.usage-summary-toggle {
    background-color: #fff3e0 !important;
    color: #000000 !important;
    border: 1px solid #ffcc80 !important;
    font-size: 11px;
    padding: 6px 8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.usage-summary-toggle:hover {
    background-color: #ffe0b2 !important;
    border-color: #ff9800 !important;
    color: #000000 !important;
}

/* Notes toggle button styling - matches usage summary */
.notes-toggle {
    background-color: #fff3e0 !important;
    color: #000000 !important;
    border: 1px solid #ffcc80 !important;
    font-size: 11px;
    padding: 6px 8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.notes-toggle:hover {
    background-color: #ffe0b2 !important;
    border-color: #ff9800 !important;
    color: #000000 !important;
}

/* Lighter usage entry background */
.usage-entry-background {
    background-color: #f8f9fa !important;
    border-left-color: #6c757d !important;
    margin-bottom: 8px !important;
}

/* Project section spacing */
.w3-card.w3-padding-small.w3-margin-bottom.w3-light-grey.w3-border.w3-border-grey {
    padding-bottom: 20px !important;
}

/* Home Screen Shortcut Button Styling */
#homeScreenShortcutBtn, #homeScreenShortcutBtnMobile {
    background-color: #6c757d !important;
    color: #f8f9fa !important;
    border: 1px solid #5a6268 !important;
    transition: all 0.2s ease !important;
    font-size: 11px !important;
    padding: 6px 8px !important;
    border-radius: 3px !important;
    opacity: 0.8 !important;
}

#homeScreenShortcutBtn:hover, #homeScreenShortcutBtnMobile:hover {
    background-color: #5a6268 !important;
    border-color: #495057 !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
}

#homeScreenShortcutBtn i, #homeScreenShortcutBtnMobile i {
    margin-right: 3px !important;
    font-size: 12px !important;
}

/* Hide desktop button on large screens */
@media (min-width: 993px) {
    #homeScreenShortcutBtn {
        display: none !important;
    }
}

/* Show mobile button only on small/medium screens */
@media (max-width: 992px) {
    #homeScreenShortcutBtnMobile {
        display: inline-block !important;
    }
}

/* Home Screen Shortcut Modal Styling - iOS Focused */
#homeScreenShortcutModal .w3-modal-content {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    border: 1px solid #e0e0e0 !important;
}

#homeScreenShortcutModal .w3-container ol {
    margin: 20px 0 !important;
    padding-left: 24px !important;
}

#homeScreenShortcutModal .w3-container ol li {
    margin-bottom: 12px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

#homeScreenShortcutModal .w3-panel {
    margin: 20px 0 !important;
    border-radius: 8px !important;
}

#homeScreenShortcutModal .w3-button {
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

/* iOS-style colors and styling */
#homeScreenShortcutModal .w3-blue {
    background-color: #007AFF !important;
}

#homeScreenShortcutModal .w3-light-blue {
    background-color: #E3F2FD !important;
    border-color: #2196F3 !important;
}

#homeScreenShortcutModal .w3-border-blue {
    border-color: #2196F3 !important;
}

/* Enhanced Apple icon styling */
#homeScreenShortcutModal .fa-apple {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Pro tips styling */
#homeScreenShortcutModal .w3-panel ul {
    margin: 8px 0 !important;
    padding-left: 20px !important;
}

#homeScreenShortcutModal .w3-panel ul li {
    margin-bottom: 6px !important;
    font-size: 14px !important;
    color: #555 !important;
}

/* Tab styling */
#homeScreenShortcutModal .w3-bar {
    border-bottom: 1px solid #e0e0e0 !important;
}

#homeScreenShortcutModal .tab-button {
    background-color: #f8f9fa !important;
    color: #666 !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

#homeScreenShortcutModal .tab-button:hover {
    background-color: #e9ecef !important;
    color: #333 !important;
}

#homeScreenShortcutModal .tab-button.active {
    background-color: #007AFF !important;
    color: white !important;
    border-bottom: 3px solid #0056b3 !important;
}

#homeScreenShortcutModal .tab-button.active i {
    color: white !important;
}

#homeScreenShortcutModal .tab-content {
    min-height: 300px !important;
}

/* Android-specific colors */
#homeScreenShortcutModal .w3-green {
    background-color: #4CAF50 !important;
}

#homeScreenShortcutModal .w3-light-green {
    background-color: #E8F5E8 !important;
    border-color: #4CAF50 !important;
}

#homeScreenShortcutModal .w3-border-green {
    border-color: #4CAF50 !important;
}

/* Project Selection Modal Styles */
#projectSelectionModal .w3-modal-content {
    max-width: 600px;
    margin: 50px auto;
}

#projectSelectionModal .w3-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

#projectSelectionModal .w3-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

#projectSelectionModal .w3-button {
    margin: 5px;
    min-width: 120px;
}

#projectSelectionModal .w3-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MOBILE NAVIGATION STYLES ===== */
/* Mobile hamburger button */
#mobileHamburger {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1001;
}

#hamburgerBtn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 0;
}

#hamburgerBtn:hover {
    background-color: #333 !important;
}

#hamburgerBtn.active {
    background-color: #d36028 !important;
}

#hamburgerBtn.active i {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

/* Mobile navigation menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: #1a1a1a;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.mobile-nav-menu.show {
    left: 0;
}

/* Mobile nav header */
.mobile-nav-header {
    background-color: #d36028;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.mobile-nav-header span {
    font-size: 18px;
    font-weight: 600;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.mobile-close-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Mobile nav sections */
.mobile-nav-section {
    border-bottom: 1px solid #333;
    padding: 15px 0;
}

.mobile-nav-section .mobile-nav-header {
    background-color: #333;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
}

/* Mobile nav items */
.mobile-nav-item {
    display: flex !important;
    align-items: center;
    padding: 15px 20px !important;
    color: #f0f0f0 !important;
    text-decoration: none !important;
    border: none !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: left !important;
}

.mobile-nav-item:hover {
    background-color: #333 !important;
    color: white !important;
    transform: translateX(5px);
}

.mobile-nav-item.active {
    background-color: #d36028 !important;
    color: white !important;
    border-left: 4px solid #fff !important;
}

/* Jobs Grid Layout */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
    margin-right: 120px; /* Space for the Add Project button */
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
        margin-right: 100px; /* Slightly less space on tablets */
    }
}

@media (max-width: 480px) {
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.job-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.job-card h4 {
    margin: 0 0 15px 0;
    word-wrap: break-word;
    line-height: 1.3;
}

.job-card .btnViewJob {
    margin-top: auto;
}

.mobile-nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Responsive breakpoints */
@media (max-width: 1000px) {
    #mainNavMenu {
        display: none !important;
    }
    
    #mobileHamburger {
        display: block !important;
    }
    
    .mobile-nav-menu {
        width: 280px;
        left: -100%;
    }
}

@media (max-width: 600px) {
    .mobile-nav-menu {
        width: 100%;
    }
}

@media (min-width: 1001px) {
    #mobileHamburger {
        display: none !important;
    }
    
    .mobile-nav-menu {
        display: none !important;
    }
}

/* ===== MOBILE EQUIPMENT CARDS ===== */
/* Custom breakpoint for equipment cards - show cards below 860px instead of 600px */
@media (max-width: 860px) {
    .equipment-table-view {
        display: none !important;
    }
    
    .equipment-card-view {
        display: block !important;
    }
}

@media (min-width: 861px) {
    .equipment-table-view {
        display: block !important;
    }
    
    .equipment-card-view {
        display: none !important;
    }
}

.equipment-cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
}

.equipment-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.equipment-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.equipment-card-header {
    background: #f8f9fa;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.equipment-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.equipment-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equipment-card-badge.job-purchase {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.equipment-card-badge.maintenance {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.equipment-card-content {
    padding: 16px;
}

.equipment-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.equipment-card-row:last-child {
    border-bottom: none;
}

.equipment-card-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
    min-width: 80px;
}

.equipment-card-value {
    color: #333;
    font-size: 14px;
    text-align: right;
    flex: 1;
    margin-left: 12px;
    word-break: break-word;
}

.equipment-card-actions {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.equipment-card-actions .btnView {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.equipment-card-actions .btnView:hover {
    background-color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Responsive adjustments for medium screens (around 860px breakpoint) */
@media (max-width: 860px) and (min-width: 600px) {
    .equipment-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        padding: 20px 0;
    }
    
    .equipment-card {
        margin: 0;
    }
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    .equipment-cards-container {
        padding: 8px 0;
        gap: 12px;
    }
    
    .equipment-card {
        border-radius: 6px;
        margin: 0 8px;
    }
    
    .equipment-card-header,
    .equipment-card-content,
    .equipment-card-actions {
        padding: 12px;
    }
    
    .equipment-card-title {
        font-size: 16px;
    }
    
    .equipment-card-label {
        font-size: 13px;
        min-width: 70px;
    }
    
    .equipment-card-value {
        font-size: 13px;
    }
}

/* Back Charge Report Table */
#backChargeTable th {
  background-color: #f5f5f5 !important;
  font-weight: bold !important;
  text-align: center !important;
  vertical-align: middle !important;
}

#backChargeTable td {
  vertical-align: top !important;
  padding: 8px !important;
}

#backChargeTable .equipment-info {
  line-height: 1.4 !important;
}

#backChargeTable .usage-info {
  text-align: center !important;
}

#backChargeTable .user-info {
  line-height: 1.3 !important;
}

/* Equipment Checked Out Section Styles */
.equipCheckOutDate {
    font-size: 0.9em;
    color: #666;
}

.equipNotes {
    max-width: 200px;
    word-wrap: break-word;
}

.equipUser a {
    color: #2196F3;
    text-decoration: none;
}

.equipUser a:hover {
    text-decoration: underline;
}

/* Blue header for checked out equipment */
.w3-blue.w3-padding {
    background-color: #2196F3 !important;
    color: white !important;
}

/* Collapsible section styles */
.collapsible-header {
    transition: background-color 0.3s ease;
}

.collapsible-header:hover {
    opacity: 0.9;
}

.collapsible-content {
    display: block; /* Open by default */
}

/* Font Awesome icon styles */
.fa-chevron-down, .fa-chevron-right {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

/* Hover effects for collapsible headers */
.w3-hover-light-blue:hover {
    background-color: #1976D2 !important;
}

.w3-hover-light-orange:hover {
    background-color: #F57C00 !important;
}

.w3-hover-light-green:hover {
    background-color: #388E3C !important;
}
/* Equipment summary cards */
.equipment-summary-card {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.equipment-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.equipment-summary-card h4 {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: bold;
}

.equipment-summary-card strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.summary-total {
  background-color: #e3f2fd;
  border-color: #2196f3;
}

.summary-total h4 {
  color: #1976d2;
}

.summary-used {
  background-color: #e8f5e8;
  border-color: #4caf50;
}

.summary-used h4 {
  color: #2e7d32;
}

.summary-not-used {
  background-color: #fff3e0;
  border-color: #ff9800;
}

.summary-not-used h4 {
  color: #f57c00;
}

/* Responsive adjustments for summary cards */
@media (max-width: 768px) {
    .equipment-summary-card {
        margin-bottom: 10px;
        padding: 8px;
    }
    
    .equipment-summary-card h4 {
        font-size: 18px;
        margin: 0 0 3px 0;
    }
    
    .equipment-summary-card strong {
        font-size: 10px;
    }
}

/* Equipment usage states */
.equipment-usage-summary {
    background-color: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.equipment-usage-summary h5 {
    color: #2e7d32;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.usage-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.usage-stat {
    flex: 1;
    min-width: 120px;
}

.usage-stat strong {
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usage-stat .stat-value {
    color: #4caf50;
    font-size: 18px;
    font-weight: bold;
    margin-top: 5px;
    display: block;
}

.usage-stat .stat-date {
    color: #777;
    font-size: 12px;
    margin-top: 3px;
    display: block;
}

.add-more-use-btn {
    margin-top: 15px;
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.add-more-use-btn:hover {
    background-color: #1976d2;
}

.add-more-use-btn i {
    margin-right: 5px;
}

/* Equipment check-in button within usage summary */
.equipment-usage-summary .equipButtons {
    display: inline-block;
}

.equipment-usage-summary .summary-checkin-btn {
    padding: 6px 16px;
    font-size: 14px;
    min-width: 100px;
    max-width: 120px;
}

/* Checked-in status label */
.checked-in-label {
    display: inline-block;
    padding: 6px 12px;
    background-color: #4caf50;
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.checked-in-label i {
    margin-right: 4px;
}

.checked-in-label small {
    font-size: 11px;
    opacity: 0.9;
}

/* Equipment status indicators - consistent styling for both states */
.equipment-status-indicator {
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    border: none;
    cursor: default;
    user-select: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.equipment-status-used {
    background-color: #4caf50;
    color: white;
}

.equipment-status-not-used {
    background-color: #ff9800;
    color: white;
}

/* Past date equipment styling */
.past-date-equipment {
    border-left: 4px solid #2196f3;
}

.past-date-equipment .equipment-header {
    background-color: #e3f2fd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.past-date-equipment .date-indicator {
    color: #1976d2;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

/* Loading states */
.equipment-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.equipment-loading img {
    margin-bottom: 15px;
}

.equipment-loading strong {
    font-size: 16px;
    color: #333;
}

/* Error states */
.equipment-error {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    margin: 20px 0;
}

.equipment-error strong {
    font-size: 16px;
    color: #c62828;
    margin-bottom: 10px;
    display: block;
}

.btnPin {
    padding: 2px 4px !important;
    width: 40px !important;
}

/* Responsive adjustments for equipment details */
@media (max-width: 768px) {
    .usage-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .usage-stat {
        min-width: auto;
    }
    
    .equipment-status-used,
    .equipment-status-not-used {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Modern Permissions Interface - Compact */
.permission-group-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

.permission-group-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.permission-group-header {
    background: linear-gradient(135deg, #d36028 0%, #b8541f 100%);
    transition: all 0.3s ease;
    padding: 12px 16px;
}

.permission-group-header:hover {
    background: linear-gradient(135deg, #b8541f 0%, #9e4a1c 100%);
}

.permission-group-header h3 {
    font-size: 16px;
    margin: 0;
}

.permission-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 16px;
}

.permission-category {
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.permission-category:hover {
    border-color: #d36028;
    box-shadow: 0 1px 4px rgba(211, 96, 40, 0.1);
}

.permission-category-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 8px 12px;
}

.permission-main-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.permission-main-label input[type="checkbox"] {
    margin-right: 8px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    top: 0px;
    position: relative;
}

.permission-sub-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 4px 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    font-size: 12px;
}

.permission-sub-label:hover {
    background-color: #fff3e0;
}

.permission-sub-label input[type="checkbox"] {
    margin-right: 6px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    top: 0px;
    position: relative;
}

.permission-subcategory {
    background-color: #fafbfc;
    border-top: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    padding: 6px 8px;
}

.permissions-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.permission-group-content {
    padding: 12px;
}

/* Responsive improvements for permissions */
@media (max-width: 768px) {
    .permission-sub-label {
        font-size: 11px;
        padding: 3px 4px;
    }
    
    .permission-main-label {
        font-size: 13px;
    }
    
    .permission-group-header h3 {
        font-size: 14px;
    }
    
    .permission-group-header {
        padding: 10px 12px;
    }
    
    .permission-category-header {
        padding: 6px 8px;
    }
}

/* Checkbox styling improvements */
input[type="checkbox"].w3-check {
    accent-color: #d36028;
}

/* Button improvements */
.w3-button.w3-round {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.w3-button.w3-round:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* User Groups Accordion */
.user-groups-cell {
    position: relative;
    min-width: 120px;
}

.user-groups-toggle {
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
    padding: 4px 8px;
}

.user-groups-toggle:hover {
    background-color: #e0e0e0;
}

.user-groups-toggle i {
    transition: transform 0.2s ease;
    font-size: 10px;
}

.user-groups-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    max-width: 300px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    margin-top: 2px;
}

.user-groups-dropdown > div {
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.user-groups-dropdown > div:last-child {
    border-bottom: none;
}

.user-groups-dropdown > div:hover {
    background-color: #f8f9fa;
}

.user-groups-dropdown i {
    color: #666;
    font-size: 11px;
}

/* ===== ADD USE MODAL STYLES ===== */
.add-use-modal-content {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.add-use-modal-header {
  padding-top: 18px;
  padding-bottom: 18px;
}

.add-use-modal-header h3 {
  margin: 0;
}

.add-use-modal-header #auName {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 400;
}

.add-use-modal-body {
  padding: 24px;
  background: #fff;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.add-use-field-group {
  margin-bottom: 18px;
}

.add-use-user-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.add-use-user-row .add-use-field {
  flex: 1 1 260px;
  min-width: 220px;
}

.add-use-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.add-use-helper-text {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
}

.add-use-user-results {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 10px;
}

.add-use-project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.add-use-project-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.add-use-project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: #fff7e6;
}

.add-use-project-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #444;
}

.add-use-project-name {
  font-size: 15px;
}

.add-use-project-company {
  font-size: 13px;
  color: #666;
}

.add-use-project-card-badge {
  font-size: 12px;
  color: #d35400;
  font-weight: 600;
}

.add-use-project-card-body {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fff;
}

.add-use-project-card-loading,
.add-use-project-card-empty {
  text-align: center;
  font-size: 13px;
  color: #666;
}

.add-use-cost-code-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-use-cost-code-option {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.add-use-cost-code-option:hover {
  border-color: #ff9800;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.15);
}

.add-use-cost-code-option.selected {
  border-color: #ff9800;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.25);
  background: #fffaf2;
}

.add-use-cost-code-primary {
  font-size: 14px;
  color: #333;
}

.add-use-cost-code-secondary {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.add-use-selection-summary {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  font-size: 13px;
}

.add-use-selection-summary.add-use-selection-error {
  border-color: #f44336;
  background: #fdecea;
  color: #c62828;
}

.add-use-usage-inputs .w3-input,
.add-use-usage-inputs .w3-select {
  background: #fff;
}

.add-use-notes-field textarea {
  min-height: 80px;
  resize: vertical;
}

.add-use-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.add-use-empty-state {
  padding: 16px;
  text-align: center;
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .add-use-modal-body {
    padding: 16px;
  }

  .add-use-project-list {
    max-height: none;
  }

  .add-use-actions {
    justify-content: center;
  }
}
