/* --- GLOBAL FONT STYLING --- */



/* Jost is now the default font for the entire application */
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
th,
td,
label,
.nav-link,
.card {
  font-family: "Jost", sans-serif;
}

:root {
  --primary-color: #2060ba;
  --gradient-bg: linear-gradient(to bottom, #13487D, #2A7B9B);
  --gradient-bg-right:linear-gradient(to right, #13487D, #2A7B9B);
  --gradient-bg-135deg:linear-gradient(135deg, #13487D, #2A7B9B);
  --gradient-bg-90deg:linear-gradient(90deg, #13487D, #2A7B9B);
  --menu-bg-color: #f0f7f2;
}

body {
  background: #f8f9fa;
  color: #5c5b61;
  margin: 0;
}

.nav-link:hover img {
  filter: invert(1) brightness(200%);
}

/* Sidebar Styling */
.sidebar.span-text {
  background: #ffffff;
  color: #5c5b61;
  height: 100vh;
  width: 60px;
  left: 0;
  top: 0;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  display: none;
}
.sidebar.open {
  width: 230px;
}

.sidebar.open .span-text {
  display: block;
}

.content {
  overflow-y: auto;
  padding: 20px;
  background: #eff3f4;
  font-weight: 500;
  max-height: 100vh;
  min-height: 100vh;
}
.btn.bg-white.rounded {
  border-radius: 74px !important;
}

/* --- NAVBAR (Header) --- */
img.logo {
  margin: 10px 0px;
}

.sidebar .parent-menu > .nav-item {
  padding: 4px 12px;
}

.nav-link {
  /* color: #5c5b61; */
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 500;
  color: red;
}

.nav-link:hover {
  background: var(--gradient-bg);
  border-radius: 5px;
  color: white !important;
}
a.nav-link.home {
  margin-left: 6px;
}
/* --- SIDEBAR HIDE --- */
.sidebar.hidden {
  transform: translateX(-100%) !important;
}
.sidebar.testcls {
  transform: translateX(-100%);
}

/* --- MENU BUTTON --- */
.menu-btn {
  font-size: 24px;
  cursor: pointer;
  background: transparent;
  color: var('--gradient-bg');
  border: none;
  top: 15px;
  right: 0px;
  z-index: 1001;
  padding: 10px 15px;
  border-radius: 5px;
  display: none;
}

.card {
  border: none;
}

label {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-control,
.form-select {
  background-color: #fbfbfb;
  border: 1px solid #ccc;
  font-size: 14px;
  padding: 8px 12px;
}

.form-control:focus,
.form-select:focus {
  border-color: #24ad74;
  box-shadow: 0 0 0 0.1rem rgba(36, 173, 116, 0.25);
  background-color: #eef2f7;
}

.form-control[type="file"] {
  padding: 6px;
  background-color: #fbfbfb;
  font-size: 14px;
  color: #555;
}

.form-control[type="file"]::-webkit-file-upload-button {
  background: #24ad74;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
  background: var(--gradient-bg-right);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-gradient {
  background: var(--gradient-bg-right);
  color: white;
  border: none;
  padding: 8px 24px;
  font-weight: 500;
  font-size: 15px;
  border-radius: 6px;
  transition: all 0.3s ease-in-out;
}

.btn-gradient:hover {
  background:var(--gradient-bg-right);
}

.btn-group-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-section {
  margin-bottom: 20px;
}

input.form-control.border-0.ps-1.rounded-end-pill.shadow-none {
  background: white;
}

.filter-box input.form-control {
  background-color: transparent !important;
  box-shadow: none !important;
}

.filter-box input.form-control:focus {
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none;
}

input.form-control.filter-box,
input.form-control.filter-box:focus,
select.form-select.filter-box,
select.form-select.filter-box:focus {
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.transition-sidebar {
  transition: transform 0.3s ease-in-out;
  transform: translateX(0);
  z-index: 1050;
  background: white;
  max-height: 100vh;
  min-height: 100vh;
}

.toggle-btn {
  position: relative;
  top: -3px;
  /* left: 10px; */
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.sidebar .nav {
  list-style: none;
  padding: 25px 0 0 0;
  margin: 0;
  margin-left: -20px;
}

/* .sidebar .nav li {
  padding: 10px 30px;
} */

.sidebar .nav a {
  text-decoration: none;
  display: flex;
  align-items: center;
  color: #333;
}

.sidebar .nav a img {
  width: 24px;
  height: 24px;
}

.sidebar .nav a span {
  margin-left: 10px;
  display: none;
}

.sidebar.open .nav a span {
  display: inline;
}

.main-content {
  flex: 1;
  padding: 20px;
}

.top-sidebar {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  gap: 10px;
}

a.nav-link1 {
  margin-left: 5px;
}

input:invalid:focus,
select:invalid:focus,
textarea:invalid:focus {
  border-color: red;
  outline: none;
}

.btn-gradient:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input,
textarea {
  white-space: nowrap;
}

.hidden-field {
  display: none !important;
  visibility: hidden;
  height: 0;
}

.was-validated input:invalid:focus,
.was-validated select:invalid:focus,
.was-validated textarea:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.was-validated input:valid:focus,
.was-validated select:valid:focus,
.was-validated textarea:valid:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control:invalid ~ .invalid-feedback,
.form-select:invalid ~ .invalid-feedback {
  display: block;
}

.collapse .nav-link {
  font-size: 12px;
  color: #d1d1d1;
}

.nav-item .fa-chevron-down {
  font-size: 12px;
  color: #000000;
}
.nav.flex-column.submenu {
  padding: 0 0 0 20px !important;
}
.card-dash {
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
  border: none;
  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: start;
  gap: 20px;
  background-color: #ffffff;
  border-radius: 0.375rem;
}

.main-image {
  width: 35px;
  height: 35px;
  background: var(--primary-color);
  align-items: center;
  display: flex;
  justify-content: center;
  border-radius: 8px;
}

.card-dash-img {
  width: max-content;
}

.card-dash:hover {
  background: var(--gradient-bg);
  color: white;
}

.card-dash:hover .main-image {
  background-color: #ffffff;
}

.card-dash .main-image i {
  color: #ffffff;
}

.card-dash:hover .main-image i {
  color: var(--primary-color);
}

tbody tr:hover {
  border-bottom: rgb(152, 151, 151);
  transition: all ease 0.8s;
}
tr:hover td {
  background: rgb(248, 248, 248) !important;
}

.table {
  transition: none !important;
}

.row.tabs {
  row-gap: 14px;
}

.col-md-10.content.bg-dark1 {
  background: #eff3f4;
}

.shadow-box {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.table th,
.table td {
  border-top: none;
  font-weight: 500;
  font-size: 14px;
}

.equal-height {
  display: flex;
  flex-direction: column;
  width: 100%;
}

h5.total-card-dash-text {
  font-size: 16px;
  font-weight: 400;
  margin: 0 !important;
  color: #212121;
}

p.total-price {
  font-size: 24px;
  font-weight: 500;
  margin: 0 !important;
}

.card-dash:hover h5.total-card-dash-text {
  color: white;
}

.btn.bg-white {
  border-radius: 40px;
}

/* === SMALL MOBILE CARD === */
.planet-card-dash {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top: 15px;
}

.planet-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 0.75rem;
  color: #343a40;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

.planet-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f1f1f1;
}

.planet-row:last-child {
  border-bottom: none;
}

.label {
  font-weight: 500;
  color: #6c757d;
  font-size: 14px;
}

.value {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}

.input-group.py-2 {
  background: white;
  border-radius: 71px;
}

/* responsive */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
  }
  .menu-btn {
    display: block;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .content {
    margin-left: 0;
    position: fixed;
  }
  .navbar {
    width: 100%;
    left: 0;
  }
  .transition-sidebar.hide {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .shadow-box {
    padding: 15px;
  }
  .content {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .search-bar input {
    max-width: 280px;
    min-width: 160px;
    font-size: 13px;
  }
  .profile-pic {
    width: 35px;
    height: 35px;
  }
  .profile-name {
    font-size: 12px;
  }
  h2.text-black.h2 {
    font-size: 20px;
  }
  h5.total-card-dash-text {
    font-size: 12px;
  }
  p.total-price {
    font-size: 16px;
  }
}

/* Table csss */
.gradient-header {
  background: var(--gradient-bg-90deg);
  color: #fff;
}
.filter-box {
  padding: 10px 16px !important;
  height: 45px;
  border-radius: 6px;
  font-size: 14px;
}

/* Ensure date inputs match */
input[type="date"].form-control {
  height: 45px;
}

/* Style search input group for uniform height */
.input-group.filter-box {
  height: 45px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ced4da;
}

/* Remove border & set height for inner input */
.input-group.filter-box input {
  height: 100%;
  padding: 10px 16px;
}

/* Adjust search icon container */
.input-group-text {
  background-color: transparent;
  border: none;
}

th {
  vertical-align: middle !important;
}

.badge-gradient {
  background: var(--gradient-bg-90deg);
  color: #fff;
}

/* Form */
.card-dash1.shadow-sm.p-3.mb-4 {
  background: white;
  border-radius: 7px;
  margin-top: 26px;
}

.btn-gradient {
  background: var(--gradient-bg-90deg);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent button text from wrapping */
}

.btn-gradient:hover {
  background:  var(--gradient-bg-135deg);
  box-shadow: 0 4px 12px rgba(33, 136, 56, 0.3);
  transform: translateY(-1px);
}

@media (max-width: 576px) {
  .btn-gradient {
    width: 100%; /* Stack full width on small screens */
    text-align: center;
  }
  .card-dash1 .d-flex {
    justify-content: center !important;
  }
}

.custom-pagination .page-item .page-link {
  color: var(--primary-color);;
  border: 1px solid var(--primary-color);;
  margin: 0 4px;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.custom-pagination .page-item .page-link:hover {
  background-color: var(--primary-color);;
  color: #fff;
  box-shadow: 0 2px 6px rgba(33, 136, 56, 0.25);
  transform: translateY(-1px);
}

.custom-pagination .page-item.active .page-link {
  background-color: var(--primary-color);;
  color: #fff;
  border-color: #1e7e34;
}

.custom-pagination {
  flex-wrap: wrap;
  gap: 8px;
}

/* login--page */
.container {
  max-width: 1400px;
}

.gradient-text {
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 32px;
}

p.text-secondary.mb-4 {
  color: #5c5b61;
  font-weight: 600;
  font-size: 15px;
}

.login-image {
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}

.btn-login {
  background: var(--gradient-bg);
  color: white;
  font-weight: 600;
  border-radius: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.btn-login:hover {
  opacity: 0.9;
  color: white;
}

.forgot-password {
  text-decoration: underline;
  color: #4248ff;
  font-size: 14px;
  text-align: end;
  font-weight: 500;
}

.signup-text a {
  color: #4248ff;
  font-weight: 500;
  text-decoration: none;
}

.login-wrapper {
  height: 100vh;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .login-wrapper {
    overflow-y: auto;
  }
  .login-container {
    flex-direction: column-reverse;
    padding: 1rem;
    gap: 2rem;
  }
  .login-box {
    width: 100%;
    padding: 0;
  }
  .login-image {
    margin-top: 13rem;
    height: 265px;
  }
}

/* form.css */
.nav .submenu .nav-item .nav-link {
  font-size: 14px;
}

.custom-pagination {
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 1;
  gap: 4px;
}

.custom-pagination .page-link {
  padding: 4px 8px;
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .custom-pagination .page-link {
    padding: 2px 6px;
    font-size: 0.75rem;
  }
  .custom-pagination i {
    font-size: 1rem !important;
  }
}

/* user-profilecsss */
.nav-tabs .nav-link {
  font-weight: 600;
  border: none;
  color: grey;
}

.nav-tabs .nav-link.active {
  background: var(--gradient-bg-right);
  color: #fff !important;
  border-radius: 0.25rem 0.25rem 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.nav-tabs .nav-link.active .fa-chevron-down {
  rotate: 0deg;
}

.table-bordered > :not(caption) > * > * {
  border-bottom: 1px solid #dee2e6;
  padding: 0.65rem;
  vertical-align: middle;
}

table th,
.table td {
  white-space: nowrap;
  vertical-align: middle;
  font-size: 14px;
}

.table thead th {
  font-weight: 600;
  font-size: 14px;
  text-transform: capitalize;
}

.table-responsive {
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 8px;
}

.scrollbar-top-wrapper {
  position: relative;
  overflow: hidden;
}

.scrollbar-top {
  height: 12px;
  overflow-x: auto;
  overflow-y: hidden;
}

.scrollbar-top::-webkit-scrollbar {
  height: 8px;
}
.scrollbar-top::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 4px;
}

.scroll-container {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
}

/* Hide bottom scrollbar */
.scroll-container::-webkit-scrollbar {
  display: none;
}

/* email break */
.value.d-flex.justify-content-center.align-items-center {
  word-break: break-all;
  white-space: normal;
}

/* form */
.img-flag {
  vertical-align: middle;
}

.select2-container .select2-selection--single {
  box-sizing: border-box;
  cursor: pointer;
  display: block;
  height: 39px;
  user-select: none;
  -webkit-user-select: none;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 26px;
  position: absolute;
  top: 6px;
  right: 1px;
  width: 20px;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #444;
  line-height: 38px;
}

/* 18 july 2025 changes */

.nav .submenu .nav-item .nav-link {
  /* font-size: 14px; */
  margin-left: 28px;
}

@media (max-width: 768px) {
  .tabs {
    /* Yeh horizontal scrollbar add kar dega agar content zyada ho */
    overflow-x: auto;

    /* Yeh scrollbar ko chhipa dega taaki design kharab na lage */
    -ms-overflow-style: none; /* for Internet Explorer, Edge */
    scrollbar-width: none; /* for Firefox */
  }

  /* Yeh scrollbar ko Chrome, Safari, etc. mein chhipata hai */
  .tabs::-webkit-scrollbar {
    display: none;
  }
}





/* guru */
/* guru */
/* guru */
/* guru */
/* ================================================================ */
/* FINAL CONSOLIDATED SIDEBAR STYLES (v3)                           */
/* This is the complete and final version.                          */
/* ================================================================ */

/* --- 1. Basic Layout & Main Transitions --- */
#sidebar {
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.transition-sidebar {
  /* For mobile slide-in/out */
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. General Link & Text Styling --- */
#sidebar .nav-link {
  transition: background-color 0.25s ease, color 0.25s ease, filter 0.25s ease;
}
#sidebar .span-text {
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}
#sidebar:not(.open) .span-text {
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  pointer-events: none;
}
#sidebar .nav-link .fa-chevron-down {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 3. Active State Styling Logic --- */
/* Default active style for ANY link */
#sidebar .nav-link.active {
  background: var(--gradient-bg);
  border-radius: 5px;
  color: white !important;
  width: max-content;
  
}
#sidebar .nav-link.active img,
#sidebar .nav-link.active .fa-chevron-down {
  filter: brightness(0) invert(1);
  color: white;
}
/* OVERRIDE for a parent link when its child is active */
#sidebar .parent-menu > .nav-item > .nav-link.active.child-is-active {
  background: transparent !important;
  color: var(--gradient-bg) !important;
  font-weight: 600 !important;
}
#sidebar .parent-menu > .nav-item > .nav-link.active.child-is-active img {
  filter: invert(41%) sepia(35%) saturate(1458%) hue-rotate(99deg)
    brightness(94%) contrast(86%);
}
#sidebar
  .parent-menu
  > .nav-item
  > .nav-link.active.child-is-active
  .fa-chevron-down {
  color: var(--primary-color);
}

/* --- 4. Sidebar 'OPEN' State Behavior --- */
#sidebar.open .nav-link[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}
#sidebar.open .submenu-wrapper.collapsing {
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* --- 5. Sidebar 'COLLAPSED' State Behavior --- */
/* Hide child menus by default when collapsed */
#sidebar:not(.open) .submenu-wrapper {
  height: auto !important;
  overflow: visible !important;
  background-color: #f8f9fa;
  padding-top: 5px;
  padding-bottom: 5px;
  border-radius: 0 8px 8px 0;
}
/* Show specific child menu when JS adds the class */
#sidebar:not(.open) .submenu-wrapper.show-in-collapsed {
  /* display: block !important; */

    display: none !important;

}
/* General styling for collapsed child items */
#sidebar:not(.open) .submenu {
  padding: 0 !important;
  margin: 0 !important;
}
#sidebar:not(.open) .submenu .nav-item {
  padding: 0px 12px;
}
#sidebar:not(.open) .submenu .nav-link {
  justify-content: center;
  padding: 10px 0;
}
#sidebar:not(.open) .nav-link[data-bs-toggle="collapse"] .fa-chevron-down {
  display: none;
}



