/* ========== BASE STYLES ========== */
:root {
  /* Professional Color Scheme - Updated to more sophisticated tones */
  --primary-color: #3e8e89;        /* Dark blue-gray */
  --primary-dark: #1a252f;         /* Darker shade */
  --primary-light: #ecf0f1;        /* Light gray */
  --accent-color: #3498db;         /* Blue accent */
  --success-color: #27ae60;        /* Green for success */
  --warning-color: #f39c12;        /* Orange for warnings */
  --danger-color: #e74c3c;         /* Red for errors */
   --input-bg: #f0f3f5;
  
  /* Enhanced Neutral Colors */
  --white: #ffffff;
  --gray-50: #f8f9fa;              
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  
  /* Improved Typography */
  --base-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;         /* 12px */
  --font-size-sm: 0.8125rem;       /* 13px */
  --font-size-base: 0.875rem;      /* 14px */
  --font-size-lg: 1rem;            /* 16px */
  --font-size-xl: 1.25rem;         /* 20px */
  
  /* Refined Spacing */
  --space-xxs: 0.25rem;            /* 4px */
  --space-xs: 0.5rem;              /* 8px */
  --space-sm: 0.75rem;             /* 12px */
  --space-md: 1rem;                /* 16px */
  --space-lg: 1.5rem;              /* 24px */
  --space-xl: 2rem;                /* 32px */
  
  /* New variables */
  --border-radius: 0.25rem;
  --border-radius-lg: 0.375rem;
  --box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  --box-shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --transition: all 0.2s ease-in-out;
}

/* ========== GLOBAL RESETS ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--base-font);
  font-size: var(--font-size-base);
  color: var(--gray-800);
  background-color: var(--gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
}

/* ========== TYPOGRAPHY IMPROVEMENTS ========== */
h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

h1 { 
  font-size: var(--font-size-xl);
  letter-spacing: -0.025em;
}
h2 { 
  font-size: var(--font-size-lg);
  letter-spacing: -0.015em;
}
h3 { font-size: var(--font-size-base); }
h4 { font-size: var(--font-size-sm); }

p {
  margin-bottom: var(--space-sm);
  color: var(--gray-700);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}


/* ========== INPUT & FORM CONTROLS ========== */
.form-control,
.form-select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"] {
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-base);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  background-color: var(--white);
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

/* Remove all focus outlines and shadows */
.form-control:focus,
.form-select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="search"]:focus,
.btn:focus,
.dropdown-toggle:focus,
.nav-link:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--gray-400);
}

.dropdown-toggle{
    font-weight: 500;
}

/* Simple hover state for inputs */
.form-control:hover,
.form-select:hover,
textarea:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="search"]:hover {
  border-color: var(--gray-400);
}

.navbar-brand:focus, .navbar-brand:hover{
    color: var(--primary-color);
}

/* Remove Bootstrap's default form styles */
.form-control:focus {
  background-color: var(--white);
}

/* Select dropdown styling */
.form-select {
  background-image: none;
  padding-right: var(--space-md);
}

/* Checkboxes and radios */
.form-check-input {
  width: 1em;
  height: 1em;
  margin-top: 0.15em;
  border: 1px solid var(--gray-400);
}

.form-check-input:focus {
  box-shadow: none;
  border-color: var(--gray-500);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* File input */
.form-control[type="file"] {
  padding: var(--space-xs);
}

.form-control[type="file"]:focus {
  border-color: var(--gray-400);
}

/* Range input */
.form-range {
  width: 100%;
  height: 1.5rem;
  padding: 0;
  background-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.form-range:focus {
  outline: none;
}

.form-range::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  margin-top: -0.25rem;
  background-color: var(--primary-color);
  border: none;
  border-radius: 1rem;
  appearance: none;
  -webkit-appearance: none;
}

/* Remove autofill background color */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--white) inset;
  -webkit-text-fill-color: var(--gray-800);
}

/* Disabled inputs */
.form-control:disabled,
.form-control[readonly] {
  background-color: var(--gray-100);
  opacity: 1;
}

/* Input groups */
.input-group-text {
  font-size: var(--font-size-base);
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
}

/* Validation states */
.is-invalid {
  border-color: var(--danger-color);
}

.is-valid {
  border-color: var(--success-color);
}

.invalid-feedback,
.valid-feedback {
  font-size: var(--font-size-xs);
}

.invalid-feedback {
  color: var(--danger-color);
}

.valid-feedback {
  color: var(--success-color);
}

/* Floating labels (if using) */
.form-floating > label {
  font-size: var(--font-size-sm);
  color: var(--gray-600);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--gray-600);
  font-size: var(--font-size-xs);
}

