﻿body {
  //padding-top: 50px;
  //padding-bottom: 20px;
  font-size: 0.9rem !important;
}
.form-control {
  min-height: 44px !important;
}
.btn_custom {
  height: 40px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
.select2-selection {
  min-height: 44px !important;
}
.select2-container {
  width: 11rem;
}
@media (min-width: 576px) {
  .qvLineitem.modal-lg {
    max-width: 29rem !important;
  }
}

@media (min-width: 992px) {
  .qvLineitem.modal-lg {
    max-width: 70rem !important;
  }
}
.ck-editor__editable {
  min-height: 200px; /* adjust rows/height */
}

/* Set padding to keep content from hitting the edges */
/*.body-content {
    padding-left: 15px;
    padding-right: 15px;
}*/
/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
/*.dl-horizontal dt {
    white-space: normal;
}*/
/* Set width on the form input elements since they're 100% wide by default */
/*input,
select,
textarea {
    max-width: 280px;
}*/
.select2-container .select2-selection--single .select2-selection__rendered {
  margin-left: 10px; /* Pushes the text to the center */
  margin-top: 2px;
}
.photomodal-boday {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
  justify-content: center;
  text-align: center;
  overflow: hidden; /* Prevent content overflow */
}

.modal-body img {
  max-width: 90%; /* Constrain the image width */
  max-height: 60vh; /* Constrain the image height */
  margin: auto; /* Center the image */
  display: block; /* Ensure the image behaves as a block-level element */
  position: relative; /* Ensure it does not overlap anything */
}

.photomodal-footer {
  display: flex;
  justify-content: center; /* Center the buttons */
  gap: 15px; /* Add spacing between buttons */
  padding-top: 10px;
  border-top: 1px solid #ddd; /* Separate buttons visually from the image */
}
.modal-body img {
  cursor: grab; /* Indicate that the photo is draggable */
  position: relative; /* Needed for dragging */
}

.modal-body img:active {
  cursor: grabbing; /* Change cursor when dragging */
}
/*.modal-footer button {
        padding: 10px 15px;
        font-size: 14px;
        white-space: nowrap;*/ /* Prevent button text from wrapping */
/*}*/

.is-invalid1 {
  border-color: #dc3545 !important;
}
.is-valid1 {
  border-color: #28a745 !important;
}
.dataTables_filter input {
  width: 50px;
}
.text-right {
  text-align: right;
}
label.is-invalid {
  display: none !important;
}

.dtClear {
  margin-left: inherit !important;
  width: inherit !important;
}
.checkbox input[type="checkbox"]:focus + label::before,
.checkbox input[type="checkbox"]:focus + input[type="hidden"] + label::before,
.checkbox input[type="radio"]:focus + label::before {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

.alink:hover {
  text-decoration: underline;
}
.alink:visited {
  color: #4578cf;
}
/* Spinner */
.spinner {
  width: 50px;
  height: 50px;
  display: inline-block;
  padding: 0px;
  border-radius: 100%;
  border: 6px solid;
  border-top-color: #005a9c;
  border-bottom-color: #005a9c;
  border-left-color: rgba(0, 90, 156, 0.15);
  border-right-color: rgba(0, 90, 156, 0.15);
  -webkit-animation: spinner 0.8s ease-in-out infinite alternate;
  animation: spinner 0.8s ease-in-out infinite alternate;
}

@keyframes spinner {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@-webkit-keyframes spinner {
  from {
    -webkit-transform: rotate(0deg);
  }

  to {
    -webkit-transform: rotate(360deg);
  }
}

/*.pagination .page-item.active .page-link {
    background-color: #007bff;
    color: #fff;
}*/

/*.is-invalid .select2-container--default {
    border: 1px solid #a94442;
    border-radius: 4px;
}*/

.menu_border {
  border-bottom: 0.5px solid white;
  border-top: 0.5px solid white;
}
.menu_border:hover {
  background-color: #33384c;
}

.menu-item.menu_border.active {
  background-color: #33384c;
}

#dt_tab thead {
  position: sticky;
  top: 61px;
}

.comment_badge.badge {
  position: absolute;
  top: 4px;
  padding: 3px;
  width: 17px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  border-radius: 100px;
  -webkit-border-radius: 100px;
}
.wrapper .page-wrap .main-content .page-header {
  margin-bottom: 6px !important;
}
.previous {
  width: 100px;
}
.next {
  width: 100px;
}

.pagination .page-item.active .page-link {
  background-color: #007bff !important;
  color: #fff !important;
}

.is-invalid1 .select2-selection,
.needs-validation ~ span > .select2-dropdown {
  border-color: #dc3545 !important;
}

.is-valid1 .select2-selection,
.needs-validation ~ span > .select2-dropdown {
  border-color: #28a745 !important;
}

/*yahan sy*/

.select2-search__field {
  margin-top: 10px !important;
  /*margin-left: 10px !important;*/
}

/*@media screen and (max-width: 531px) {
    .headerButtons {*/
/*display: flex;
        flex-flow: column-reverse;*/
/*margin-top:2px !important;
    }
}*/
@media screen and (max-width: 480px) {
  .headerSearchTxt {
    /*display: flex;
        flex-flow: column-reverse;*/
    /*margin-top: 2px !important;*/
    width: 375px;
  }
  .primary_heading_fs {
    font-size: 1.3rem;
  }
  .secondary_heading_fs {
    font-size: 1rem;
  }
}
@media only screen and (min-width: 1023px) {
  .wrapper .header-top {
    padding: 8px 0 8px 240px !important;
  }
}
@media only screen and (min-width: 1440px) {
  .overflow_X_None {
    overflow-x: hidden !important;
  }
}

.wrapper .header-top {
  padding: 0 8px;
}

.container-fluid {
  padding: 0px 15px !important;
}

/*.select2-selection {
    margin-left: 4px !important;
}

.select2-search__field {
    margin-top: 5px !important;
    padding: 0 6px 0 8px !important;
}

.select2-selection__rendered {
    padding: 0px !important;
}
*/
#userDropdown {
  padding-right: 15px !important;
}
.tblInvoiceLineItems {
  width: 100%;
  min-width: 1200px;
}

td {
  vertical-align: top !important;
}
.form-control {
  border: 1px solid #070606 !important;
}
.form-control.is-invalid {
  border-color: #dc3545 !important;
}
.form-control.is-valid {
  border-color: #28a745 !important;
}

.wide-dropdown {
  width: 250px !important; /* Adjust width as needed */
}
.select2-container--default .select2-selection--single {
  border: 1px solid #007bff; /* Set border color */
  border-radius: 4px; /* Set border radius */
  height: calc(2.25rem + 2px); /* Match the height to Bootstrap */
  padding: 0.375rem 0.75rem; /* Adjust padding */
}
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 2.25rem; /* Center the text vertically */
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 100%; /* Ensure the arrow is centered */
  right: 10px; /* Position the arrow */
}