#sidebar:not(.open) .submenu-wrapper {
    display: none !important; /* Hide the entire submenu container when sidebar is closed */
}

/* Optional: Also ensure the dropdown arrow is hidden */
#sidebar:not(.open) .nav-link .fa-chevron-down {
    display: none;
}



/* 
  Jab sidebar close ho (yaani uspar 'open' class na ho), 
  tab yeh styles apply honge.
*/

#sidebar:not(.open) .logo-item {
    /* Logo ko hide karega */
    display: none;
}

#sidebar:not(.open) .submenu-wrapper {
    /* Sub-menu ke poore container ko (icons ke saath) hide karega */
    display: none !important;
}

#sidebar:not(.open) .nav-link .fa-chevron-down {
    /* Dropdown arrow ko hide karega */
    display: none;
}

/* --- SMOOTH SIDEBAR ANIMATION --- */

/* Step 1: Sidebar ke liye base transition set karein */
#sidebar {
    /* Yeh batata hai ki jab 'width' badlegi, to use 0.4 second mein, 
       dheere-se-tez-phir-dheere (ease) effect ke saath badlo. */
    transition: width 0.4s ease;
}

/* Step 2: Sidebar ke andar ke text ko fade-in/fade-out karein */
#sidebar .span-text {
    /* Text ko shuru mein gayab rakhein (lekin jagah le) */
    opacity: 0;
    /* Isse text transition ke waqt tootega nahi */
    white-space: nowrap;
    /* Opacity ko 0.3 second mein animate karo, 
       aur 0.1 second ruk kar start karo. */
    transition: opacity 0.3s ease 0.1s;
}