/* ========== ENHANCED LAYOUT COMPONENTS ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Improved Flex Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

/* ========== MODERN NAVIGATION ========== */
.navbar {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  padding: var(--space-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.navbar-brand {
  font-weight: 600;
  color: var(--primary-color);
  font-size: var(--font-size-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
}

.nav-link {
  color: var(--gray-700);
  font-size: var(--font-size-base);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: var(--gray-100);
}

/* ========== PROFESSIONAL SIDEBAR ========== */
.sidebar {
  background-color: var(--white);
  border-right: 1px solid var(--gray-200);
  width: 200px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding-top: 60px;
  overflow-y: auto;
  z-index: 1020;
  transition: transform 0.3s ease;
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: 34px;
    padding-right: 0;
    padding-top: 60px;
    overflow: hidden;
}
.sidebar .nav-link{
    display: flex;
    height: 40px;
}
.mobile-sidebar-toggle {
    background: transparent;
    width: 37px;
    border: 2px solid #64a4a0 !important;
    font-size: 20px !important;
    height: 35px;
    margin-left: 15px;
}

/* When sidebar is collapsed */
.main-content.expanded {
    margin-left: 44px;
}

.sidebar-menu {
  list-style: none;
  padding: var(--space-md);
}

.sidebar-item {
  margin-bottom: var(--space-xxs);
}

.sidebar-link {
  display: flex;
  align-items: center;
  color: var(--gray-700);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  transition: var(--transition);
  gap: var(--space-sm);
  font-size: var(--font-size-base);
}

.sidebar-link:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

.sidebar-link.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
}

/* ========== MAIN CONTENT AREA ========== */
.main-content {
    margin-left: 250px;
    padding: var(--space-md);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    padding-left: 60px !important;
}

.sidebar{
      transition: margin-left 0.3s ease;
}

.sidebar.collapsed:hover {
    width: 200px;
       overflow: scroll;
}

/* ========== ENHANCED CARD COMPONENTS ========== */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.card:hover {
  box-shadow: var(--box-shadow-md);
}

.card-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--gray-50);
}

.card-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.card-body {
  padding: var(--space-md);
}

.card-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--gray-200);
  background-color: var(--gray-50);
}

/* ========== MODERN BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-base);
  font-weight: 500;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  gap: var(--space-xs);
}

.btn-sm {
  padding: var(--space-xxs) var(--space-sm);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-lg);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ========== IMPROVED FORMS ========== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--gray-700);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-base);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  transition: var(--transition);
  height: 38px;
  background-color: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* ========== PROFESSIONAL TABLES ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
}

.table th {
  text-align: left;
  padding: var(--space-sm);
  background-color: var(--gray-100);
  color: var(--gray-800);
  font-weight: 600;
  border-bottom: 2px solid var(--gray-300);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  font-size: var(--font-size-sm);
}

.table tr:last-child td {
  border-bottom: none;
}

.table-striped tbody tr:nth-child(odd) {
  background-color: var(--gray-50);
}

.table-hover tbody tr:hover {
  background-color: var(--gray-100);
}

/* ========== ENHANCED UTILITY CLASSES ========== */
.text-primary { color: var(--primary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-muted { color: var(--gray-600) !important; }
.text-center { text-align: center !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-light { background-color: var(--gray-50) !important; }

.mt-1 { margin-top: var(--space-xs) !important; }
.mt-2 { margin-top: var(--space-sm) !important; }
.mt-3 { margin-top: var(--space-md) !important; }
.mt-4 { margin-top: var(--space-lg) !important; }

.p-2 { padding: var(--space-sm) !important; }
.p-3 { padding: var(--space-md) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }

.shadow-sm { box-shadow: var(--box-shadow) !important; }
.shadow { box-shadow: var(--box-shadow-md) !important; }

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-primary {
  color: #fff;
  background-color: var(--primary-color);
}

.badge-success {
  color: #fff;
  background-color: var(--success-color);
}

.badge-warning {
  color: #212529;
  background-color: var(--warning-color);
}

.badge-danger {
  color: #fff;
  background-color: var(--danger-color);
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 992px) {
  .sidebar {
    width: 220px;
  }
  .main-content {
    margin-left: 220px;
  }
}

@media (max-width: 768px) {
    
      .sidebar.collapsed:hover {
      width: 0 !important;
      overflow: hidden !important;
  }

  /* Sidebar visible by default */
  .sidebar {
    transform: translateX(0);
    width: 230px;
    transition: all 0.3s ease;
  }

  /* Sidebar CLOSED when collapsed */
  .sidebar.collapsed {
    transform: translateX(-100%);
    width: 0;
    overflow: hidden;
  }

  .main-content {
    margin-left: 0;
  }

}

/* ========== PRINT STYLES ========== */
@media print {
  .navbar, .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 0;
  }
}

/* ========== MODAL ENHANCEMENTS ========== */
.employee-form-modal .modal-dialog {
  max-width: 800px;
}

.employee-form-modal .modal-header {
  background: var(--primary-color);
  color: white;
  padding: var(--space-md);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.employee-form-modal .modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--white);
}

.employee-form-modal label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: var(--space-xs);
  display: block;
}

.employee-form-modal .form-control,
.employee-form-modal select {
  font-size: var(--font-size-sm);
  padding: var(--space-xs) var(--space-sm);
  height: 38px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  background-color: var(--white);
  transition: var(--transition);
}