.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #6c757d; /* Placeholder text color */
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: transparent transparent #007bff transparent; /* Arrow color */
}

.select2-selection.select2-selection--multiple,
.select2-selection.select2-selection--single {
  border: 1px solid black !important;
  padding-left: 2px !important;
}

.select2.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 26px !important;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  top: 4px !important;
}

.select2.select2-container--default
  .select2-selection--multiple
  .select2-selection__rendered {
  margin-top: 4px !important;
}

.select2.select2-container.select2-container--default {
  width: 100% !important;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu:hover .dropdown-menu {
  display: block;
}

/* Hide "tblAssetForMobile" on screens wider than 768px (desktop) */
@media (min-width: 768px) {
  #tblAssetForMobile,
  #tblFollowersForMobile,
  #tblHistoryForMobile,
  #tblEmailHistoryForMobile,
  #tblTimeLogForMobile,
  #inspectionTableForMobile,
  #tblServiceOrdersForMobile,
  #tblCommentsForMobile,
  #tblCostForMobile,
  #tblPartsForMobile,
  #tblAllPictureForMobile,
  #tblAllDocsForMobile,
  #tblTasksForMobile {
    display: none;
  }
  .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -5px;
    margin-left: 0;
    display: none;
  }
}

/* Hide "tblAsset" on screens smaller than 768px (mobile) */
@media (max-width: 767px) {
  #WOtblAsset,
  #tblFollowers,
  #tblHistory,
  #tblEmailHistory,
  #tblTimeLog,
  #inspectionTable,
  #tblServiceOrders,
  #tblComments,
  #tblCost,
  #tblParts,
  #tblAllPicture,
  #tblAllDocs,
  #tblTasks {
    display: none;
  }
  .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: 25px;
    margin-left: -80px;
    display: none;
  }
}