/* Jab sidebar par 'open' class lagegi, to text ko dikhao */
#sidebar.open .span-text {
    opacity: 1;
}

/* 
  Step 3: Main content ko bhi smooth push karo (IMPORTANT)
  Agar aapke paas main content area hai (sidebar ke right mein),
  toh uspar bhi transition lagayein. Maan lete hain uski ID 'main-content' hai.
*/
#main-content { /* Yahan apne main content ka sahi selector daalein */
    /* Transition 'margin-left' par lagayein jo sidebar ke width ke saath match kare */
    transition: margin-left 0.4s ease;
}



















/* =================================================================== */
/* === FINAL SIDEBAR ALIGNMENT & STYLE FIX (Copy All Of This) === */
/* =================================================================== */

/* --- 1. GENERAL LINK STYLING (For both Open & Closed state) --- */
#sidebar .nav-item {
    padding: 4px 12px; /* Thodi si space har item ke aas-paas */
}

#sidebar .nav-link {
    display: flex;
    align-items: center; /* Icons aur text ko vertically center rakhta hai */
    padding: 12px 15px;/* Link ke andar padding */
    width: 100%;       /* Link ko poori available width deta hai */
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s ease-in-out; /* Smooth hover effects */
}

/* --- 2. UNIFY ICON SIZES (Sabse Zaroori Step) --- */
#sidebar .nav-link img,
#sidebar .nav-link .nav-icon {
    width: 24px;       /* Sabhi icons ki width fix */
    height: 24px;      /* Sabhi icons ki height fix */
    flex-shrink: 0;  /* Icon ko shrink hone se rokta hai */
    object-fit: contain;
    transition: filter 0.25s ease; /* Icon color change ko smooth banata hai */
}
/* FontAwesome icons ke liye extra centering */
#sidebar .nav-link .nav-icon {
    font-size: 20px;
    text-align: center;
    line-height: 24px;
}