.employee-form-modal .form-control:focus,
.employee-form-modal select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.employee-form-modal .row.g-2 > [class*="col-"] {
  margin-bottom: var(--space-sm);
}

.employee-form-modal h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: var(--space-xs);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

/* ========== DROPDOWNS ========== */
.dropdown-menu {
  font-size: var(--font-size-sm);
  padding: var(--space-xs) 0;
  min-width: 160px;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-md);
}

.dropdown-item {
  padding: var(--space-xs) var(--space-md);
  color: var(--gray-800);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

/* ========== ALERTS ========== */
.alert {
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
  border: 1px solid transparent;
  border-radius: var(--border-radius);
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

/* ========== ADDITIONAL COMPONENTS ========== */
.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
}

.list-group-item {
  position: relative;
  display: block;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--white);
  border: 1px solid var(--gray-200);
}

.list-group-item:first-child {
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.list-group-item:last-child {
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.list-group-item:hover {
  background-color: var(--gray-50);
}

/* ========== MAIN CONTENT ========== */
.dashboard-main {
  flex: 1;
  padding: var(--space-md);
  transition: margin-left 0.3s;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--gray-300);
}

.dashboard-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.dashboard-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  font-size: var(--font-sm);
  font-weight: 500;
}

/* ========== CARDS ========== */
.dashboard-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--space-md);
  transition: var(--transition);
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--gray-200);
  background-color: var(--gray-100);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
  display: flex;
  align-items: center;
}

.card-title i {
  margin-right: var(--space-xs);
  color: var(--gray-600);
}

.card-body {
  padding: var(--space-md);
}

/* ========== STATS CARDS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-md);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card.success {
  border-left-color: var(--success);
}

.stat-card.warning {
  border-left-color: var(--warning);
}

.stat-card.danger {
  border-left-color: var(--danger);
}

.stat-card.info {
  border-left-color: var(--info);
}

.stat-value {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
}

.stat-label {
  font-size: var(--font-sm);
  color: var(--gray-600);
  display: flex;
  align-items: center;
}

.stat-icon {
  margin-right: var(--space-xs);
  font-size: 1.25em;
}

/* ========== ACTIVITY FEED ========== */
.activity-feed {
  list-style: none;
  padding: 0;
}

.activity-item {
  display: flex;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-sm);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-time {
  font-size: var(--font-xs);
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* ========== TABLES ========== */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
}

.dashboard-table th {
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  padding: var(--space-sm);
  text-align: left;
  text-transform: uppercase;
  font-size: var(--font-xs);
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gray-300);
}

.dashboard-table td {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.dashboard-table tr:hover td {
  background-color: var(--gray-50);
}

/* ========== BUTTONS ========== */
.dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-sm);
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}



.btn-icon {
  margin-right: var(--space-xs);
}

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: var(--font-xs);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 50rem;
}


/* ========== PROGRESS BARS ========== */
.progress {
  height: 8px;
  background-color: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  transition: width 0.6s ease;
}

/* ========== ALERTS ========== */
.alert {
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-radius: var(--radius);
  font-size: var(--font-sm);
  display: flex;
  align-items: center;
}

.alert i {
  margin-right: var(--space-xs);
}

.alert-info {
  background-color: #e7f5ff;
  color: #1864ab;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .dashboard-main {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .dashboard-badge {
    margin-top: var(--space-sm);
  }
}

@media (min-width: 992px) {
    .modal-lg, .modal-xl {
        --bs-modal-width: 800px !important;
    }
}

/* Employee Form Modal - Enhanced Styling */
.employee-form-modal .modal-content {
    border: none;
    border-radius: 0.4rem;
    background-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.employee-form-modal .modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.25rem;
    border-bottom: none;
}

.employee-form-modal .modal-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
}

.employee-form-modal .modal-body {
    padding: 1.25rem;
    background-color: #fff;
    max-height: 600px;
    overflow-y: auto; /* scroll tabhi dikhe jab zarurat ho */
}

.employee-form-modal .modal-footer {
    background-color: var(--primary-light);
    border-top: 1px solid var(--border-color);
    padding: 0.8rem 1.25rem;
}

/* Form Inputs - Compact Style */
.employee-form-modal .form-control,
.employee-form-modal select {
    width: 100%;
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.3rem;
    background-color: var(--input-bg);
    color: var(--primary-dark);
    transition: all 0.15s ease;
    height: 32px;
}

/* Select Box Styling */
.employee-form-modal select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%2345557a' stroke='%2345557a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px 8px;
    padding-right: 1.75rem;
}

/* Input States */
.employee-form-modal .form-control:focus,
.employee-form-modal select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    background-color: var(--input-bg)!important;
    outline: none;
}

.employee-form-modal .form-control:hover,
.employee-form-modal select:hover {
    border-color: #a8b5c1;
    background-color: #e6eaed;
}

/* Labels */
.employee-form-modal label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #45557a;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Styling */
.employee-form-modal .btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.3rem;
}