.card .card-body .dataTables_wrapper .form-control {
  background-color: #ffff !important;
}

.fixed-WO-card {
  position: fixed !important;
  top: 60px;
  z-index: 1000;
  background: #f6f7fb;
  padding-top: 2rem;
  padding-bottom: 1rem;
}
/* General Link Styling */
.link-style {
  color: #007bff;
  font-weight: 500;
  text-decoration: none;
}

.link-style:hover {
  text-decoration: underline;
}

/* Copy Button Styling */
.copy-link {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: #495057;
  padding: 5px 8px;
  font-size: 14px;
  margin-left: 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.copy-link:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* Copied State */
.copy-link.copied {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}
/* Sidebar Styling*/
.wrapper .page-wrap .app-sidebar.colored .sidebar-content {
  background-color: #263f6c !important;
}

.wrapper
  .page-wrap
  .app-sidebar.colored
  .sidebar-content
  .nav-container
  .navigation-main
  .nav-item
  a
  i {
  color: #ffffff !important;
}

.nav-item.active,
.nav-item.open,
.nav-item.has-sub.open {
  background-color: #0663b3 !important;
}

.nav-item.has-sub.open .submenu-content .nav-item.has-sub.open {
  background-color: #004784 !important;
}

.wrapper
.page-wrap
.app-sidebar.colored
.sidebar-content
.nav-container
.navigation-main
.nav-item.open::after,
.wrapper
.page-wrap
.app-sidebar.colored
.sidebar-content
.nav-container
.navigation-main
.nav-item.active::after {
    width: 4px;
    height: 35px;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%) !important; /* Override old red */
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
    z-index: 1;
}

.menu-item.menu_border.active {
  background-color: #33384c !important;
  color: #da2b18 !important;
}

.wrapper
.page-wrap
.app-sidebar.colored
.sidebar-content
.nav-container
.navigation-main
.submenu-content
.nav-item.has-sub.open
.submenu-content {
    /*background-color: #071725 !important;*/
}

.nav-item.has-sub .submenu-content .menu-item.active {
  color: white !important;
  font-weight: 700;
  background-color: #6c757d;
}

.wrapper
  .page-wrap
  .app-sidebar.colored
  .sidebar-content
  .nav-container
  .navigation-main
  .nav-item
  .submenu-content {
  background-color: #142a51 !important;
}

.workorder_detail {
  margin-top: 12rem;
}

@media (max-width: 768px) {
  .workorder_detail {
    margin-top: 15rem;
  }
}

#board {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 20px;
  padding: 10px;
}

.ItemColumn {
  flex: 0 0 260px;
  background-color: #f4f4f4;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.itemColum-Header {
  padding: 10px;
  border-radius: 4px 4px 0 0;
  color: white;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

.item-column-content {
  padding: 10px;
  max-height: 70vh;
  overflow-y: auto;
}

.item-card {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.wo-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 15px;
  color: #2c3e50;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.card .nav-pills.custom-pills .nav-link {
  padding: 12px 10px !important;
}

.wo-id {
  color: #2980b9;
}

.wo-date {
  font-size: 13px;
  color: #999;
}

.simple-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
}

.simple-line {
  font-size: 15px;
  color: #2c3e50;
  line-height: 1.4;
  font-weight: 500;
  white-space: pre-wrap;
  word-break: break-word;
}

.description-line {
  font-size: 14px;
  color: #6c757d;
  font-style: italic;
}
.wo-footer {
  margin-top: 12px;
  text-align: right;
}

