.navbar-brand-box {
  text-align: center;
}

.navbar-header .dropdown.show .header-item.initial-dropdown, .initial-dropdown {
  width: 40px;
  height: 40px;
  background: #fc9414;
  color: white;
  border-radius: 15%;
  font-size: 14px;
  line-height: 0px;
}

.header-item.initial-dropdown:hover {
  color: white;
  background: #252b3b !important;
}

.navbar-header .dropdown-item:hover, 
.navbar-header .dropdown-item:focus {
  color: #ffffff;
  text-decoration: none;
  background-color: #252b3b;
}

.navbar-header .dropdown-item.text-danger:hover, 
.navbar-header .dropdown-item.text-danger:focus {
  color: #ffffff !important;
  text-decoration: none;
  background-color: #ff3d60 !important;
}

.page-item.active .page-link {
  color: #fff;
  background-color: #fc9414;
  border-color: #fc9414;
}

body[data-sidebar=dark] #sidebar-menu ul li a:hover,
body[data-sidebar=dark] #sidebar-menu ul li a:hover i,
body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu li a:hover {
  color: #fc9414;
}

.media {
  display: flex;
  align-items: flex-start;
}

.media-body {
  flex: 1;
}

/* Hide empty table structure when no data */
.dataTables_wrapper table.dataTable tbody tr.dataTables_empty td {
    border: none !important;
    padding: 2rem !important;
    text-align: center !important;
}

/* Hide thead when table has empty row - CSS approach (modern browsers) */
.dataTables_wrapper table.dataTable:has(tbody tr.dataTables_empty) thead {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.dataTables_wrapper table.dataTable:has(tbody tr.dataTables_empty) thead tr,
.dataTables_wrapper table.dataTable:has(tbody tr.dataTables_empty) thead th {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Hide thead when table is empty - using JavaScript approach */
.dataTables_wrapper table.dataTable thead.hidden-empty {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.dataTables_wrapper table.dataTable thead.hidden-empty tr,
.dataTables_wrapper table.dataTable thead.hidden-empty th {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Make empty message span full width */
.dataTables_wrapper table.dataTable tbody tr.dataTables_empty td {
    display: block !important;
    width: 100% !important;
    position: relative;
}

/* Hide other columns in empty row */
.dataTables_wrapper table.dataTable tbody tr.dataTables_empty td:not(:first-child) {
    display: none !important;
}

/* Ensure first column spans full width */
.dataTables_wrapper table.dataTable tbody tr.dataTables_empty td:first-child {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    border: none !important;
    padding: 2rem !important;
    position: relative;
}

/* Hide table structure when showing empty message */
.dataTables_wrapper table.dataTable tbody:has(tr.dataTables_empty:only-child) {
    display: block;
}

.dataTables_wrapper table.dataTable tbody:has(tr.dataTables_empty:only-child) tr.dataTables_empty {
    display: block;
    width: 100%;
}

/* Standardize all form input heights (excluding textareas and checkboxes) */
.form-control:not(textarea):not([type="checkbox"]):not([type="radio"]),
.form-select {
    height: 38px !important;
    width: 100%;
}

/* Ensure Select2 dropdowns match standard input height */
.select2-container .select2-selection--single {
    height: 38px !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

/* Invoice Preview Styles */
.invoice-preview {
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.invoice-header {
    border-bottom: 3px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.invoice-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.invoice-info {
    margin-bottom: 30px;
}

.invoice-info-row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.invoice-info-cell {
    flex: 1;
}

.invoice-info-cell h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.invoice-info-cell p {
    margin: 5px 0;
    font-size: 12px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-table th,
.invoice-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.invoice-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.invoice-table .text-right {
    text-align: right;
}

.invoice-table .text-center {
    text-align: center;
}

.invoice-summary {
    margin-top: 20px;
    margin-left: auto;
    width: 300px;
}

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

.invoice-summary-row.total {
    font-weight: bold;
    font-size: 16px;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    padding: 12px 0;
    margin-top: 10px;
}

.notes-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 3px solid #333;
}

.notes-section h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

/* Mechanic Row Hover Effect */
.mechanic-row:hover {
    background-color: #f8f9fa;
}

input.form-control:not(textarea):not([type="checkbox"]):not([type="radio"]).auth-input {
    height: 50px !important;
}

/* Apply styles to all multi-select containers */
.select2-selection--multiple {
    height: 38px;
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px;
    margin: 0;
}

.select2-selection__choice {
    padding: 2px;
    line-height: normal;
}

.select2-container--default .select2-selection--multiple li.select2-selection__choice {
    background-color: #F5F5F5 !important;
}

.select2-container--default .select2-selection--multiple li.select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    margin: 0 5px 0 0 !important;
}

.select2-search--inline .select2-search__field {
    margin: 5px 0;
    padding: 2px;
    line-height: normal;
}