/* ==========================================================================
   SHIPPSARTHI - Official Gold & Metallic Silver Theme
   Directly inspired by the official SHIPPSARTHI logo colors
   ========================================================================== */

:root {
  /* Primary Gold Theme Colors */
  --shipp-gold-main: #a71e2a;
  --shipp-gold-light: #c82333;
  --shipp-gold-bright: #dc3545;
  --shipp-gold-dark: #a71e2a;
  --shipp-gold-deep: #c82333;
  --shipp-gold-tint: #FFFDF5;
  --shipp-gold-soft: #FFF9E6;
  --shipp-gold-border: rgba(212, 175, 55, 0.4);
  --shipp-gold-glow: rgba(212, 175, 55, 0.25);

  /* Gradients */
  --shipp-gold-grad: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #a71e2a 100%);
  --shipp-gold-grad-hover: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #a71e2a 100%);
  --shipp-gold-grad-soft: linear-gradient(135deg, #FFF9E6 0%, #FFFDF5 100%);

  /* Metallic Silver Slate */
  --shipp-silver-light: #F8FAFC;
  --shipp-silver-border: #E2E8F0;
  --shipp-silver-mid: #94A3B8;
  --shipp-silver-dark: #64748B;
  --shipp-silver-slate: #334155;
  --shipp-silver-grad: linear-gradient(135deg, #94A3B8 0%, #475569 100%);

  /* System Color Overrides - Override legacy dark --main-color (#221E16) to Gold */
  --main-color: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #a71e2a 100%) !important;
  --primary: #dc3545 !important;
  --primary-hover: #dc3545 !important;
}

/* --------------------------------------------------------------------------
   1. BUTTONS & ACTIONS
   -------------------------------------------------------------------------- */
.btn-primary,
button.btn-primary,
input[type="submit"].btn-primary,
.bg-primary {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--shipp-gold-glow) !important;
  transition: all 0.25s ease-in-out !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show>.btn-primary.dropdown-toggle {
  background: var(--shipp-gold-grad-hover) !important;
  border-color: var(--shipp-gold-main) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--shipp-gold-dark) !important;
  border-color: var(--shipp-gold-main) !important;
  background-color: transparent !important;
  transition: all 0.25s ease-in-out !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--shipp-gold-glow) !important;
}

.btn-secondary {
  background: var(--shipp-silver-grad) !important;
  border-color: var(--shipp-silver-dark) !important;
  color: #ffffff !important;
}

.btn-secondary.btn-prev {
  background: #ffffff !important;
  background-image: none !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

.btn-secondary.btn-prev:hover,
.btn-secondary.btn-prev:focus {
  background: #f8fafc !important;
  background-image: none !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06) !important;
}

.btn-info {
  background: linear-gradient(135deg, #D4AF37 0%, #A67C1E 100%) !important;
  border-color: #A67C1E !important;
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   2. SIDEBAR NAVIGATION
   -------------------------------------------------------------------------- */
.left-side-menu {
  background: #ffffff !important;
  border-right: 1px solid rgba(212, 175, 55, 0.15) !important;
}

#sidebar-menu>ul>li>a:hover,
#sidebar-menu>ul>li>a:focus,
#sidebar-menu>ul>li>a:active {
  color: #fff !important;
  background: #ffffff52 !important;
}

#sidebar-menu>ul>li.mm-active>a,
#sidebar-menu>ul>li>a.active {
  color: #fff;
  background: #ffffff52;
  font-weight: 600 !important;
}

#sidebar-menu>ul>li.mm-active>a i,
#sidebar-menu>ul>li>a.active i,
#sidebar-menu>ul>li>a:hover i {
  color: var(--shipp-gold-main) !important;
}

/* Sidebar Image Icons Visibility & Gold Filter */
.sidebar-icons {
  width: 19px;
  margin: 0px 5px;
  transition: filter 0.2s ease, opacity 0.2s ease !important;
}

#sidebar-menu>ul>li>a .sidebar-icons {
  /* filter: brightness(0) saturate(100%) invert(20%) sepia(10%) hue-rotate(200deg) opacity(0.85) !important; */
}