.view-details-btn {
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.view-details-btn:hover {
  background-color: #e9f2ff;
  color: #0056b3;
}

@media (max-width: 768px) {
  #board {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    gap: 16px;
  }

  .ItemColumn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 400px; /* or any height you prefer */
  }

  .item-column-content {
    max-height: none;
    overflow-y: visible;
  }

  .mobile-action-buttons {
    margin-top: 0rem;
  }
}
@media (max-width: 900px) {
  .mobile-workorder-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    min-height: 100vh;
  }

  /* Simple White Header */
  .mobile-header-simple {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
  }

  .header-back-button {
    margin-bottom: 1rem;
  }

  .header-back-button .btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }

  .work-order-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    line-height: 1.3;
  }

  .status-indicator {
    display: flex;
    justify-content: flex-start;
  }

  .status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem;
    border-radius: 25px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 0.9rem;
  }

  .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
  }

  .status-text {
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
  }

  /* Info Cards */
  .mobile-info-cards {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .mobile-info-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f1f3f4;
  }

  .card-header-mobile {
    background: #f8f9fa;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #e9ecef;
  }

  .card-icon {
    font-size: 1.5rem;
  }

  .card-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0rem !important;
  }

  .card-content-mobile {
    padding: 1.25rem;
  }

  .info-row-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f8f9fa;
  }

  .info-row-mobile:last-child {
    border-bottom: none;
  }
  .info-row-mobile.no-space-between {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .info-row-mobile.no-space-between .label-mobile {
    margin-bottom: 0.2rem; /* Tighten spacing */
  }

  .info-row-mobile.no-space-between .value-mobile {
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default padding */
    line-height: 1.5; /* Keep text readable */
  }
  .label-mobile {
    font-weight: 700;
    color: #6c757d;
    font-size: 0.95rem;
  }

  .value-mobile {
    font-weight: 500;
    color: #6c6c6c;
    font-size: 0.95rem;
    text-align: right;
  }
  .value-mobile.align-left {
    text-align: left !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .location-info-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .location-name-mobile {
    font-size: 1.1rem;
    color: #6c6c6c;
    margin-bottom: 0.5rem;
  }

  .location-address-mobile,
  .location-city-mobile {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .contact-info-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-name-mobile {
    font-size: 1.1rem;
    color: #6c6c6c;
    margin-bottom: 0.5rem;
  }

  .contact-phone-mobile,
  .contact-email-mobile {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .contact-icon {
    font-size: 1rem;
  }

  .managed-service-mobile {
    margin: 0;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .text-muted-mobile {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 1rem;
  }

  /* Accordion Tabs */
  .mobile-accordion-tabs {
    padding: 0 1rem;
    margin-bottom: 2rem;
  }

  .accordion-tab {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid #f1f3f4;
  }

  .tab-header-mobile {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e9ecef;
  }

  .tab-header-mobile:hover {
    background: #e9ecef;
  }

  .tab-header-mobile.active {
    background: #e3f2fd;
    border-bottom: none;
  }

  .tab-icon {
    font-size: 1.2rem;
  }

  .tab-title {
    flex: 1;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
  }

  .tab-arrow {
    font-size: 1rem;
    color: #6c757d;
    transition: transform 0.2s ease;
  }

  .tab-header-mobile.active .tab-arrow {
    transform: rotate(180deg);
  }

  .tab-content-mobile {
    display: none;
    padding: 1.25rem;
    background: white;
  }

  .tab-content-mobile.active {
    display: block;
  }

  .tab-section-mobile {
    margin-bottom: 1.5rem;
  }

  .tab-section-mobile:last-child {
    margin-bottom: 0;
  }

  .section-title-mobile {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
  }

  .section-content-mobile {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
  }

  .description-text-mobile {
    margin: 0;
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
  }

  .section-header-with-action-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }

  .section-header-with-action-mobile .section-title-mobile {
    margin: 0;
  }

  .mobile-action-btn {
    background: #007bff;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .btn-icon {
    font-size: 1rem;
    width: 30px !important;
    line-height: 30px !important;
  }
  .btn-icon1 {
    font-size: 1rem;
  }
  .info-grid-mobile {
    display: grid;
    gap: 0.75rem;
  }

  .info-item-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
  }

  .comments-list-mobile,
  .costs-list-mobile,
  .parts-list-mobile,
  .documents-list-mobile,
  .service-orders-list-mobile,
  .email-history-list-mobile,
  .assets-list-mobile,
  .followers-list-mobile,
  .inspections-list-mobile,
  .time-log-list-mobile,
  .history-list-mobile {
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
  }

  .photos-grid-mobile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  /* Responsive adjustments */
  @media (max-width: 480px) {
    .mobile-header-simple {
      padding: 1rem 0.75rem;
    }

    .work-order-title {
      font-size: 1.5rem;
    }

    .mobile-info-cards {
      padding: 0 0.75rem;
    }

    .mobile-accordion-tabs {
      padding: 0 0.75rem;
    }

    .card-header-mobile,
    .tab-header-mobile {
      padding: 10px;
    }

    .card-content-mobile,
    .tab-content-mobile {
      padding: 1rem;
    }

    .tab-title {
      font-size: 1rem;
    }
  }
}

/* Hide mobile styles on desktop */
@media (min-width: 901px) {
  .mobile-workorder-container {
    display: none;
  }
}
.mobile-action-buttons {
  margin-top: 0rem;
}
.action-buttons-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mobile-action-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 80px;
}

.mobile-dropdown {
  position: relative;
}

.mobile-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  min-width: 200px;
}