/* --- 3. SIDEBAR COLLAPSED (CLOSED) STATE STYLING --- */
#sidebar:not(.open) .nav-link {
  /* Step 1: Icon ko horizontally center mein laane ke liye */
  justify-content: center !important;

  /* Step 2: Left aur Right se extra padding hata do taaki background fail na jaye */
  padding-left: 0 !important;
  padding-right: 0 !important;

  /* Optional: Upar-neeche ke liye padding set kar sakte hain */
  padding-top: 12px;
  padding-bottom: 12px;
}


/* --- 4. HOVER & ACTIVE STATE STYLING (Main Logic) --- */

/* OPEN Sidebar - Hover/Active State */
#sidebar.open .nav-link:hover,
#sidebar.open .nav-link.active {
    background: var(--menu-bg-color); /* Halka green background */
    color: var(--primary-color) !important; /* Dark green text */
}

/* Jab parent ka child active ho, tab parent ko bhi active dikhao */
#sidebar.open .has-submenu > a.active {
    background: var(--menu-bg-color);
    color: var(--primary-color) !important;
}

/* COLLAPSED Sidebar - Hover/Active State */
#sidebar:not(.open) .nav-link:hover,
#sidebar:not(.open) .nav-link.active {
    background: var(--gradient-bg); /* Dark green background */
}