#sidebar-menu>ul>li>a:hover .sidebar-icons,
#sidebar-menu>ul>li>a:focus .sidebar-icons,
#sidebar-menu>ul>li>a.active .sidebar-icons,
#sidebar-menu>ul>li.mm-active>a .sidebar-icons {
  opacity: 1 !important;
}

.nav-second-level li a,
.nav-third-level li a,
.nav-second-level li ul li a {
  color: #6e768e !important;
  background-color: transparent !important;
}

.nav-second-level li a:focus,
.nav-second-level li a:hover,
.nav-third-level li a:focus,
.nav-third-level li a:hover,
.nav-second-level li ul li a:hover,
.nav-second-level li ul li a:focus {
  color: var(--shipp-gold-dark) !important;
  background-color: transparent !important;
}

.nav-second-level li a.active,
.nav-second-level li.mm-active>a,
.nav-third-level li.mm-active>a,
.nav-third-level li a.active,
.nav-second-level li ul li a.active,
.nav-second-level li ul li.mm-active>a {
  color: var(--shipp-gold-dark) !important;
  font-weight: 600 !important;
  background-color: transparent !important;
}

.group-title-main {
  color: #fff;
  letter-spacing: 0.5px;
}

.group-lines {
  background: linear-gradient(90deg, var(--shipp-gold-light), transparent) !important;
}

/* --------------------------------------------------------------------------
   3. TOPBAR & NAVBAR
   -------------------------------------------------------------------------- */
.navbar-custom {
  background-color: #ffffff !important;
  /* border-bottom: 2px solid #c82333  !important; */
}

.topbar-left {
  background-color: #ffffff !important;
  border-bottom: 2px solid var(--shipp-gold-border) !important;
}

.logo-box {
  background-color: transparent !important;
}

/* User profile & Notification icons */
.nav-user img {}

.notification-list .noti-icon-badge {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #a71e2a 100%);
}

/* --------------------------------------------------------------------------
   4. TEXT, LINKS & BADGES
   -------------------------------------------------------------------------- */
a {
  color: var(--shipp-gold-dark);
}

a:hover {
  color: var(--shipp-gold-deep);
  text-decoration: none;
}

.text-primary {
  color: var(--shipp-gold-dark) !important;
}

.badge-primary {
  background: var(--shipp-gold-grad) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px var(--shipp-gold-glow) !important;
}

.badge-soft-primary {
  background-color: var(--shipp-gold-soft) !important;
  color: var(--shipp-gold-dark) !important;
  border: 1px solid var(--shipp-gold-border) !important;
}

/* --------------------------------------------------------------------------
   5. FORM INPUTS & SELECTS
   -------------------------------------------------------------------------- */
.form-control:focus,
.custom-select:focus,
textarea.form-control:focus {
  border-color: var(--shipp-gold-main) !important;
  box-shadow: 0 0 0 0.2rem var(--shipp-gold-glow) !important;
}

.custom-control-input:checked~.custom-control-label::before {
  background-color: var(--shipp-gold-main) !important;
  border-color: var(--shipp-gold-dark) !important;
}

.custom-switch .custom-control-input:checked~.custom-control-label::before {
  background-color: var(--shipp-gold-main) !important;
  border-color: var(--shipp-gold-dark) !important;
}

.custom-checkbox .custom-control-input:checked~.custom-control-label::before {
  background-color: var(--shipp-gold-main) !important;
  border-color: var(--shipp-gold-dark) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--shipp-gold-grad) !important;
  color: #ffffff !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--shipp-gold-main) !important;
}

/* --------------------------------------------------------------------------
   6. TABS, PILLS & PAGINATION
   -------------------------------------------------------------------------- */
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
  background: var(--shipp-gold-grad) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px var(--shipp-gold-glow) !important;
}

.nav-tabs .nav-link:hover,
.btn-tab:hover {
  color: var(--shipp-gold-dark) !important;
  border-bottom: 3px solid var(--shipp-gold-main) !important;
}

.nav-tabs .nav-link.active,
.btn-tab.active {
  color: #fff !important;
  border-bottom: 3px solid var(--shipp-gold-main) !important;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #a71e2a 100%) !important;
  font-weight: 600 !important;
}