.employee-form-modal .btn-success:hover {
    background-color: #367d78;
    border-color: #367d78;
}

/* Section Headers */
.employee-form-modal h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Form Grid */
.employee-form-modal .row.g-2 > [class*="col-"] {
    margin-bottom: 0.7rem;
}

/* Date Inputs */
.employee-form-modal input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    padding: 0;
    margin: 0;
}

.employee-form-modal input:-webkit-autofill,
.employee-form-modal input:-webkit-autofill:hover, 
.employee-form-modal input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset;
  -webkit-text-fill-color: var(--gray-800);
}


/* Responsive */
@media (max-width: 768px) {
    .employee-form-modal .modal-body {
        padding: 1rem;
    }
    
    .employee-form-modal .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Payslip Styles with Company Branding */
.payslip-container {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
}

.company-header {
    margin-bottom: 20px;
}

.company-name {
    color: #2c3e50;
    margin-bottom: 5px;
}

.company-details p {
    margin: 2px 0;
    font-size: 14px;
    color: #555;
}

.company-logo-placeholder {
    width: 100px;
    height: 100px;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

#pdfStatus {
    font-size: 0.9rem;
    padding: 0.375rem 0;
    color: #6c757d;
}

/* Print-specific styles */
@media print {
    body * {
        visibility: hidden;
    }
    #payslipToPrint, #payslipToPrint * {
        visibility: visible;
    }
    #payslipToPrint {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    #payslipToPrint, #payslipToPrint * {
        visibility: visible;
    }
    #payslipToPrint {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        background-color: white;
    }
    .no-print, .modal-footer {
        display: none !important;
    }
    .company-logo-placeholder {
        border: none;
    }
}

/* Compact common modal styling */
.common_view_modal .modal-content {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    font-size: 14px; /* Compact font size */
}

/* Header */
.common_view_modal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 8px 15px;
}
.common_view_modal .modal-title {
    font-size: 15px;
    font-weight: 600;
}

/* Footer */
.common_view_modal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 8px 15px;
}

/* Compact info boxes */
.common_view_modal .mb-3 {
    padding: 6px 10px;  /* smaller padding */
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px; /* smaller spacing */
    background: #fcfcfc;
}

/* Alternate light shades */
.common_view_modal .col-md-6 .mb-3:nth-child(odd) {
    background: #f5faff;
}
.common_view_modal .col-md-6 .mb-3:nth-child(even) {
    background: #ffffff;
}

/* Labels */
.common_view_modal label {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 2px;
    font-weight: 600;
}

/* Values */
.common_view_modal p.form-control-static {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #222;
    line-height: 1.3;
}

#emiDetails{
    width: 100%;
}

#editEmiDetails{
    width: 100%;
}

/* Modal Body */
#loanDetailsModal .modal-body {
    padding: 1.25rem;
    background-color: #fff;
    max-height: 600px;
    overflow-y: auto;
}



/* Profile Image Box */
.member-info .profile-image {
    width: 110px;
    height: 110px;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.member-info .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Text Details */
.member-info .profile-details h6 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px;
}

.member-info .profile-details p {
    font-size: 15px;
    color: #555;
    margin: 6px 0;
    line-height: 1.5;
}

.member-info .profile-details p span {
    font-weight: 600;
    color: #2c3e50;
}
.bg-light-blue {
    background-color: #e6f0ff; /* halka light blue */
}

.pagination {
    margin-bottom: 0;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-link {
    color: #0d6efd;
}

.page-link:hover {
    color: #0a58ca;
}


#penaltyMemberDetails{
    gap: 10px;
}

/*.table th{*/
/*     white-space: nowrap;*/
/*}*/

/* ====== MEMBER CARD ====== */
/* ====== MEMBER CARD ====== */
.member-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  padding: 20px;
}
.member-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dee2e6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.member-avatar.placeholder {
  background: #d1d5db;
  color: #495057;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-name {
  font-weight: 700;
  color: #212529;
  font-size: 1.1rem;
}

/* ====== INFO CARDS (Loan & Plan) ====== */
.info-card {
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.info-header {
  font-weight: 600;
  color: #343a40;
  padding: 12px 16px;
  font-size: 15px;
  letter-spacing: 0.3px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}
.info-body {
  padding: 16px 20px;
  font-size: 14px;
}
.info-group {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #f1f3f5;
}
.info-group strong {
  color: #212529;
}
.info-group span {
  color: #6c757d;
}

/* ====== GRID DETAILS ====== */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  font-size: 13px;
}
.details-grid div {
  padding: 3px 0;
  color: #495057;
}

/* ====== MODAL OPTIMIZATION ====== */
#loanDetailsModal .modal-dialog {
  max-width: 1000px;
}
#loanDetailsModal .modal-body {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
}

/* ====== SUBTLE COLOR HIGHLIGHTS ====== */
.text-primary {
  color: #0d6efd !important;
}
.text-muted {
  color: #6c757d !important;
}