/* Dono state mein hover/active par icon ka color badlo (White) */
#sidebar:not(.open) .nav-link:hover img,
#sidebar:not(.open) .nav-link.active img,
#sidebar:not(.open) .nav-link:hover .nav-icon,
#sidebar:not(.open) .nav-link.active .nav-icon {
    /* Yeh filter dark icon ko white bana deta hai */
    filter: brightness(0) invert(1);
}

/* Lekin open sidebar mein icon ka color WAPIS original karo */
#sidebar.open .nav-link:hover img,
#sidebar.open .nav-link.active img,
#sidebar.open .nav-link:hover .nav-icon,
#sidebar.open .nav-link.active .nav-icon {
    filter: none; /* Filter hata do */
}

/* --- 5. CLEANUP OLD CONFLICTING RULES --- */
/* Purane conflicting rules ko disable kar do */
#sidebar .nav-link.active {
    width: auto; /* 'max-content' ko hata do, yahi problem kar raha tha */
}
a.nav-link.home {
    margin-left: 0; /* Extra margin hata do */
}

/* =================================================================== */
/* === FINAL SUBMENU ALIGNMENT & SPACING FIX === */
/* =================================================================== */

/* --- 1. Sabse pehle, purane problematic margin ko reset karo --- */
#sidebar .submenu .nav-link {
  margin-left: 0 !important; /* Yeh sabse zaroori hai! */
}