.selection-btn-add {
  background: #fff !important;
  color: var(--shipp-gold-dark) !important;
  border: 1px solid var(--shipp-gold-border) !important;
}

.selection-btn-add:hover {
  background: var(--shipp-gold-soft) !important;
  color: var(--shipp-gold-dark) !important;
}

.selection-mode-index {
  background: var(--shipp-gold-soft) !important;
  color: var(--shipp-gold-dark) !important;
}

.selection-mode-row .form-control:focus,
.config-field:focus {
  border-color: var(--shipp-gold-main) !important;
  box-shadow: 0 0 0 0.2rem var(--shipp-gold-glow) !important;
}

.page-item.active .page-link {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--shipp-gold-glow) !important;
}

.page-link {
  color: var(--shipp-gold-dark);
}

.page-link:hover {
  color: var(--shipp-gold-deep);
  background-color: var(--shipp-gold-soft);
}

/* --------------------------------------------------------------------------
   7. CARDS & TABLES
   -------------------------------------------------------------------------- */
.card {
  border-top: 3px solid var(--shipp-gold-main) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

.card-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
}

.card-title {
  color: #1e293b !important;
  font-weight: 600;
}

.table th {
  border-top: none;
  background-color: #fcfbfa;
  color: #334155;
  font-weight: 600;
}

.table-hover tbody tr:hover {
  background-color: var(--shipp-gold-tint) !important;
}

/* --------------------------------------------------------------------------
   8. MISCELLANEOUS (LOADERS, PROGRESS, BORDERS)
   -------------------------------------------------------------------------- */
.progress-bar {
  background: var(--shipp-gold-grad) !important;
}

.border-primary {
  border-color: var(--shipp-gold-main) !important;
}

/* Custom Search Container Highlight */
.custom-search-input:focus {
  border-color: var(--shipp-gold-main) !important;
  box-shadow: 0 0 0 0.2rem var(--shipp-gold-glow) !important;
}

/* --------------------------------------------------------------------------
   9. INNER PAGES - COMPREHENSIVE GOLD THEME MATCHING
   -------------------------------------------------------------------------- */

/* Buttons & Action Controls */
.btn-dark,
button.btn-dark,
a.btn-dark,
.btn-black,
button.btn-black,
a.btn-black,
.bg-dark,
.btn-ship-now {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px var(--shipp-gold-glow) !important;
  transition: all 0.25s ease-in-out !important;
}

.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active,
.btn-black:hover,
.btn-black:focus,
.btn-black:active,
.btn-ship-now:hover {
  background: var(--shipp-gold-grad-hover) !important;
  border-color: var(--shipp-gold-main) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 14px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-1px);
}

.btn-outline-dark,
button.btn-outline-dark,
a.btn-outline-dark {
  color: var(--shipp-gold-dark) !important;
  border-color: var(--shipp-gold-main) !important;
  background-color: transparent !important;
  transition: all 0.25s ease-in-out !important;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-outline-dark:active {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px var(--shipp-gold-glow) !important;
}

/* Shipment Journey & Filter Tabs */
.journey-btn.active,
.journey-item.active,
.tab-btn.active,
.status-filter.active,
.filter-btn.active,
.btn-group .btn.active,
.btn-group-toggle .btn.active,
.nav-pills .nav-link.active {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px var(--shipp-gold-glow) !important;
}

.journey-btn,
.journey-item,
.status-filter {
  transition: all 0.2s ease !important;
}

.journey-btn:hover,
.journey-item:hover,
.status-filter:hover {
  border-color: var(--shipp-gold-main) !important;
  color: var(--shipp-gold-dark) !important;
}

.journey-btn .badge,
.journey-item .badge,
.status-filter .badge {
  background-color: #ffffff !important;
  color: var(--shipp-gold-dark) !important;
  font-weight: 700 !important;
}

/* DataTables & Table Styling */
table.dataTable thead th,
table.dataTable thead td,
.table thead th {
  background-color: var(--shipp-gold-soft) !important;
  color: #1e293b !important;
  font-weight: 600 !important;
}

.table-hover tbody tr:hover {
  background-color: var(--shipp-gold-tint) !important;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.pagination .page-item.active .page-link {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--shipp-gold-glow) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--shipp-gold-soft) !important;
  border-color: var(--shipp-gold-border) !important;
  color: var(--shipp-gold-dark) !important;
}