/* dashboard css */

/* Dashboard Title */
h1.h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

/* Cursor Pointer for Clickable Cards */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Remove gradients and use solid colors */
.bg-gradient {
    background: #2c3e50 !important;
}

.extra-small {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Dashboard Grid Layout - Cleaner */
.dashboard_grids ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.dashboard_grids li {
    margin: 0;
    padding: 0;
}

.dash_small_card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background: white;
    border: 1px solid #e9ecef;
}

.dash_small_card:hover {
    border-color: #3498db;
}

.dash_small_card h6 {
    margin: 0;
    text-align: center;
    line-height: 1.2;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Balance Cards - Clean and Professional */
.balance-card-no-hover {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: white;
}

.balance-card-no-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.balance-card-no-hover .card-body {
    padding: 1.5rem !important;
}

.balance-card-no-hover h3 {
    font-size: 1.5rem;
    margin: 0.25rem 0;
    font-weight: 700;
}

.balance-card-no-hover .fs-1 {
    font-size: 2.5rem !important;
    opacity: 0.9;
}

/* Branch Selector and Time Styling */
.branch-selector,
.live-watch {
    margin-bottom: 1.5rem;
}

.branch-selector label,
.live-watch label {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

.branch-selector .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.branch-selector .form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.1);
}

/* Live Watch Enhancement */
.live-watch .bg-gradient {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.live-watch .text-white {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Financial Summary Cards */
.card.border-0.shadow-sm {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: white;
}

.card.border-0.shadow-sm:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 1.25rem;
}

.card-header.bg-success {
    background: #27ae60 !important;
}

.card-header.bg-warning {
    background: #f39c12 !important;
    color: white !important;
}

.card-header.bg-info {
    background: #3498db !important;
}

.card-header.bg-secondary {
    background: #7f8c8d !important;
}

.card-header.bg-primary {
    background: #2c3e50 !important;
}

.card-header.bg-danger {
    background: #e74c3c !important;
}

.card-header.bg-dark {
    background: #34495e !important;
}

.card-body {
    padding: 1.25rem;
}

/* More Info Links */
.more_info {
    text-align: center;
    background: #27ae60;
    color: #fff;
    border-radius: 0 0 8px 8px;
    margin-top: 1rem;
}

.more_info a {
    color: #fff;
    display: inline-block;
    width: 100%;
        padding: 0.75rem;
    text-decoration: none;
    font-weight: 500;
}

.more_info:hover {
    background: #219653;
}

/* Price Daily Items */
.price_daily {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f2f6;
    padding-bottom: 0.75rem;
    padding-top: 0.75rem;
    margin: 0.5rem 0;
}

.card-body small {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
}

.price_daily h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    font-size: 0.9rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-color: #f1f2f6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Status Items in Cards */
.border-end {
    border-right: 1px solid #e9ecef !important;
}

.col-3:last-child .border-end,
.col-2:last-child .border-end {
    border-right: none !important;
}

/* Text Colors for Amounts */
.text-success { color: #27ae60 !important; }
.text-primary { color: #3498db !important; }
.text-warning { color: #f39c12 !important; }
.text-danger { color: #e74c3c !important; }
.text-info { color: #17a2b8 !important; }
.text-secondary { color: #7f8c8d !important; }




/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard_grids ul {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .dashboard_grids ul {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .col-md-10 {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .col-md-2 {
        width: 100%;
    }
    
    .branch-selector,
    .live-watch {
        display: inline-block;
        width: 48%;
        margin-right: 2%;
        vertical-align: top;
    }
    
    .live-watch {
        margin-right: 0;
    }
    
    .balance-card-no-hover .card-body {
        padding: 1.25rem !important;
    }
    
    .balance-card-no-hover h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .dashboard_grids ul {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .dash_small_card {
        padding: 0.75rem 0.5rem !important;
    }
    
    .dash_small_card .fs-4 {
        font-size: 1.4rem !important;
    }
    
    .branch-selector,
    .live-watch {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .balance-card-no-hover .card-body {
        padding: 1.25rem !important;
    }
    
    .balance-card-no-hover h3 {
        font-size: 1.3rem;
    }
    
    .balance-card-no-hover .fs-1 {
        font-size: 2rem !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .price_daily {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .price_daily h5 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .dashboard_grids ul {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .dash_small_card {
        padding: 0.5rem !important;
    }
    
    .dash_small_card .fs-4 {
        font-size: 1.2rem !important;
        margin-bottom: 0.3rem;
    }
    
    .dash_small_card h6 {
        font-size: 0.75rem;
    }
    
    .balance-card-no-hover .card-body {
        padding: 1rem !important;
    }
    
    .balance-card-no-hover h5 {
        font-size: 0.9rem;
    }
    
    .balance-card-no-hover h3 {
        font-size: 1.1rem;
    }
    
    .balance-card-no-hover .fs-1 {
        font-size: 1.8rem !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .more_info {
        padding: 0.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .dashboard_grids ul {
              grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* Animation for better user experience */


/* Stagger animation for list items */
/* Form Select Styling */
.form-select-sm {
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 0.875rem;
}

.form-select-sm:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.1);
}

/* Table Responsive */
.table-responsive {
    border-radius: 0 0 8px 8px;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Clean up borders and shadows */
.border-bottom {
    border-bottom: 1px solid #e9ecef !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05) !important;
}

/* Improve visibility of important elements */
.balance-amount,
.financial-amount {
    font-weight: 700;
}

.card-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Due EMI Links */
a[href*="due-emi"] {
    font-weight: 500;
    text-decoration: none;
}

a[href*="due-emi"]:hover {
    text-decoration: underline;
}

.menu-light {
    background: #f8f9fa; /* Light grey */
    padding: 8px 15px;
    border-radius: 6px;
    margin: 0 5px;
    transition: 0.2s ease-in-out;
    font-weight: 500;
}

.menu-light:hover {
    background: #e9ecef; /* Slightly darker light */
    color: #000 !important;
}

/* Keep modal body same (just slightly clean padding) */
#viewLoanPlanModal .modal-body {
    background: #f6f7fb;
    padding: 25px;
}

/* Beautiful card-style blocks */
#viewLoanPlanModal .form-group {
    background: #ffffff;
    padding: 9px 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #e3e6f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

/* Soft pastel background highlights for each block */
#viewLoanPlanModal .form-group:nth-child(odd) {
    background: #f9fbff; /* Light blue-white */
}

#viewLoanPlanModal .form-group:nth-child(even) {
    background: #fffdf7; /* Light cream */
}

/* Left colored stripe */
#viewLoanPlanModal .form-group::before {
content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    border-radius: 12px 0 0 12px;
    background: #009688;
    opacity: 0.5;
}

/* Label */
#viewLoanPlanModal label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 3px;
}

/* Value */
#viewLoanPlanModal p {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Status badge style */
#viewLoanPlanModal .badge {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

/* Sabhi table TDs ke liye */
/*.table td {*/
/*    vertical-align: middle !important;*/
/*    white-space: nowrap;*/
/*}*/

/* Sabhi buttons ko inline rakhein */
.table td .btn,
.table td .btn-group,
.table td .dropdown {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    margin-bottom: 0;
}

/* Last button/element me margin na de */
.table td .btn:last-child,
.table td .btn-group:last-child,
.table td .dropdown:last-child {
    margin-right: 0;
}

/* Links ko bhi inline rakhein */
.table td a {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* Badge ko bhi inline rakhein */
.table td .badge {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}


@media(max-width:768px){
    h1.h3 {
    font-size: 1.2rem;
    padding-bottom: 0.50rem;
}
.border-end{
    border: 0!important;
}

form .col-md-3, form .col-md-2{
    width: 50%!important;
}

.form-control, .form-select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="search"] {
    font-size: 12px;
}

.btn{
    font-size: 13px;
    padding: 5px 10px;
}
.table th {
    padding: 0.45rem;
    font-size: 0.7rem;
}

    .table td {
        padding: 0.45rem;
        font-size: 11px;
        font-weight: 500;
    }
.sidebar .nav-link {
    font-size: 13px;
}

}
.nav-link:focus, .nav-link:hover{
    color: #000;
}
.navbar-nav .nav-link.active, .navbar-nav .nav-link.show{
   color: #000; 
}
.avatar-placeholder,
.avatar-placeholder-lg {
    background: #6c5ce7;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.avatar-placeholder {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.avatar-placeholder-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 22px;
    margin: 0 auto;
}



@media (min-width: 1200px) and (max-width: 1600px){
  .sidebar .nav-link{
    font-size: 13px;
}  
.menu-light {
    font-size: 13px;
}
.dropdown-toggle {
        font-size: 13px;
}
.form-label {
    font-size: 13px;
}

.form-control {
    height: 38px;
         font-size: 13px;
}

.btn {
    padding: 7px;
    text-align: center;
    font-size: 12px;
    gap: 0;
}

.table th {
    padding: 0.50rem!important;
    font-size: 0.9rem!important;
}
.table td {
    font-size: 0.75rem!important;
    padding: 0.5rem!important;
}

.table-big td {
    font-size: 0.85rem!important;
    padding: 0.5rem!important;
}

.main-content .container-fluid{
    padding: 0;
}

.main-content main{
     padding-left: 10px !important;
}

.main-content.expanded{
    padding-left: 0!important;
}

    .main-content.expanded main {
        padding-left: 0px !important;
    }

}


.card .d-flex.justify-content-end.mb-3{
    margin-bottom: 0!important;
}
.card .row.g-3{
        --bs-gutter-y: 0.5rem;
        --bs-gutter-x: 0.5rem;
}

.customer_name h5 {
    font-size: 15px;
    margin-bottom: 0;
    color: #5f5f5f;
    padding-left: 0;
}


/* company details*/

.company_details{
    text-align: center;
}

.reciept_modals .modal-header{
    background: #00800024;
}

.reciept_modal_header{
    box-shadow: rgba(100, 100, 111, 0.1) 0px 3px 8px 0px;
    padding: 15px;
    margin-bottom: 24px;
}
.reciept_modals .table-responsive th{
    background: #e1e1e1;
    font-size: 13px !important;
}


.loan_deta td{
  padding: 10px 0 !important;
  font-weight: 500;
}

.reciept_modal_header .company_details p{
    font-size: 12px;
    margin-bottom: 0;
}


/* EMI Schedule Table Styling */
.emi-schedule-table th,
.emi-schedule-table td {
    border: 1px solid #000;
    padding: 6px 8px;          /* clean gapping */
    text-align: center;
    vertical-align: middle;
}

.emi-schedule-table th {
    font-weight: 600;
    font-size: 12px;
}

.emi-schedule-table td {
    font-size: 12px;
    height: 26px;              /* handwritten space feel */
}

/* Print tuning */
@media print {
    .emi-schedule-table th,
    .emi-schedule-table td {
        padding: 5px 7px;
        font-size: 11px;
    }
}

.disbursement-view-modal .modal-content {
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Header */
.disbursement-view-modal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 12px 16px;
}

.disbursement-view-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
}

/* Body */
.disbursement-view-modal .modal-body {
    background: #ffffff;
    padding: 18px;
}

/* Field wrapper */
.disbursement-view-modal .mb-3 {
    background: #fafafa;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

/* Labels */
.disbursement-view-modal label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

/* Values */
.disbursement-view-modal p.form-control-static {
    margin: 0;
    font-size: 13px;
    color: #222;
    font-weight: 500;
    word-break: break-word;
}

/* Footer */
.disbursement-view-modal .modal-footer {
    border-top: 1px solid #ddd;
    background: #f8f9fa;
    padding: 10px 16px;
}

/* Buttons */
.disbursement-view-modal .btn-secondary {
    padding: 6px 16px;
    font-size: 13px;
}

/* Row spacing */
.disbursement-view-modal .row > [class*="col-"] {
    margin-bottom: 4px;
}

/* Print friendly */
@media print {
    .disbursement-view-modal .modal-content {
        box-shadow: none;
        border: 1px solid #000;
    }

    .disbursement-view-modal .mb-3 {
        background: #fff;
        border: 1px solid #000;
    }
}

@media print {
    .bar_code {
        width: 90px !important;
        max-width: 60px !important;
        overflow: visible !important;
        text-align: center;
    }

    .bar_code svg {
        width: 90px !important;
        height: auto !important;
        display: inline-block;
    }
}

/* EMI पेज के लिए स्टाइल */


.desktop_view {
    display: none;
}

.mobile_view {
    display: flex;
}
    


/* प्रिंट के समय page break control */


@media (max-width: 767.98px) {
    
    .desktop_view {
        display: flex;
    }
    .mobile_view {
        display: none;
    }
    
    .approve-btn{
        font-size: 9px;
    border-radius: 4px!important;
    padding: 4px;
    margin: 0 0 3px!important;
    }
    
    .btn-success{
             font-size: 9px!important;
    border-radius: 4px!important;
    padding: 4px!important;
    margin: 0 0 3px!important;   
    }
    
    .btn-danger {
             font-size: 9px!important;
    border-radius: 4px!important;
    padding: 4px!important;
    margin: 0 0 3px!important;   
    }
    
    .badge{
            font-size: 12px !important;
    }
    
    .reject-btn{
             font-size: 9px;
    border-radius: 4px!important;
    padding: 4px;
    }
    
    .approve-request{
        font-size: 9px;
    border-radius: 4px!important;
    padding: 4px;
    margin: 0 0 3px!important;
    }
    
    .reject-request{
             font-size: 9px;
    border-radius: 4px!important;
    padding: 4px;
    }
    
      #loanTabs .nav-link {
    font-size: 11px !important;
    padding: 4px 6px !important;
    line-height: 1.2;
    white-space: nowrap;
  }

  #loanTabs .nav-item {
    flex: 1;
    text-align: center;
  }

  #loanTabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  #loanTabs::-webkit-scrollbar {
    display: none;
  }
    
      .member-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

.member-card img {
        width: 65px;
        height: 65px;
        margin-bottom: 0;
    }

  .member-name {
    font-size: 13px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    text-align: left;
    width: 100%;
    margin-top: 10px;
  }

  .details-grid div {
    word-break: break-word;
  }
    
    .hide-mobile {
        display: none !important;
    }
    
        /* Card padding reduce */
    .card-body {
        padding: 12px;
    }

    /* Form labels */
    .card-body form .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    /* Inputs & selects */
.card-body form .form-control, .card-body form .form-select {
        font-size: 11px;
        padding: 6px 8px;
        height: 30px;
    }

    /* Row spacing */
    .card-body form .row.g-3 {
        --bs-gutter-y: 8px;
    }

    /* Filter button */
    .card-body form button.btn {
        font-size: 13px;
padding: 6px 10px;
        margin: 10px 0;
    }

    /* Print / CSV buttons */
    .card-body .btn {
        font-size: 13px;
 padding: 6px 10px;
        margin: 10px 0;
    }

    .card-body .d-flex {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    div{
        font-size: 10px;
    }
    
    .main-content {
        padding-left: 17px !important;
        margin-left: 0 !important;
    }
    
        .pagination {
        flex-wrap: wrap;              /* buttons next line me aa jayenge */
        justify-content: center;
        gap: 4px;                     /* buttons ke beech halka gap */
    }

    .pagination .page-item {
        margin: 0;                    /* extra spacing remove */
    }

    .pagination .page-link {
        padding: 4px 8px;             /* chhote buttons */
        font-size: 12px;              /* font size kam */
        line-height: 1.2;
        min-width: 32px;              /* uniform size */
        text-align: center;
    }

    /* First / Last ko thoda compact */
    .pagination .page-link {
        white-space: nowrap;
    }
    
    .dropdown-toggle{
    font-size: 10px!important;
    }
    
    .card-body small {
    font-size: 0.5rem;
}


    
}

@media (max-width: 767px) {

    .navbar-inner {
        justify-content: space-between;
                justify-content: space-between;
        width: 100%;
    }

    /* LEFT */
    .sidebar-toggle {
        order: 1;
    }

    /* CENTER */
    .navbar-brand {
        order: 2;
font-size: 12px;
    }

    /* RIGHT */
    .logout-wrap {
        order: 3;
    }
    
        .navbar {
        overflow: visible !important;
    }

    .navbar-nav,
    .navbar-inner {
        overflow: visible !important;
    }

    .nav-item.dropdown {
        position: relative;
    }

    .nav-item.dropdown .dropdown-menu {
        position: absolute !important;
        top: 100%;
        right: 0;
        left: auto;
        z-index: 1055;
        transform: none !important;
        margin-top: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    /* Prevent navbar height from expanding */
    .navbar .dropdown-menu.show {
        position: absolute !important;
    }
}

@media (min-width: 1200px) {
    .fs-3 {
        font-size: 1.45rem !important;
    }
}


/*table{*/
/*        table-layout: fixed!important;*/
/*    border-collapse: collapse!important;*/
/*}*/

/*table th,*/
/*table td {*/
/*    word-wrap: break-word!important;*/
/*    white-space: normal!important;*/
/*}*/

/*table td .badge {*/
/*    white-space: normal !important;*/
/*    word-break: break-word;*/
/*    display: inline-block;*/
/*    max-width: 100%;*/
/*}*/


table.print-table{
        table-layout: fixed!important;
    border-collapse: collapse!important;
}

table.print-table th,
table.print-table td {
    word-wrap: break-word!important;
    white-space: normal!important;
}

.badge{
    border-radius: 2px !important;
}


.emi_collection_modal{
    width: 640px;
}

.login-logo img{
    width: 150px;
}


@media(max-width: 768px){
     .emi_collection_modal{
     width: 96%;
 }  
 .member-info .profile-details h6 {
    font-size: 12px;
}
 .member-info .profile-details p {
    font-size: 10px;
    line-height: 1;
}
 
 .member-info .profile-image {
    width: 82px;
    height: 82px;
    border: 0;
}

.profile-image img{
    width: 82px;
    height: 82px;
    object-fit: cover;
} 
 
 .btn-secondary{
     font-size: 9px !important;
        border-radius: 4px !important;
        padding: 4px !important;
        margin: 0 0 3px !important;
 }
 
 .collect_emi_btn{
     width: 100%;
 }
 
 .login-logo img {
    width: 120px;
}
 
 
}

@media (max-width: 374px) {
    .navbar-brand {
        order: 2;
        font-size: 10px;
        margin-right: 0;
    }
}

/*.table-responsive {*/
/*    position: relative;*/
/*    overflow: visible !important;*/
/*}*/

/*.table-responsive table{*/
/*    width: 100% !important;*/
/*    table-layout: fixed;   */
/*}*/

/*.table-responsive th,*/
/*.table-responsive td{*/
/*    white-space: normal !important;  */
/*    word-break: break-word;           */
/*    overflow-wrap: anywhere;      */
/*}*/


.table-responsive .dropdown-menu {
    position: absolute !important;
    z-index: 1000 !important;
}



.user_icon{
        width: 20px;
    height: 20px;
    border-radius: 50%;
}
/* table ko horizontal scroll tak limit rakho */
.table-responsive {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* dropdown ka parent static kar do */
.table-responsive td,
.table-responsive th {
    position: static !important;
}

/* Bootstrap dropdown ko container se bahar force karo */
.table-responsive .dropdown-menu {
    position: fixed !important;
    inset: auto auto auto auto !important;
    transform: none !important;
    z-index: 999999 !important;
}

/* dropdown toggle pe transform remove (IMPORTANT) */
.table-responsive .dropdown,
.table-responsive .dropdown-toggle {
    transform: none !important;
}