.mobile-dropdown-menu .dropdown-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f8f9fa;
  color: #495057;
  font-size: 0.9rem;
  cursor: pointer;
}

.mobile-dropdown-menu .dropdown-item:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.mobile-dropdown-menu .dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  position: absolute;
  left: 100%;
  top: 0;
  margin-top: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
}

.dropdown-submenu:hover .dropdown-menu {
  display: block;
}
.email-history-card {
  transition: box-shadow 0.2s ease;
}

.email-history-card:hover {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}
.btn-block {
  display: block;
  width: 50% !important;
}
@media (max-width: 768px) {
  .dropdown-submenu .dropdown-menu {
    left: auto !important;
    right: 100% !important;
    top: 0;
    z-index: 1050 !important; /* Make sure it's above the main menu */
    min-width: 200px;
    width: max-content;
    white-space: normal;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
  }

  .dropdown-submenu .dropdown-menu .dropdown-item {
    width: 100%;
    white-space: normal;
    display: block;
  }

  /* Fix for parent to allow child to overflow properly */
  .dropdown-menu {
    overflow: visible !important;
  }

  .dropdown-submenu {
    position: relative;
  }
}
/* Base Button */
.hamburger-btn {
  width: 48px;
  height: 48px;
  background-color: #ffffff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hamburger-btn:hover {
  background-color: #f8f9fa;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Hamburger Lines */
.hamburger-line {
  width: 22px;
  height: 2px;
  background-color: #333;
  border-radius: 1px;
}

.wrapper .header-top .top-menu .mobile-nav-toggle span {
  top: 22px !important;
  left: 13px !important;
}
/* Wrapper for the tabs */
.custom-tabs-wrapper {
  position: relative;
}

.custom-cost-tabs {
  border-bottom: 2px solid #e5e5e5; /* Light divider */
  background-color: transparent;
}

/* Tab link style - clean, readable */
.custom-cost-tabs .nav-link {
  color: #555;
  font-weight: 500;
  border: none;
  background-color: transparent;
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

/* Hover effect - underline animation */
.custom-cost-tabs .nav-link:hover {
  color: #000;
  background-color: transparent;
  border-bottom: 2px solid #17c1e8;
}

/* Active tab - bold with underline */
.custom-cost-tabs .nav-link.active {
  color: #17c1e8;
  font-weight: 600;
  background-color: transparent;
  border-bottom: 2px solid #17c1e8;
}

/* Smooth tab pane animation */
.custom-tab-pane {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 575.98px) {
  /* ===== Invoice header buttons: keep inline and wrap nicely ===== */
  .buttons_Fluid {
    display: flex;
    flex-wrap: wrap; /* allows wrapping on small screens */
    gap: 8px; /* space between buttons */
  }

  .buttons_Fluid .btn {
    margin-right: 0 !important; /* remove inline margin-right */
    flex: 0 1 auto; /* shrink as needed */
  }

  .invoice-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* space between items */
  }

  .invoice-status-row > [class*="col-"] {
    /* phones: two cards per row */
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

/* ===== MODERN SIDEBAR BASE ===== */
.app-sidebar.colored {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.12) !important;
    border-right: 1px solid rgba(59, 130, 246, 0.1) !important;
    position: relative;
}

/* Sidebar Header Enhancement */
.app-sidebar .sidebar-header {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
}

    .app-sidebar .sidebar-header .header-brand {
        color: #ffffff !important;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

/* Sidebar Content Container */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content {
    background: transparent !important;
}

    /* Navigation Container */
    .wrapper .page-wrap .app-sidebar.colored .sidebar-content .nav-container {
        background: transparent;
    }

        /* ===== NAVIGATION ITEMS ===== */
        .wrapper .page-wrap .app-sidebar.colored .sidebar-content
        .nav-container .navigation-main .nav-item {
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

            /* Default link styling */
            .wrapper .page-wrap .app-sidebar.colored .sidebar-content
            .nav-container .navigation-main .nav-item > a {
                color: rgba(226, 232, 240, 0.85) !important;
                display: flex;
                align-items: center;
                gap: 12px;
                border-radius: 10px;
                transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
                font-weight: 500;
                font-size: 14px;
                position: relative;
                overflow: hidden;
            }

                /* Icon styling */
                .wrapper .page-wrap .app-sidebar.colored .sidebar-content
                .nav-container .navigation-main .nav-item > a i {
                    color: rgba(255, 255, 255, 0.9) !important;
                    font-size: 18px;
                    transition: transform 0.3s ease;
                }

            /* Hover effect - LIGHT BLUE TINT (matches theme) */
            .wrapper .page-wrap .app-sidebar.colored .sidebar-content
            .nav-container .navigation-main .nav-item:hover > a {
                background: rgba(59, 130, 246, 0.15) !important;
                color: #ffffff !important;
                transform: translateX(3px);
            }

                .wrapper .page-wrap .app-sidebar.colored .sidebar-content
                .nav-container .navigation-main .nav-item:hover > a i {
                    transform: scale(1.1);
                }

/* ===== ACTIVE STATE ===== */
.nav-item.active,
.nav-item.open,
.nav-item.has-sub.open {
    background: transparent !important;
}

.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .nav-item.active > a,
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .nav-item.open > a {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

/* Active indicator bar */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .nav-item.active::after {
    content: "" !important;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%) !important;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
    z-index: 1;
}

/* ===== SUBMENU STYLING - BLUE THEME ===== */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content {
    background: rgba(59, 130, 246, 0.08) !important;
    backdrop-filter: blur(8px);
    border-radius: 8px;
    border-left: 2px solid rgba(59, 130, 246, 0.25);
    overflow: visible;
}

    /* Submenu items - SMALLER than main menu */
    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .submenu-content .menu-item.menu_border {
        color: rgba(203, 213, 225, 0.9) !important;
        border: none !important;
        border-radius: 6px;
        background: rgb(92 122 173 / 20%);
        font-size: 13px !important;
        font-weight: 500;
        padding-left: 35px !important;
        transition: all 0.2s ease;
        position: relative;
    }

        /* Submenu hover - LIGHT BLUE TINT */
        .wrapper .page-wrap .app-sidebar.colored .sidebar-content
        .nav-container .navigation-main .submenu-content .menu-item.menu_border:hover {
            background: rgba(59, 130, 246, 0.2) !important;
            color: #ffffff !important;
            transform: translateX(4px);
        }

        /* Submenu active item - BRIGHT BLUE (narrower width) */
        .wrapper .page-wrap .app-sidebar.colored .sidebar-content
        .nav-container .navigation-main .submenu-content .menu-item.menu_border.active {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
            color: #ffffff !important;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
            font-weight: 600;
            padding-left: 10px !important;
            width: calc(100% - 20px) !important; /* Adjust 20px to your desired margin */
            margin-left: 15px !important; /* Centers it if width is reduced */
        }

            /* Submenu active indicator (smaller than main menu) */
            .wrapper .page-wrap .app-sidebar.colored .sidebar-content
            .nav-container .navigation-main .submenu-content .menu-item.menu_border.active::before {
                content: "";
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
                width: 0px;
                height: 65% !important;
                background: #60a5fa;
                border-radius: 0 2px 2px 0;
            }

            /* Submenu active indicator */
            .wrapper .page-wrap .app-sidebar.colored .sidebar-content
            .nav-container .navigation-main .submenu-content .menu-item.menu_border.active::before {
                content: "";
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
                width: 3px;
                height: 70%;
                background: #60a5fa;
                border-radius: 0 2px 2px 0;
            }

    /* ===== NESTED SUBMENU - INFO COLOR ===== */
    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .submenu-content .nav-item.has-sub > a {
        color: #ffffff !important;
        font-weight: 500;
    }

.nav-item.has-sub.open .submenu-content .nav-item.has-sub.open {
    background: transparent !important;
}

.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content {
    background: rgba(23, 162, 184, 0.1) !important;
    backdrop-filter: blur(8px);
    border-left: 2px solid rgba(23, 162, 184, 0.3);
    border-radius: 8px;
}

        /* Nested submenu hover */
        .wrapper .page-wrap .app-sidebar.colored .sidebar-content
        .nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content .menu-item.menu_border:hover {
            background: rgba(23, 162, 184, 0.25) !important;
            color: #b3e5f0 !important;
        }

/* Nested submenu active - INFO COLOR */
.nav-item.has-sub .submenu-content .menu-item.active {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 12px rgba(23, 162, 184, 0.4);
}

/* Nested submenu active indicator */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content .menu-item.menu_border.active::before {
    background: #4dd0e1;
}

/* ---- Single bordered panel for submenu groups ---- */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .nav-item.has-sub > .submenu-content {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .nav-item.has-sub > .submenu-content .menu-item.menu_border {
        display: flex;
        align-items: center;
        border: 1px solid rgba(59, 130, 246, 0.25) !important;
        border-radius: 0 !important;
        margin: 0 16px !important;
        padding: 10px 14px !important;
        width: calc(100% - 32px) !important;
        position: relative;
    }

    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .nav-item.has-sub > .submenu-content:first-of-type .menu-item.menu_border {
        border-top-left-radius: 10px !important;
        border-top-right-radius: 10px !important;
        margin-top: 8px !important;
    }

    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .nav-item.has-sub > .submenu-content:last-of-type .menu-item.menu_border {
        border-bottom-left-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
    }

    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .nav-item.has-sub > .submenu-content + .submenu-content .menu-item.menu_border {
        border-top: 0 !important;
        margin-top: -1px !important;
    }

/* keep active/hover styles */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .menu-item.menu_border.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35) !important;
    font-weight: 600;
}

/* ===== NESTED SUBMENU - MATCH REGULAR SUBMENU STYLING ===== */
/* Remove individual borders from nested submenu container */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content {
    background: transparent !important;
    border: 0 !important;
    border-left: none !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
    overflow: hidden !important; /* Prevent overflow */
}

    /* Style nested submenu items - INTEGRATED WITH PARENT SECTION */
    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content .menu-item.menu_border {
        display: flex;
        align-items: center;
        border-left: 1px solid rgba(59, 130, 246, 0.25) !important;
        border-right: 1px solid rgba(59, 130, 246, 0.25) !important;
        border-top: none !important;
        border-bottom: none !important;
        border-radius: 0;
        margin: 0 16px 0 24px !important;
        padding: 10px 14px !important;
        width: calc(100% - 40px) !important;
        position: relative;
        color: rgba(203, 213, 225, 0.9) !important;
        background: rgb(126 170 244 / 20%) !important;
        font-size: 13px !important;
        font-weight: 500;
        transition: all 0.2s ease;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

/* First nested submenu item - top border and rounded top corners */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub > .submenu-content:first-of-type .menu-item.menu_border {
    border-top: 1px solid rgba(59, 130, 246, 0.25) !important;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-top: 1px !important;
}

/* Last nested submenu item - bottom border and rounded bottom corners */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub > .submenu-content:last-of-type:not(:has(.nav-item.has-sub)) .menu-item.menu_border,
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content:last-child:not(:has(.nav-item.has-sub)) .menu-item.menu_border {
    border-bottom: 1px solid rgba(59, 130, 246, 0.25) !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Target the actual last .menu-item.menu_border (before any nested .nav-item.has-sub) */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub > .submenu-content:nth-last-child(2) .menu-item.menu_border:not(.nav-item.has-sub .menu-item.menu_border) {
    border-bottom: 1px solid rgba(59, 130, 246, 0.25) !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Ensure middle items have no top/bottom borders */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub > .submenu-content:not(:first-of-type):not(:last-of-type) .menu-item.menu_border {
    border-top: none !important;
    border-bottom: none !important;
}

/* Ensure all middle items have no border-radius */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub > .submenu-content:not(:first-of-type):not(:last-of-type) .menu-item.menu_border,
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub > .submenu-content:not(:first-of-type):nth-last-child(n+3) .menu-item.menu_border {
    border-radius: 0 !important;
}

    /* Remove top border between nested submenu items */
    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content > .submenu-content + .submenu-content .menu-item.menu_border {
        border-top: 2px !important;
        margin-top: -1px !important;
    }

    /* Nested submenu hover - SAME AS REGULAR SUBMENU */
    .wrapper .page-wrap .app-sidebar.colored .sidebar-content
    .nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content .menu-item.menu_border:hover {
        background: rgba(59, 130, 246, 0.2) !important; /* Same blue tint as regular submenu */
        color: #ffffff !important;
        transform: translateX(4px);
    }
/* Nested submenu active - SAME AS REGULAR SUBMENU (blue, not info color) */
.nav-item.has-sub .submenu-content .menu-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important; /* Same blue as regular submenu */
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35) !important; /* Same shadow */
    width: calc(100% - 40px) !important; /* Match width calculation */
    margin-left: 24px !important; /* Match reduced margin */
    margin-right: 16px !important;
    padding: 10px 14px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: hidden !important; /* Prevent overflow */
    box-sizing: border-box !important;
}

/*Ensure regular submenu active state is never overridden by nested submenu rules*/
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .nav-item.has-sub > .submenu-content .menu-item.menu_border.active {
    background: linear-gradient(135deg, #7696cc 0%, #4467b2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5) !important;
    font-weight: 600 !important;
    z-index: 10 !important;
    position: relative !important;
}
/* Nested submenu active indicator - SAME AS REGULAR SUBMENU */
.wrapper .page-wrap .app-sidebar.colored .sidebar-content
.nav-container .navigation-main .submenu-content .nav-item.has-sub .submenu-content .menu-item.menu_border.active::before {
    content: "" !important;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 65% !important;
    background: #60a5fa !important; /* Same blue as regular submenu indicator */
    border-radius: 0 2px 2px 0;
}

.management-tab {
    position: relative;
}

    .management-tab > .nav-link {
        cursor: pointer;
    }

    .management-tab .management-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

        .management-tab:hover .management-menu,
        .management-tab .management-menu:hover {
            display: block;
        }

.management-menu .dropdown-item {
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .management-menu .dropdown-item:hover {
        background-color: #f1f3f5;
        color: #0d6efd;
    }

    .management-menu .dropdown-item.active {
        background-color: #0d6efd;
        color: #fff;
    }

.management-tab .caret {
    margin-left: 4px;
    font-size: 0.85rem;
}

.maintenance-tab {
    position: relative;
}

    .maintenance-tab > .nav-link {
        cursor: pointer;
    }

    .maintenance-tab .maintenance-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

        .maintenance-tab:hover .maintenance-menu,
        .maintenance-tab .maintenance-menu:hover {
            display: block;
        }

.maintenance-menu .dropdown-item {
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .maintenance-menu .dropdown-item:hover,
    .maintenance-menu .dropdown-item.active {
        background-color: #f1f3f5;
        color: #05539c;
    }

.maintenance-tab .caret {
    margin-left: 4px;
    font-size: 0.85rem;
}