/* --- 2. OPEN sidebar mein sabhi links ke liye base padding set karo --- */
#sidebar.open .nav-link {
  /* Top-level items ke liye padding */
  padding: 12px 9px;
}

/* --- 3. Ab, SUBMENU ke links ko padding se indent (aage) karo --- */
#sidebar.open .submenu .nav-link {
  /* Yeh submenu items ko parent ke text ke neeche align karega */
  padding-left: 30px;
  font-size: 14px; /* Thoda chhota font size submenu ke liye accha lagta hai */
}

/* --- 4. Submenu ke icon aur text ke beech ka gap adjust karo --- */
/* #sidebar.open .submenu .nav-link {
  gap: 15px;
} */

/* --- 5. Active submenu item ka style theek karo --- */
#sidebar.open .submenu .nav-link.active,
#sidebar.open .submenu .nav-link:hover {
  background: #f0f7f2; /* Thoda aur halka background active child ke liye */
  color: var( --primary-color) !important;
}

/* Active child link ke icon ka color bhi change karo */
#sidebar.open .submenu .nav-link.active img,
#sidebar.open .submenu .nav-link:hover img,
#sidebar.open .submenu .nav-link.active .nav-icon,
#sidebar.open .submenu .nav-link:hover .nav-icon {
  filter: none; /* Inka color wahi rehne do jo parent ka hai */
}
/* =================================================================== */
/* === FIX: TEXT CUTTING OFF IN SIDEBAR (ELLIPSIS METHOD) === */
/* =================================================================== */

/* Yeh rule sirf tab kaam karega jab sidebar open ho */
#sidebar.open .nav-link .span-text {
  /* Step 1: Text ko uske container se bahar nikalne se roko */
  overflow: hidden;

  /* Step 2: Jab text bahar nikle, to uski jagah "..." dikhao */
  text-overflow: ellipsis;

  /* Step 3: Text ko ek hi line mein rakho (ellipsis ke liye zaroori) */
  /* Yeh rule aapke code mein pehle se ho sakta hai, par yahan likhna safe hai */
  /* white-space: nowrap; */
}