/* Modals & Dropdowns */
.modal-header {
  background-color: #ffffff !important;
  border-bottom: 2px solid var(--shipp-gold-border) !important;
}

.modal-title {
  color: var(--shipp-gold-dark) !important;
  font-weight: 600 !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  background-color: var(--shipp-gold-soft) !important;
  color: var(--shipp-gold-dark) !important;
}

/* Specific Order Page Components Overrides */
.mode-pill.active,
.status-badge-new.active,
.button-add-order,
button.button-add-order,
a.button-add-order,
.button-bulk-import,
button.button-bulk-import,
a.button-bulk-import,
#add_order_btn,
.btn-ship-now,
button[onclick*="showCourierModal"],
a[onclick*="showCourierModal"] {
  background: var(--shipp-gold-grad) !important;
  border-color: var(--shipp-gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px var(--shipp-gold-glow) !important;
}

.mode-pill.active:hover,
.status-badge-new.active:hover,
.button-add-order:hover,
.button-bulk-import:hover,
#add_order_btn:hover {
  background: var(--shipp-gold-grad-hover) !important;
  border-color: var(--shipp-gold-main) !important;
  color: #ffffff !important;
}

.order-tab-count,
.badge-count-new {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 6px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  background: #e2e8f0 !important;
  color: #475569 !important;
  border: none !important;
  vertical-align: middle !important;
}

.status-badge-new.active .order-tab-count,
.status-badge-new.active .badge-count-new {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* --------------------------------------------------------------------------
   10. COMMON TABLE SCROLLING & FIXED VIEWPORT LAYOUT
   Directly modifies existing common table class (.table-responsive / .main-data-teble-1)
   -------------------------------------------------------------------------- */
.table-responsive,
.main-data-teble-1 {
  max-height: 670px;
  overflow-y: auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Explicit Styled Scrollbars for Tables */
.table-responsive::-webkit-scrollbar,
.main-data-teble-1::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track,
.main-data-teble-1::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
.main-data-teble-1::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.main-data-teble-1::-webkit-scrollbar-thumb:hover {
  background: var(--shipp-gold-main);
}

@media (max-width: 1400px) {

  .table-responsive,
  .main-data-teble-1 {
    max-height: calc(100vh - 300px);
  }
}

@media (max-width: 991px) {

  .table-responsive,
  .main-data-teble-1 {
    max-height: calc(100vh - 340px);
  }
}

.modal .table-responsive,
.modal .main-data-teble-1 {
  max-height: 60vh;
}

/* Sticky Table Header - Keeps table header visible while scrolling rows */
.table-responsive table thead th,
.table-responsive thead th,
.main-data-teble-1 table thead th,
.main-data-teble-1 thead th {
  position: sticky !important;
  top: 0;
  z-index: 10;
  background-color: #fcfbfa !important;
  /* Preserves existing table header background */
  box-shadow: inset 0 -1px 0 #e2e8f0;
  /* Preserves crisp header border line */
}

/* --------------------------------------------------------------------------
   11. MAIN CONTENT & SIDEBAR SCROLLBARS
   -------------------------------------------------------------------------- */
.main-content-wrapper {
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 #f8fafc !important;
  -ms-overflow-style: auto !important;
}

.main-content-wrapper::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
  display: block !important;
}

.main-content-wrapper::-webkit-scrollbar-track {
  background: #f8fafc !important;
}

.main-content-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 6px !important;
}

.main-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Sidebar scrollbar */
.new_sidebar,
.left-side-menu {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent !important;
}

.new_sidebar::-webkit-scrollbar,
.left-side-menu::-webkit-scrollbar {
  width: 5px !important;
}

.new_sidebar::-webkit-scrollbar-track,
.left-side-menu::-webkit-scrollbar-track {
  background: transparent !important;
}

.new_sidebar::-webkit-scrollbar-thumb,
.left-side-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3) !important;
  border-radius: 10px !important;
}

.new_sidebar::-webkit-scrollbar-thumb:hover,
.left-side-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.55) !important;
}