body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.App {
  text-align: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.App-header {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  color: white;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  border: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 500px;
  width: 90%;
  font-size: calc(10px + 2vmin);
}

.App-header h1 {
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: 300;
}

.user-profile {
  text-align: center;
}

.user-profile h2 {
  margin-bottom: 15px;
  font-size: 1.8rem;
  font-weight: 400;
}

.user-profile p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  opacity: 0.9;
}

.sign-in-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px 0 rgba(255, 107, 107, 0.4);
}

.sign-in-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(255, 107, 107, 0.6);
}

.sign-in-btn:active {
  transform: translateY(0);
}

.api-section {
  margin-top: 30px;
  text-align: left;
  max-width: 100%;
}

.api-section h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 400;
}

.loading {
  text-align: center;
  font-style: italic;
  opacity: 0.8;
}

.error {
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.5);
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  text-align: center;
}

.retry-btn {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: #ff5252;
  transform: translateY(-1px);
}

.data-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.data-section h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 500;
}

.data-section pre {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  padding: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.action-btn {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px 0 rgba(78, 205, 196, 0.4);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(78, 205, 196, 0.6);
}

.logout-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  box-shadow: 0 4px 15px 0 rgba(255, 107, 107, 0.4);
}

.logout-btn:hover {
  box-shadow: 0 6px 20px 0 rgba(255, 107, 107, 0.6);
}

.action-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .App-header {
    padding: 20px;
    margin: 20px;
  }
  
  .data-section pre {
    font-size: 0.8rem;
  }
  
  .actions {
    flex-direction: column;
    align-items: center;
  }
  
  .action-btn {
    width: 100%;
    max-width: 200px;
  }
}

/* ============================================
   3D KEYCLOAK LOADING STYLES
   ============================================ */

.keycloak-loading-3d {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}

.keycloak-loading-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

.keycloak-loading-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.keycloak-loading-orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.4));
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.keycloak-loading-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(240, 147, 251, 0.8), rgba(118, 75, 162, 0.4));
  bottom: -200px;
  right: -200px;
  animation-delay: 5s;
}

.keycloak-loading-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  animation: gridMove 20s linear infinite;
}

.keycloak-loading-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  border-radius: 30px;
  padding: 50px 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 100px rgba(102, 126, 234, 0.2);
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform-style: preserve-3d;
}

.keycloak-loading-logo-container {
  position: relative;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.keycloak-loading-logo-glow {
  position: absolute;
  width: 250px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(102, 126, 234, 0.3), transparent 70%);
  border-radius: 50%;
  filter: blur(25px);
  animation: pulse 3s ease-in-out infinite;
  z-index: 1;
}

.keycloak-loading-logo {
  position: relative;
  z-index: 2;
  max-width: 220px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  filter: brightness(1.1) contrast(1.1);
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.keycloak-loading-spinner-wrapper {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.keycloak-loading-spinner-3d {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(102, 126, 234, 0.2);
  border-top-color: #667eea;
  border-right-color: #764ba2;
  border-radius: 50%;
  animation: spin3d 1s linear infinite;
  box-shadow: 
    0 0 20px rgba(102, 126, 234, 0.3),
    inset 0 0 10px rgba(102, 126, 234, 0.1);
  transform-style: preserve-3d;
}

@keyframes spin3d {
  0% { transform: rotate(0deg) rotateX(0deg); }
  50% { transform: rotate(180deg) rotateX(180deg); }
  100% { transform: rotate(360deg) rotateX(360deg); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.keycloak-loading-title {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.keycloak-loading-text {
  color: #666;
  font-size: 1rem;
  margin: 0;
}


div.exhibition-dashboard .search-filter-bar{
    padding: 10px 10px;
    padding-bottom: 0;
    align-items: center;
  }
  
  div.modern-product-dashboard .search-filter-bar{
    padding: 16px 10px;
  }
  
  .stat-card{
    display: flex;
    white-space: nowrap;
  }
  
  div.stat-card p{
    font-size: 14px;
      color: #718096;
      font-weight: 500;
  }
  
  div.stat-card h3{
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    text-align: left;
  }
  
  .stat-info{
    display: flex;
    flex-direction: column;
    
    flex: 1 1;
  
  }
  
  div.stat-info p{
    font-size: 14px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 4px;
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    
  }
  
  div.stat-info h3{
    margin: 0;
  }
  
  div.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
  }
  
  .stat-content{
    text-align: left;
  }
  
  div.stat-content h3{
    margin: 0;
  }
  
  .fa-dollar-sign{
    height: 50px;
    width: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  
  }
  
  h3.main-h3{
    font-size: 14px !important;
    display: flex;
    flex-wrap: wrap;
  }
  
  h3.main-h3.main-d{
    color: #6c757d !important;
  }
  
  h3.consignment-h3{
    font-size: 14px !important;
    color: #6c757d !important;
  }
  
  p.consignment-p{
    color: #1a202c !important;
    font-size: 24px !important;
    font-weight: bold !important;
  }
  
  div.stat-card.c{
    display: flex;
    flex-direction: column;
  }
  
  div.consignment-header{
    background: #ffffff;
    border-radius: 8px;
  }
  
  div.consignment-search .form-input{
    padding: 40px 30px;
    background: #ffffff;
  }
  
  div.consignment-list{
    background: #ffffff;
  }
  
  button.icon-btn.btn-sm.consi-view{
    background-color: #17a2b8;
    color: #fff;
  }
  
  button.icon-btn.btn-sm.consi-edit{
    background-color: #007bff;
    color: #fff;
  }
  
  button.icon-btn.btn-sm.consi-delete{
    background-color: #dc3545;
    color: #fff;
  }
  div.action-section{
    margin-left: 100px;
  }
  
  div.consignment-selector{
    align-items: center;
  }
  
  a.add-product-btn{
    text-decoration: none;
  }
  
  div.received-header-content{
    padding: 16px 10px;
    background: #ffffff;
    border-radius: 8px;
  }
  
  input.search-input::placeholder{
    padding-left: 20px;
  }
  
  div.search-box i{
    padding-left: 10px;
  }
  
  div.section-header{
    border-radius: 8px;
  }
  
  .card-info.main-info{
    display: flex;
    flex-direction: column;
    flex: 1 1;
    min-width: 0;
  }
  
  .card-info.main-info .main-h3{
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-bottom: 5px;
    text-align: center;
  
  }
  
  /* Footer layout */
  div.card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  /* IMPORTANT: text container ko shrink allow karo */
  div.card-footer .recent-info {
    flex: 1 1;
    min-width: 0; /* ðŸ‘ˆ MOST IMPORTANT */
  }
  
  /* Review edit requests text wrap */
  div.card-footer .recent-label {
    white-space: normal;        /* allow wrap */
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
  }
/* width responsive style*/
.sidebar.collapsed~ .main-content{
    max-width: calc(100% - 60px);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-header i {
    margin-right: 10px;
    color: #ffd700;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #ffd700;
}

.sidebar-menu li.active a {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #ffd700;
}

.sidebar-menu i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Sidebar Menu Group Styles */
.sidebar-menu-group-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    -webkit-user-select: none;
            user-select: none;
}

.sidebar-menu-group-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #ffd700;
    color: white;
}

.sidebar-menu-group-header i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-menu-chevron {
    margin-left: auto;
    margin-right: 0;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.sidebar-menu li.active-parent > .sidebar-menu-group-header {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: #ffd700;
    color: white;
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 3px solid #ffd700;
    margin-left: 20px;
}

.sidebar-submenu li {
    margin: 0;
}

.sidebar-submenu a {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 40px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #ffd700;
    color: white;
    padding-left: 45px;
}

.sidebar-submenu li.active a {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: #ffd700;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 250px);
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.header-left p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-dashboard-switcher {
    display: flex;
    align-items: center;
}

.header-dashboard-select {
    background-color: #1976d2;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 160px;
    max-width: 220px;
}

.header-dashboard-select:hover,
.header-dashboard-select:focus {
    background-color: #1565c0;
    outline: none;
}

.header-role-switcher {
    display: flex;
    align-items: center;
}

.header-role-select {
    background-color: #2e7d32;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 140px;
    max-width: 200px;
}

.header-role-select:hover,
.header-role-select:focus {
    background-color: #1b5e20;
    outline: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: #e9ecef;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
    flex: 1 1;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.view-all-btn {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-btn:hover {
    color: #764ba2;
}

/* Recent Products */
.recent-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.product-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.product-info h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.product-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.product-category {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.product-date {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.action-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.action-card i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

.action-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.action-card p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Form Styles */
.form-container {
    padding: 30px;
    flex: 1 1;
}

.product-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f8f9fa;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
    gap: 20px;
}

.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-row-6 {
    grid-template-columns: repeat(6, 1fr);
}

.form-row-10 {
    grid-template-columns: repeat(10, 1fr);
}

.product-price-supplier-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.product-price-supplier-row .form-group {
    flex: 1 1;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .product-price-supplier-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .product-price-supplier-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Responsive adjustments for 4-column layout */
@media (max-width: 1400px) {
    .form-row-10 {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row-10 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row-4 {
        grid-template-columns: 1fr;
    }
    
    .form-row-6 {
        grid-template-columns: 1fr;
    }
    
    .form-row-10 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Array Input Styles */
.array-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.array-input input {
    flex: 1 1;
}

.btn-add-item {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-add-item:hover {
    background: #218838;
}

.array-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.array-item {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.array-item button {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.array-item button:hover {
    background: #dc3545;
    color: white;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f8f9fa;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Product View Styles */
.product-view-content {
    padding: 30px;
    flex: 1 1;
}

.search-filter-bar {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-controls select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

/* Products Table */
.products-table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    background: #f8f9fa;
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.products-table td {
    padding: 15px;
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle;
}

.products-table tr:hover {
    background: #f8f9fa;
}

/* Badge Styles */
.badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-food {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-beverage {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-spice {
    background: #fff3e0;
    color: #f57c00;
}

.badge-supplement {
    background: #e8f5e8;
    color: #388e3c;
}

.badge-cosmetic {
    background: #fce4ec;
    color: #c2185b;
}

.badge-other {
    background: #f5f5f5;
    color: #616161;
}

.badge-organic {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge-natural {
    background: #fff8e1;
    color: #f57f17;
}

.badge-premium {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-standard {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-bulk {
    background: #fff3e0;
    color: #ef6c00;
}

/* Action Buttons */
.btn-action {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-view:hover {
    background: #138496;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.page-info {
    color: #7f8c8d;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #2c3e50;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Product Detail Styles */
.product-detail {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section {
    padding-bottom: 20px;
    border-bottom: 1px solid #f8f9fa;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 15px;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.detail-item span {
    color: #2c3e50;
}

/* User Manager Styles */
.user-profile-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.profile-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-item label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-item span {
    color: #555;
    font-size: 1rem;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    min-height: 20px;
}

.profile-input,
.profile-textarea {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.profile-input:focus,
.profile-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.profile-textarea {
    resize: vertical;
    min-height: 80px;
}

.profile-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.profile-image-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-banned {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-verified {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-unverified {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .header-left h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-content,
    .product-view-content,
    .form-container {
        padding: 20px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .products-table-container {
        overflow-x: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-profile {
        align-self: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }

    .main-content{
        max-width: 100%;
    }

    .sidebar.collapsed~ .main-content{
    max-width: 100%;
}
}

/* ============================================
   MAIN DASHBOARD SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for main dashboard section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Main Container */
.container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.main-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: scale(1.05);
}

.main-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.main-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Main Sidebar - Mobile First Approach */
.sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .sidebar.collapsed .sidebar-header h2 {
    display: none;
  }

  .sidebar.collapsed .main-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #ffd700;
  }

  .sidebar.collapsed .sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .sidebar.collapsed .sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .sidebar.collapsed .sidebar-menu a span {
    display: none;
  }

  .sidebar.collapsed .sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .sidebar.collapsed .sidebar-menu-group-header {
    justify-content: center;
    padding: 15px;
  }

  .sidebar.collapsed .sidebar-menu-group-header span {
    display: none;
  }

  .sidebar.collapsed .sidebar-menu-chevron {
    display: none;
  }

  .sidebar.collapsed .sidebar-menu-group-header i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .sidebar.collapsed .sidebar-submenu {
    display: none;
  }
}

.main-sidebar-icon-only {
  display: none;
}

.sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.sidebar-header i {
  margin-right: 8px;
  color: #ffd700;
  font-size: 1rem;
}

/* VHC Logo Styles */
.sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sidebar-title-text {
  flex: 1 1;
}

.sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.sidebar-menu li {
  margin: 5px 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: #ffd700;
}

.sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: #ffd700;
}

.sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content */
.main-content {
  flex: 1 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Main Header */
.header {
  background: white;
  padding: 15px 20px 15px 70px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.main-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.main-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.main-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.header-left h1 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 0;
  word-break: break-word;
}

.header-left p {
  color: #7f8c8d;
  font-size: 0.85rem;
  margin: 5px 0 0 0;
}

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.header-dashboard-select {
  min-width: 120px;
  max-width: 160px;
  padding: 5px 8px;
  font-size: 13px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-profile:hover {
  background: #e9ecef;
}

.profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dashboard Content */
.dashboard-content {
  padding: 20px 15px;
  flex: 1 1;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Table Styles */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.table th {
  background: #f8f9fa;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.table tr:hover {
  background: #f8f9fa;
}

/* Form Styles */
.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card-header {
  margin-bottom: 15px;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.card-body {
  color: #64748b;
  font-size: 0.9rem;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .main-mobile-menu-btn {
    display: none;
  }

  .main-sidebar-overlay {
    display: none !important;
  }

  .main-sidebar-toggle-btn {
    display: flex;
  }

  .sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .container.sidebar-collapsed .main-content {
    margin-left: 60px;
  }

  .header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .container.sidebar-collapsed .header {
    padding-left: 85px;
  }

  .header-left h1 {
    font-size: 1.6rem;
  }

  .dashboard-content {
    padding: 25px 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .table th,
  .table td {
    padding: 15px 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .sidebar {
    width: 250px;
  }

  .main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .container.sidebar-collapsed .main-content {
    margin-left: 60px;
  }

  .header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .container.sidebar-collapsed .header {
    padding-left: 90px;
  }

  .sidebar-header {
    padding: 20px;
  }

  .sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .header-left h1 {
    font-size: 2rem;
  }

  .dashboard-content {
    padding: 30px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .table {
    min-width: 1200px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .table {
    min-width: 1400px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .dashboard-content {
    width: 100%;
    max-width: 100%;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.main-mobile-hide {
  display: none;
}

/* Show on mobile only */
.main-mobile-only {
  display: block;
}

/* Responsive text */
.main-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.main-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.main-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .main-mobile-hide {
    display: block;
  }

  .main-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .header {
    padding: 10px 20px;
  }

  .header-left h1 {
    font-size: 1.3rem;
  }

  .dashboard-content {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .sidebar-menu a,
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PAGES RESPONSIVE STYLES
   ============================================ */

/* Main Dashboard Page */
.main-dashboard {
  padding: 15px;
  min-height: calc(100vh - 80px);
}

.page-header {
  padding: 15px;
  margin-bottom: 20px;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.header-content h1 {
  font-size: 1.5rem;
}

.header-content p {
  font-size: 0.9rem;
}

/* Consignment Page */
.consignment-container,
.warehouse-container,
.all-user-list-page,
.planning-consignment-page {
  padding: 15px;
  min-height: calc(100vh - 80px);
}

.consignment-header,
.warehouse-header,
.list-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
}

.consignment-title h1,
.warehouse-title h1,
.list-header h1 {
  font-size: 1.5rem;
}

.consignment-stats,
.stats-container,
.summary-cards {
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 15px;
}

.stat-card h3,
.stat-content h3 {
  font-size: 1.5rem;
}

.consignment-search,
.warehouse-filters,
.search-filter-bar {
  padding: 15px;
  margin-bottom: 20px;
}

.search-container {
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.search-input,
.form-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
}

/* Tables - Mobile */
.table-container,
.table-responsive,
.products-table-container,
.consignment-list {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.table,
.products-table,
.buyers-table,
.consignment-table {
  min-width: 600px;
  font-size: 0.85rem;
}

.table th,
.table td,
.products-table th,
.products-table td,
.buyers-table th,
.buyers-table td {
  padding: 10px 8px;
  font-size: 0.8rem;
}

/* Forms - Mobile */
.add-consignment-form,
.add-product-form,
.add-buyer-form,
.add-supplier-form,
.add-warehouse-form {
  padding: 20px;
  margin: 15px;
}

.form-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-label {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.form-actions {
  flex-direction: column;
  gap: 10px;
}

.form-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Buttons - Mobile */
.btn,
.btn-primary,
.btn-secondary,
.btn-add-consignment,
.export-btn,
.refresh-btn {
  padding: 12px 16px;
  font-size: 0.9rem;
  min-height: 44px;
  width: 100%;
  justify-content: center;
}

.header-actions {
  flex-direction: column;
  width: 100%;
  gap: 10px;
}

.header-actions .btn {
  width: 100%;
}

/* Pagination - Mobile */
.pagination-container,
.pagination {
  flex-direction: column;
  gap: 15px;
  align-items: center;
  padding: 15px;
}

.pagination-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-width: 40px;
  min-height: 40px;
}

.page-info {
  text-align: center;
  font-size: 0.85rem;
}

/* Container Boxes */
.container-box-inner,
.title-box {
  padding: 15px;
  margin-bottom: 20px;
}

.title-box {
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.add-supplier-btn,
.add-buyer-btn {
  width: 100%;
  justify-content: center;
}

/* Error and Loading States */
.error-message,
.alert {
  padding: 12px 15px;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.loading-container {
  padding: 40px 20px;
  min-height: 300px;
}

.loading-container i {
  font-size: 2rem;
}

.empty-state,
.no-data {
  padding: 40px 20px;
  text-align: center;
}

.empty-state i,
.no-data i {
  font-size: 3rem;
}

/* Action Buttons in Tables */
.action-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.action-buttons button {
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
}

/* Modal Responsive */
.ReactModal__Content {
  width: 95vw !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  margin: 5vh auto !important;
  padding: 20px !important;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .main-dashboard,
  .consignment-container,
  .warehouse-container,
  .all-user-list-page,
  .planning-consignment-page {
    padding: 20px;
  }

  .page-header,
  .consignment-header,
  .warehouse-header,
  .list-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
  }

  .header-content h1,
  .consignment-title h1,
  .warehouse-title h1,
  .list-header h1 {
    font-size: 1.8rem;
  }

  .consignment-stats,
  .stats-container,
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card h3,
  .stat-content h3 {
    font-size: 2rem;
  }

  .search-container {
    flex-direction: row;
    width: auto;
  }

  .search-input,
  .form-input {
    width: auto;
    min-width: 250px;
  }

  .table,
  .products-table,
  .buyers-table {
    min-width: 800px;
    font-size: 0.9rem;
  }

  .table th,
  .table td,
  .products-table th,
  .products-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  .add-consignment-form,
  .add-product-form,
  .add-buyer-form,
  .add-supplier-form,
  .add-warehouse-form {
    padding: 25px;
    margin: 20px;
  }

  .form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .form-actions .btn {
    width: auto;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-add-consignment {
    width: auto;
    padding: 12px 20px;
  }

  .header-actions {
    flex-direction: row;
    width: auto;
  }

  .header-actions .btn {
    width: auto;
  }

  .pagination-container,
  .pagination {
    flex-direction: row;
    justify-content: space-between;
  }

  .title-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .add-supplier-btn,
  .add-buyer-btn {
    width: auto;
  }

  .action-buttons {
    gap: 8px;
  }

  .ReactModal__Content {
    width: 85vw !important;
    max-width: 85vw !important;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .main-dashboard,
  .consignment-container,
  .warehouse-container,
  .all-user-list-page,
  .planning-consignment-page {
    padding: 25px;
  }

  .page-header,
  .consignment-header,
  .warehouse-header,
  .list-header {
    padding: 25px;
  }

  .header-content h1,
  .consignment-title h1,
  .warehouse-title h1,
  .list-header h1 {
    font-size: 2rem;
  }

  .consignment-stats,
  .stats-container,
  .summary-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .stat-card {
    padding: 25px;
  }

  .stat-card h3,
  .stat-content h3 {
    font-size: 2.5rem;
  }

  .table,
  .products-table,
  .buyers-table {
    min-width: 1000px;
    font-size: 0.95rem;
  }

  .table th,
  .table td,
  .products-table th,
  .products-table td {
    padding: 15px 12px;
    font-size: 0.9rem;
  }

  .add-consignment-form,
  .add-product-form,
  .add-buyer-form,
  .add-supplier-form,
  .add-warehouse-form {
    padding: 30px;
    margin: 25px auto;
    max-width: 900px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-label {
    font-size: 1rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 12px 15px;
    font-size: 1rem;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-add-consignment {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .ReactModal__Content {
    width: 75vw !important;
    max-width: 75vw !important;
    max-width: 800px !important;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .main-dashboard,
  .consignment-container,
  .warehouse-container,
  .all-user-list-page,
  .planning-consignment-page {
    padding: 30px;
  }

  .consignment-stats,
  .stats-container,
  .summary-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }

  .table,
  .products-table,
  .buyers-table {
    min-width: 1200px;
  }

  .add-consignment-form,
  .add-product-form,
  .add-buyer-form,
  .add-supplier-form,
  .add-warehouse-form {
    max-width: 1000px;
  }

  .ReactModal__Content {
    width: 70vw !important;
    max-width: 900px !important;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .main-dashboard,
  .consignment-container,
  .warehouse-container,
  .all-user-list-page,
  .planning-consignment-page {
    padding: 40px;
  }

  .consignment-stats,
  .stats-container,
  .summary-cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .table,
  .products-table,
  .buyers-table {
    min-width: 1400px;
  }

  .add-consignment-form,
  .add-product-form,
  .add-buyer-form,
  .add-supplier-form,
  .add-warehouse-form {
    max-width: 1200px;
  }

  .ReactModal__Content {
    width: 60vw !important;
    max-width: 1000px !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .sidebar,
  .header,
  .form-actions,
  .main-mobile-menu-btn,
  .main-sidebar-toggle-btn,
  .btn,
  .pagination-container,
  .pagination {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
  }

  .dashboard-content,
  .main-dashboard,
  .consignment-container,
  .warehouse-container {
    padding: 0;
  }

  .table,
  .products-table,
  .buyers-table {
    min-width: 100%;
    font-size: 0.8rem;
  }

  .table th,
  .table td,
  .products-table th,
  .products-table td {
    padding: 8px;
    font-size: 0.75rem;
  }
}


/* width responsive style*/
.qc-main-content {
  max-width: calc(100% - 250px);
}

.qc-sidebar.collapsed~.qc-main-content {
  max-width: calc(100% - 60px);
}

/* QC Dashboard Styles */

/* QC Container Layout */
.qc-container {
  display: flex;
  min-height: 100vh;
}

/* QC Sidebar Styles */
.qc-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.qc-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qc-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.qc-sidebar-header i {
  margin-right: 10px;
  color: #60a5fa;
}

/* VHC Logo Styles for QC Sidebar */
.qc-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.qc-sidebar-title-text {
  flex: 1 1;
}

.qc-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.qc-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.qc-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.qc-sidebar-menu li {
  margin: 0;
}

.qc-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.qc-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #60a5fa;
}

.qc-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #60a5fa;
}

.qc-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* QC Menu Group Styles */
.qc-menu-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.qc-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #60a5fa;
}

.qc-menu-group-header i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.qc-menu-chevron {
  margin-left: auto;
  margin-right: 0;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.qc-sidebar-menu li.active-parent>.qc-menu-group-header {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #60a5fa;
}

.qc-submenu {
  list-style: none;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.1);
  border-left: 3px solid #60a5fa;
  margin-left: 20px;
}

.qc-submenu li {
  margin: 0;
}

.qc-submenu a {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 40px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.qc-submenu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #60a5fa;
  padding-left: 45px;
}

.qc-submenu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #60a5fa;
  color: white;
}

/* QC Main Content */
.qc-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* QC Header Styles */
.qc-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qc-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.qc-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.qc-header-right {
  display: flex;
  align-items: center;
}

.qc-user-profile {
  display: flex;
  align-items: center;
}

/* QC Dashboard Styles */
.qc-dashboard {
  padding: 30px;
}

.qc-dashboard-header {
  margin-bottom: 30px;
}

.qc-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.qc-dashboard-header p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* QC Stats Grid */
.qc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.qc-stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.qc-stat-card:hover {
  transform: translateY(-2px);
}

.qc-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.5rem;
}

.qc-stat-blue .qc-stat-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.qc-stat-orange .qc-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.qc-stat-green .qc-stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.qc-stat-red .qc-stat-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.qc-stat-purple .qc-stat-icon {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
}

.qc-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.qc-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.qc-stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.qc-change-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.qc-change-orange {
  background: #fed7aa;
  color: #d97706;
}

.qc-change-green {
  background: #d1fae5;
  color: #059669;
}

.qc-change-red {
  background: #fee2e2;
  color: #dc2626;
}

.qc-change-purple {
  background: #ede9fe;
  color: #6d28d9;
}

/* QC Dashboard Content */
.qc-dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
  gap: 30px;
}

.qc-quick-actions,
.qc-recent-activities {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qc-quick-actions h3,
.qc-recent-activities h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.qc-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qc-action-btn {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.qc-action-btn i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.qc-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.qc-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

.qc-btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.qc-btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-1px);
}

.qc-btn-tertiary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.qc-btn-tertiary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

/* QC Activities */
.qc-activities-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.qc-activity-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.qc-activity-approval {
  border-left-color: #10b981;
}

.qc-activity-rejection {
  border-left-color: #ef4444;
}

.qc-activity-pending {
  border-left-color: #f59e0b;
}

.qc-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.1rem;
}

.qc-activity-approval .qc-activity-icon {
  background: #d1fae5;
  color: #059669;
}

.qc-activity-rejection .qc-activity-icon {
  background: #fee2e2;
  color: #dc2626;
}

.qc-activity-pending .qc-activity-icon {
  background: #fed7aa;
  color: #d97706;
}

.qc-activity-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.qc-activity-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.qc-activity-time {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* QC Page Header */
.qc-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.qc-page-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.qc-page-header p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 1.1rem;
}

/* QC Buttons */
.qc-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.qc-btn i {
  margin-right: 8px;
}

.qc-btn-sm {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.qc-btn-success {
  background: #10b981;
  color: white;
}

.qc-btn-success:hover {
  background: #059669;
}

.qc-btn-danger {
  background: #ef4444;
  color: white;
}

.qc-btn-danger:hover {
  background: #dc2626;
}

/* QC Table Styles */
.qc-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.qc-table {
  width: 100%;
  border-collapse: collapse;
}

.qc-table th {
  background: #f8fafc;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
}

.qc-table td {
  padding: 15px;
  border-bottom: 1px solid #f1f5f9;
}

.qc-table tr:hover {
  background: #f8fafc;
}

/* QC Status and Priority */
.qc-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.qc-status-pending,
.qc-status-orange {
  background: #fed7aa;
  color: #d97706;
}

.qc-status-in-progress,
.qc-status-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.qc-status-approved,
.qc-status-completed,
.qc-status-green {
  background: #d1fae5;
  color: #059669;
}

.qc-status-rejected,
.qc-status-red {
  background: #fee2e2;
  color: #dc2626;
}

.qc-priority {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.qc-priority-high,
.qc-priority-red {
  background: #fee2e2;
  color: #dc2626;
}

.qc-priority-medium,
.qc-priority-orange {
  background: #fed7aa;
  color: #d97706;
}

.qc-priority-low,
.qc-priority-green {
  background: #d1fae5;
  color: #059669;
}

/* QC Filters */
.qc-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qc-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qc-filter-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.qc-filter-group select,
.qc-filter-group input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* QC Modal Styles */
.qc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.qc-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.qc-modal-large {
  max-width: 800px;
}

.qc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.qc-modal-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.qc-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px;
}

.qc-modal-content {
  padding: 20px;
}

/* QC Form Styles */
.qc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qc-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qc-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.qc-form-group input,
.qc-form-group select,
.qc-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

.qc-form-group input:focus,
.qc-form-group select:focus,
.qc-form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.qc-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* QC Action Buttons */
.qc-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qc-status-select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.8rem;
}

.qc-link-btn {
  background: none;
  border: none;
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}

.qc-link-btn:hover {
  color: #1d4ed8;
}

/* QC Consignment Selector */
.qc-consignment-selector {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}

.qc-selector-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.qc-selector-group label {
  font-weight: 600;
  color: #374151;
  font-size: 1rem;
  min-width: 120px;
}

.qc-consignment-select {
  padding: 10px 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  min-width: 200px;
  background: white;
}

.qc-consignment-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* QC Error Banner */
.qc-error-banner {
  background: #fee2e2;
  color: #dc2626;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #dc2626;
}

/* QC Products Section */
.qc-products-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  overflow: hidden;
}

.qc-products-section h3 {
  background: #f8fafc;
  padding: 20px;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
}

.qc-products-table-container {
  overflow-x: auto;
}

.qc-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.qc-products-table th {
  background: #f8fafc;
  padding: 15px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.qc-products-table td {
  padding: 15px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.qc-products-table tr:hover {
  background: #f8fafc;
}

.qc-product-name-cell {
  font-weight: 500;
  color: #1e293b;
  max-width: 200px;
  word-wrap: break-word;
}

.qc-document-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.qc-document-status.yes {
  background: #d1fae5;
  color: #059669;
}

.qc-document-status.no {
  background: #fee2e2;
  color: #dc2626;
}

.qc-upload-btn {
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.qc-upload-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.qc-upload-btn:disabled,
.qc-upload-btn-disabled {
  background: #9ca3af !important;
  color: #e5e7eb !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  transform: none;
}

.qc-upload-btn:disabled:hover,
.qc-upload-btn-disabled:hover {
  background: #9ca3af !important;
  transform: none;
}

.qc-upload-btn i {
  font-size: 0.9rem;
}

.qc-missing-batch {
  color: #dc3545;
  font-weight: 600;
}

/* QC No Products */
.qc-no-products {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 30px;
}

.qc-no-products p {
  color: #6b7280;
  font-size: 1.1rem;
  margin: 0;
}

/* QC Loading */
.qc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.qc-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.qc-loading p {
  color: #6b7280;
  margin: 0;
  font-size: 1rem;
}

/* QC File Product */
.qc-file-product {
  color: #6b7280;
  font-size: 0.8rem;
  margin: 5px 0 0 0;
  font-style: italic;
}

/* QC Document Modal Styles */
.qc-document-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.qc-product-details-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.qc-product-details-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.qc-product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.qc-detail-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qc-detail-field label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.qc-disabled-input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.9rem;
}

.qc-add-documents-section {
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.qc-add-documents-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.qc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.qc-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qc-form-field label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.qc-form-select,
.qc-form-input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.qc-form-select:focus,
.qc-form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.qc-form-input:disabled {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.qc-field-hint {
  display: block;
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 4px;
  font-style: italic;
}

.qc-file-field {
  grid-column-start: 1; grid-column-end: -1;
}

.qc-file-upload-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
}

.qc-file-input {
  display: none;
}

.qc-choose-file-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.qc-choose-file-btn:hover {
  background: #e5e7eb;
}

.qc-file-name {
  color: #6b7280;
  font-size: 0.9rem;
  flex: 1 1;
}

.qc-upload-btn {
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.qc-upload-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.qc-upload-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.qc-uploaded-documents-section {
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.qc-uploaded-documents-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.qc-documents-table-container {
  overflow-x: auto;
}

.qc-documents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.qc-documents-table th {
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.qc-documents-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.qc-documents-table tr:hover {
  background: #f8fafc;
}

.qc-document-name {
  font-weight: 500;
  color: #1e293b;
}

.qc-view-btn,
.qc-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.qc-view-btn {
  color: #3b82f6;
}

.qc-view-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.qc-remove-btn {
  color: #ef4444;
}

.qc-remove-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.qc-no-documents {
  text-align: center;
  padding: 40px;
  color: #6b7280;
}

.qc-publish-section {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.qc-publish-btn {
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 15px 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.qc-publish-btn:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
}

.qc-publish-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.qc-error-message {
  background: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 15px;
  border-left: 4px solid #dc2626;
  font-size: 0.9rem;
}

/* coa one Pending style */
.details-grid.coaOnePending-details{
  background: #fff;
}

.details-grid.coaOnePending-details strong{
  color: #4b5563;
  font-weight: 600;
}

.details-grid.coaOnePending-details div{
  background-color: #fff;
}
/* Responsive Design for Modal */
@media (max-width: 768px) {
  .qc-document-modal {
    width: 98%;
    margin: 10px;
  }

  .qc-product-details-grid,
  .qc-form-grid {
    grid-template-columns: 1fr;
  }

  .qc-file-upload-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .qc-choose-file-btn {
    width: 100%;
    text-align: center;
  }

  .qc-documents-table {
    font-size: 0.8rem;
  }

  .qc-documents-table th,
  .qc-documents-table td {
    padding: 8px;
  }
}

/* QC Upload Styles */

.qc-upload-document {
  padding: 20px;
}

.qc-warehouse-select {
  padding: 10px 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  box-sizing: border-box;
}

.qc-upload-section {
  margin-bottom: 30px;
}

.qc-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  background: #f9fafb;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.qc-upload-area.qc-drag-active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.qc-upload-content {
  position: relative;
}

.qc-upload-icon {
  font-size: 3rem;
  color: #9ca3af;
  margin-bottom: 20px;
}

.qc-upload-area h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 10px 0;
}

.qc-upload-area p {
  color: #6b7280;
  margin: 0 0 20px 0;
}

.qc-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.qc-uploaded-files {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 30px;
}

.qc-uploaded-files h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.qc-files-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.qc-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.qc-file-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.qc-file-info i {
  font-size: 1.5rem;
  color: #6b7280;
}

.qc-file-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.qc-file-details p {
  color: #6b7280;
  margin: 0;
  font-size: 0.9rem;
}

.qc-file-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.qc-progress-bar {
  width: 100px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.qc-progress-fill {
  height: 100%;
  background: #3b82f6;
  transition: width 0.3s ease;
}

/* QC Document Categories */
.qc-document-categories {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 25px;
}

.qc-document-categories h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.qc-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.qc-category-card {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease;
}

.qc-category-card:hover {
  transform: translateY(-2px);
}

.qc-category-card i {
  font-size: 2rem;
  color: #3b82f6;
  margin-bottom: 15px;
}

.qc-category-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.qc-category-card p {
  color: #6b7280;
  margin: 0;
  font-size: 0.9rem;
}

/* QC Details Grid */
.qc-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.qc-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qc-detail-item label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.qc-detail-item span {
  color: #1e293b;
  font-size: 1rem;
}

.qc-qc-actions {
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.qc-qc-actions h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .qc-sidebar {
    width: 200px;
  }

  .qc-main-content {
    margin-left: 200px;
  }

  .qc-dashboard-content {
    grid-template-columns: 1fr;
  }

  .qc-filters {
    flex-direction: column;
  }

  .qc-stats-grid {
    grid-template-columns: 1fr;
  }

  .qc-categories-grid {
    grid-template-columns: 1fr;
  }

  .qc-details-grid {
    grid-template-columns: 1fr;
  }

  .qc-selector-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .qc-consignment-select {
    min-width: 100%;
  }

  .qc-products-table {
    font-size: 0.8rem;
  }

  .qc-products-table th,
  .qc-products-table td {
    padding: 10px 5px;
  }
}

@media (max-width: 640px) {
  .qc-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .qc-main-content {
    margin-left: 0;
  }

  .qc-header {
    padding: 15px 20px;
  }

  .qc-dashboard {
    padding: 20px;
  }

  .qc-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .qc-main-content {
    max-width: 100%;
  }

  .qc-sidebar.collapsed~.qc-main-content {
    max-width: 100%;
  }
}
/* ============================================
   QC SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for QC section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* QC Container */
.qc-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.qc-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qc-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  transform: scale(1.05);
}

.qc-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.qc-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qc-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* QC Sidebar - Mobile First Approach */
.qc-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.qc-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .qc-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .qc-sidebar.collapsed .qc-sidebar-header h2 {
    display: none;
  }

  .qc-sidebar.collapsed .qc-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #60a5fa;
  }

  .qc-sidebar.collapsed .qc-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .qc-sidebar.collapsed .qc-sidebar-menu a,
  .qc-sidebar.collapsed .qc-menu-group-header {
    justify-content: center;
    padding: 15px;
  }

  .qc-sidebar.collapsed .qc-sidebar-menu a span,
  .qc-sidebar.collapsed .qc-menu-group-header span {
    display: none;
  }

  .qc-sidebar.collapsed .qc-menu-chevron {
    display: none;
  }

  .qc-sidebar.collapsed .qc-sidebar-menu i,
  .qc-sidebar.collapsed .qc-menu-group-header i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .qc-sidebar.collapsed .qc-submenu {
    display: none;
  }
}

.qc-sidebar-icon-only {
  display: none;
}

.qc-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qc-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.qc-sidebar-header i {
  margin-right: 8px;
  color: #60a5fa;
  font-size: 1rem;
}

/* VHC Logo Styles for QC Sidebar */
.qc-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.qc-sidebar-title-text {
  flex: 1 1;
}

.qc-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.qc-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.qc-sidebar-menu li {
  margin: 0;
}

.qc-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.qc-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #60a5fa;
}

.qc-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #60a5fa;
}

.qc-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.qc-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* QC Main Content */
.qc-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* QC Header */
.qc-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.qc-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.qc-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.qc-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.qc-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.qc-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.qc-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.qc-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.qc-user-profile {
  display: flex;
  align-items: center;
}

/* QC Dashboard */
.qc-dashboard {
  padding: 20px 15px;
}

.qc-dashboard-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qc-dashboard-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.qc-dashboard-content p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* QC Stats Grid */
.qc-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.qc-stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.qc-stat-card:hover {
  transform: translateY(-2px);
}

.qc-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.qc-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.qc-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.85rem;
}

/* QC Dashboard Content */
.qc-dashboard-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.qc-quick-actions,
.qc-recent-activities {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qc-quick-actions h3,
.qc-recent-activities h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.qc-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qc-action-btn {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
}

.qc-action-btn i {
  margin-right: 10px;
  font-size: 1rem;
}

/* QC Activities */
.qc-activities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qc-activity-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.qc-activity-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1rem;
  flex-shrink: 0;
}

.qc-activity-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.qc-activity-content p {
  color: #64748b;
  margin: 0 0 4px 0;
  font-size: 0.85rem;
}

.qc-activity-time {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* QC Page Header */
.qc-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 10px;
}

.qc-page-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.qc-page-header p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 1rem;
}

/* QC Buttons */
.qc-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.qc-btn i {
  margin-right: 8px;
}

.qc-btn-sm {
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* QC Table Styles */
.qc-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.qc-table {
  width: 100%;
  border-collapse: collapse;
  /*min-width: 800px;*/
  font-size: 0.85rem;
}

.qc-table th {
  background: #f8fafc;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.qc-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.qc-table tr:hover {
  background: #f8fafc;
}

/* QC Filters */
.qc-filters {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qc-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 0;
}

.qc-filter-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.qc-filter-group select,
.qc-filter-group input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

/* QC Form Styles */
.qc-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.qc-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qc-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.qc-form-group input,
.qc-form-group select,
.qc-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.qc-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* QC Products Table */
.qc-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
  -webkit-overflow-scrolling: touch;
}

.qc-products-table {
  width: 100%;
  border-collapse: collapse;
  /*min-width: 800px;*/
  background: white;
  font-size: 0.85rem;
}

.qc-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.qc-products-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.qc-products-table td {
  padding: 10px 8px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

/* QC Documents Table */
.qc-documents-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.qc-documents-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  font-size: 0.85rem;
}

.qc-documents-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  white-space: nowrap;
}

.qc-documents-table td {
  padding: 10px 8px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

/* QC Modal Styles */
.qc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 10px;
  overflow-y: auto;
}

.qc-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.qc-modal-large {
  max-width: 100%;
}

.qc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
}

.qc-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.qc-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qc-modal-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}

/* QC Upload Section */
.qc-upload-section {
  margin-bottom: 20px;
}

.qc-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  background: #f9fafb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.qc-upload-icon {
  font-size: 2.5rem;
  color: #9ca3af;
  margin-bottom: 15px;
}

.qc-upload-area h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 10px 0;
}

.qc-upload-area p {
  color: #6b7280;
  margin: 0 0 15px 0;
  font-size: 0.9rem;
}

/* QC Consignment Selector */
.qc-consignment-selector {
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.qc-selector-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.qc-selector-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.qc-consignment-select {
  padding: 10px 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  background: white;
  box-sizing: border-box;
}

.qc-consignment-selector{
  justify-content: initial;
  gap: 10px;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .qc-mobile-menu-btn {
    display: none;
  }

  .qc-sidebar-overlay {
    display: none !important;
  }

  .qc-sidebar-toggle-btn {
    display: flex;
  }

  .qc-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .qc-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .qc-container.sidebar-collapsed .qc-main-content {
    margin-left: 60px;
  }

  .qc-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .qc-container.sidebar-collapsed .qc-header {
    padding-left: 85px;
  }

  .qc-header-left h1 {
    font-size: 1.6rem;
  }

  .qc-dashboard {
    padding: 25px 20px;
  }

  .qc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .qc-dashboard-content-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .qc-filters {
    flex-direction: row;
    gap: 20px;
  }

  .qc-filter-group {
    flex: 1 1;
  }

  .qc-products-table {
    /*min-width: 900px;*/
    font-size: 0.9rem;
  }

  .qc-products-table th,
  .qc-products-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  /*.qc-documents-table {
    min-width: 800px;
  }*/

  .qc-modal {
    max-width: 90%;
  }

  .qc-modal-header {
    padding: 20px 25px;
  }

  .qc-modal-header h3 {
    font-size: 1.4rem;
  }

  .qc-modal-content {
    padding: 25px;
  }

  .qc-selector-group {
    flex-direction: column;
    gap: 15px;
  }

  .qc-consignment-select {
    min-width: 200px;
    width: auto;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .qc-sidebar {
    width: 250px;
  }

  .qc-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .qc-container.sidebar-collapsed .qc-main-content {
    margin-left: 60px;
  }

  .qc-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .qc-container.sidebar-collapsed .qc-header {
    padding-left: 90px;
  }

  .qc-sidebar-header {
    padding: 20px;
  }

  .qc-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .qc-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .qc-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .qc-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .qc-header-left h1 {
    font-size: 1.8rem;
  }

  .qc-dashboard {
    padding: 30px;
  }

  .qc-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .qc-dashboard-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  /*.qc-products-table {
    min-width: 1200px;
  }*/

  .qc-documents-table {
    min-width: 900px;
  }

  .qc-modal {
    max-width: 1200px;
  }

  .qc-modal-header {
    padding: 20px 30px;
  }

  .qc-modal-header h3 {
    font-size: 1.5rem;
  }

  .qc-modal-content {
    padding: 30px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .qc-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /*.qc-products-table {
    min-width: 1400px;
  }

  .qc-documents-table {
    min-width: 1000px;
  }*/
}

/* ============================================
  LARG SCREEN STYLES (1200px-)
   ============================================ */

@media (max-width:1200px){
  .qc-consignment-selector{
    flex-direction: row;
    justify-content: initial;
    gap: 20px;
  }

  #warehouse-select{
    width: 350px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .qc-modal {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.qc-mobile-hide {
  display: none;
}

/* Show on mobile only */
.qc-mobile-only {
  display: block;
}

/* Responsive text */
.qc-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.qc-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.qc-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .qc-mobile-hide {
    display: block;
  }

  .qc-mobile-only {
    display: none;
  }
}

/* ============================================
   MAX WIDTH (768PX) STYLE
   ============================================ */

@media(max-width: 768px){
  .qc-consignment-selector{
    flex-direction: column;
  }
}

/* ============================================
   MAX WIDTH (395PX) STYLE
   ============================================ */

@media (max-width: 395px){
  .parameter-list-header{
    display: flex;
    flex-direction: column;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .qc-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .qc-header {
    padding: 10px 20px;
  }

  .qc-header-left h1 {
    font-size: 1.3rem;
  }

  .qc-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .qc-sidebar-menu a,
  .qc-action-btn,
  .qc-btn,
  .qc-upload-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .qc-sidebar,
  .qc-header,
  .qc-form-actions,
  .qc-mobile-menu-btn,
  .qc-sidebar-toggle-btn {
    display: none !important;
  }

  .qc-main-content {
    margin-left: 0;
  }

  .qc-dashboard,
  .qc-page-header {
    padding: 0;
  }
}


/* width responsive style*/
.marketing-main-content{
  max-width: calc(100% - 250px);
}

.marketing-sidebar.collapsed ~ .marketing-main-content{
    max-width: calc(100% - 60px);
}

/* Marketing Dashboard Styles */

/* Marketing Container Layout */
.marketing-container {
  display: flex;
  min-height: 100vh;
}

/* Marketing Sidebar Styles */
.marketing-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.marketing-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marketing-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.marketing-sidebar-header i {
  margin-right: 10px;
  color: #a78bfa;
}

/* VHC Logo Styles for Marketing Sidebar */
.marketing-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.marketing-sidebar-title-text {
  flex: 1 1;
}

.marketing-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.marketing-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.marketing-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.marketing-sidebar-menu li {
  margin: 0;
}

.marketing-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.marketing-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a78bfa;
}

.marketing-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a78bfa;
}

.marketing-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Marketing Menu Group Styles */
.marketing-menu-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.marketing-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a78bfa;
}

.marketing-menu-group-header i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.marketing-menu-chevron {
  margin-left: auto;
  margin-right: 0;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.marketing-sidebar-menu li.active-parent > .marketing-menu-group-header {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a78bfa;
}

.marketing-submenu {
  list-style: none;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.1);
  border-left: 3px solid #a78bfa;
  margin-left: 20px;
}

.marketing-submenu li {
  margin: 0;
}

.marketing-submenu a {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 40px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.marketing-submenu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a78bfa;
  padding-left: 45px;
}
.marketing-submenu li a{
  font-size: 11px;
}
.marketing-submenu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a78bfa;
  color: white;
}

/* Marketing Main Content */
.marketing-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Marketing Header Styles */
.marketing-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.marketing-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.marketing-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.marketing-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.marketing-user-profile {
  display: flex;
  align-items: center;
}

/* Marketing Dashboard Styles */
.marketing-dashboard {
  padding: 30px;
}

.marketing-dashboard-header {
  margin-bottom: 30px;
}

.marketing-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.marketing-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Marketing Stats Grid */
.marketing-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.marketing-stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marketing-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.marketing-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.marketing-stat-purple .marketing-stat-icon {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  color: white;
}

.marketing-stat-blue .marketing-stat-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.marketing-stat-green .marketing-stat-icon {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.marketing-stat-orange .marketing-stat-icon {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
}

.marketing-stat-content {
  flex: 1 1;
}

.marketing-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.marketing-stat-content p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

.marketing-stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.marketing-change-purple {
  background: #ede9fe;
  color: #7c3aed;
}

.marketing-change-blue {
  background: #dbeafe;
  color: #3b82f6;
}

.marketing-change-green {
  background: #d1fae5;
  color: #10b981;
}

.marketing-change-orange {
  background: #fed7aa;
  color: #f97316;
}

/* Marketing Dashboard Content */
.marketing-dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
  gap: 30px;
}

/* Marketing Quick Actions */
.marketing-quick-actions {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marketing-quick-actions h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.marketing-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.marketing-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.marketing-btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}

.marketing-btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.marketing-btn-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.marketing-btn-secondary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.marketing-btn-tertiary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.marketing-btn-tertiary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.marketing-action-btn i {
  font-size: 1.1rem;
}

/* Marketing Recent Activities */
.marketing-recent-activities {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marketing-recent-activities h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.marketing-activities-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.marketing-activity-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid;
  transition: all 0.2s ease;
}

.marketing-activity-item:hover {
  background: #f8fafc;
  transform: translateX(5px);
}

.marketing-activity-campaign {
  border-left-color: #7c3aed;
  background: #f5f3ff;
}

.marketing-activity-lead {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.marketing-activity-event {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.marketing-activity-content-item {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.marketing-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.marketing-activity-campaign .marketing-activity-icon {
  background: #7c3aed;
  color: white;
}

.marketing-activity-lead .marketing-activity-icon {
  background: #3b82f6;
  color: white;
}

.marketing-activity-event .marketing-activity-icon {
  background: #10b981;
  color: white;
}

.marketing-activity-content-item .marketing-activity-icon {
  background: #f59e0b;
  color: white;
}

.marketing-activity-content {
  flex: 1 1;
}

.marketing-activity-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.marketing-activity-content p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 5px 0;
}

.marketing-activity-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Marketing Action Sections */
.marketing-action-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.action-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.action-btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.action-btn-secondary {
  background: white;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  margin-right: 8px;
}

.action-btn-secondary:hover {
  background: #3b82f6;
  color: white;
}

.action-buttons-row {
  display: flex;
  gap: 8px;
}

.status-buttons {
  display: flex;
  gap: 8px;
}

.status-btn {
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.status-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.status-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.status-btn.active:hover {
  background: #2563eb;
  border-color: #2563eb;
}

/* Stat Link */
.stat-link {
  display: inline-block;
  margin-top: 8px;
  color: #3b82f6;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
}

.stat-link:hover {
  text-decoration: underline;
}

/* Marketing Stat Red */
.marketing-stat-red .marketing-stat-icon {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: white;
}

.marketing-stat-red {
  border-left: 4px solid #ef4444;
}

/* Companies Table Section */
.marketing-companies-table-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
}

.marketing-companies-table-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.marketing-companies-table-container {
  overflow-x: auto;
}

.marketing-companies-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.marketing-companies-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.marketing-companies-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.marketing-companies-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.marketing-companies-table tbody tr:hover {
  background-color: #f8f9fa;
}

.marketing-companies-table tbody tr:last-child {
  border-bottom: none;
}

.marketing-companies-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.marketing-table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

.pagination-info {
  color: #64748b;
  font-size: 0.95rem;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page-info {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
}

.marketing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .marketing-dashboard-content {
    grid-template-columns: 1fr;
  }

  .marketing-action-sections {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .marketing-sidebar {
    width: 200px;
  }

  .marketing-main-content {
    margin-left: 200px;
  }

  .marketing-stats-grid {
    grid-template-columns: 1fr;
  }

  .marketing-dashboard {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .marketing-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .marketing-main-content {
    margin-left: 0;
  }

  .marketing-container {
    flex-direction: column;
  }
}

@media (max-width: 480px){
  .marketing-main-content{
        max-width: 100%;
    }

    .marketing-sidebar.collapsed~ .marketing-main-content{
        max-width: 100%;
   }
}
/* ============================================
   MARKETING SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Marketing section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Marketing Container */
.marketing-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.marketing-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marketing-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%);
  transform: scale(1.05);
}

.marketing-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.marketing-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.marketing-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Marketing Sidebar - Mobile First Approach */
.marketing-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.marketing-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .marketing-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .marketing-sidebar.collapsed .marketing-sidebar-header h2 {
    display: none;
  }

  .marketing-sidebar.collapsed .marketing-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #a78bfa;
  }

  .marketing-sidebar.collapsed .marketing-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .marketing-sidebar.collapsed .marketing-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .marketing-sidebar.collapsed .marketing-sidebar-menu a span {
    display: none;
  }

  .marketing-sidebar.collapsed .marketing-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .marketing-sidebar.collapsed .marketing-menu-group-header {
    justify-content: center;
    padding: 15px;
  }

  .marketing-sidebar.collapsed .marketing-menu-group-header span {
    display: none;
  }

  .marketing-sidebar.collapsed .marketing-menu-chevron {
    display: none;
  }

  .marketing-sidebar.collapsed .marketing-menu-group-header i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .marketing-sidebar.collapsed .marketing-submenu {
    display: none;
  }
}

.marketing-sidebar-icon-only {
  display: none;
}

.marketing-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marketing-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.marketing-sidebar-header i {
  margin-right: 8px;
  color: #a78bfa;
  font-size: 1rem;
}

/* VHC Logo Styles for Marketing Sidebar */
.marketing-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.marketing-sidebar-title-text {
  flex: 1 1;
}

.marketing-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.marketing-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.marketing-sidebar-menu li {
  margin: 0;
}

.marketing-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.marketing-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a78bfa;
}

.marketing-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a78bfa;
}

.marketing-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.marketing-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Marketing Main Content */
.marketing-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Marketing Header */
.marketing-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.marketing-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.marketing-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.marketing-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.marketing-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.marketing-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.marketing-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.marketing-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.marketing-user-profile {
  display: flex;
  align-items: center;
}

/* Marketing Dashboard */
.marketing-dashboard {
  padding: 20px 15px;
}

.marketing-dashboard-header {
  margin-bottom: 20px;
}

.marketing-dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.marketing-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Marketing Stats Grid */
.marketing-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.marketing-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marketing-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.marketing-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.marketing-stat-content {
  flex: 1 1;
  min-width: 0;
}

.marketing-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.marketing-stat-content p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

.marketing-stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Marketing Dashboard Content */
.marketing-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.marketing-quick-actions,
.marketing-recent-activities {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marketing-quick-actions h3,
.marketing-recent-activities h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.marketing-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marketing-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.marketing-action-btn i {
  font-size: 1rem;
}

/* Marketing Activities */
.marketing-activities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.marketing-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid;
  transition: all 0.2s ease;
}

.marketing-activity-item:hover {
  background: #f8fafc;
  transform: translateX(5px);
}

.marketing-activity-icon {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.marketing-activity-content {
  flex: 1 1;
  min-width: 0;
}

.marketing-activity-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.marketing-activity-content p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 4px 0;
}

.marketing-activity-time {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Marketing Action Sections */
.marketing-action-sections {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.action-section {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Marketing Companies Table */
.marketing-companies-table-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.marketing-companies-table-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.marketing-companies-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.marketing-companies-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
  font-size: 0.85rem;
}

.marketing-companies-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.marketing-companies-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.marketing-companies-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.marketing-companies-table tbody tr:hover {
  background-color: #f8f9fa;
}

.marketing-companies-table td {
  padding: 10px 12px;
  color: #555;
  font-size: 0.85rem;
  vertical-align: middle;
}

/* Marketing Table Pagination */
.marketing-table-pagination {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #e2e8f0;
  gap: 10px;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 36px;
  min-height: 36px;
}

.pagination-page-info {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Marketing Form Styles */
.marketing-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.marketing-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.marketing-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.marketing-form-group input,
.marketing-form-group select,
.marketing-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.marketing-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Marketing Loading */
.marketing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.marketing-loading p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .marketing-mobile-menu-btn {
    display: none;
  }

  .marketing-sidebar-overlay {
    display: none !important;
  }

  .marketing-sidebar-toggle-btn {
    display: flex;
  }

  .marketing-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .marketing-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .marketing-container.sidebar-collapsed .marketing-main-content {
    margin-left: 60px;
  }

  .marketing-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .marketing-container.sidebar-collapsed .marketing-header {
    padding-left: 85px;
  }

  .marketing-header-left h1 {
    font-size: 1.6rem;
  }

  .marketing-dashboard {
    padding: 25px 20px;
  }

  .marketing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .marketing-dashboard-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .marketing-action-sections {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .marketing-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .action-buttons-row {
    flex-direction: row;
  }

  .marketing-companies-table {
    min-width: 1400px;
    font-size: 0.9rem;
  }

  .marketing-companies-table th,
  .marketing-companies-table td {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  .marketing-table-pagination {
    flex-direction: row;
    align-items: center;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .marketing-sidebar {
    width: 250px;
  }

  .marketing-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .marketing-container.sidebar-collapsed .marketing-main-content {
    margin-left: 60px;
  }

  .marketing-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .marketing-container.sidebar-collapsed .marketing-header {
    padding-left: 90px;
  }

  .marketing-sidebar-header {
    padding: 20px;
  }

  .marketing-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .marketing-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .marketing-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .marketing-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .marketing-header-left h1 {
    font-size: 1.8rem;
  }

  .marketing-dashboard {
    padding: 30px;
  }

  .marketing-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .marketing-dashboard-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .marketing-action-sections {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .marketing-companies-table {
    min-width: 1600px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .marketing-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .marketing-action-sections {
    grid-template-columns: repeat(4, 1fr);
  }

  .marketing-companies-table {
    min-width: 1800px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .marketing-dashboard-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.marketing-mobile-hide {
  display: none;
}

/* Show on mobile only */
.marketing-mobile-only {
  display: block;
}

/* Responsive text */
.marketing-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.marketing-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.marketing-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .marketing-mobile-hide {
    display: block;
  }

  .marketing-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .marketing-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .marketing-header {
    padding: 10px 20px;
  }

  .marketing-header-left h1 {
    font-size: 1.3rem;
  }

  .marketing-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .marketing-sidebar-menu a,
  .marketing-action-btn,
  .marketing-btn,
  .status-btn,
  .pagination-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .marketing-sidebar,
  .marketing-header,
  .marketing-form-actions,
  .marketing-mobile-menu-btn,
  .marketing-sidebar-toggle-btn {
    display: none !important;
  }

  .marketing-main-content {
    margin-left: 0;
  }

  .marketing-dashboard {
    padding: 0;
  }
}


/* width responsive style*/
.ppic-main-content{
  max-width: calc(100% - 250px);
}

.ppic-sidebar.collapsed ~ .ppic-main-content{
    max-width: calc(100% - 60px);
}

/* PPIC Dashboard Styles - All classes scoped with ppic- prefix */

/* PPIC Container Layout */
.ppic-container {
  display: flex;
  min-height: 100vh;
}

/* PPIC Sidebar Styles */
.ppic-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.ppic-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ppic-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.ppic-sidebar-header i {
  margin-right: 10px;
  color: #6ee7b7;
}

/* VHC Logo Styles for PPIC Sidebar */
.ppic-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ppic-sidebar-title-text {
  flex: 1 1;
}

.ppic-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ppic-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.ppic-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.ppic-sidebar-menu li {
  margin: 0;
}

.ppic-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.ppic-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #6ee7b7;
}

.ppic-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #6ee7b7;
}

.ppic-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* PPIC Menu Group Styles */
.ppic-menu-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.ppic-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #6ee7b7;
}

.ppic-menu-group-header i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.ppic-menu-chevron {
  margin-left: auto;
  margin-right: 0;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.ppic-sidebar-menu li.active-parent > .ppic-menu-group-header {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #6ee7b7;
}

.ppic-submenu {
  list-style: none;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.1);
  border-left: 3px solid #6ee7b7;
  margin-left: 20px;
}

.ppic-submenu li {
  margin: 0;
}

.ppic-submenu a {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 40px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.ppic-submenu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #6ee7b7;
  padding-left: 45px;
}

.ppic-submenu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #6ee7b7;
  color: white;
}

/* PPIC Main Content */
.ppic-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* PPIC Header Styles */
.ppic-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.ppic-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.ppic-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ppic-user-profile {
  display: flex;
  align-items: center;
}

/* PPIC Dashboard Styles */
.ppic-dashboard {
  padding: 30px;
}

.ppic-dashboard-header {
  margin-bottom: 30px;
}

.ppic-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.ppic-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* PPIC Stats Grid */
.ppic-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.ppic-stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ppic-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ppic-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.ppic-stat-green .ppic-stat-icon {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.ppic-stat-blue .ppic-stat-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.ppic-stat-orange .ppic-stat-icon {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
}

.ppic-stat-content {
  flex: 1 1;
}

.ppic-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.ppic-stat-content p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

.ppic-stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.ppic-change-green {
  background: #d1fae5;
  color: #065f46;
}

.ppic-change-blue {
  background: #dbeafe;
  color: #3b82f6;
}

.ppic-change-orange {
  background: #fed7aa;
  color: #f97316;
}

/* PPIC Quick Actions */
.ppic-quick-actions {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ppic-quick-actions h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.ppic-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ppic-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.ppic-btn-primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.ppic-btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.ppic-btn-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.ppic-btn-secondary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.ppic-btn-tertiary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.ppic-btn-tertiary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.ppic-action-btn i {
  font-size: 1.1rem;
}

/* Sidebar Toggle Button */
.ppic-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.ppic-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.ppic-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .ppic-dashboard-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ppic-sidebar {
    width: 200px;
  }

  .ppic-main-content {
    margin-left: 200px;
  }

  .ppic-stats-grid {
    grid-template-columns: 1fr;
  }

  .ppic-dashboard {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .ppic-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .ppic-main-content {
    margin-left: 0;
  }

  .ppic-container {
    flex-direction: column;
  }
}

@media (max-width: 480px){
  .ppic-main-content{
        max-width: 100%;
    }

    .ppic-sidebar.collapsed~ .ppic-main-content{
        max-width: 100%;
   }
}
/* ============================================
   PPIC SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for PPIC section only
   All classes scoped with ppic- prefix
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* PPIC Container */
.ppic-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.ppic-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ppic-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: scale(1.05);
}

.ppic-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.ppic-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ppic-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* PPIC Sidebar - Mobile First Approach */
.ppic-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.ppic-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .ppic-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .ppic-sidebar.collapsed .ppic-sidebar-header h2 {
    display: none;
  }

  .ppic-sidebar.collapsed .ppic-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #6ee7b7;
  }

  .ppic-sidebar.collapsed .ppic-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .ppic-sidebar.collapsed .ppic-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .ppic-sidebar.collapsed .ppic-sidebar-menu a span {
    display: none;
  }

  .ppic-sidebar.collapsed .ppic-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .ppic-sidebar.collapsed .ppic-menu-group-header {
    justify-content: center;
    padding: 15px;
  }

  .ppic-sidebar.collapsed .ppic-menu-group-header span {
    display: none;
  }

  .ppic-sidebar.collapsed .ppic-menu-chevron {
    display: none;
  }

  .ppic-sidebar.collapsed .ppic-menu-group-header i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .ppic-sidebar.collapsed .ppic-submenu {
    display: none;
  }
}

.ppic-sidebar-icon-only {
  display: none;
}

.ppic-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ppic-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.ppic-sidebar-header i {
  margin-right: 8px;
  color: #6ee7b7;
  font-size: 1rem;
}

/* VHC Logo Styles for PPIC Sidebar */
.ppic-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ppic-sidebar-title-text {
  flex: 1 1;
}

.ppic-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ppic-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.ppic-sidebar-menu li {
  margin: 0;
}

.ppic-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.ppic-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #6ee7b7;
}

.ppic-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #6ee7b7;
}

.ppic-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.ppic-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PPIC Main Content */
.ppic-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* PPIC Header */
.ppic-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.ppic-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.ppic-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.ppic-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.ppic-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.ppic-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.ppic-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.ppic-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.ppic-user-profile {
  display: flex;
  align-items: center;
}

/* PPIC Dashboard */
.ppic-dashboard {
  padding: 20px 15px;
}

.ppic-dashboard-header {
  margin-bottom: 20px;
}

.ppic-dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.ppic-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* PPIC Stats Grid */
.ppic-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.ppic-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ppic-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ppic-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.ppic-stat-content {
  flex: 1 1;
  min-width: 0;
}

.ppic-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.ppic-stat-content p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

.ppic-stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

/* PPIC Dashboard Content */
.ppic-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.ppic-quick-actions,
.ppic-recent-activities {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ppic-quick-actions h3,
.ppic-recent-activities h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.ppic-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ppic-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ppic-action-btn i {
  font-size: 1rem;
}

/* PPIC Loading */
.ppic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ppic-loading p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .ppic-mobile-menu-btn {
    display: none;
  }

  .ppic-sidebar-overlay {
    display: none !important;
  }

  .ppic-sidebar-toggle-btn {
    display: flex;
  }

  .ppic-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .ppic-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .ppic-container.sidebar-collapsed .ppic-main-content {
    margin-left: 60px;
  }

  .ppic-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .ppic-container.sidebar-collapsed .ppic-header {
    padding-left: 85px;
  }

  .ppic-header-left h1 {
    font-size: 1.6rem;
  }

  .ppic-dashboard {
    padding: 25px 20px;
  }

  .ppic-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .ppic-dashboard-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .ppic-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .ppic-sidebar {
    width: 250px;
  }

  .ppic-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .ppic-container.sidebar-collapsed .ppic-main-content {
    margin-left: 60px;
  }

  .ppic-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .ppic-container.sidebar-collapsed .ppic-header {
    padding-left: 90px;
  }

  .ppic-sidebar-header {
    padding: 20px;
  }

  .ppic-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .ppic-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .ppic-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .ppic-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .ppic-header-left h1 {
    font-size: 1.8rem;
  }

  .ppic-dashboard {
    padding: 30px;
  }

  .ppic-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .ppic-dashboard-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .ppic-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .ppic-dashboard-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.ppic-mobile-hide {
  display: none;
}

/* Show on mobile only */
.ppic-mobile-only {
  display: block;
}

/* Responsive text */
.ppic-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.ppic-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.ppic-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .ppic-mobile-hide {
    display: block;
  }

  .ppic-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .ppic-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .ppic-header {
    padding: 10px 20px;
  }

  .ppic-header-left h1 {
    font-size: 1.3rem;
  }

  .ppic-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .ppic-sidebar-menu a,
  .ppic-action-btn,
  .ppic-btn,
  .status-btn,
  .pagination-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .ppic-sidebar,
  .ppic-header,
  .ppic-form-actions,
  .ppic-mobile-menu-btn,
  .ppic-sidebar-toggle-btn {
    display: none !important;
  }

  .ppic-main-content {
    margin-left: 0;
  }

  .ppic-dashboard {
    padding: 0;
  }
}


/* width responsive style*/
.operation-main-content{
  max-width: calc(100% - 250px);
}

.operation-sidebar.collapsed ~ .operation-main-content{
    max-width: calc(100% - 60px);
}

.operation-container {
  display: flex;
  min-height: 100vh;
}

.operation-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.operation-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.operation-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.operation-sidebar-header i {
  margin-right: 10px;
  color: #fbbf24;
}

.operation-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.operation-sidebar-title-text {
  flex: 1 1;
}

.operation-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.operation-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.operation-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.operation-sidebar-menu li {
  margin: 0;
}

.operation-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.operation-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #fbbf24;
}

.operation-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #fbbf24;
}

.operation-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.operation-menu-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.operation-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #fbbf24;
}

.operation-menu-group-header i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.operation-menu-chevron {
  margin-left: auto;
  margin-right: 0;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.operation-sidebar-menu li.active-parent > .operation-menu-group-header {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #fbbf24;
}

.operation-submenu {
  list-style: none;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.1);
  border-left: 3px solid #fbbf24;
  margin-left: 20px;
}

.operation-submenu li {
  margin: 0;
}

.operation-submenu a {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 40px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.operation-submenu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #fbbf24;
  padding-left: 45px;
}

.operation-submenu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #fbbf24;
  color: white;
}

.operation-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

.operation-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.operation-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.operation-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.operation-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.operation-user-profile {
  display: flex;
  align-items: center;
}

.operation-dashboard {
  padding: 30px;
}

.operation-dashboard-header {
  margin-bottom: 30px;
}

.operation-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.operation-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

.operation-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.operation-stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.operation-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.operation-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.operation-stat-green .operation-stat-icon {
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
  color: white;
}

.operation-stat-blue .operation-stat-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.operation-stat-orange .operation-stat-icon {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
}

.operation-stat-content {
  flex: 1 1;
}

.operation-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.operation-stat-content p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

.operation-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.operation-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.operation-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

@media (max-width: 1024px) {
  .operation-dashboard-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .operation-sidebar {
    width: 200px;
  }

  .operation-main-content {
    margin-left: 200px;
  }

  .operation-stats-grid {
    grid-template-columns: 1fr;
  }

  .operation-dashboard {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .operation-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .operation-main-content {
    margin-left: 0;
  }

  .operation-container {
    flex-direction: column;
  }
}

@media (max-width: 480px){
  .operation-main-content{
        max-width: 100%;
    }

    .operation-sidebar.collapsed~ .operation-main-content{
        max-width: 100%;
   }
}

/* ============================================
   OPERATION SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Operation section only
   All classes scoped with operation- prefix
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Operation Container */
.operation-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.operation-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.operation-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  transform: scale(1.05);
}

.operation-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.operation-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.operation-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Operation Sidebar - Mobile First Approach */
.operation-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.operation-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .operation-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .operation-sidebar.collapsed .operation-sidebar-header h2 {
    display: none;
  }

  .operation-sidebar.collapsed .operation-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #fbbf24;
  }

  .operation-sidebar.collapsed .operation-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .operation-sidebar.collapsed .operation-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .operation-sidebar.collapsed .operation-sidebar-menu a span {
    display: none;
  }

  .operation-sidebar.collapsed .operation-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .operation-sidebar.collapsed .operation-menu-group-header {
    justify-content: center;
    padding: 15px;
  }

  .operation-sidebar.collapsed .operation-menu-group-header span {
    display: none;
  }

  .operation-sidebar.collapsed .operation-menu-chevron {
    display: none;
  }

  .operation-sidebar.collapsed .operation-menu-group-header i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .operation-sidebar.collapsed .operation-submenu {
    display: none;
  }
}

.operation-sidebar-icon-only {
  display: none;
}

.operation-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.operation-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.operation-sidebar-header i {
  margin-right: 8px;
  color: #fbbf24;
  font-size: 1rem;
}

/* VHC Logo Styles for Operation Sidebar */
.operation-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.operation-sidebar-title-text {
  flex: 1 1;
}

.operation-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.operation-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.operation-sidebar-menu li {
  margin: 0;
}

.operation-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.operation-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #fbbf24;
}

.operation-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #fbbf24;
}

.operation-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.operation-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Operation Main Content */
.operation-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Operation Header */
.operation-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.operation-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.operation-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.operation-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.operation-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.operation-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.operation-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.operation-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.operation-user-profile {
  display: flex;
  align-items: center;
}

/* Operation Dashboard */
.operation-dashboard {
  padding: 20px 15px;
}

.operation-dashboard-header {
  margin-bottom: 20px;
}

.operation-dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.operation-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Operation Stats Grid */
.operation-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.operation-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.operation-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.operation-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.operation-stat-content {
  flex: 1 1;
  min-width: 0;
}

.operation-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.operation-stat-content p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

.operation-stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Operation Dashboard Content */
.operation-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.operation-quick-actions,
.operation-recent-activities {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.operation-quick-actions h3,
.operation-recent-activities h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.operation-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.operation-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.operation-action-btn i {
  font-size: 1rem;
}

/* Operation Loading */
.operation-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.operation-loading p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .operation-mobile-menu-btn {
    display: none;
  }

  .operation-sidebar-overlay {
    display: none !important;
  }

  .operation-sidebar-toggle-btn {
    display: flex;
  }

  .operation-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .operation-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .operation-container.sidebar-collapsed .operation-main-content {
    margin-left: 60px;
  }

  .operation-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .operation-container.sidebar-collapsed .operation-header {
    padding-left: 85px;
  }

  .operation-header-left h1 {
    font-size: 1.6rem;
  }

  .operation-dashboard {
    padding: 25px 20px;
  }

  .operation-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .operation-dashboard-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .operation-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .operation-sidebar {
    width: 250px;
  }

  .operation-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .operation-container.sidebar-collapsed .operation-main-content {
    margin-left: 60px;
  }

  .operation-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .operation-container.sidebar-collapsed .operation-header {
    padding-left: 90px;
  }

  .operation-sidebar-header {
    padding: 20px;
  }

  .operation-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .operation-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .operation-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .operation-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.70rem;
  }

  .operation-header-left h1 {
    font-size: 1.8rem;
  }

  .operation-dashboard {
    padding: 30px;
  }

  .operation-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .operation-dashboard-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .operation-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .operation-dashboard-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.operation-mobile-hide {
  display: none;
}

/* Show on mobile only */
.operation-mobile-only {
  display: block;
}

/* Responsive text */
.operation-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.operation-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.operation-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .operation-mobile-hide {
    display: block;
  }

  .operation-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .operation-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .operation-header {
    padding: 10px 20px;
  }

  .operation-header-left h1 {
    font-size: 1.3rem;
  }

  .operation-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .operation-sidebar-menu a,
  .operation-action-btn,
  .operation-btn,
  .status-btn,
  .pagination-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .operation-sidebar,
  .operation-header,
  .operation-form-actions,
  .operation-mobile-menu-btn,
  .operation-sidebar-toggle-btn {
    display: none !important;
  }

  .operation-main-content {
    margin-left: 0;
  }

  .operation-dashboard {
    padding: 0;
  }
}

/* width responsive style*/
.production-main-content{
  max-width: calc(100% - 250px);
}

.production-sidebar.collapsed ~ .production-main-content{
    max-width: calc(100% - 60px);
}


/* Production Dashboard Styles */

/* Production Container Layout */
.production-container {
  display: flex;
  min-height: 100vh;
}

/* Production Sidebar Styles */
.production-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.production-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.production-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.production-sidebar-header i {
  margin-right: 10px;
  color: #7dd3fc;
}

/* VHC Logo Styles for Production Sidebar */
.production-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.production-sidebar-title-text {
  flex: 1 1;
}

.production-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.production-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.production-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.production-sidebar-menu li {
  margin: 0;
}

.production-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.production-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #7dd3fc;
}

.production-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #7dd3fc;
}

.production-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Production Main Content */
.production-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Production Header Styles */
.production-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.production-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.production-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.production-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.production-user-profile {
  display: flex;
  align-items: center;
}

/* Production Dashboard Styles */
.production-dashboard {
  padding: 30px;
}

.production-dashboard-header {
  margin-bottom: 30px;
}

.production-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.production-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Production Stats Grid */
.production-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.production-stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.production-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.production-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.production-stat-blue .production-stat-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.production-stat-green .production-stat-icon {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.production-stat-orange .production-stat-icon {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
}

.production-stat-teal .production-stat-icon {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: white;
}

.production-stat-content {
  flex: 1 1;
}

.production-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.production-stat-content p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 8px 0;
}

/* Production Request Cards */
.production-request-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.production-request-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.production-request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.production-request-pending {
  border-left-color: #f59e0b;
}

.production-request-pending:hover {
  border-left-color: #d97706;
  background: linear-gradient(to right, #fffbeb, white);
}

.production-request-released {
  border-left-color: #10b981;
}

.production-request-released:hover {
  border-left-color: #059669;
  background: linear-gradient(to right, #ecfdf5, white);
}

.production-request-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.8rem;
}

.production-request-pending .production-request-card-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.production-request-released .production-request-card-icon {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: white;
}

.production-request-card-content {
  flex: 1 1;
}

.production-request-card-content h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1e293b;
}

.production-request-pending .production-request-card-content h3 {
  color: #d97706;
}

.production-request-released .production-request-card-content h3 {
  color: #059669;
}

.production-request-card-content p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.production-request-card-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.production-request-card-arrow {
  font-size: 1.5rem;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.production-request-card:hover .production-request-card-arrow {
  color: #1e293b;
  transform: translateX(5px);
}

/* Production Dashboard Content */
.production-dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
  gap: 30px;
}

/* Production Quick Actions */
.production-quick-actions {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.production-quick-actions h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.production-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.production-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.production-btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
}

.production-btn-primary:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

.production-btn-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.production-btn-secondary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.production-action-btn i {
  font-size: 1.1rem;
}

/* Production Loading */
.production-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .production-dashboard-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .production-sidebar {
    width: 200px;
  }

  .production-main-content {
    margin-left: 200px;
  }

  .production-stats-grid {
    grid-template-columns: 1fr;
  }

  .production-dashboard {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .production-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .production-main-content {
    margin-left: 0;
  }

  .production-container {
    flex-direction: column;
  }
}

@media (max-width: 480px){
  .production-main-content{
        max-width: 100%;
    }

    .production-sidebar.collapsed~ .production-main-content{
        max-width: 100%;
   }
}
/* ============================================
   PRODUCTION SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Production section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Production Container */
.production-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.production-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.production-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: scale(1.05);
}

.production-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.production-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.production-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Production Sidebar - Mobile First Approach */
.production-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.production-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .production-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .production-sidebar.collapsed .production-sidebar-header h2 {
    display: none;
  }

  .production-sidebar.collapsed .production-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #7dd3fc;
  }

  .production-sidebar.collapsed .production-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .production-sidebar.collapsed .production-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .production-sidebar.collapsed .production-sidebar-menu a span {
    display: none;
  }

  .production-sidebar.collapsed .production-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
}

.production-sidebar-icon-only {
  display: none;
}

.production-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.production-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.production-sidebar-header i {
  margin-right: 8px;
  color: #7dd3fc;
  font-size: 1rem;
}

/* VHC Logo Styles for Production Sidebar */
.production-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.production-sidebar-title-text {
  flex: 1 1;
}

.production-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.production-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.production-sidebar-menu li {
  margin: 0;
}

.production-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.production-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #7dd3fc;
}

.production-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #7dd3fc;
}

.production-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.production-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Production Main Content */
.production-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Production Header */
.production-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.production-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.production-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.production-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.production-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.production-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.production-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.production-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.production-user-profile {
  display: flex;
  align-items: center;
}

/* Production Dashboard */
.production-dashboard {
  padding: 20px 15px;
}

.production-dashboard-header {
  margin-bottom: 20px;
}

.production-dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.production-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Production Stats Grid */
.production-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.production-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.production-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.production-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.production-stat-content {
  flex: 1 1;
  min-width: 0;
}

.production-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.production-stat-content p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Production Request Cards */
.production-request-cards {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.production-request-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.production-request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.production-request-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.production-request-card-content {
  flex: 1 1;
  min-width: 0;
}

.production-request-card-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1e293b;
}

.production-request-card-content p {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.production-request-card-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.production-request-card-arrow {
  font-size: 1.2rem;
  color: #94a3b8;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Production Dashboard Content */
.production-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

/* Production Quick Actions */
.production-quick-actions {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.production-quick-actions h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.production-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.production-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.production-action-btn i {
  font-size: 1rem;
}

/* Production Table Styles */
.production-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.production-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.production-table th {
  background: #f8fafc;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.production-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.production-table tr:hover {
  background: #f8fafc;
}

/* Production Form Styles */
.production-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.production-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.production-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.production-form-group input,
.production-form-group select,
.production-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.production-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Production Loading */
.production-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.production-loading p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .production-mobile-menu-btn {
    display: none;
  }

  .production-sidebar-overlay {
    display: none !important;
  }

  .production-sidebar-toggle-btn {
    display: flex;
  }

  .production-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .production-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .production-container.sidebar-collapsed .production-main-content {
    margin-left: 60px;
  }

  .production-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .production-container.sidebar-collapsed .production-header {
    padding-left: 85px;
  }

  .production-header-left h1 {
    font-size: 1.6rem;
  }

  .production-dashboard {
    padding: 25px 20px;
  }

  .production-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .production-request-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .production-dashboard-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .production-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .production-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .production-table th,
  .production-table td {
    padding: 15px 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .production-sidebar {
    width: 250px;
  }

  .production-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .production-container.sidebar-collapsed .production-main-content {
    margin-left: 60px;
  }

  .production-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .production-container.sidebar-collapsed .production-header {
    padding-left: 90px;
  }

  .production-sidebar-header {
    padding: 20px;
  }

  .production-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .production-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .production-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .production-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .production-header-left h1 {
    font-size: 1.8rem;
  }

  .production-dashboard {
    padding: 30px;
  }

  .production-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .production-request-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .production-dashboard-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .production-table {
    min-width: 1200px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .production-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .production-request-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .production-table {
    min-width: 1400px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .production-request-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.production-mobile-hide {
  display: none;
}

/* Show on mobile only */
.production-mobile-only {
  display: block;
}

/* Responsive text */
.production-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.production-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.production-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .production-mobile-hide {
    display: block;
  }

  .production-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .production-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .production-header {
    padding: 10px 20px;
  }

  .production-header-left h1 {
    font-size: 1.3rem;
  }

  .production-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .production-sidebar-menu a,
  .production-action-btn,
  .production-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .production-sidebar,
  .production-header,
  .production-form-actions,
  .production-mobile-menu-btn,
  .production-sidebar-toggle-btn {
    display: none !important;
  }

  .production-main-content {
    margin-left: 0;
  }

  .production-dashboard {
    padding: 0;
  }
}


/* width responsive style*/
.logistic-main-content{
  max-width: calc(100% - 250px);
}

.logistic-sidebar.collapsed ~ .logistic-main-content{
    max-width: calc(100% - 60px);
}
/* Logistic Dashboard Styles */

/* Logistic Container Layout */
.logistic-container {
  display: flex;
  min-height: 100vh;
}

/* Logistic Sidebar Styles */
.logistic-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.logistic-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logistic-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.logistic-sidebar-header i {
  margin-right: 10px;
  color: #ffd700;
}

/* VHC Logo Styles for Logistic Sidebar */
.logistic-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logistic-sidebar-title-text {
  flex: 1 1;
}

.logistic-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logistic-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.logistic-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.logistic-sidebar-menu li {
  margin: 0;
}

.logistic-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.logistic-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #ffd700;
}

.logistic-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #ffd700;
}

.logistic-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.logistic-menu-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.logistic-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #ffd700;
}

.logistic-menu-group-header .logistic-menu-chevron {
  margin-left: auto;
  margin-right: 0;
  font-size: 12px;
  opacity: 0.8;
}

.logistic-submenu {
  list-style: none;
  padding: 0 0 0 0;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.15);
}

.logistic-submenu li a {
  padding-left: 44px;
  font-size: 0.95em;
}

.logistic-sidebar-menu li.active-parent > .logistic-menu-group-header {
  border-left-color: #ffd700;
}

/* Logistic Main Content */
.logistic-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Logistic Header Styles */
.logistic-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logistic-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.logistic-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.logistic-header-right {
  display: flex;
  align-items: center;
}

.logistic-user-profile {
  display: flex;
  align-items: center;
}

/* Logistic Dashboard Content */
.logistic-dashboard-content {
  padding: 30px;
}

/* Stats Grid */
.logistic-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.logistic-stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s ease;
}

.logistic-stat-card:hover {
  transform: translateY(-5px);
}

.logistic-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.logistic-stat-blue .logistic-stat-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.logistic-stat-orange .logistic-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.logistic-stat-green .logistic-stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.logistic-stat-red .logistic-stat-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.logistic-stat-content h3 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #1e293b;
  margin: 0;
}

.logistic-stat-content p {
  color: #64748b;
  margin: 5px 0;
  font-size: 1rem;
}

.logistic-stat-change {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  background: #f0f9ff;
  color: #0369a1;
}

/* Recent Section */
.logistic-recent-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  overflow: hidden;
}

.logistic-section-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.logistic-section-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.logistic-view-all-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.logistic-view-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Activities List */
.logistic-activities-list {
  padding: 20px 25px;
}

.logistic-activity-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f1f5f9;
}

.logistic-activity-item:last-child {
  border-bottom: none;
}

.logistic-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.1rem;
}

.logistic-activity-item:nth-child(1) .logistic-activity-icon {
  background: #d1fae5;
  color: #059669;
}

.logistic-activity-item:nth-child(2) .logistic-activity-icon {
  background: #dbeafe;
  color: #2563eb;
}

.logistic-activity-item:nth-child(3) .logistic-activity-icon {
  background: #fef3c7;
  color: #d97706;
}

.logistic-activity-item:nth-child(4) .logistic-activity-icon {
  background: #d1fae5;
  color: #059669;
}

.logistic-activity-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.logistic-activity-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.logistic-activity-time {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* Quick Actions */
.logistic-quick-actions {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 25px;
}

.logistic-quick-actions h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.logistic-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.logistic-action-card {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.logistic-action-card:hover {
  background: white;
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.logistic-action-card i {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 10px;
}

.logistic-action-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.logistic-action-card p {
  color: #64748b;
  margin: 0;
  font-size: 0.9rem;
}

/* Consignment Details Content */
.logistic-consignment-details-content {
  padding: 30px;
  width: 100%;
  margin: 0 auto;
}

.logistic-selector-group{
  display: flex;
  flex-direction: column;
}

/* Pending Consignment Section */
.logistic-pending-consignment-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logistic-pending-consignment-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.logistic-consignment-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logistic-consignment-dropdown {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 1rem;
  background: white;
  min-width: 100px;
}

/* Consignment Info Section */
.logistic-consignment-info-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logistic-consignment-info-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.logistic-consignment-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.logistic-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logistic-detail-item label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.logistic-eta-edit-icon-btn {
  margin-left: 8px;
  width: 26px;
  height: 26px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f8fafc;
  color: #2563eb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logistic-eta-edit-icon-btn:hover {
  background: #eff6ff;
}

.logistic-detail-item span {
  color: #1f2937;
  font-size: 1rem;
}

.logistic-status-forward {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Products Section */
.logistic-products-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logistic-products-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.logistic-products-table-container {
  overflow-x: auto;
}

.logistic-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.logistic-products-table th {
  background: #f8fafc;
  color: #374151;
  font-weight: 600;
  padding: 12px;
  text-align: left;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.logistic-products-table td {
  padding: 12px;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}

.logistic-product-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #f9fafb;
}

.logistic-product-input:disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}

.logistic-qty-rate-locked-notice {
  margin: 0 0 12px 0;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #92400e;
}

.logistic-qty-rate-locked {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}

/* Document Upload Section */
.logistic-document-upload-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logistic-document-upload-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.logistic-document-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.logistic-form-row {
  display: flex;
  gap: 15px;
  align-items: end;
}

.logistic-form-group {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logistic-form-group-full {
  flex: 1 1;
}

.logistic-form-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.logistic-form-select,
.logistic-form-input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

.logistic-form-textarea {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  resize: vertical;
  font-family: inherit;
}

.logistic-file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
}

.logistic-choose-file-btn {
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
}

.logistic-choose-file-btn:hover {
  background: #e5e7eb;
}

.logistic-file-input {
  display: none;
}

.logistic-file-name {
  color: #6b7280;
  font-size: 0.9rem;
}

.logistic-upload-btn {
  padding: 8px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.logistic-upload-btn:hover {
  background: #2563eb;
}

/* Document List Section */
.logistic-document-list-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logistic-document-list-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.logistic-no-documents {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.logistic-documents-table-container {
  overflow-x: auto;
}

.logistic-documents-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.logistic-documents-table th {
  background: #f8fafc;
  color: #374151;
  font-weight: 600;
  padding: 12px;
  text-align: left;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.logistic-documents-table td {
  padding: 12px;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}

.logistic-view-doc-btn,
.logistic-delete-doc-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.8rem;
}

.logistic-view-doc-btn {
  background: #dbeafe;
  color: #1d4ed8;
}

.logistic-view-doc-btn:hover {
  background: #bfdbfe;
}

.logistic-delete-doc-btn {
  background: #fee2e2;
  color: #dc2626;
}

.logistic-delete-doc-btn:hover {
  background: #fecaca;
}

/* Status Update Section */
.logistic-status-update-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logistic-status-update-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.logistic-status-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.logistic-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.logistic-dispatch-btn {
  padding: 10px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.logistic-dispatch-btn:hover {
  background: #2563eb;
}

.logistic-eta-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 16px;
}

.logistic-eta-modal-content {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.logistic-eta-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.logistic-eta-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1e293b;
}

.logistic-eta-modal-close-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: #f8fafc;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logistic-eta-modal-close-btn:hover {
  background: #f1f5f9;
}

/* Filters Section */
.logistic-filters-section {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.logistic-search-box {
  position: relative;
  flex: 1 1;
  min-width: 300px;
}

.logistic-search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.logistic-search-input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.logistic-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.logistic-filter-group {
  display: flex;
  gap: 10px;
}

.logistic-filter-select {
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logistic-filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Error Message */
.logistic-error-message {
  background: #fee2e2;
  color: #dc2626;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid #dc2626;
}

.logistic-error-message i {
  font-size: 1.2rem;
}

/* Table Container */
.logistic-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
}

.logistic-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.logistic-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 15px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.logistic-table td {
  padding: 15px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  vertical-align: middle;
}

.logistic-table tbody tr:hover {
  background: #f8fafc;
}

.logistic-consignment-no {
  font-weight: 600;
  color: #667eea;
}

.logistic-dispatch-method {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logistic-dispatch-method i {
  color: #667eea;
  font-size: 1.1rem;
}

/* Status Badges */
.logistic-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.logistic-status-pending {
  background: #fef3c7;
  color: #d97706;
}

.logistic-status-transit {
  background: #dbeafe;
  color: #2563eb;
}

.logistic-status-delivered {
  background: #d1fae5;
  color: #059669;
}

.logistic-status-cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.logistic-status-default {
  background: #f1f5f9;
  color: #64748b;
}

/* Action Buttons */
.logistic-action-buttons {
  display: flex;
  gap: 8px;
}

.logistic-view-btn,
.logistic-edit-btn,
.logistic-update-btn {
  width: 35px;
  height: 35px;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.logistic-view-btn {
  background: #e0f2fe;
  color: #0277bd;
}

.logistic-view-btn:hover {
  background: #b3e5fc;
  transform: translateY(-2px);
}

.logistic-edit-btn {
  background: #f3e5f5;
  color: #7b1fa2;
}

.logistic-edit-btn:hover {
  background: #e1bee7;
  transform: translateY(-2px);
}

.logistic-update-btn {
  background: #e8f5e8;
  color: #2e7d32;
}

.logistic-update-btn:hover {
  background: #c8e6c9;
  transform: translateY(-2px);
}

/* No Data */
.logistic-no-data {
  text-align: center;
  padding: 40px;
}

.logistic-no-data-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: #64748b;
}

.logistic-no-data-content i {
  font-size: 3rem;
  opacity: 0.5;
}

.logistic-no-data-content p {
  font-size: 1.1rem;
  margin: 0;
}

/* Loading */
.logistic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: #64748b;
}

.logistic-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logistic-loading p {
  font-size: 1.1rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .logistic-main-content {
    margin-left: 0;
  }
  
  .logistic-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .logistic-sidebar.open {
    transform: translateX(0);
  }
  
  .logistic-dashboard-content,
  .logistic-consignment-details-content {
    padding: 20px;
  }
  
  .logistic-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .logistic-filters-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .logistic-search-box {
    min-width: auto;
  }
  
  .logistic-table-container {
    overflow-x: auto;
  }
  
  .logistic-actions-grid {
    grid-template-columns: 1fr;
  }

  .logistic-consignment-selector{
      flex-direction: column;
    }
}

@media (max-width: 480px) {
  .logistic-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .logistic-stat-card {
    flex-direction: column;
    text-align: center;
  }
  
  .logistic-action-buttons {
    flex-direction: column;
  }

  .logistic-main-content{
        max-width: 100%;
    }

    .logistic-sidebar.collapsed~ .logistic-main-content{
        max-width: 100%;
   }
}

/* Next Consignment Number Styles */
.logistic-next-consignment-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.logistic-next-consignment-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.logistic-next-consignment-section h3::before {
  content: "🔢";
  margin-right: 10px;
  font-size: 1.2rem;
}

.logistic-next-consignment-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logistic-consignment-number-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 16px 32px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logistic-consignment-number-badge i {
  margin-right: 12px;
  color: #ffd700;
  font-size: 1.5rem;
}

.consignment-number {
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logistic-consignment-info {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  font-style: italic;
  max-width: 400px;
  line-height: 1.5;
}

/* Product Count Styling */
.logistic-product-count {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
}

/* Full Width Detail Item */
.logistic-detail-item-full {
  grid-column-start: 1; grid-column-end: -1;
}

.logistic-detail-item-full label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.logistic-detail-item-full span {
  display: block;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  color: #495057;
  line-height: 1.4;
}

/* Status Badge Variants */
.logistic-status-pending {
  background: #ffc107;
  color: #000;
}

.logistic-status-forwarded-to-qc {
  background: #17a2b8;
  color: white;
}

.logistic-status-forwarded-to-logistic {
  background: #6f42c1;
  color: white;
}

.logistic-status-completed {
  background: #28a745;
  color: white;
}

.logistic-status-cancelled {
  background: #dc3545;
  color: white;
}

/* Document Upload Section Styles */
.logistic-document-upload-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  color: #856404;
  font-size: 14px;
  margin-bottom: 20px;
}

.logistic-document-upload-info i {
  margin-right: 8px;
  font-size: 16px;
}

.logistic-choose-file-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.logistic-choose-file-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.logistic-choose-file-btn i {
  margin-right: 8px;
}

.logistic-file-name {
  margin-left: 12px;
  color: #666;
  font-size: 14px;
  font-style: italic;
}

.logistic-upload-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.logistic-upload-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.logistic-upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.logistic-upload-btn i {
  margin-right: 8px;
}

/* Enhanced Document List Styles */
.logistic-no-documents {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.logistic-no-documents i {
  font-size: 48px;
  color: #dee2e6;
  margin-bottom: 16px;
}

.logistic-no-documents p {
  font-size: 16px;
  margin: 0 0 8px 0;
  font-weight: 500;
}

.logistic-no-documents small {
  font-size: 14px;
  color: #adb5bd;
}

.logistic-document-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logistic-document-name i {
  color: #667eea;
  font-size: 14px;
}

.logistic-document-type {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logistic-document-type-invoice {
  background: #e3f2fd;
  color: #1976d2;
}

.logistic-document-type-bl {
  background: #f3e5f5;
  color: #7b1fa2;
}

.logistic-document-type-packing-list {
  background: #e8f5e8;
  color: #388e3c;
}

.logistic-document-type-other-document {
  background: #fff3e0;
  color: #f57c00;
}

.logistic-document-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.logistic-download-doc-btn,
.logistic-delete-doc-btn {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.logistic-download-doc-btn {
  color: #28a745;
}

.logistic-download-doc-btn:hover {
  background: #e8f5e8;
  color: #1e7e34;
}

.logistic-delete-doc-btn {
  color: #dc3545;
}

.logistic-delete-doc-btn:hover {
  background: #f8d7da;
  color: #721c24;
}
/* ============================================
   LOGISTIC SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Logistic section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Logistic Container */
.logistic-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.logistic-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logistic-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #5a3d7a 100%);
  transform: scale(1.05);
}

.logistic-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.logistic-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logistic-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Logistic Sidebar - Mobile First Approach */
.logistic-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.logistic-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .logistic-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .logistic-sidebar.collapsed .logistic-sidebar-header h2 {
    display: none;
  }

  .logistic-sidebar.collapsed .logistic-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #ffd700;
  }

  .logistic-sidebar.collapsed .logistic-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .logistic-sidebar.collapsed .logistic-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .logistic-sidebar.collapsed .logistic-sidebar-menu a span {
    display: none;
  }

  .logistic-sidebar.collapsed .logistic-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
}

.logistic-sidebar-icon-only {
  display: none;
}

.logistic-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logistic-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.logistic-sidebar-header i {
  margin-right: 8px;
  color: #ffd700;
  font-size: 1rem;
}

/* VHC Logo Styles for Logistic Sidebar */
.logistic-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logistic-sidebar-title-text {
  flex: 1 1;
}

.logistic-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logistic-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.logistic-sidebar-menu li {
  margin: 0;
}

.logistic-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.logistic-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #ffd700;
}

.logistic-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #ffd700;
}

.logistic-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.logistic-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logistic Main Content */
.logistic-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Logistic Header */
.logistic-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.logistic-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.logistic-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.logistic-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.logistic-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.logistic-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.logistic-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.logistic-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logistic-user-profile {
  display: flex;
  align-items: center;
}

/* Logistic Dashboard */
.logistic-dashboard-content {
  padding: 20px 15px;
}

.logistic-dashboard-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.logistic-dashboard-content p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Logistic Stats Grid */
.logistic-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.logistic-stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s ease;
}

.logistic-stat-card:hover {
  transform: translateY(-5px);
}

.logistic-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
}

.logistic-stat-content h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1e293b;
  margin: 0;
}

.logistic-stat-content p {
  color: #64748b;
  margin: 5px 0;
  font-size: 0.85rem;
}

/* Logistic Filters Section */
.logistic-filters-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  align-items: stretch;
}

.logistic-search-box {
  position: relative;
  width: 100%;
  min-width: auto;
}

.logistic-search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.logistic-search-input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.logistic-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.logistic-filter-select {
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

/* Logistic Table Container */
.logistic-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.logistic-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  font-size: 0.85rem;
}

.logistic-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.logistic-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  vertical-align: middle;
  font-size: 0.85rem;
}

.logistic-table tbody tr:hover {
  background: #f8fafc;
}

/* Logistic Form Styles */
.logistic-form-row {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: stretch;
}

.logistic-form-group {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.logistic-form-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.85rem;
}

.logistic-form-select,
.logistic-form-input,
.logistic-form-textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  width: 100%;
  box-sizing: border-box;
}

.logistic-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

/* Logistic Action Buttons */
.logistic-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.logistic-view-btn,
.logistic-edit-btn,
.logistic-update-btn {
  width: 35px;
  height: 35px;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  min-width: 35px;
  min-height: 35px;
}

/* Logistic Consignment Details */
.logistic-consignment-details-content {
  padding: 20px 15px;
  max-width: 100%;
  margin: 0 auto;
}

.logistic-consignment-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
}

.logistic-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logistic-detail-item label {
  font-weight: 600;
  color: #374151;
  font-size: 0.85rem;
}

.logistic-detail-item span {
  color: #1f2937;
  font-size: 0.95rem;
}

/* Logistic Products Table */
.logistic-products-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.logistic-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  font-size: 0.85rem;
}

.logistic-products-table th {
  background: #f8fafc;
  color: #374151;
  font-weight: 600;
  padding: 10px 8px;
  text-align: left;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
  white-space: nowrap;
}

.logistic-products-table td {
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  font-size: 0.85rem;
}

/* Logistic Documents Table */
.logistic-documents-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.logistic-documents-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: 0.85rem;
}

.logistic-documents-table th {
  background: #f8fafc;
  color: #374151;
  font-weight: 600;
  padding: 10px 8px;
  text-align: left;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
  white-space: nowrap;
}

.logistic-documents-table td {
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  font-size: 0.85rem;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .logistic-mobile-menu-btn {
    display: none;
  }

  .logistic-sidebar-overlay {
    display: none !important;
  }

  .logistic-sidebar-toggle-btn {
    display: flex;
  }

  .logistic-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .logistic-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .logistic-container.sidebar-collapsed .logistic-main-content {
    margin-left: 60px;
  }

  .logistic-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .logistic-container.sidebar-collapsed .logistic-header {
    padding-left: 85px;
  }

  .logistic-header-left h1 {
    font-size: 1.6rem;
  }

  .logistic-dashboard-content,
  .logistic-consignment-details-content {
    padding: 25px 20px;
  }

  .logistic-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .logistic-filters-section {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .logistic-search-box {
    flex: 1 1;
    min-width: 200px;
  }

  .logistic-filter-group {
    flex-direction: row;
    width: auto;
  }

  .logistic-filter-select {
    min-width: 150px;
    width: auto;
  }

  .logistic-consignment-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .logistic-form-row {
    flex-direction: row;
    align-items: end;
  }

  .logistic-table {
    min-width: 1200px;
    font-size: 0.9rem;
  }

  .logistic-table th,
  .logistic-table td {
    padding: 15px 12px;
    font-size: 0.85rem;
  }

  .logistic-products-table {
    min-width: 600px;
  }

  .logistic-documents-table {
    min-width: 700px;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .logistic-sidebar {
    width: 250px;
  }

  .logistic-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .logistic-container.sidebar-collapsed .logistic-main-content {
    margin-left: 60px;
  }

  .logistic-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .logistic-container.sidebar-collapsed .logistic-header {
    padding-left: 90px;
  }

  .logistic-sidebar-header {
    padding: 20px;
  }

  .logistic-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .logistic-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .logistic-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .logistic-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .logistic-header-left h1 {
    font-size: 1.8rem;
  }

  .logistic-dashboard-content,
  .logistic-consignment-details-content {
    padding: 30px;
  }

  .logistic-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .logistic-consignment-details-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .logistic-table {
    min-width: 1400px;
  }

  .logistic-products-table {
    min-width: 700px;
  }

  .logistic-documents-table {
    min-width: 800px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .logistic-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .logistic-consignment-details-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .logistic-table {
    min-width: 1600px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .logistic-consignment-details-content {
    width: 100%;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.logistic-mobile-hide {
  display: none;
}

/* Show on mobile only */
.logistic-mobile-only {
  display: block;
}

/* Responsive text */
.logistic-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.logistic-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.logistic-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .logistic-mobile-hide {
    display: block;
  }

  .logistic-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .logistic-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .logistic-header {
    padding: 10px 20px;
  }

  .logistic-header-left h1 {
    font-size: 1.3rem;
  }

  .logistic-dashboard-content,
  .logistic-consignment-details-content {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .logistic-sidebar-menu a,
  .logistic-action-btn,
  .logistic-view-btn,
  .logistic-edit-btn,
  .logistic-update-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .logistic-sidebar,
  .logistic-header,
  .logistic-form-actions,
  .logistic-mobile-menu-btn,
  .logistic-sidebar-toggle-btn {
    display: none !important;
  }

  .logistic-main-content {
    margin-left: 0;
  }

  .logistic-dashboard-content,
  .logistic-consignment-details-content {
    padding: 0;
  }
}


/* width responsive style*/
.store-main-content{
  max-width: calc(100% - 250px);
}

.store-sidebar.collapsed ~ .store-main-content{
    max-width: calc(100% - 60px);
}

/* Store Dashboard Styles */

/* Store Container Layout */
.store-container {
  display: flex;
  min-height: 100vh;
}

/* Store Sidebar Styles */
.store-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.store-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.store-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.store-sidebar-header i {
  margin-right: 10px;
  color: #34d399;
}

/* VHC Logo Styles for Store Sidebar */
.store-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.store-sidebar-title-text {
  flex: 1 1;
}

.store-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.store-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.store-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.store-sidebar-menu li {
  margin: 0;
}

.store-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.store-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.store-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

.store-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Menu Group (collapsible sections like Store Report) */
.store-sidebar-menu .menu-group {
  margin: 0;
}

.store-sidebar-menu .menu-group-title {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.store-sidebar-menu .menu-group-title:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.store-sidebar-menu .menu-group.active > .menu-group-title {
  border-left-color: #34d399;
}

.store-sidebar-menu .menu-group-title span {
  flex: 1 1;
}

.store-sidebar-menu .menu-group-title .fa-chevron-down,
.store-sidebar-menu .menu-group-title .fa-chevron-right {
  font-size: 0.7rem;
  margin-right: 0;
  width: auto;
  opacity: 0.7;
}

.store-sidebar-menu .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.15);
}

.store-sidebar-menu .submenu li {
  margin: 0;
}

.store-sidebar-menu .submenu a {
  padding: 12px 20px 12px 55px;
  font-size: 0.9rem;
}

.store-sidebar-menu .submenu a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-left-color: #34d399;
}

.store-sidebar-menu .submenu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

/* Store Main Content */
.store-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Store Header Styles */
.store-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.store-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.store-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.store-header-right {
  display: flex;
  align-items: center;
}

.store-user-profile {
  display: flex;
  align-items: center;
}

/* Store Dashboard Styles */
.store-dashboard {
  padding: 30px;
}

.store-dashboard-header {
  margin-bottom: 30px;
}

.store-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.store-dashboard-header p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* Store Stats Grid */
.store-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.store-stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.store-stat-card:hover {
  transform: translateY(-2px);
}

.store-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.5rem;
}

.store-stat-blue .store-stat-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.store-stat-orange .store-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.store-stat-green .store-stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.store-stat-red .store-stat-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.store-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.store-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.store-stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.store-change-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.store-change-orange {
  background: #fed7aa;
  color: #d97706;
}

.store-change-green {
  background: #d1fae5;
  color: #059669;
}

.store-change-red {
  background: #fee2e2;
  color: #dc2626;
}

/* Store Request Cards */
.store-request-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.store-request-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.store-request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.store-request-pending {
  border-left-color: #f59e0b;
}

.store-request-pending:hover {
  border-left-color: #d97706;
  background: linear-gradient(to right, #fffbeb, white);
}

.store-request-released {
  border-left-color: #10b981;
}

.store-request-released:hover {
  border-left-color: #059669;
  background: linear-gradient(to right, #ecfdf5, white);
}

.store-request-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.8rem;
}

.store-request-pending .store-request-card-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.store-request-released .store-request-card-icon {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: white;
}

.store-request-card-content {
  flex: 1 1;
}

.store-request-card-content h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1e293b;
}

.store-request-pending .store-request-card-content h3 {
  color: #d97706;
}

.store-request-released .store-request-card-content h3 {
  color: #059669;
}

.store-request-card-content p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.store-request-card-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.store-request-card-arrow {
  font-size: 1.5rem;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.store-request-card:hover .store-request-card-arrow {
  color: #1e293b;
  transform: translateX(5px);
}

/* Store Dashboard Content */
.store-dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
  gap: 30px;
}

.store-quick-actions,
.store-recent-activities {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.store-quick-actions h3,
.store-recent-activities h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.store-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-action-btn {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.store-action-btn i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.store-btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.store-btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

.store-btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.store-btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-1px);
}

.store-btn-tertiary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.store-btn-tertiary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

/* Store Activities */
.store-activities-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.store-activity-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.store-activity-store-in {
  border-left-color: #10b981;
}

.store-activity-store-out {
  border-left-color: #ef4444;
}

.store-activity-alert {
  border-left-color: #f59e0b;
}

.store-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.1rem;
}

.store-activity-store-in .store-activity-icon {
  background: #d1fae5;
  color: #059669;
}

.store-activity-store-out .store-activity-icon {
  background: #fee2e2;
  color: #dc2626;
}

.store-activity-alert .store-activity-icon {
  background: #fed7aa;
  color: #d97706;
}

.store-activity-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.store-activity-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.store-activity-time {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-sidebar {
    width: 200px;
  }
  
  .store-main-content {
    margin-left: 200px;
  }
  
  .store-dashboard-content {
    grid-template-columns: 1fr;
  }
  
  .store-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .store-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }
  
  .store-main-content {
    margin-left: 0;
  }
  
  .store-header {
    padding: 15px 20px;
  }
  
  .store-dashboard {
    padding: 20px;
  }
}

@media (max-width: 480px){
  .store-main-content{
        max-width: 100%;
    }

    .store-sidebar.collapsed~ .store-main-content{
        max-width: 100%;
   }
}
/* ============================================
   STORE SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Store section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Store Container */
.store-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.store-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: scale(1.05);
}

.store-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.store-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.store-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Store Sidebar - Mobile First Approach */
.store-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.store-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .store-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .store-sidebar.collapsed .store-sidebar-header h2 {
    display: none;
  }

  .store-sidebar.collapsed .store-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #34d399;
  }

  .store-sidebar.collapsed .store-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .store-sidebar.collapsed .store-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .store-sidebar.collapsed .store-sidebar-menu a span {
    display: none;
  }

  .store-sidebar.collapsed .store-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .store-sidebar.collapsed .menu-group-title {
    justify-content: center;
    padding: 15px;
  }

  .store-sidebar.collapsed .menu-group-title span,
  .store-sidebar.collapsed .menu-group-title .fa-chevron-down,
  .store-sidebar.collapsed .menu-group-title .fa-chevron-right {
    display: none;
  }

  .store-sidebar.collapsed .submenu {
    display: none;
  }
}

.store-sidebar-icon-only {
  display: none;
}

.store-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.store-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.store-sidebar-header i {
  margin-right: 8px;
  color: #34d399;
  font-size: 1rem;
}

/* VHC Logo Styles for Store Sidebar */
.store-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.store-sidebar-title-text {
  flex: 1 1;
}

.store-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.store-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.store-sidebar-menu li {
  margin: 0;
}

.store-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.store-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.store-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

.store-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.store-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Menu Group responsive overrides */
.store-sidebar-menu .menu-group-title {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
  -webkit-user-select: none;
          user-select: none;
}

.store-sidebar-menu .menu-group-title:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.store-sidebar-menu .menu-group-title span {
  flex: 1 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-sidebar-menu .menu-group-title .fa-chevron-down,
.store-sidebar-menu .menu-group-title .fa-chevron-right {
  font-size: 0.65rem;
  margin-right: 0;
  width: auto;
  opacity: 0.7;
}

.store-sidebar-menu .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.15);
}

.store-sidebar-menu .submenu a {
  padding: 10px 15px 10px 50px;
  font-size: 0.85rem;
}

/* Store Main Content */
.store-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Store Header */
.store-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.store-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.store-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.store-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.store-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.store-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.store-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.store-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.store-user-profile {
  display: flex;
  align-items: center;
}

/* Store Dashboard */
.store-dashboard {
  padding: 20px 15px;
}

.store-dashboard-header {
  margin-bottom: 20px;
}

.store-dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.store-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Store Stats Grid */
.store-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.store-stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.store-stat-card:hover {
  transform: translateY(-2px);
}

.store-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.store-stat-content {
  flex: 1 1;
  min-width: 0;
}

.store-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.store-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.85rem;
}

.store-stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Store Request Cards */
.store-request-cards {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.store-request-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.store-request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.store-request-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.store-request-card-content {
  flex: 1 1;
  min-width: 0;
}

.store-request-card-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1e293b;
}

.store-request-card-content p {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.store-request-card-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.store-request-card-arrow {
  font-size: 1.2rem;
  color: #94a3b8;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Store Dashboard Content */
.store-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.store-quick-actions,
.store-recent-activities {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.store-quick-actions h3,
.store-recent-activities h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.store-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-action-btn {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.store-action-btn i {
  margin-right: 10px;
  font-size: 1rem;
}

/* Store Activities */
.store-activities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-activity-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.store-activity-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1rem;
  flex-shrink: 0;
}

.store-activity-content {
  flex: 1 1;
  min-width: 0;
}

.store-activity-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.store-activity-content p {
  color: #64748b;
  margin: 0 0 4px 0;
  font-size: 0.85rem;
}

.store-activity-time {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* Store Table Styles */
.store-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.store-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.store-table th {
  background: #f8fafc;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.store-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.store-table tr:hover {
  background: #f8fafc;
}

/* Store Form Styles */
.store-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.store-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.store-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.store-form-group input,
.store-form-group select,
.store-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.store-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .store-mobile-menu-btn {
    display: none;
  }

  .store-sidebar-overlay {
    display: none !important;
  }

  .store-sidebar-toggle-btn {
    display: flex;
  }

  .store-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .store-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .store-container.sidebar-collapsed .store-main-content {
    margin-left: 60px;
  }

  .store-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .store-container.sidebar-collapsed .store-header {
    padding-left: 85px;
  }

  .store-header-left h1 {
    font-size: 1.6rem;
  }

  .store-dashboard {
    padding: 25px 20px;
  }

  .store-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .store-request-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .store-dashboard-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .store-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .store-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .store-table th,
  .store-table td {
    padding: 15px 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .store-sidebar {
    width: 250px;
  }

  .store-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .store-container.sidebar-collapsed .store-main-content {
    margin-left: 60px;
  }

  .store-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .store-container.sidebar-collapsed .store-header {
    padding-left: 90px;
  }

  .store-sidebar-header {
    padding: 20px;
  }

  .store-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .store-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .store-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .store-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .store-header-left h1 {
    font-size: 1.8rem;
  }

  .store-dashboard {
    padding: 30px;
  }

  .store-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .store-request-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .store-dashboard-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .store-table {
    min-width: 1200px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .store-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .store-request-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-table {
    min-width: 1400px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .store-request-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .store-dashboard-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.store-mobile-hide {
  display: none;
}

/* Show on mobile only */
.store-mobile-only {
  display: block;
}

/* Responsive text */
.store-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.store-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.store-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .store-mobile-hide {
    display: block;
  }

  .store-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .store-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .store-header {
    padding: 10px 20px;
  }

  .store-header-left h1 {
    font-size: 1.3rem;
  }

  .store-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .store-sidebar-menu a,
  .store-action-btn,
  .store-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .store-sidebar,
  .store-header,
  .store-form-actions,
  .store-mobile-menu-btn,
  .store-sidebar-toggle-btn {
    display: none !important;
  }

  .store-main-content {
    margin-left: 0;
  }

  .store-dashboard {
    padding: 0;
  }
}


/* width responsive style*/
.user-activity-main-content{
  max-width: calc(100% - 250px);
}

.user-activity-sidebar.collapsed ~ .user-activity-main-content{
    max-width: calc(100% - 60px);
}

/* User Activity Section Styles */

.user-activity-container {
  display: flex;
  min-height: 100vh;
}

.user-activity-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.user-activity-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-activity-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.user-activity-sidebar-menu {
  list-style: none;
  padding: 12px 0;
  margin: 0;
}

.user-activity-sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.user-activity-sidebar-menu li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.user-activity-sidebar-menu li.active a {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.user-activity-sidebar-menu li a i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.user-activity-main-content {
  flex: 1 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.user-activity-container.sidebar-collapsed .user-activity-main-content {
  margin-left: 70px;
}

.user-activity-container.sidebar-collapsed .user-activity-sidebar {
  width: 70px;
}

.user-activity-container.sidebar-collapsed .user-activity-sidebar-menu li a span {
  display: none;
}

.user-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  min-height: 56px;
}

.user-activity-header-left,
.user-activity-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-activity-sidebar-toggle-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #4b5563;
  font-size: 1.25rem;
}

.user-activity-user-profile {
  display: flex;
  align-items: center;
}

/* Track page layout */
.user-activity-track-page {
  flex: 1 1;
  display: flex;
  min-height: calc(100vh - 56px); /* ensure map area has real height */
  background: #f3f4f6;
  overflow: hidden;
}

.user-activity-map-wrap {
  flex: 1 1;
  min-width: 0;
  min-height: 400px;
  position: relative;
  height: 100%;
  background: #e5e7eb;
}

.user-activity-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: #e5e7eb;
}

/* Map loading overlay */
.user-activity-map-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #e5e7eb;
  z-index: 10;
}

.user-activity-map-loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #c7d2fe;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: user-activity-map-spin 0.8s linear infinite;
}

@keyframes user-activity-map-spin {
  to { transform: rotate(360deg); }
}

.user-activity-map-loader-text {
  font-size: 0.875rem;
  color: #4b5563;
}

.user-activity-track-panel {
  width: 380px;
  min-width: 320px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-activity-track-panel-title {
  padding: 16px 20px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}

.user-activity-search-wrap {
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.user-activity-search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
}

.user-activity-search-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.user-activity-search-wrap {
  position: relative;
}

.user-activity-search-wrap i.fa-search {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
}

.user-activity-filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.user-activity-filter-btn {
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  color: #4b5563;
}

.user-activity-filter-btn.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: white;
}

.user-activity-user-list {
  flex: 1 1;
  overflow-y: auto;
  padding: 8px 0;
}

.user-activity-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}

.user-activity-user-item:hover {
  background: #f9fafb;
}

.user-activity-user-item.selected {
  background: #eef2ff;
  border-left: 3px solid #4f46e5;
}

.user-activity-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex-shrink: 0;
}

.user-activity-user-info {
  flex: 1 1;
  min-width: 0;
}

.user-activity-user-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
}

.user-activity-user-status {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

/* Detail view: top bar with back button */
.user-activity-detail-top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.user-activity-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}

.user-activity-back-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.user-activity-detail-top-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

/* Detail panel (standalone = only content when a user is selected) */
.user-activity-detail-panel {
  border-top: 1px solid #e5e7eb;
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.user-activity-detail-panel-standalone {
  border-top: none;
  flex: 1 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.user-activity-detail-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.user-activity-detail-avatar-wrap {
  margin-bottom: 10px;
}

.user-activity-detail-avatar {
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

.user-activity-detail-name {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

.user-activity-detail-status {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 4px;
}

.user-activity-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.user-activity-date-nav button {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: #4f46e5;
  font-size: 1rem;
}

.user-activity-date-nav button:disabled,
.user-activity-date-nav-btn-disabled {
  cursor: not-allowed;
  color: #9ca3af;
  opacity: 0.7;
}

.user-activity-date-nav span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.user-activity-metrics {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.user-activity-metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #4b5563;
}

.user-activity-metric i {
  color: #4f46e5;
}

.user-activity-tracking-impact {
  margin-top: 8px;
}

.user-activity-tracking-impact a {
  font-size: 0.8125rem;
  color: #4f46e5;
  text-decoration: none;
}

.user-activity-tracking-impact a:hover {
  text-decoration: underline;
}

.user-activity-log-title {
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.user-activity-log-list {
  flex: 1 1;
  overflow-y: auto;
  padding: 8px 0;
}

.user-activity-log-item {
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.8125rem;
}

.user-activity-log-time {
  color: #6b7280;
  margin-bottom: 4px;
}

.user-activity-log-type {
  font-weight: 500;
  color: #111827;
}

.user-activity-log-address {
  color: #6b7280;
  margin-top: 4px;
  font-size: 0.75rem;
}

.user-activity-mobile-menu-btn,
.user-activity-sidebar-overlay {
  display: none;
}

@media (max-width: 480px){
  .user-activity-main-content{
        max-width: 100%;
    }

    .user-activity-sidebar.collapsed~ .user-activity-main-content{
        max-width: 100%;
   }

}
@media (max-width: 1024px) {
  .user-activity-track-panel {
    width: 320px;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .user-activity-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .user-activity-sidebar.open {
    transform: translateX(0);
  }

  .user-activity-main-content {
    margin-left: 0 !important;
  }

  .user-activity-container.sidebar-collapsed .user-activity-main-content {
    margin-left: 0 !important;
  }

  .user-activity-container.sidebar-collapsed .user-activity-sidebar {
    width: 250px;
  }

  .user-activity-container.sidebar-collapsed .user-activity-sidebar-menu li a span {
    display: inline;
  }

  .user-activity-mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 70px;
    left: 16px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: #4f46e5;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .user-activity-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .user-activity-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .user-activity-track-page {
    flex-direction: column;
  }

  .user-activity-map-wrap {
    min-height: 300px;
  }

  .user-activity-track-panel {
    width: 100%;
    min-width: 0;
    max-height: 50vh;
  }
}

/* width responsive style*/
.purchase-main-content{
  max-width: calc(100% - 250px);
}

.purchase-sidebar.collapsed ~ .purchase-main-content{
    max-width: calc(100% - 60px);
}

/* Purchase Dashboard Styles */

/* Purchase Container Layout */
.purchase-container {
  display: flex;
  min-height: 100vh;
}

/* Purchase Sidebar Styles */
.purchase-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.purchase-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.purchase-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.purchase-sidebar-header i {
  margin-right: 10px;
  color: #a5b4fc;
}

/* VHC Logo Styles for Purchase Sidebar */
.purchase-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.purchase-sidebar-title-text {
  flex: 1 1;
}

.purchase-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.purchase-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.purchase-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.purchase-sidebar-menu li {
  margin: 0;
}

.purchase-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.purchase-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.purchase-sidebar-section-label {
  list-style: none;
  padding: 14px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.purchase-sidebar-section-label span {
  display: block;
}

.purchase-sidebar-submenu-item a {
  padding-left: 36px;
  font-size: 13px;
}

.purchase-sidebar.collapsed .purchase-sidebar-submenu-item a {
  padding-left: 20px;
}

/* Expandable menu group (e.g. Export Indent PO List) */
.purchase-sidebar-menu li.purchase-sidebar-group {
  margin: 0;
}

.purchase-sidebar-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  -webkit-user-select: none;
          user-select: none;
}

.purchase-sidebar-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-menu li.purchase-sidebar-group.active-parent > .purchase-sidebar-group-header {
  background-color: rgba(255, 255, 255, 0.08);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-group-header i.purchase-sidebar-group-icon {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.purchase-sidebar-group-header .purchase-menu-chevron {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.85;
}

.purchase-sidebar-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.purchase-sidebar-submenu li {
  margin: 0;
}

.purchase-sidebar-submenu li a {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 44px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.purchase-sidebar-submenu li a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-submenu li.active a {
  background-color: rgba(255, 255, 255, 0.12);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-submenu li a i {
  margin-right: 10px;
  width: 18px;
  text-align: center;
}

.purchase-sidebar.collapsed .purchase-sidebar-group-header .purchase-menu-chevron,
.purchase-sidebar.collapsed .purchase-sidebar-submenu {
  display: none;
}

.purchase-sidebar.collapsed .purchase-sidebar-group-header {
  justify-content: center;
  padding: 15px 10px;
}

.purchase-sidebar.collapsed .purchase-sidebar-group-header span,
.purchase-sidebar.collapsed .purchase-sidebar-group-header .purchase-sidebar-group-label {
  display: none;
}

.purchase-sidebar.collapsed .purchase-sidebar-group-header i.purchase-sidebar-group-icon {
  margin-right: 0;
}

/* Purchase Main Content */
.purchase-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Purchase Header Styles */
.purchase-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.purchase-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.purchase-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.purchase-header-right {
  display: flex;
  align-items: center;
}

.purchase-user-profile {
  display: flex;
  align-items: center;
}

/* Purchase Dashboard Styles */
.purchase-dashboard {
  padding: 30px;
}

.purchase-dashboard-header {
  margin-bottom: 30px;
}

.purchase-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.purchase-dashboard-header p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* Purchase Stats Grid */
.purchase-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.purchase-stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.purchase-stat-card:hover {
  transform: translateY(-2px);
}

.purchase-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.5rem;
}

.purchase-stat-blue .purchase-stat-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.purchase-stat-orange .purchase-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.purchase-stat-green .purchase-stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.purchase-stat-purple .purchase-stat-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.purchase-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.purchase-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.purchase-stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.purchase-change-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.purchase-change-orange {
  background: #fed7aa;
  color: #d97706;
}

.purchase-change-green {
  background: #d1fae5;
  color: #059669;
}

.purchase-change-purple {
  background: #ede9fe;
  color: #7c3aed;
}

/* Purchase Dashboard Content */
.purchase-dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 30px;
  gap: 30px;
}

.purchase-quick-actions,
.purchase-recent-activities {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.purchase-quick-actions h3,
.purchase-recent-activities h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.purchase-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchase-action-btn {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.purchase-action-btn i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.purchase-btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}

.purchase-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
}

.purchase-btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.purchase-btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-1px);
}

.purchase-btn-tertiary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.purchase-btn-tertiary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

/* Purchase Activities */
.purchase-activities-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.purchase-activity-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.purchase-activity-order {
  border-left-color: #6366f1;
}

.purchase-activity-received {
  border-left-color: #10b981;
}

.purchase-activity-invoice {
  border-left-color: #f59e0b;
}

.purchase-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.1rem;
}

.purchase-activity-order .purchase-activity-icon {
  background: #e0e7ff;
  color: #6366f1;
}

.purchase-activity-received .purchase-activity-icon {
  background: #d1fae5;
  color: #059669;
}

.purchase-activity-invoice .purchase-activity-icon {
  background: #fed7aa;
  color: #d97706;
}

.purchase-activity-content {
  flex: 1 1;
}

.purchase-activity-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.purchase-activity-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.purchase-activity-time {
  color: #94a3b8;
  font-size: 0.8rem;
}

.purchase-activity-status {
  margin-left: 15px;
}

.purchase-status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.purchase-status-pending {
  background: #fef3c7;
  color: #d97706;
}

.purchase-status-completed {
  background: #d1fae5;
  color: #059669;
}

.purchase-status-paid {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .purchase-sidebar {
    width: 200px;
  }
  
  .purchase-main-content {
    margin-left: 200px;
  }
  
  .purchase-dashboard-content {
    grid-template-columns: 1fr;
  }
  
  .purchase-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .purchase-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }
  
  .purchase-main-content {
    margin-left: 0;
  }
  
  .purchase-header {
    padding: 15px 20px;
  }
  
  .purchase-dashboard {
    padding: 20px;
  }
}

@media (max-width: 480px){
  .purchase-main-content{
        max-width: 100%;
    }

    .purchase-sidebar.collapsed~ .purchase-main-content{
        max-width: 100%;
   }
}
/* ============================================
   PURCHASE SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Purchase section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Purchase Container */
.purchase-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.purchase-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.purchase-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: scale(1.05);
}

.purchase-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.purchase-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.purchase-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Purchase Sidebar - Mobile First Approach */
.purchase-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.purchase-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .purchase-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .purchase-sidebar.collapsed .purchase-sidebar-header h2 {
    display: none;
  }

  .purchase-sidebar.collapsed .purchase-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #a5b4fc;
  }

  .purchase-sidebar.collapsed .purchase-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .purchase-sidebar.collapsed .purchase-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .purchase-sidebar.collapsed .purchase-sidebar-menu a span {
    display: none;
  }

  .purchase-sidebar.collapsed .purchase-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
}

.purchase-sidebar-icon-only {
  display: none;
}

.purchase-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.purchase-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.purchase-sidebar-header i {
  margin-right: 8px;
  color: #a5b4fc;
  font-size: 1rem;
}

/* VHC Logo Styles for Purchase Sidebar */
.purchase-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.purchase-sidebar-title-text {
  flex: 1 1;
}

.purchase-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.purchase-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.purchase-sidebar-menu li {
  margin: 0;
}

.purchase-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.purchase-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a5b4fc;
}

.purchase-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.purchase-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Purchase Main Content */
.purchase-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Purchase Header */
.purchase-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.purchase-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.purchase-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.purchase-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.purchase-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.purchase-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.purchase-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.purchase-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.purchase-user-profile {
  display: flex;
  align-items: center;
}

/* Purchase Dashboard */
.purchase-dashboard {
  padding: 20px 15px;
}

.purchase-dashboard-header {
  margin-bottom: 20px;
}

.purchase-dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.purchase-dashboard-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Purchase Stats Grid */
.purchase-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.purchase-stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.purchase-stat-card:hover {
  transform: translateY(-2px);
}

.purchase-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.purchase-stat-content {
  flex: 1 1;
  min-width: 0;
}

.purchase-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.purchase-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.85rem;
}

.purchase-stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Purchase Dashboard Content */
.purchase-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.purchase-quick-actions,
.purchase-recent-activities {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.purchase-quick-actions h3,
.purchase-recent-activities h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.purchase-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.purchase-action-btn {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.purchase-action-btn i {
  margin-right: 10px;
  font-size: 1rem;
}

/* Purchase Activities */
.purchase-activities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchase-activity-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.purchase-activity-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1rem;
  flex-shrink: 0;
}

.purchase-activity-content {
  flex: 1 1;
  min-width: 0;
}

.purchase-activity-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.purchase-activity-content p {
  color: #64748b;
  margin: 0 0 4px 0;
  font-size: 0.85rem;
}

.purchase-activity-time {
  color: #94a3b8;
  font-size: 0.75rem;
}

.purchase-activity-status {
  margin-left: 12px;
  flex-shrink: 0;
}

.purchase-status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Purchase Table Styles */
.purchase-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.purchase-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.purchase-table th {
  background: #f8fafc;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.purchase-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.purchase-table tr:hover {
  background: #f8fafc;
}

/* Purchase Form Styles */
.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.purchase-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.purchase-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.purchase-form-group input,
.purchase-form-group select,
.purchase-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.purchase-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .purchase-mobile-menu-btn {
    display: none;
  }

  .purchase-sidebar-overlay {
    display: none !important;
  }

  .purchase-sidebar-toggle-btn {
    display: flex;
  }

  .purchase-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .purchase-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .purchase-container.sidebar-collapsed .purchase-main-content {
    margin-left: 60px;
  }

  .purchase-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .purchase-container.sidebar-collapsed .purchase-header {
    padding-left: 85px;
  }

  .purchase-header-left h1 {
    font-size: 1.6rem;
  }

  .purchase-dashboard {
    padding: 25px 20px;
  }

  .purchase-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .purchase-dashboard-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .purchase-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .purchase-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .purchase-table th,
  .purchase-table td {
    padding: 15px 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .purchase-sidebar {
    width: 250px;
  }

  .purchase-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .purchase-container.sidebar-collapsed .purchase-main-content {
    margin-left: 60px;
  }

  .purchase-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .purchase-container.sidebar-collapsed .purchase-header {
    padding-left: 90px;
  }

  .purchase-sidebar-header {
    padding: 20px;
  }

  .purchase-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .purchase-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .purchase-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .purchase-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .purchase-header-left h1 {
    font-size: 1.8rem;
  }

  .purchase-dashboard {
    padding: 30px;
  }

  .purchase-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .purchase-dashboard-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .purchase-table {
    min-width: 1200px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .purchase-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .purchase-table {
    min-width: 1400px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .purchase-dashboard-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.purchase-mobile-hide {
  display: none;
}

/* Show on mobile only */
.purchase-mobile-only {
  display: block;
}

/* Responsive text */
.purchase-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.purchase-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.purchase-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .purchase-mobile-hide {
    display: block;
  }

  .purchase-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .purchase-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .purchase-header {
    padding: 10px 20px;
  }

  .purchase-header-left h1 {
    font-size: 1.3rem;
  }

  .purchase-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .purchase-sidebar-menu a,
  .purchase-action-btn,
  .purchase-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .purchase-sidebar,
  .purchase-header,
  .purchase-form-actions,
  .purchase-mobile-menu-btn,
  .purchase-sidebar-toggle-btn {
    display: none !important;
  }

  .purchase-main-content {
    margin-left: 0;
  }

  .purchase-dashboard {
    padding: 0;
  }
}


/* width responsive style*/
.sales-main-content{
  max-width: calc(100% - 250px);
}

.sales-sidebar.collapsed ~ .sales-main-content{
    max-width: calc(100% - 60px);
}


/* Sales Dashboard Styles */

/* Sales Container Layout */
.sales-container {
  display: flex;
  min-height: 100vh;
}

/* Sales Sidebar Styles */
.sales-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sales-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sales-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.sales-sidebar-header i {
  margin-right: 10px;
  color: #93c5fd;
}

/* VHC Logo Styles for Sales Sidebar */
.sales-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sales-sidebar-title-text {
  flex: 1 1;
}

.sales-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sales-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.sales-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.sales-sidebar-menu li {
  margin: 0;
}

.sales-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sales-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #93c5fd;
}

.sales-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #93c5fd;
}

.sales-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Sales Main Content */
.sales-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Sales Header Styles */
.sales-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sales-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.sales-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.sales-header-right {
  display: flex;
  align-items: center;
}

.sales-user-profile {
  display: flex;
  align-items: center;
}

/* Sales Dashboard Styles */
.sales-dashboard {
  padding: 30px;
}

.sales-dashboard-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sales-dashboard-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.sales-dashboard-content p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sales-sidebar {
    width: 200px;
  }
  
  .sales-main-content {
    margin-left: 200px;
  }
}

@media (max-width: 640px) {
  .sales-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }
  
  .sales-main-content {
    margin-left: 0;
  }
  
  .sales-header {
    padding: 15px 20px;
  }
  
  .sales-dashboard {
    padding: 20px;
  }
}

@media (max-width: 480px){
  .sales-main-content{
        max-width: 100%;
    }

    .sales-sidebar.collapsed~ .sales-main-content{
        max-width: 100%;
   }
}
/* ============================================
   SALES SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Sales section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Sales Container */
.sales-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.sales-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sales-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: scale(1.05);
}

.sales-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.sales-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sales-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Sales Sidebar - Mobile First Approach */
.sales-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sales-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .sales-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .sales-sidebar.collapsed .sales-sidebar-header h2 {
    display: none;
  }

  .sales-sidebar.collapsed .sales-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #93c5fd;
  }

  .sales-sidebar.collapsed .sales-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .sales-sidebar.collapsed .sales-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .sales-sidebar.collapsed .sales-sidebar-menu a span {
    display: none;
  }

  .sales-sidebar.collapsed .sales-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
}

.sales-sidebar-icon-only {
  display: none;
}

.sales-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sales-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.sales-sidebar-header i {
  margin-right: 8px;
  color: #93c5fd;
  font-size: 1rem;
}

/* VHC Logo Styles for Sales Sidebar */
.sales-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sales-sidebar-title-text {
  flex: 1 1;
}

.sales-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sales-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.sales-sidebar-menu li {
  margin: 0;
}

.sales-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.sales-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #93c5fd;
}

.sales-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #93c5fd;
}

.sales-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.sales-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sales Main Content */
.sales-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Sales Header */
.sales-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.sales-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.sales-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.sales-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.sales-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.sales-header-left {
  flex: 1 1;
  min-width: 200px;
}

.sales-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.sales-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.sales-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sales-user-profile {
  display: flex;
  align-items: center;
}

/* Sales Dashboard */
.sales-dashboard {
  padding: 20px 15px;
}

.sales-dashboard-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sales-dashboard-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.sales-dashboard-content p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* ============================================
   SALES CREATE ORDER - RESPONSIVE
   ============================================ */

.sales-create-order {
  padding: 15px;
  max-width: 100%;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
  overflow-x: hidden;
}

.sales-order-header {
  margin-bottom: 15px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.sales-order-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  flex: 1 1;
  min-width: 200px;
}

.sales-order-header .add-consignee-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.sales-order-form {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
}

.form-section {
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.form-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.form-group {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  flex: 1 1 100%;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.form-actions.save-section {
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.add-btn,
.cancel-btn,
.save-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.add-btn {
  background-color: #3b82f6;
  color: white;
}

.cancel-btn {
  background-color: #6b7280;
  color: white;
}

.save-btn {
  background-color: #28a745;
  color: white;
}

/* Products Table */
.products-table-container {
  overflow-x: auto;
  margin-top: 15px;
  -webkit-overflow-scrolling: touch;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  background: white;
  font-size: 0.85rem;
}

.products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.products-table td {
  padding: 10px 8px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

.edit-btn,
.delete-btn {
  padding: 5px 10px;
  margin: 0 2px;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* ============================================
   FINAL ORDER LIST - RESPONSIVE
   ============================================ */

.final-order-list {
  padding: 15px;
  max-width: 100%;
  overflow-x: hidden;
}

.final-order-header {
  margin-bottom: 20px;
}

.final-order-title {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  background-color: #ffeb3b;
  padding: 12px 15px;
  border-radius: 6px;
  text-align: center;
  word-break: break-word;
}

.final-order-filters {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.supplier-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.supplier-filter label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
  white-space: nowrap;
}

.supplier-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  min-width: 150px;
  max-width: 100%;
}

.final-order-table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.entries-selector,
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entries-selector label,
.search-box label {
  font-size: 0.9rem;
  color: #555;
  white-space: nowrap;
}

.entries-select,
.search-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  min-width: 100px;
}

.search-input {
  min-width: 150px;
  flex: 1 1;
  max-width: 300px;
}

.final-order-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.final-order-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
  font-size: 0.85rem;
}

.final-order-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  white-space: nowrap;
}

.final-order-table td {
  padding: 10px 8px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 80px;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.final-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 0.85rem;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  min-width: 36px;
}

/* ============================================
   REJECTED ORDERS - RESPONSIVE
   ============================================ */

.rejected-orders {
  padding: 15px;
  max-width: 100%;
  overflow-x: hidden;
}

.rejected-orders-header {
  margin-bottom: 20px;
}

.rejected-orders-header h2 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.rejected-orders-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rejected-orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.rejected-orders-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  white-space: nowrap;
}

.rejected-orders-table td {
  padding: 10px 8px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

/* ============================================
   VERIFICATION MANAGEMENT - RESPONSIVE
   ============================================ */

.sales-order-verification {
  padding: 15px;
  max-width: 100%;
  overflow-x: hidden;
}

.verification-header {
  margin-bottom: 20px;
}

.verification-header h2 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.verification-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.verification-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 0.85rem;
}

.verification-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  white-space: nowrap;
}

.verification-table td {
  padding: 10px 8px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

.check-now-btn {
  padding: 6px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ============================================
   CREATE CONSIGNEE - RESPONSIVE
   ============================================ */

.create-consignee {
  padding: 15px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.create-consignee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
}

.create-consignee-header-left h2 {
  margin: 0;
  font-size: 1.3rem;
  color: white;
  font-weight: 600;
}

.create-consignee-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 15px;
}

.create-consignee-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
}

.create-consignee-form .form-control {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.create-consignee-form .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.create-consignee-form .submit-btn,
.create-consignee-form .cancel-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.consignees-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
}

.consignees-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
}

.consignees-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.85rem;
}

/* ============================================
   MODALS - RESPONSIVE
   ============================================ */

.edit-modal-overlay,
.view-modal-overlay,
.verification-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 10px;
  overflow-y: auto;
}

.edit-modal-content,
.view-modal-content,
.verification-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 100%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.edit-modal-header,
.view-modal-header,
.verification-modal-header {
  padding: 15px 20px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  flex-shrink: 0;
}

.edit-modal-header h2,
.view-modal-header h2,
.verification-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
  font-weight: 600;
  word-break: break-word;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.edit-modal-body,
.view-modal-body,
.verification-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}

.edit-section,
.view-section,
.verification-section {
  margin-bottom: 20px;
}

.edit-section h3,
.view-section h3,
.verification-section h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.edit-form-grid,
.verification-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 0;
}

.view-detail-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.9rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
  word-break: break-word;
}

.products-table-wrapper,
.view-products-table-container,
.verification-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
  -webkit-overflow-scrolling: touch;
}

.products-table,
.view-products-table,
.verification-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  font-size: 0.8rem;
}

.products-table th,
.view-products-table th,
.verification-products-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.75rem;
  white-space: nowrap;
}

.products-table td,
.view-products-table td,
.verification-products-table td {
  padding: 8px 10px;
  color: #555;
  font-size: 0.8rem;
  vertical-align: middle;
}

.edit-modal-footer,
.verification-modal-footer {
  padding: 15px 20px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8f9fa;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.edit-modal-footer .save-btn,
.edit-modal-footer .cancel-btn,
.verify-btn,
.reject-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .sales-mobile-menu-btn {
    display: none;
  }

  .sales-sidebar-overlay {
    display: none !important;
  }

  .sales-sidebar-toggle-btn {
    display: flex;
  }

  .sales-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .sales-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .sales-container.sidebar-collapsed .sales-main-content {
    margin-left: 60px;
  }

  .sales-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .sales-container.sidebar-collapsed .sales-header {
    padding-left: 85px;
  }

  .sales-header-left h1 {
    font-size: 1.6rem;
  }

  .sales-dashboard {
    padding: 25px 20px;
  }

  .sales-create-order {
    padding: 20px;
  }

  .sales-order-header h2 {
    font-size: 1.4rem;
  }

  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(50% - 10px);
  }

  .products-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .products-table th,
  .products-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .final-order-list {
    padding: 20px;
  }

  .final-order-title {
    font-size: 1.3rem;
    padding: 15px 20px;
  }

  .final-order-table {
    min-width: 1400px;
    font-size: 0.9rem;
  }

  .final-order-table th,
  .final-order-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  .rejected-orders-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .verification-table {
    min-width: 1000px;
    font-size: 0.9rem;
  }

  .create-consignee-form .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .edit-form-grid,
  .verification-form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .view-detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .edit-modal-content,
  .view-modal-content,
  .verification-modal-content {
    max-width: 90%;
  }

  .edit-modal-header,
  .view-modal-header,
  .verification-modal-header {
    padding: 20px 25px;
  }

  .edit-modal-header h2,
  .view-modal-header h2,
  .verification-modal-header h2 {
    font-size: 1.4rem;
  }

  .edit-modal-body,
  .view-modal-body,
  .verification-modal-body {
    padding: 25px;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .sales-sidebar {
    width: 250px;
  }

  .sales-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .sales-container.sidebar-collapsed .sales-main-content {
    margin-left: 60px;
  }

  .sales-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .sales-container.sidebar-collapsed .sales-header {
    padding-left: 90px;
  }

  .sales-sidebar-header {
    padding: 20px;
  }

  .sales-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .sales-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .sales-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .sales-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .sales-header-left h1 {
    font-size: 1.8rem;
  }

  .sales-dashboard {
    padding: 30px;
  }

  .sales-create-order {
    padding: 5px 20px 10px 20px;
  }

  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(33.333% - 15px);
  }

  .products-table {
    min-width: 1200px;
  }

  .final-order-table {
    min-width: 1800px;
  }

  .rejected-orders-table {
    min-width: 1000px;
  }

  .verification-table {
    min-width: 1200px;
  }

  .create-consignee-form .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .edit-form-grid,
  .verification-form-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .view-detail-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .edit-modal-content,
  .view-modal-content,
  .verification-modal-content {
    max-width: 1200px;
  }

  .edit-modal-header,
  .view-modal-header,
  .verification-modal-header {
    padding: 20px 30px;
  }

  .edit-modal-header h2,
  .view-modal-header h2,
  .verification-modal-header h2 {
    font-size: 1.5rem;
  }

  .edit-modal-body,
  .view-modal-body,
  .verification-modal-body {
    padding: 30px;
  }

  .edit-modal-footer,
  .verification-modal-footer {
    padding: 20px 30px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(25% - 15px);
  }

  .final-order-table {
    min-width: 2000px;
  }

  .edit-form-grid,
  .verification-form-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .view-detail-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(16.666% - 17px);
  }

  .edit-modal-content,
  .view-modal-content,
  .verification-modal-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.sales-mobile-hide {
  display: none;
}

/* Show on mobile only */
.sales-mobile-only {
  display: block;
}

/* Responsive text */
.sales-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.sales-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.sales-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .sales-mobile-hide {
    display: block;
  }

  .sales-mobile-only {
    display: none;
  }

  .action-buttons-group {
    min-width: 100px;
  }

  .action-btn {
    font-size: 0.85rem;
    padding: 8px 14px;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .sales-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .sales-header {
    padding: 10px 20px;
  }

  .sales-header-left h1 {
    font-size: 1.3rem;
  }

  .sales-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .sales-sidebar-menu a,
  .action-btn,
  .add-btn,
  .cancel-btn,
  .save-btn,
  .check-now-btn,
  .edit-btn,
  .delete-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .pagination-btn {
    min-height: 40px;
    min-width: 40px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .sales-sidebar,
  .sales-header,
  .form-actions,
  .action-buttons-group,
  .pagination-buttons,
  .modal-close-btn {
    display: none !important;
  }

  .sales-main-content {
    margin-left: 0;
  }

  .sales-create-order,
  .final-order-list,
  .rejected-orders,
  .sales-order-verification {
    padding: 0;
  }
}


/* ============================================
   SALES SECTION THEME STYLES
   Dark and Light theme support for Sales section only
   ============================================ */

/* Light Theme (Default) */
.sales-container[data-sales-theme="light"],
body[data-sales-theme="light"] .sales-container {
  --sales-bg-primary: #ffffff;
  --sales-bg-secondary: #f8fafc;
  --sales-bg-tertiary: #f1f5f9;
  --sales-text-primary: #1e293b;
  --sales-text-secondary: #64748b;
  --sales-text-tertiary: #94a3b8;
  --sales-border-color: #e2e8f0;
  --sales-shadow: rgba(0, 0, 0, 0.08);
  --sales-shadow-hover: rgba(0, 0, 0, 0.12);
}

/* Dark Theme */
.sales-container[data-sales-theme="dark"],
body[data-sales-theme="dark"] .sales-container {
  --sales-bg-primary: #1e293b;
  --sales-bg-secondary: #0f172a;
  --sales-bg-tertiary: #1e293b;
  --sales-text-primary: #f1f5f9;
  --sales-text-secondary: #cbd5e1;
  --sales-text-tertiary: #94a3b8;
  --sales-border-color: #334155;
  --sales-shadow: rgba(0, 0, 0, 0.3);
  --sales-shadow-hover: rgba(0, 0, 0, 0.4);
}

/* Apply theme to Sales Main Content */
.sales-container[data-sales-theme="dark"] .sales-main-content,
body[data-sales-theme="dark"] .sales-container .sales-main-content {
  background-color: var(--sales-bg-secondary);
}

/* Apply theme to Sales Header */
.sales-container[data-sales-theme="dark"] .sales-header,
body[data-sales-theme="dark"] .sales-container .sales-header {
  background-color: var(--sales-bg-primary);
  border-bottom-color: var(--sales-border-color);
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .sales-header-left h1,
body[data-sales-theme="dark"] .sales-container .sales-header-left h1 {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .sales-header-left p,
body[data-sales-theme="dark"] .sales-container .sales-header-left p {
  color: var(--sales-text-secondary);
}

/* Theme Toggle Button */
.sales-theme-toggle-btn {
  background: var(--sales-bg-tertiary);
  border: 1px solid var(--sales-border-color);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--sales-text-secondary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.sales-theme-toggle-btn:hover {
  background: var(--sales-border-color);
  color: var(--sales-text-primary);
  transform: scale(1.05);
}

.sales-theme-toggle-btn:active {
  transform: scale(0.95);
}

.sales-container[data-sales-theme="dark"] .sales-theme-toggle-btn,
body[data-sales-theme="dark"] .sales-container .sales-theme-toggle-btn {
  background: var(--sales-bg-tertiary);
  border-color: var(--sales-border-color);
  color: var(--sales-text-primary);
}

/* Apply theme to Sales Dashboard */
.sales-container[data-sales-theme="dark"] .sales-dashboard,
body[data-sales-theme="dark"] .sales-container .sales-dashboard {
  background-color: var(--sales-bg-secondary);
}

.sales-container[data-sales-theme="dark"] .sales-metric-card,
body[data-sales-theme="dark"] .sales-container .sales-metric-card {
  background-color: var(--sales-bg-primary);
  box-shadow: 0 2px 8px var(--sales-shadow);
}

.sales-container[data-sales-theme="dark"] .sales-metric-card:hover,
body[data-sales-theme="dark"] .sales-container .sales-metric-card:hover {
  box-shadow: 0 4px 12px var(--sales-shadow-hover);
}

.sales-container[data-sales-theme="dark"] .metric-label,
body[data-sales-theme="dark"] .sales-container .metric-label {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .metric-value,
body[data-sales-theme="dark"] .sales-container .metric-value {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .metric-change,
body[data-sales-theme="dark"] .sales-container .metric-change {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .sales-chart-card,
body[data-sales-theme="dark"] .sales-container .sales-chart-card {
  background-color: var(--sales-bg-primary);
  box-shadow: 0 2px 8px var(--sales-shadow);
}

.sales-container[data-sales-theme="dark"] .chart-title,
body[data-sales-theme="dark"] .sales-container .chart-title {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .chart-subtitle,
body[data-sales-theme="dark"] .sales-container .chart-subtitle {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .chart-amount,
body[data-sales-theme="dark"] .sales-container .chart-amount {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .chart-select,
body[data-sales-theme="dark"] .sales-container .chart-select {
  background-color: var(--sales-bg-tertiary);
  border-color: var(--sales-border-color);
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .chart-labels,
body[data-sales-theme="dark"] .sales-container .chart-labels {
  color: var(--sales-text-tertiary);
}

.sales-container[data-sales-theme="dark"] .earning-item,
body[data-sales-theme="dark"] .sales-container .earning-item {
  background-color: var(--sales-bg-tertiary);
  border-color: var(--sales-border-color);
}

.sales-container[data-sales-theme="dark"] .earning-label,
body[data-sales-theme="dark"] .sales-container .earning-label {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .earning-value,
body[data-sales-theme="dark"] .sales-container .earning-value {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .campaign-name,
body[data-sales-theme="dark"] .sales-container .campaign-name {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .campaign-percentage,
body[data-sales-theme="dark"] .sales-container .campaign-percentage {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .progress-bar-wrapper,
body[data-sales-theme="dark"] .sales-container .progress-bar-wrapper {
  background-color: var(--sales-bg-tertiary);
}

.sales-container[data-sales-theme="dark"] .legend-label,
body[data-sales-theme="dark"] .sales-container .legend-label {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .donut-chart-center,
body[data-sales-theme="dark"] .sales-container .donut-chart-center {
  color: var(--sales-text-secondary);
}

/* Apply theme to all Sales pages */
.sales-container[data-sales-theme="dark"] .sales-create-order,
.sales-container[data-sales-theme="dark"] .final-order-list,
.sales-container[data-sales-theme="dark"] .rejected-orders,
.sales-container[data-sales-theme="dark"] .sales-order-verification,
.sales-container[data-sales-theme="dark"] .create-consignee,
body[data-sales-theme="dark"] .sales-container .sales-create-order,
body[data-sales-theme="dark"] .sales-container .final-order-list,
body[data-sales-theme="dark"] .sales-container .rejected-orders,
body[data-sales-theme="dark"] .sales-container .sales-order-verification,
body[data-sales-theme="dark"] .sales-container .create-consignee {
  background-color: var(--sales-bg-secondary);
}

.sales-container[data-sales-theme="dark"] .sales-order-form,
.sales-container[data-sales-theme="dark"] .final-order-table-container,
.sales-container[data-sales-theme="dark"] .rejected-orders-table-container,
.sales-container[data-sales-theme="dark"] .verification-table-container,
.sales-container[data-sales-theme="dark"] .create-consignee-content,
body[data-sales-theme="dark"] .sales-container .sales-order-form,
body[data-sales-theme="dark"] .sales-container .final-order-table-container,
body[data-sales-theme="dark"] .sales-container .rejected-orders-table-container,
body[data-sales-theme="dark"] .sales-container .verification-table-container,
body[data-sales-theme="dark"] .sales-container .create-consignee-content {
  background-color: var(--sales-bg-primary);
  border-color: var(--sales-border-color);
}

.sales-container[data-sales-theme="dark"] .form-section h3,
.sales-container[data-sales-theme="dark"] .final-order-title,
.sales-container[data-sales-theme="dark"] .rejected-orders-header h2,
.sales-container[data-sales-theme="dark"] .verification-header h2,
body[data-sales-theme="dark"] .sales-container .form-section h3,
body[data-sales-theme="dark"] .sales-container .final-order-title,
body[data-sales-theme="dark"] .sales-container .rejected-orders-header h2,
body[data-sales-theme="dark"] .sales-container .verification-header h2 {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .form-group label,
.sales-container[data-sales-theme="dark"] .view-detail-item label,
body[data-sales-theme="dark"] .sales-container .form-group label,
body[data-sales-theme="dark"] .sales-container .view-detail-item label {
  color: var(--sales-text-secondary);
}

.sales-container[data-sales-theme="dark"] .form-group input,
.sales-container[data-sales-theme="dark"] .form-group select,
.sales-container[data-sales-theme="dark"] .form-group textarea,
.sales-container[data-sales-theme="dark"] .view-detail-item span,
body[data-sales-theme="dark"] .sales-container .form-group input,
body[data-sales-theme="dark"] .sales-container .form-group select,
body[data-sales-theme="dark"] .sales-container .form-group textarea,
body[data-sales-theme="dark"] .sales-container .view-detail-item span {
  background-color: var(--sales-bg-tertiary);
  border-color: var(--sales-border-color);
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .products-table,
.sales-container[data-sales-theme="dark"] .final-order-table,
.sales-container[data-sales-theme="dark"] .rejected-orders-table,
.sales-container[data-sales-theme="dark"] .verification-table,
body[data-sales-theme="dark"] .sales-container .products-table,
body[data-sales-theme="dark"] .sales-container .final-order-table,
body[data-sales-theme="dark"] .sales-container .rejected-orders-table,
body[data-sales-theme="dark"] .sales-container .verification-table {
  background-color: var(--sales-bg-primary);
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .products-table thead,
.sales-container[data-sales-theme="dark"] .final-order-table thead,
.sales-container[data-sales-theme="dark"] .rejected-orders-table thead,
.sales-container[data-sales-theme="dark"] .verification-table thead,
body[data-sales-theme="dark"] .sales-container .products-table thead,
body[data-sales-theme="dark"] .sales-container .final-order-table thead,
body[data-sales-theme="dark"] .sales-container .rejected-orders-table thead,
body[data-sales-theme="dark"] .sales-container .verification-table thead {
  background-color: var(--sales-bg-tertiary);
}

.sales-container[data-sales-theme="dark"] .products-table th,
.sales-container[data-sales-theme="dark"] .final-order-table th,
.sales-container[data-sales-theme="dark"] .rejected-orders-table th,
.sales-container[data-sales-theme="dark"] .verification-table th,
body[data-sales-theme="dark"] .sales-container .products-table th,
body[data-sales-theme="dark"] .sales-container .final-order-table th,
body[data-sales-theme="dark"] .sales-container .rejected-orders-table th,
body[data-sales-theme="dark"] .sales-container .verification-table th {
  color: var(--sales-text-primary);
}

.sales-container[data-sales-theme="dark"] .products-table td,
.sales-container[data-sales-theme="dark"] .final-order-table td,
.sales-container[data-sales-theme="dark"] .rejected-orders-table td,
.sales-container[data-sales-theme="dark"] .verification-table td,
body[data-sales-theme="dark"] .sales-container .products-table td,
body[data-sales-theme="dark"] .sales-container .final-order-table td,
body[data-sales-theme="dark"] .sales-container .rejected-orders-table td,
body[data-sales-theme="dark"] .sales-container .verification-table td {
  color: var(--sales-text-secondary);
  border-color: var(--sales-border-color);
}

.sales-container[data-sales-theme="dark"] .products-table tbody tr:hover,
.sales-container[data-sales-theme="dark"] .final-order-table tbody tr:hover,
.sales-container[data-sales-theme="dark"] .rejected-orders-table tbody tr:hover,
.sales-container[data-sales-theme="dark"] .verification-table tbody tr:hover,
body[data-sales-theme="dark"] .sales-container .products-table tbody tr:hover,
body[data-sales-theme="dark"] .sales-container .final-order-table tbody tr:hover,
body[data-sales-theme="dark"] .sales-container .rejected-orders-table tbody tr:hover,
body[data-sales-theme="dark"] .sales-container .verification-table tbody tr:hover {
  background-color: var(--sales-bg-tertiary);
}

/* Modals */
.sales-container[data-sales-theme="dark"] .edit-modal-content,
.sales-container[data-sales-theme="dark"] .view-modal-content,
.sales-container[data-sales-theme="dark"] .verification-modal-content,
body[data-sales-theme="dark"] .sales-container .edit-modal-content,
body[data-sales-theme="dark"] .sales-container .view-modal-content,
body[data-sales-theme="dark"] .sales-container .verification-modal-content {
  background-color: var(--sales-bg-primary);
}

.sales-container[data-sales-theme="dark"] .edit-modal-header,
.sales-container[data-sales-theme="dark"] .view-modal-header,
.sales-container[data-sales-theme="dark"] .verification-modal-header,
body[data-sales-theme="dark"] .sales-container .edit-modal-header,
body[data-sales-theme="dark"] .sales-container .view-modal-header,
body[data-sales-theme="dark"] .sales-container .verification-modal-header {
  background-color: var(--sales-bg-tertiary);
  border-bottom-color: var(--sales-border-color);
}

.sales-container[data-sales-theme="dark"] .edit-modal-header h2,
.sales-container[data-sales-theme="dark"] .view-modal-header h2,
.sales-container[data-sales-theme="dark"] .verification-modal-header h2,
body[data-sales-theme="dark"] .sales-container .edit-modal-header h2,
body[data-sales-theme="dark"] .sales-container .view-modal-header h2,
body[data-sales-theme="dark"] .sales-container .verification-modal-header h2 {
  color: var(--sales-text-primary);
}

/* Buttons */
.sales-container[data-sales-theme="dark"] .add-btn,
.sales-container[data-sales-theme="dark"] .save-btn,
.sales-container[data-sales-theme="dark"] .cancel-btn,
.sales-container[data-sales-theme="dark"] .edit-btn,
.sales-container[data-sales-theme="dark"] .delete-btn,
.sales-container[data-sales-theme="dark"] .action-btn,
body[data-sales-theme="dark"] .sales-container .add-btn,
body[data-sales-theme="dark"] .sales-container .save-btn,
body[data-sales-theme="dark"] .sales-container .cancel-btn,
body[data-sales-theme="dark"] .sales-container .edit-btn,
body[data-sales-theme="dark"] .sales-container .delete-btn,
body[data-sales-theme="dark"] .sales-container .action-btn {
  /* Button colors remain the same for visibility */
}

/* Ensure theme doesn't affect other sections */
.sales-container[data-sales-theme] {
  /* Isolated to sales container only */
}


/* width responsive style*/

.accounts-main-content{
  max-width: calc(100% - 250px);
}

.accounts-sidebar.collapsed ~ .accounts-main-content{
    max-width: calc(100% - 60px);
}

/* Accounts Dashboard Styles */

/* Accounts Container Layout */
.accounts-container {
  display: flex;
  min-height: 100vh;
}

/* Accounts Sidebar Styles */
.accounts-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.accounts-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accounts-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.accounts-sidebar-header i {
  margin-right: 10px;
  color: #34d399;
}

/* VHC Logo Styles for Accounts Sidebar */
.accounts-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.accounts-sidebar-title-text {
  flex: 1 1;
}

.accounts-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.accounts-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.accounts-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.accounts-sidebar-menu li {
  margin: 0;
}

.accounts-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.accounts-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.accounts-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

.accounts-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.accounts-menu-group-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.accounts-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.accounts-menu-group-header i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.accounts-menu-chevron {
  margin-left: auto;
  margin-right: 0 !important;
  width: auto !important;
  font-size: 12px;
}

.accounts-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.12);
}

.accounts-submenu li a {
  padding-left: 48px;
  font-size: 0.9rem;
}

.accounts-sidebar-menu li.active-parent .accounts-menu-group-header {
  background-color: rgba(255, 255, 255, 0.12);
  border-left-color: #34d399;
}

/* Accounts Main Content */
.accounts-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Accounts Header Styles */
.accounts-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accounts-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.accounts-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.accounts-header-right {
  display: flex;
  align-items: center;
}

.accounts-user-profile {
  display: flex;
  align-items: center;
}

/* Accounts Dashboard Styles */
.accounts-dashboard {
  padding: 30px;
}

.accounts-dashboard-header {
  margin-bottom: 30px;
}

.accounts-dashboard-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.accounts-dashboard-header p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* Accounts Stats Grid */
.accounts-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.accounts-stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.accounts-stat-card:hover {
  transform: translateY(-2px);
}

.accounts-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.5rem;
}

.accounts-stat-blue .accounts-stat-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.accounts-stat-orange .accounts-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.accounts-stat-green .accounts-stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.accounts-stat-purple .accounts-stat-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.accounts-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.accounts-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.accounts-stat-change {
  font-size: 0.85rem;
  font-weight: 600;
}

.accounts-change-blue {
  color: #3b82f6;
}

.accounts-change-orange {
  color: #f59e0b;
}

.accounts-change-green {
  color: #10b981;
}

.accounts-change-purple {
  color: #8b5cf6;
}

/* Accounts Dashboard Content */
.accounts-dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 30px;
  gap: 30px;
}

/* Quick Actions */
.accounts-quick-actions {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accounts-quick-actions h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.accounts-action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.accounts-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.accounts-btn-primary {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
}

.accounts-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .accounts-sidebar {
    width: 200px;
  }

  .accounts-main-content {
    margin-left: 200px;
  }

  .accounts-stats-grid {
    grid-template-columns: 1fr;
  }

  .accounts-action-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px){
  .accounts-main-content{
        max-width: 100%;
    }

    .accounts-sidebar.collapsed~ .accounts-main-content{
        max-width: 100%;
   }
}
/* ============================================
   ACCOUNTS SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Accounts section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Accounts Container */
.accounts-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.accounts-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accounts-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: scale(1.05);
}

.accounts-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.accounts-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.accounts-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Accounts Sidebar - Mobile First Approach */
.accounts-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.accounts-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .accounts-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .accounts-sidebar.collapsed .accounts-sidebar-header h2 {
    display: none;
  }

  .accounts-sidebar.collapsed .accounts-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #34d399;
  }

  .accounts-sidebar.collapsed .accounts-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .accounts-sidebar.collapsed .accounts-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .accounts-sidebar.collapsed .accounts-sidebar-menu a span {
    display: none;
  }

  .accounts-sidebar.collapsed .accounts-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
}

.accounts-sidebar-icon-only {
  display: none;
}

.accounts-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accounts-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.accounts-sidebar-header i {
  margin-right: 8px;
  color: #34d399;
  font-size: 1rem;
}

/* VHC Logo Styles for Accounts Sidebar */
.accounts-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.accounts-sidebar-title-text {
  flex: 1 1;
}

.accounts-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.accounts-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.accounts-sidebar-menu li {
  margin: 0;
}

.accounts-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.accounts-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.accounts-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

.accounts-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.accounts-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounts-menu-group-header {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.accounts-menu-group-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.accounts-menu-group-header i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.accounts-menu-chevron {
  margin-left: auto;
  margin-right: 0 !important;
  width: auto !important;
  font-size: 12px !important;
}

.accounts-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.12);
}

.accounts-submenu li a {
  padding-left: 42px;
  font-size: 0.85rem;
}

.accounts-sidebar-menu li.active-parent .accounts-menu-group-header {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

/* Accounts Main Content */
.accounts-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Accounts Header */
.accounts-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.accounts-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.accounts-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.accounts-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.accounts-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.accounts-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.accounts-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.accounts-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.accounts-user-profile {
  display: flex;
  align-items: center;
}

/* Accounts Dashboard */
.accounts-dashboard {
  padding: 20px 15px;
}

.accounts-dashboard-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accounts-dashboard-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.accounts-dashboard-content p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Accounts Stats Grid */
.accounts-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.accounts-stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.accounts-stat-card:hover {
  transform: translateY(-2px);
}

.accounts-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.accounts-stat-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #1e293b;
}

.accounts-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.85rem;
}

/* Accounts Dashboard Content */
.accounts-dashboard-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.accounts-quick-actions {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accounts-quick-actions h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
}

.accounts-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accounts-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Accounts Table Styles */
.accounts-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.accounts-table th {
  background: #f8fafc;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.accounts-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.accounts-table tr:hover {
  background: #f8fafc;
}

/* Accounts Form Styles */
.accounts-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.accounts-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.accounts-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.accounts-form-group input,
.accounts-form-group select,
.accounts-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.accounts-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Accounts Modal Styles */
.accounts-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 10px;
  overflow-y: auto;
}

.accounts-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.accounts-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
}

.accounts-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.accounts-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accounts-modal-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .accounts-mobile-menu-btn {
    display: none;
  }

  .accounts-sidebar-overlay {
    display: none !important;
  }

  .accounts-sidebar-toggle-btn {
    display: flex;
  }

  .accounts-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .accounts-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .accounts-container.sidebar-collapsed .accounts-main-content {
    margin-left: 60px;
  }

  .accounts-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .accounts-container.sidebar-collapsed .accounts-header {
    padding-left: 85px;
  }

  .accounts-header-left h1 {
    font-size: 1.6rem;
  }

  .accounts-dashboard {
    padding: 25px 20px;
  }

  .accounts-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .accounts-dashboard-content-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .accounts-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .accounts-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .accounts-table th,
  .accounts-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  .accounts-modal {
    max-width: 90%;
  }

  .accounts-modal-header {
    padding: 20px 25px;
  }

  .accounts-modal-header h3 {
    font-size: 1.4rem;
  }

  .accounts-modal-content {
    padding: 25px;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .accounts-sidebar {
    width: 250px;
  }

  .accounts-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .accounts-container.sidebar-collapsed .accounts-main-content {
    margin-left: 60px;
  }

  .accounts-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .accounts-container.sidebar-collapsed .accounts-header {
    padding-left: 90px;
  }

  .accounts-sidebar-header {
    padding: 20px;
  }

  .accounts-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .accounts-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .accounts-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .accounts-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .accounts-header-left h1 {
    font-size: 1.8rem;
  }

  .accounts-dashboard {
    padding: 30px;
  }

  .accounts-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .accounts-dashboard-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .accounts-table {
    min-width: 1200px;
  }

  .accounts-modal {
    max-width: 1200px;
  }

  .accounts-modal-header {
    padding: 20px 30px;
  }

  .accounts-modal-header h3 {
    font-size: 1.5rem;
  }

  .accounts-modal-content {
    padding: 30px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .accounts-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .accounts-table {
    min-width: 1400px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .accounts-modal {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.accounts-mobile-hide {
  display: none;
}

/* Show on mobile only */
.accounts-mobile-only {
  display: block;
}

/* Responsive text */
.accounts-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.accounts-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.accounts-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .accounts-mobile-hide {
    display: block;
  }

  .accounts-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .accounts-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .accounts-header {
    padding: 10px 20px;
  }

  .accounts-header-left h1 {
    font-size: 1.3rem;
  }

  .accounts-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .accounts-sidebar-menu a,
  .accounts-action-btn,
  .accounts-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .accounts-sidebar,
  .accounts-header,
  .accounts-form-actions,
  .accounts-mobile-menu-btn,
  .accounts-sidebar-toggle-btn {
    display: none !important;
  }

  .accounts-main-content {
    margin-left: 0;
  }

  .accounts-dashboard {
    padding: 0;
  }
}


/* width responsive style*/
.packing-main-content{
  max-width: calc(100% - 250px);
}

.packing-sidebar.collapsed ~ .packing-main-content{
    max-width: calc(100% - 60px);
}


/* Packing Dashboard Styles */

/* Packing Container Layout */
.packing-container {
  display: flex;
  min-height: 100vh;
}

/* Packing Sidebar Styles */
.packing-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.packing-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.packing-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.packing-sidebar-header i {
  margin-right: 10px;
  color: #34d399;
}

/* VHC Logo Styles for Packing Sidebar */
.packing-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.packing-sidebar-title-text {
  flex: 1 1;
}

.packing-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.packing-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.packing-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.packing-sidebar-menu li {
  margin: 0;
}

.packing-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.packing-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.packing-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

.packing-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Packing Main Content */
.packing-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Packing Header Styles */
.packing-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.packing-header-left h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.packing-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.packing-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.packing-user-profile {
  display: flex;
  align-items: center;
}

/* Packing Dashboard Styles */
.packing-dashboard {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.packing-dashboard-header {
  margin-bottom: 30px;
}

.packing-dashboard-header h2 {
  color: #1e293b;
  font-size: 1.8rem;
  margin: 0 0 5px 0;
}

.packing-dashboard-header p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

.packing-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.packing-stat-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.packing-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.packing-stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.packing-stat-content {
  flex: 1 1;
}

.packing-stat-content h3 {
  color: #1e293b;
  margin: 0 0 5px 0;
  font-size: 1.8rem;
  font-weight: 600;
}

.packing-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.packing-stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.packing-change-green {
  color: #059669;
  background-color: #d1fae5;
}

.packing-change-orange {
  color: #d97706;
  background-color: #fed7aa;
}

.packing-change-blue {
  color: #2563eb;
  background-color: #dbeafe;
}

.packing-dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
}

.packing-quick-actions {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.packing-quick-actions h3 {
  color: #1e293b;
  margin: 0 0 20px 0;
  font-size: 1.3rem;
}

.packing-action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.packing-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.packing-btn-primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.packing-btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(5, 150, 105, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .packing-sidebar {
    width: 200px;
  }

  .packing-main-content {
    margin-left: 200px;
  }

  .packing-header {
    padding: 15px 20px;
  }

  .packing-header-left h1 {
    font-size: 1.5rem;
  }

  .packing-dashboard {
    padding: 15px;
  }
}

@media (max-width: 640px) {
  .packing-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .packing-main-content {
    margin-left: 0;
  }

  .packing-container {
    flex-direction: column;
  }
}

@media (max-width: 480px){
  .packing-main-content{
        max-width: 100%;
    }

    .packing-sidebar.collapsed~ .packing-main-content{
        max-width: 100%;
   }
}
/* ============================================
   PACKING SECTION RESPONSIVE STYLES
   Dedicated responsive CSS for Packing section only
   ============================================ */

/* ============================================
   LAYOUT COMPONENTS - RESPONSIVE
   ============================================ */

/* Packing Container */
.packing-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Mobile Menu Button */
.packing-mobile-menu-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.packing-mobile-menu-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: scale(1.05);
}

.packing-mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.packing-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.packing-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Packing Sidebar - Mobile First Approach */
.packing-sidebar {
  width: 280px;
  max-width: 85vw;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.packing-sidebar.open {
  transform: translateX(0);
}

/* Collapsed Sidebar State - Desktop Only */
@media (min-width: 481px) {
  .packing-sidebar.collapsed {
    width: 60px;
    max-width: 60px;
  }

  .packing-sidebar.collapsed .packing-sidebar-header h2 {
    display: none;
  }

  .packing-sidebar.collapsed .packing-sidebar-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 1.5rem;
    color: #34d399;
  }

  .packing-sidebar.collapsed .packing-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .packing-sidebar.collapsed .packing-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .packing-sidebar.collapsed .packing-sidebar-menu a span {
    display: none;
  }

  .packing-sidebar.collapsed .packing-sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
}

.packing-sidebar-icon-only {
  display: none;
}

.packing-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.packing-sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.packing-sidebar-header i {
  margin-right: 8px;
  color: #34d399;
  font-size: 1rem;
}

/* VHC Logo Styles for Packing Sidebar */
.packing-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.packing-sidebar-title-text {
  flex: 1 1;
}

.packing-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: brightness(1.1) contrast(1.15) saturate(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.packing-sidebar-menu {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.packing-sidebar-menu li {
  margin: 0;
}

.packing-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.packing-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #34d399;
}

.packing-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #34d399;
}

.packing-sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.packing-sidebar-menu span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Packing Main Content */
.packing-main-content {
  flex: 1 1;
  margin-left: 0;
  background-color: #f8fafc;
  min-height: 100vh;
  width: 100%;
  transition: margin-left 0.3s ease;
}

/* Packing Header */
.packing-header {
  background: white;
  padding: 15px 20px 15px 70px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 100;
  transition: padding-left 0.3s ease;
}

/* Sidebar Toggle Button */
.packing-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #475569;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.packing-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.05);
}

.packing-sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.packing-header-left {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
}

.packing-header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.packing-header-left p {
  color: #64748b;
  margin: 5px 0 0 0;
  font-size: 0.85rem;
}

.packing-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

.packing-user-profile {
  display: flex;
  align-items: center;
}

/* Packing Dashboard */
.packing-dashboard {
  padding: 20px 15px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.packing-dashboard-header {
  margin-bottom: 20px;
}

.packing-dashboard-header h2 {
  color: #1e293b;
  font-size: 1.5rem;
  margin: 0 0 5px 0;
  font-weight: 600;
}

.packing-dashboard-header p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

.packing-dashboard-content {
  max-width: 100%;
  margin: 0 auto;
}

/* Packing Stats Grid */
.packing-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.packing-stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.packing-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.packing-stat-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.packing-stat-content {
  flex: 1 1;
  min-width: 0;
}

.packing-stat-content h3 {
  color: #1e293b;
  margin: 0 0 5px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.packing-stat-content p {
  color: #64748b;
  margin: 0 0 5px 0;
  font-size: 0.85rem;
}

.packing-stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Packing Quick Actions */
.packing-quick-actions {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.packing-quick-actions h3 {
  color: #1e293b;
  margin: 0 0 15px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.packing-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.packing-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Packing Table Styles */
.packing-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.packing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.85rem;
}

.packing-table th {
  background: #f8fafc;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.packing-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #555;
  font-size: 0.85rem;
}

.packing-table tr:hover {
  background: #f8fafc;
}

/* Packing Form Styles */
.packing-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.packing-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.packing-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
}

.packing-form-group input,
.packing-form-group select,
.packing-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.packing-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ============================================
   TABLET STYLES (481px - 768px)
   ============================================ */

@media (min-width: 481px) {
  .packing-mobile-menu-btn {
    display: none;
  }

  .packing-sidebar-overlay {
    display: none !important;
  }

  .packing-sidebar-toggle-btn {
    display: flex;
  }

  .packing-sidebar {
    width: 220px;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(0);
  }

  .packing-main-content {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
  }

  .packing-container.sidebar-collapsed .packing-main-content {
    margin-left: 60px;
  }

  .packing-header {
    padding: 18px 25px;
    padding-left: 25px;
    transition: padding-left 0.3s ease;
  }

  .packing-container.sidebar-collapsed .packing-header {
    padding-left: 85px;
  }

  .packing-header-left h1 {
    font-size: 1.6rem;
  }

  .packing-dashboard {
    padding: 25px 20px;
  }

  .packing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .packing-dashboard-content {
    max-width: 1200px;
  }

  .packing-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .packing-table {
    min-width: 900px;
    font-size: 0.9rem;
  }

  .packing-table th,
  .packing-table td {
    padding: 15px 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   SMALL LAPTOP STYLES (769px - 1024px)
   ============================================ */

@media (min-width: 769px) {
  .packing-sidebar {
    width: 250px;
  }

  .packing-main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .packing-container.sidebar-collapsed .packing-main-content {
    margin-left: 60px;
  }

  .packing-header {
    padding-left: 30px;
    transition: padding-left 0.3s ease;
  }

  .packing-container.sidebar-collapsed .packing-header {
    padding-left: 90px;
  }

  .packing-sidebar-header {
    padding: 20px;
  }

  .packing-sidebar-header h2 {
    font-size: 1.5rem;
    justify-content: center;
  }

  .packing-sidebar-logo {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
  }

  .packing-sidebar-logo-icon {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .packing-sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .packing-header-left h1 {
    font-size: 1.8rem;
  }

  .packing-dashboard {
    padding: 20px;
  }

  .packing-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .packing-table {
    min-width: 1200px;
  }
}

/* ============================================
   LAPTOP STYLES (1025px - 1366px)
   ============================================ */

@media (min-width: 1025px) {
  .packing-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .packing-table {
    min-width: 1400px;
  }
}

/* ============================================
   LARGE SCREEN STYLES (1367px+)
   ============================================ */

@media (min-width: 1367px) {
  .packing-dashboard-content {
    max-width: 1400px;
  }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   ============================================ */

/* Hide on mobile */
.packing-mobile-hide {
  display: none;
}

/* Show on mobile only */
.packing-mobile-only {
  display: block;
}

/* Responsive text */
.packing-responsive-text {
  font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Responsive padding */
.packing-responsive-padding {
  padding: clamp(10px, 2vw, 20px);
}

/* Responsive margin */
.packing-responsive-margin {
  margin: clamp(10px, 2vw, 20px);
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .packing-mobile-hide {
    display: block;
  }

  .packing-mobile-only {
    display: none;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
  .packing-sidebar {
    height: 100vh;
    overflow-y: auto;
  }

  .packing-header {
    padding: 10px 20px;
  }

  .packing-header-left h1 {
    font-size: 1.3rem;
  }

  .packing-dashboard {
    padding: 15px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .packing-sidebar-menu a,
  .packing-action-btn,
  .packing-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .packing-sidebar,
  .packing-header,
  .packing-form-actions,
  .packing-mobile-menu-btn,
  .packing-sidebar-toggle-btn {
    display: none !important;
  }

  .packing-main-content {
    margin-left: 0;
  }

  .packing-dashboard {
    padding: 0;
  }
}


/* HR Section Styles - Blue theme (#3B82F6) */
.hr-container {
  display: flex;
  min-height: 100vh;
}

.hr-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.hr-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hr-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.hr-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.hr-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.hr-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.hr-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.hr-sidebar-menu li {
  margin: 0;
}

.hr-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.hr-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #60a5fa;
}

.hr-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #60a5fa;
}

.hr-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.hr-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

.hr-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hr-header-left {
  display: flex;
  align-items: center;
}

.hr-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hr-user-profile {
  display: flex;
  align-items: center;
}

.hr-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  margin-right: 12px;
  color: #475569;
}

.hr-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* HR Section Responsive Styles */
.hr-mobile-menu-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hr-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hr-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .hr-mobile-menu-btn {
    display: flex;
  }

  .hr-sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .hr-sidebar.open {
    transform: translateX(0);
  }

  .hr-main-content {
    margin-left: 0;
  }

  .hr-header {
    padding: 15px 20px 15px 70px;
  }
}

@media (min-width: 769px) {
  .hr-mobile-menu-btn {
    display: none;
  }

  .hr-sidebar.collapsed {
    width: 60px;
  }

  .hr-sidebar.collapsed .hr-sidebar-menu a span {
    display: none;
  }

  .hr-sidebar.collapsed .hr-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .hr-sidebar.collapsed .hr-sidebar-menu i {
    margin-right: 0;
  }

  .hr-container.sidebar-collapsed .hr-main-content {
    margin-left: 60px;
  }
}

@media (max-width: 480px) {
  .hr-main-content .all-tickets-page {
    padding: 15px 10px;
  }
}

/* IT Section Styles - Purple/Indigo theme (#6366F1) */
.it-container {
  display: flex;
  min-height: 100vh;
}

.it-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.it-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.it-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.it-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.it-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.it-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.it-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.it-sidebar-menu li {
  margin: 0;
}

.it-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.it-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #a5b4fc;
}

.it-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #a5b4fc;
}

.it-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.it-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

.it-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.it-header-left {
  display: flex;
  align-items: center;
}

.it-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.it-user-profile {
  display: flex;
  align-items: center;
}

.it-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  margin-right: 12px;
  color: #475569;
}

.it-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* IT Section Responsive Styles */
.it-mobile-menu-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.it-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.it-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .it-mobile-menu-btn {
    display: flex;
  }

  .it-sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .it-sidebar.open {
    transform: translateX(0);
  }

  .it-main-content {
    margin-left: 0;
  }

  .it-header {
    padding: 15px 20px 15px 70px;
  }
}

@media (min-width: 769px) {
  .it-mobile-menu-btn {
    display: none;
  }

  .it-sidebar.collapsed {
    width: 60px;
  }

  .it-sidebar.collapsed .it-sidebar-menu a span {
    display: none;
  }

  .it-sidebar.collapsed .it-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .it-sidebar.collapsed .it-sidebar-menu i {
    margin-right: 0;
  }

  .it-container.sidebar-collapsed .it-main-content {
    margin-left: 60px;
  }
}

@media (max-width: 480px) {
  .it-main-content .all-tickets-page {
    padding: 15px 10px;
  }
}

.qa-trading-document-upload {
  padding: 16px;
}

.qa-trading-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.qa-trading-search {
  min-width: 300px;
  padding: 8px 10px;
  border: 1px solid #d6d8db;
  border-radius: 4px;
}

.qa-trading-refresh-btn,
.qa-trading-upload-btn,
.qa-trading-delete-btn {
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 7px 10px;
}

.qa-trading-refresh-btn,
.qa-trading-upload-btn {
  background: #2f7de1;
  color: #fff;
}

.qa-trading-delete-btn {
  background: #c0392b;
  color: #fff;
  margin-left: 8px;
}

.qa-trading-icon-btn {
  border: 1px solid #2f7de1;
  color: #2f7de1;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  padding: 6px 10px;
}

.qa-trading-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.qa-trading-purchase-btn {
  border: 1px solid #0d9488;
  color: #0d9488;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.qa-trading-purchase-btn:hover {
  background: #f0fdfa;
}

.qa-trading-purchase-modal {
  max-width: min(1100px, 96vw);
  width: 100%;
}

.qa-trading-purchase-order-block {
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.qa-trading-purchase-order-header {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 0.9rem;
  border-bottom: 1px solid #e5e7eb;
}

.qa-trading-purchase-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.qa-trading-purchase-lines-table th,
.qa-trading-purchase-lines-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.qa-trading-purchase-lines-table th {
  background: #fff;
  font-weight: 600;
}

.qa-trading-table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.qa-trading-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.qa-trading-table th,
.qa-trading-table td {
  border-bottom: 1px solid #eceff2;
  padding: 10px;
  vertical-align: top;
  font-size: 13px;
}

.qa-trading-table th {
  background: #f6f8fb;
  text-align: left;
}

.qa-vendor-expired-row td {
  background: #fff1f2;
}

.qa-trading-upload-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-trading-upload-form input[type='text'] {
  border: 1px solid #d6d8db;
  border-radius: 4px;
  padding: 6px 8px;
}

.qa-trading-doc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-trading-doc-item a {
  color: #2f7de1;
  text-decoration: none;
}

.qa-trading-doc-item a:hover {
  text-decoration: underline;
}

.qa-trading-doc-remark {
  margin-left: 6px;
  color: #666;
  font-size: 12px;
}

.qa-trading-error {
  margin-bottom: 12px;
  background: #fdecec;
  color: #9f1d1d;
  border: 1px solid #f8c9c9;
  border-radius: 4px;
  padding: 8px 10px;
}

.qa-trading-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1200;
}

.qa-trading-modal {
  width: min(920px, 92vw);
  max-height: 88vh;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.qa-trading-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e6e9ef;
}

.qa-trading-modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.qa-trading-modal-content {
  padding: 16px 18px;
  overflow-y: auto;
  max-height: calc(88vh - 58px);
}

.qa-trading-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 12px;
}

.qa-trading-modal-grid-single {
  grid-template-columns: 1fr;
}

.qa-trading-modal-grid label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.qa-trading-modal-grid input,
.qa-trading-modal-grid select {
  width: 100%;
  border: 1px solid #d6d8db;
  border-radius: 4px;
  padding: 8px 10px;
}

.qa-trading-modal-actions {
  margin-bottom: 14px;
}

.qa-trading-modal-list {
  border-top: 1px solid #e9ebef;
  padding-top: 12px;
}

.qa-trading-modal-list h4 {
  margin: 0 0 8px;
}

.qa-trading-empty-list {
  color: #777;
  margin: 0;
}
/* QA Section Styles - Teal theme (#14B8A6) */
.qa-container {
  display: flex;
  min-height: 100vh;
}

.qa-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.qa-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qa-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.qa-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.qa-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.qa-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.qa-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.qa-sidebar-menu li {
  margin: 0;
}

.qa-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.qa-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #5eead4;
}

.qa-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #5eead4;
}

.qa-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.qa-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

.qa-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qa-header-left {
  display: flex;
  align-items: center;
}

.qa-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qa-user-profile {
  display: flex;
  align-items: center;
}

.qa-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  margin-right: 12px;
  color: #475569;
}

.qa-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* QA Section Responsive Styles */
.qa-mobile-menu-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.qa-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qa-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .qa-mobile-menu-btn {
    display: flex;
  }

  .qa-sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .qa-sidebar.open {
    transform: translateX(0);
  }

  .qa-main-content {
    margin-left: 0;
  }

  .qa-header {
    padding: 15px 20px 15px 70px;
  }
}

@media (min-width: 769px) {
  .qa-mobile-menu-btn {
    display: none;
  }

  .qa-sidebar.collapsed {
    width: 60px;
  }

  .qa-sidebar.collapsed .qa-sidebar-menu a span {
    display: none;
  }

  .qa-sidebar.collapsed .qa-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .qa-sidebar.collapsed .qa-sidebar-menu i {
    margin-right: 0;
  }

  .qa-container.sidebar-collapsed .qa-main-content {
    margin-left: 60px;
  }
}

@media (max-width: 480px) {
  .qa-main-content .all-tickets-page {
    padding: 15px 10px;
  }
}

/* QA Section Styles - Teal theme (#14B8A6) */
.global-consignment-container {
  display: flex;
  min-height: 100vh;
}

.global-consignment-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.global-consignment-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.global-consignment-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.global-consignment-sidebar-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.global-consignment-sidebar-logo-icon {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.global-consignment-sidebar-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.global-consignment-sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.global-consignment-sidebar-menu li {
  margin: 0;
}

.global-consignment-sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.global-consignment-sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #5eead4;
}

    .global-consignment-sidebar-menu li.active a {
  background-color: rgba(255, 255, 255, 0.15);
  border-left-color: #5eead4;
}

.global-consignment-sidebar-menu i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.global-consignment-main-content {
  flex: 1 1;
  margin-left: 250px;
  background-color: #f8fafc;
  min-height: 100vh;
}

.global-consignment-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.global-consignment-header-left {
  display: flex;
  align-items: center;
}

.global-consignment-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.global-consignment-user-profile {
  display: flex;
  align-items: center;
}

.global-consignment-sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  margin-right: 12px;
  color: #475569;
}

.global-consignment-sidebar-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* QA Section Responsive Styles */
.global-consignment-mobile-menu-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.global-consignment-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.global-consignment-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .global-consignment-mobile-menu-btn {
    display: flex;
  }

  .global-consignment-sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .global-consignment-sidebar.open {
    transform: translateX(0);
  }

  .global-consignment-main-content {
    margin-left: 0;
  }

  .global-consignment-header {
    padding: 15px 20px 15px 70px;
  }
}

@media (min-width: 769px) {
  .global-consignment-mobile-menu-btn {
    display: none;
  }

  .global-consignment-sidebar.collapsed {
    width: 60px;
  }

  .global-consignment-sidebar.collapsed .global-consignment-sidebar-menu a span {
    display: none;
  }

      .global-consignment-sidebar.collapsed .global-consignment-sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }

  .global-consignment-sidebar.collapsed .global-consignment-sidebar-menu i {
    margin-right: 0;
  }

  .global-consignment-container.sidebar-collapsed .global-consignment-main-content {
    margin-left: 60px;
  }
}

@media (max-width: 480px) {
  .global-consignment-main-content .all-tickets-page {
    padding: 15px 10px;
  }
}

/* Add Buyer Full Page Styles */
.add-buyer {
    width: 100%;
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
  }
  
  /* Form Header */
  .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .form-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
  }
  
  .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
  }
  
  .back-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
  }
  
  /* Error Message */
  .error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
  }
  
  .error-message i {
    font-size: 16px;
  }
  
  /* Success Message */
  .success-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
  }
  
  .success-message i {
    font-size: 16px;
  }
  
  /* Form Styles */
  .buyer-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* Phase Indicator */
  .phase-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
  }
  
  .phase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
    position: relative;
  }
  
  .phase-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 100%;
    width: 40px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
  }
  
  .phase-step.active:not(:last-child)::after {
    background: #667eea;
  }
  
  .phase-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
  }
  
  .phase-step.active .phase-number {
    background: #667eea;
    color: white;
  }
  
  .phase-label {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
  }
  
  .phase-step.active .phase-label {
    color: #667eea;
    font-weight: 600;
  }
  
  /* Form Sections */
  .form-section {
    margin-bottom: 40px;
  }
  
  .form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    font-size: 20px;
    font-weight: 600;
  }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-gap: 20px 28px;
    gap: 20px 28px;
    margin-bottom: 20px;
  }

  /* Grid items default to min-width:auto and can overflow into the next column; clamp width */
  .form-grid > .form-group {
    min-width: 0;
    box-sizing: border-box;
  }

  /* Extra separation before the next column (e.g. GSTIN/Company Type) — company field has autocomplete dropdown */
  .form-grid > .form-group--company-name {
    -webkit-padding-end: 12px;
            padding-inline-end: 12px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
  }
  
  .form-label.required::after {
    content: ' *';
    color: #dc3545;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  }
  
  .form-select[multiple] {
    min-height: 120px;
    padding: 8px;
  }
  
  .form-help {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
  }
  
  /* Array Input Groups */
  .array-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .array-input-group .form-input {
    flex: 1 1;
  }
  
  .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
  }
  
  .remove-btn:hover {
    background: #c82333;
  }
  
  .add-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
  }
  
  .add-btn:hover {
    background: #218838;
  }
  
  /* Form Actions */
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
  }
  
  .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
  }
  
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .btn-primary {
    background: #007bff;
    color: white;
  }
  
  .btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  .btn-secondary {
    background: #6c757d;
    color: white;
  }
  
  .btn-secondary:hover:not(:disabled) {
    background: #5a6268;
  }
  
  .btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
  }
  
  .btn-outline:hover:not(:disabled) {
    background: #007bff;
    color: white;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .add-buyer {
      padding: 10px;
    }
    
    .form-header {
      flex-direction: column;
      gap: 15px;
      align-items: stretch;
    }
    
    .form-header h2 {
      font-size: 24px;
      text-align: center;
    }
    
    .back-btn {
      align-self: center;
    }
    
    .buyer-form {
      padding: 20px;
    }
    
    .form-grid {
      grid-template-columns: 1fr;
      gap: 15px;
    }
    
    .phase-indicator {
      flex-direction: column;
      gap: 20px;
    }
    
    .phase-step {
      margin: 0;
    }
    
    .phase-step:not(:last-child)::after {
      display: none;
    }
    
    .form-actions {
      flex-direction: column;
    }
    
    .btn {
      width: 100%;
    }
    
    .array-input-group {
      flex-direction: column;
      align-items: stretch;
    }
    
    .remove-btn {
      width: 100%;
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .form-header h2 {
      font-size: 20px;
    }
    
    .buyer-form {
      padding: 15px;
    }
    
    .form-section h3 {
      font-size: 18px;
    }
    
    .back-btn {
      width: 100%;
      justify-content: center;
    }
  }
.add-consignment {
  padding: 20px;
  background-color: var(--dashboard-bg);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

.add-consignment .form-header {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  text-align: left;
}

.add-consignment .form-header h2 {
  color: var(--text-color-dark);
  font-size: 2rem;
  margin: 0 0 10px 0;
}

.add-consignment .form-header p {
  color: var(--text-color-light);
  font-size: 1.1rem;
  margin: 0;
}

.add-consignment-form {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 100%;
}

.add-consignment-form .form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.add-consignment-form .form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.add-consignment-form .form-section h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
  grid-column-start: 1; grid-column-end: -1;
}

.add-consignment-form .form-group {
  margin-bottom: 0;
}

.add-consignment-form .form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color-dark);
  font-weight: 500;
  font-size: 1rem;
}

.add-consignment-form .form-label .required {
  color: var(--danger-color);
  margin-left: 4px;
}

.add-consignment-form .form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  color: var(--text-color-dark);
  background-color: var(--input-bg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.add-consignment-form .form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
  outline: none;
}

.add-consignment-form .form-input::placeholder {
  color: var(--text-color-light);
}

.add-consignment-form .error-message {
  background-color: var(--danger-light-color);
  color: var(--danger-dark-color);
  border: 1px solid var(--danger-color);
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-consignment-form .error-message i {
  font-size: 1.2rem;
}

.add-consignment-form .form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.add-consignment-form .btn {
  padding: 12px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
}

.add-consignment-form .btn-outline {
  background-color: transparent;
  color: var(--text-color-dark);
  border: 1px solid var(--border-color);
}

.add-consignment-form .btn-outline:hover:not(:disabled) {
  background-color: var(--hover-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.add-consignment-form .btn-cancel {
  background-color: #dc3545;
  color: white;
}

.add-consignment-form .btn-cancel:hover:not(:disabled) {
  background-color: #c82333;
}

.add-consignment-form .btn-create {
  background-color: #007bff;
  color: white;
}

.add-consignment-form .btn-create:hover:not(:disabled) {
  background-color: #0056b3;
}

.add-consignment-form .btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.add-consignment-form .btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark-color);
}

.add-consignment-form .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .add-consignment-form {
    padding: 20px;
  }

  .add-consignment-form .form-section {
    grid-template-columns: 1fr;
  }

  .add-consignment-form .form-section h3 {
    font-size: 1.3rem;
  }

  .add-consignment-form .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .add-consignment-form .btn {
    width: 100%;
    justify-content: center;
  }
}

.add-planning-consignment {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.company-name {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

.dispatch-info {
  font-size: 16px;
  color: #6c757d;
  margin: 0;
  font-weight: 500;
}

.planning-form {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  font-size: 14px;
}

.form-input,
.form-select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-input[readonly] {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.remark-group {
  grid-column: span 2;
}

.remark-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.remark-input {
  flex: 1 1;
  padding-right: 60px;
}

.remark-icons {
  position: absolute;
  right: 10px;
  display: flex;
  gap: 8px;
}

.remark-icon {
  width: 24px;
  height: 24px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.remark-icon:hover {
  background: #218838;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-start;
}

.save-product-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-product-btn:hover:not(:disabled) {
  background: #0056b3;
}

.save-product-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #f5c6cb;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .remark-group {
    grid-column: span 1;
  }
  
  .header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .company-name {
    font-size: 20px;
  }
  
  .dispatch-info {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .add-planning-consignment {
    padding: 15px;
  }
  
  .planning-form {
    padding: 20px 15px;
  }
  
  .form-row {
    gap: 15px;
  }
  
  .save-product-btn {
    width: 100%;
    padding: 15px;
  }
}

/* Products List Section */
.consignment-products-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  overflow: hidden;
}

.consignment-products-header {
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
}

.consignment-products-header h3 {
  margin: 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6c757d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

.products-table-container {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.products-table thead {
  background: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-size: 13px;
}

.products-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
  font-size: 13px;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.product-name-cell {
  max-width: 200px;
  word-wrap: break-word;
  line-height: 1.4;
}

.quantity-cell {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

.remark-cell {
  max-width: 150px;
  word-wrap: break-word;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-approved {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-in_progress {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Action Column Styles */
.action-cell {
  text-align: center;
  white-space: nowrap;
  min-width: 100px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.edit-btn,
.delete-btn,
.return-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

.edit-btn {
  background-color: #e3f2fd;
  color: #1976d2;
}

.edit-btn:hover:not(:disabled) {
  background-color: #bbdefb;
  transform: scale(1.1);
}

.edit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-btn {
  background-color: #ffebee;
  color: #d32f2f;
}

.delete-btn:hover:not(:disabled) {
  background-color: #ffcdd2;
  transform: scale(1.1);
}

.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.return-btn {
  background-color: #fff3e0;
  color: #ef6c00;
  font-size: 16px;
  font-weight: 600;
}

.return-btn:hover:not(:disabled) {
  background-color: #ffe0b2;
  transform: scale(1.05);
}

.return-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Edit Mode Styles */
.edit-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.save-edit-btn,
.cancel-edit-btn {
  background: none;
  border: 1px solid #ced4da;
  cursor: pointer;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 600;
  min-width: 40px;
  min-height: 32px;
}

.save-edit-btn {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}

.save-edit-btn:hover:not(:disabled) {
  background-color: #218838;
  border-color: #1e7e34;
  transform: scale(1.05);
}

.save-edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cancel-edit-btn {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}

.cancel-edit-btn:hover:not(:disabled) {
  background-color: #c82333;
  border-color: #bd2130;
  transform: scale(1.05);
}

.cancel-edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.edit-qty-input {
  width: 80px;
  padding: 4px 8px;
  border: 2px solid #007bff;
  border-radius: 4px;
  font-size: 13px;
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

.edit-qty-input:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments for products table */
@media (max-width: 1200px) {
  .products-table {
    font-size: 12px;
  }
  
  .products-table th,
  .products-table td {
    padding: 8px 6px;
  }
  
  .product-name-cell {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .products-table-container {
    font-size: 11px;
  }
  
  .products-table th,
  .products-table td {
    padding: 6px 4px;
  }
  
  .product-name-cell {
    max-width: 120px;
  }
  
  .remark-cell {
    max-width: 100px;
  }
  
  .status-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .consignment-products-header h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .consignment-products-header {
    padding: 10px 15px;
  }
  
  .consignment-products-header h3 {
    font-size: 14px;
  }
  
  .products-table th,
  .products-table td {
    padding: 4px 2px;
  }
  
  .product-name-cell {
    max-width: 80px;
  }
  
  .quantity-cell {
    font-size: 10px;
  }
  
  .action-buttons,
  .edit-actions {
    gap: 4px;
  }
  
  .edit-btn,
  .delete-btn,
  .return-btn,
  .save-edit-btn,
  .cancel-edit-btn {
    min-width: 28px;
    min-height: 28px;
    font-size: 14px;
    padding: 2px 4px;
  }
  
  .edit-qty-input {
    width: 60px;
    font-size: 11px;
    padding: 2px 4px;
  }
}

/* Status Action Buttons */
.consignment-status-actions {
  display: flex;
  gap: 15px;
  padding: 20px;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.status-action-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.forward-to-qc-btn {
  background-color: #007bff;
  color: white;
}

.forward-to-qc-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.forward-to-qc-btn.forwarded {
  background-color: #28a745;
  color: white;
}

.forward-to-qc-btn.forwarded:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.forward-to-logistic-btn {
  background-color: #007bff;
  color: white;
}

.forward-to-logistic-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.forward-to-logistic-btn.forwarded {
  background-color: #28a745;
  color: white;
}

.forward-to-logistic-btn.forwarded:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.status-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.status-action-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Responsive adjustments for status buttons */
@media (max-width: 768px) {
  .consignment-status-actions {
    flex-direction: column;
    gap: 10px;
  }

  .status-action-btn {
    width: 100%;
    min-width: auto;
    padding: 14px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .status-action-btn {
    padding: 12px 15px;
    font-size: 13px;
  }
}

/* Confirmation Modal Styles */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirm-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 1200px;
  width: 95%;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirm-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.confirm-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.confirm-modal-header h3::before {
  content: '⚠️';
  font-size: 24px;
}

.confirm-modal-body {
  padding: 30px 24px;
  text-align: center;
}

.confirm-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.confirm-icon i {
  font-size: 36px;
  color: #856404;
}

.confirm-message {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 15px 0;
  line-height: 1.5;
}

.confirm-details {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.confirm-details strong {
  color: #007bff;
  font-weight: 600;
}

.confirm-modal-footer {
  padding: 20px 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8f9fa;
}

.confirm-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cancel-btn {
  background: #6c757d;
  color: white;
}

.cancel-btn:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.confirm-action-btn {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.confirm-action-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Responsive adjustments for modal */
@media (max-width: 480px) {
  .confirm-modal-content {
    max-width: 100%;
    margin: 10px;
  }

  .confirm-modal-header h3 {
    font-size: 18px;
  }

  .confirm-message {
    font-size: 16px;
  }

  .confirm-modal-footer {
    flex-direction: column-reverse;
  }

  .confirm-btn {
    width: 100%;
  }
}

/* Return confirmation modal */
.return-confirm-modal {
  max-width: 520px;
  width: 100%;
}

.return-confirm-header {
  background: linear-gradient(135deg, #ef6c00 0%, #e65100 100%);
}

.return-confirm-header h3::before {
  content: '↩';
}

.return-confirm-body {
  text-align: left;
  padding: 24px;
}

.return-confirm-intro {
  margin: 0 0 16px;
  font-size: 15px;
  color: #333;
}

.return-confirm-product-details {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.return-confirm-product-details p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
}

.return-confirm-product-details p:last-child {
  margin-bottom: 0;
}

.return-confirm-arn-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.return-confirm-arn-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
}

.return-confirm-arn-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.return-confirm-arn-list li:first-child {
  padding-top: 0;
}

.return-confirm-arn {
  font-weight: 600;
  color: #1976d2;
  min-width: 100px;
}

.return-confirm-arrow {
  color: #6c757d;
}

.return-confirm-qty {
  font-weight: 600;
  color: #212529;
}

.return-confirm-total {
  margin: 0 0 16px;
  font-size: 15px;
  color: #333;
}

.return-confirm-total strong {
  color: #ef6c00;
  font-size: 16px;
}

.return-confirm-question {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #495057;
  text-align: center;
}

.return-confirm-note {
  margin: 0 0 16px;
  padding: 12px;
  background: #fff3e0;
  border-radius: 8px;
  color: #e65100;
  font-size: 14px;
}

.return-confirm-action-btn {
  background: #ef6c00;
  border-color: #ef6c00;
}

.return-confirm-action-btn:hover:not(:disabled) {
  background: #e65100;
  border-color: #e65100;
}

/* Unified Add Page Styles (Product) */
.add-product{ background:#fff; background:var(--card-bg,#fff); padding:20px; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,0.08); box-shadow:var(--box-shadow,0 6px 18px rgba(0,0,0,0.08)); }
.add-product .form-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.add-product .form-header h2{ margin:0; font-size:1.6rem; color:#2c3e50; color:var(--text-color-dark,#2c3e50); }
.product-form{ display:flex; flex-direction:column; gap:18px; }
.form-section{ border-top:1px solid #e9ecef; border-top:1px solid var(--border-color,#e9ecef); padding-top:14px; }
.form-section h3{ margin:0 0 12px 0; color:#2c3e50; color:var(--text-color-dark,#2c3e50); font-size:1.1rem; }
.form-grid{ display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); grid-gap:14px; gap:14px; }
.form-group{ display:flex; flex-direction:column; gap:6px; }
.form-label{ font-size:.85rem; color:#2c3e50; color:var(--text-color-dark,#2c3e50); font-weight:600; }
.form-input,.form-select,.form-textarea{ width:100%; padding:10px 12px; border:1px solid #e9ecef; border:1px solid var(--border-color,#e9ecef); border-radius:6px; background:#fff; color:#2c3e50; color:var(--text-color-dark,#2c3e50); text-transform:uppercase; }
.form-input::placeholder{ text-transform:none; }
.btn{ display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:6px; border:none; cursor:pointer; font-weight:600; }
.btn-primary{ background:#007bff; background:var(--primary-color,#007bff); color:#fff; }
.btn-secondary{ background:#6c757d; color:#fff; }
@media (max-width:768px){ .form-grid{ grid-template-columns:1fr; } .btn{ width:100%; justify-content:center; } }


/* Add Supplier Form Styles */
.add-supplier {
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* Product Search Styles */
.product-search-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.product-search-input {
  width: 100%;
  padding-right: 35px; /* Space for clear button */
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-search-btn:hover {
  background-color: #f0f0f0;
  color: #333;
}

/* Product Dropdown Styles */
.product-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 2px;
}

.product-dropdown::-webkit-scrollbar {
  width: 6px;
}

.product-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.product-dropdown::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.product-dropdown::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.product-dropdown > div {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.product-dropdown > div:hover {
  background-color: #f5f5f5;
}

.product-dropdown > div:last-child {
  border-bottom: none;
}

/* Document Upload Styles */
.document-upload-section {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.document-upload-section:hover {
  border-color: #007bff;
  background-color: #f8f9ff;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.file-upload-label:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.selected-files {
  margin-top: 20px;
  text-align: left;
}

.selected-files h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 14px;
}

.remove-file-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.remove-file-btn:hover {
  background: #c82333;
}

.upload-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.upload-btn:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
}

.upload-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.uploaded-documents {
  margin-top: 20px;
  text-align: left;
}

.uploaded-documents h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #e8f5e8;
  border: 1px solid #c3e6c3;
  border-radius: 4px;
  margin-bottom: 8px;
}

.document-url {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #155724;
  font-size: 14px;
  word-break: break-all;
}

.remove-document-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.remove-document-btn:hover {
  background: #c82333;
}

/* Photo Upload Styles */
.photo-upload-section {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.photo-upload-section:hover {
  border-color: #28a745;
  background-color: #f8fff8;
}

.photo-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #28a745;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.photo-upload-label:hover {
  background: #218838;
  transform: translateY(-1px);
}

.photo-previews {
  margin-top: 20px;
  text-align: left;
}

.photo-previews h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
}

.photo-preview-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-preview-container {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.photo-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-preview-container:hover .photo-preview-image {
  transform: scale(1.05);
}

.remove-photo-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-photo-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.photo-info {
  padding: 8px;
  text-align: center;
}

.photo-name {
  display: block;
  font-size: 12px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-size {
  display: block;
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

.upload-photo-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.upload-photo-btn:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
}

.upload-photo-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.uploaded-photos {
  margin-top: 20px;
  text-align: left;
}

.uploaded-photos h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.uploaded-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.uploaded-photo-item {
  border: 1px solid #c3e6c3;
  border-radius: 8px;
  overflow: hidden;
  background: #e8f5e8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.uploaded-photo-container {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.uploaded-photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.uploaded-photo-container:hover .uploaded-photo-image {
  transform: scale(1.05);
}

.photo-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 24px;
}

.photo-placeholder span {
  font-size: 12px;
  margin-top: 5px;
}

.remove-uploaded-photo-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-uploaded-photo-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.uploaded-photo-info {
  padding: 8px;
  text-align: center;
}

.uploaded-photo-url {
  display: block;
  font-size: 10px;
  color: #155724;
  word-break: break-all;
  line-height: 1.2;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.back-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.supplier-form {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.form-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.form-section h3 {
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
  display: inline-block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px 28px;
  gap: 20px 28px;
  margin-bottom: 20px;
}

/* Grid items default to min-width:auto and can overflow into the next column; clamp width */
.form-grid > .form-group {
  min-width: 0;
  box-sizing: border-box;
}

/* Extra separation before the next column (e.g. GSTIN) — company field has autocomplete dropdown */
.form-grid > .form-group--company-name {
  -webkit-padding-end: 12px;
          padding-inline-end: 12px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 500;
  font-size: 14px;
}

.form-label.required::after {
  content: ' *';
  color: #dc3545;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Multiple Select Styles */
.form-select[multiple] {
  min-height: 120px;
  padding: 8px;
}

.form-select[multiple] option {
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 4px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
}

.form-select[multiple] option:checked {
  background-color: #667eea;
  color: white;
  border-color: #5a67d8;
}

.form-help {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #6c757d;
  font-style: italic;
}

/* Phase Indicator */
.phase-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.phase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 20px;
  position: relative;
}

.phase-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 100%;
  width: 40px;
  height: 2px;
  background: #e9ecef;
  z-index: 1;
}

.phase-step.active:not(:last-child)::after {
  background: #667eea;
}

.phase-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.phase-step.active .phase-number {
  background: #667eea;
  color: white;
}

.phase-label {
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  text-align: center;
}

.phase-step.active .phase-label {
  color: #667eea;
  font-weight: 600;
}

/* Array Input Groups */
.array-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.array-input-group .form-input {
  flex: 1 1;
  margin-bottom: 0;
}

.remove-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #dc3545;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.remove-btn:hover {
  background: #c82333;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-btn:hover {
  background: #218838;
}

/* Products Selection */
.products-selection {
  max-height: 200px;
  overflow-y: auto;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 16px;
  background: #f8f9fa;
}

.product-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
}

.product-checkbox:last-child {
  border-bottom: none;
}

.product-checkbox input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.product-name {
  font-weight: 500;
  color: #2c3e50;
}

.product-type {
  color: #7f8c8d;
  font-size: 12px;
  font-style: italic;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-outline:hover:not(:disabled) {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.error-message i {
  font-size: 16px;
}

/* Success Message */
.success-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #d4edda;
  color: #155724;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

.success-message i {
  font-size: 16px;
}

/* Loading Spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .add-supplier {
    padding: 10px;
  }
  
  .form-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .supplier-form {
    padding: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .array-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .remove-btn {
    align-self: flex-end;
    width: auto;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .form-header h2 {
    font-size: 24px;
  }
  
  .form-section h3 {
    font-size: 18px;
  }
  
  .supplier-form {
    padding: 15px;
  }
}

/* ==========================================================================
   Add Warehouse — form page
   ========================================================================== */
.add-warehouse {
  box-sizing: border-box;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.add-warehouse *,
.add-warehouse *::before,
.add-warehouse *::after {
  box-sizing: border-box;
}

/* Card ---------------------------------------------------------------------- */
.warehouse-panel {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}

.warehouse-panel--state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 72px 24px;
  color: #667085;
  font-size: 15px;
}

/* Header ------------------------------------------------------------------- */
.warehouse-panel__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  background: linear-gradient(135deg, #eef2ff 0%, #f6f4ff 100%);
  border-bottom: 1px solid #e6e8ee;
}

.warehouse-panel__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #fff;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.32);
}

.warehouse-panel__header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: #1d2939;
  letter-spacing: -0.01em;
}

.warehouse-panel__header p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #667085;
}

/* Form ------------------------------------------------------------------- */
.warehouse-form {
  padding: 26px;
}

.form-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #eef0f4;
}

.form-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.form-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  color: #475467;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #5925dc;
  background: #f4f3ff;
  border: 1px solid #e0deff;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Field grid — auto-fits, never squashes a column below 240px ------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 18px 22px;
  gap: 18px 22px;
  align-items: start;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #344054;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.required {
  color: #d92d20;
  margin-left: 2px;
}

/* Controls -------------------------------------------------------------- */
.form-input,
.form-textarea {
  display: block;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  text-transform: none;
  color: #1d2939;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-textarea {
  height: auto;
  min-height: 92px;
  padding: 10px 13px;
  line-height: 1.5;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #98a2b3;
  text-transform: none;
}

.form-input:hover,
.form-textarea:hover {
  border-color: #b6bdc9;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

/* Select — custom chevron, same height as inputs */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23667085%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* Actions ------------------------------------------------------------- */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #eef0f4;
}

.btn {
  padding: 0 20px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-width: 132px;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.32);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: #344054;
  border-color: #d0d5dd;
}

.btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #b6bdc9;
}

/* Error ------------------------------------------------------------- */
.error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 26px 0;
  padding: 11px 14px;
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 9px;
  font-size: 13px;
}

.error-message i {
  font-size: 14px;
}

/* Spinner --------------------------------------------------------- */
.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e4e7ec;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive ---------------------------------------------------- */
@media (max-width: 640px) {
  .add-warehouse {
    padding: 14px 12px 32px;
  }

  .warehouse-panel__header {
    padding: 16px 18px;
  }

  .warehouse-form {
    padding: 20px 18px;
  }

  .error-message {
    margin-left: 18px;
    margin-right: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }
}

/* Delete Consignment Modal Styles */
.delete-consignment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.delete-consignment-modal-content {
  width: 100%;
  max-width: 520px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* Delete Supplier Modal Styles (legacy) */
.delete-supplier-modal {
  width: 100%;
  max-width: 500px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 24px;
  text-align: center;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 4px;
  margin-bottom: 16px;
  border: 1px solid #f5c6cb;
  font-size: 13px;
  text-align: left;
}

.error-message i {
  font-size: 14px;
  flex-shrink: 0;
}

.warning-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: #fff3cd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #856404;
  font-size: 24px;
}

.modal-body h4 {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.supplier-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.supplier-info p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #2c3e50;
}

.supplier-info p:last-child {
  margin-bottom: 0;
}

.supplier-info strong {
  color: #495057;
  font-weight: 600;
}

.warning-text {
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
}

.btn-danger {
  background: #dc3545;
  color: white;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* Loading Spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .delete-supplier-modal {
    max-width: 95vw;
    margin: 10px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-header h3 {
    font-size: 16px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-body h4 {
    font-size: 16px;
  }
  
  .supplier-info {
    padding: 12px;
  }
  
  .supplier-info p {
    font-size: 13px;
  }
  
  .warning-text {
    font-size: 13px;
  }
  
  .modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .modal-header {
    padding: 12px 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .warning-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .modal-body h4 {
    font-size: 15px;
  }
  
  .supplier-info {
    padding: 10px;
  }
  
  .supplier-info p {
    font-size: 12px;
  }
  
  .warning-text {
    font-size: 12px;
  }
  
  .modal-footer {
    padding: 10px 16px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* Delete Modal Styles */
.delete-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.delete-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.3s ease;
}

.delete-modal.success-state .modal-header {
  background: #d4edda;
  border-bottom-color: #c3e6cb;
}

.delete-modal .modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #dc3545;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-modal.success-state .modal-header h3 {
  color: #155724;
}

.delete-modal .modal-header h3 i {
  font-size: 20px;
}

.delete-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.delete-modal .modal-body {
  padding: 24px;
  text-align: center;
  flex: 1 1;
}

.delete-modal .error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.delete-modal .error-message i {
  font-size: 16px;
}

.delete-modal .warning-icon {
  margin-bottom: 16px;
}

.delete-modal .warning-icon i {
  font-size: 40px;
  color: #ffc107;
}

.delete-modal .success-icon {
  margin-bottom: 16px;
}

.delete-modal .success-icon i {
  font-size: 48px;
  color: #28a745;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.delete-modal h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
}

.delete-modal.success-state h4 {
  color: #155724;
}

.delete-modal .product-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}

.delete-modal .product-info p {
  margin: 8px 0;
  font-size: 14px;
  color: #495057;
}

.delete-modal .product-info strong {
  color: #2c3e50;
  font-weight: 600;
}

.delete-modal .warning-text {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

.delete-modal .success-text {
  font-size: 13px;
  color: #155724;
  margin: 0;
  line-height: 1.5;
}

.delete-modal .modal-footer {
  padding: 20px 24px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.delete-modal .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 110px;
  justify-content: center;
}

.delete-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.delete-modal .btn-secondary {
  background: #6c757d;
  color: white;
}

.delete-modal .btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.delete-modal .btn-danger {
  background: #dc3545;
  color: white;
}

.delete-modal .btn-danger:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.delete-modal .btn-danger:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .delete-modal .modal-header,
  .delete-modal .modal-body,
  .delete-modal .modal-footer {
    padding: 20px;
  }
  
  .delete-modal .modal-footer {
    flex-direction: column;
  }
  
  .delete-modal .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .delete-modal .modal-header h3 {
    font-size: 18px;
  }
  
  .delete-modal h4 {
    font-size: 16px;
  }
  
  .delete-modal .warning-icon i {
    font-size: 40px;
  }
}

/* Delete Supplier Modal Styles */
.delete-supplier-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.delete-supplier-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.3s ease;
}

.delete-supplier-modal.success-state .modal-header {
  background: #d4edda;
  border-bottom-color: #c3e6cb;
}

.delete-supplier-modal .modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #dc3545;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-supplier-modal.success-state .modal-header h3 {
  color: #155724;
}

.delete-supplier-modal .modal-header h3 i {
  font-size: 20px;
}

.delete-supplier-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-supplier-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.delete-supplier-modal .modal-body {
  padding: 24px;
  text-align: center;
  flex: 1 1;
}

.delete-supplier-modal .error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.delete-supplier-modal .error-message i {
  font-size: 1.2rem;
}

.delete-supplier-modal .warning-icon {
  margin-bottom: 16px;
}

.delete-supplier-modal .warning-icon i {
  font-size: 40px;
  color: #ffc107;
}

.delete-supplier-modal .success-icon {
  margin-bottom: 16px;
}

.delete-supplier-modal .success-icon i {
  font-size: 48px;
  color: #28a745;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.delete-supplier-modal h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
}

.delete-supplier-modal.success-state h4 {
  color: #155724;
}

.delete-supplier-modal .supplier-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}

.delete-supplier-modal .supplier-info p {
  margin: 8px 0;
  font-size: 14px;
  color: #495057;
}

.delete-supplier-modal .supplier-info p:last-child {
  margin-bottom: 0;
}

.delete-supplier-modal .supplier-info strong {
  color: #2c3e50;
  font-weight: 600;
}

.delete-supplier-modal .warning-text {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

.delete-supplier-modal .success-text {
  font-size: 13px;
  color: #155724;
  margin: 0;
  line-height: 1.5;
}

.delete-supplier-modal .modal-footer {
  padding: 20px 24px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.delete-supplier-modal .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 110px;
  justify-content: center;
}

.delete-supplier-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.delete-supplier-modal .btn-secondary {
  background: #6c757d;
  color: white;
}

.delete-supplier-modal .btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.delete-supplier-modal .btn-danger {
  background: #dc3545;
  color: white;
}

.delete-supplier-modal .btn-danger:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.delete-supplier-modal .btn-danger:active {
  transform: translateY(0);
}

/* Loading Spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .delete-supplier-modal {
    max-width: 95vw;
  }
  
  .delete-supplier-modal .modal-header,
  .delete-supplier-modal .modal-body,
  .delete-supplier-modal .modal-footer {
    padding: 20px;
  }
  
  .delete-supplier-modal .modal-footer {
    flex-direction: row;
  }
  
  .delete-supplier-modal .btn {
    flex: 1 1;
  }
}

@media (max-width: 480px) {
  .delete-supplier-modal {
    padding: 10px;
  }
  
  .delete-supplier-modal .modal-header h3 {
    font-size: 16px;
  }
  
  .delete-supplier-modal h4 {
    font-size: 15px;
  }
  
  .delete-supplier-modal .warning-icon i {
    font-size: 36px;
  }
  
  .delete-supplier-modal .success-icon i {
    font-size: 40px;
  }
}

/* Delete Warehouse Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.delete-warehouse-modal {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 10px 10px 0 0;
}

.modal-header h2 {
  color: #e74c3c;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #7f8c8d;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #e74c3c;
  color: white;
}

.close-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-content {
  padding: 30px;
  text-align: center;
}

.warning-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  font-size: 32px;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.delete-content h3 {
  color: #2c3e50;
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
}

.warehouse-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e1e8ed;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item label {
  color: #7f8c8d;
  font-weight: 500;
  font-size: 14px;
}

.info-item span {
  color: #2c3e50;
  font-weight: 600;
  font-size: 14px;
}

.warning-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.warning-message p {
  color: #721c24;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.warning-message strong {
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px 30px;
  border-top: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 0 0 10px 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 100px;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #7f8c8d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 6px;
  margin: 0 30px 20px 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #f5c6cb;
  font-size: 14px;
}

.error-message i {
  font-size: 14px;
}

/* Loading State */
.btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 10px;
  }
  
  .delete-warehouse-modal {
    max-width: 100%;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-header h2 {
    font-size: 20px;
  }
  
  .delete-content {
    padding: 20px;
  }
  
  .warning-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .delete-content h3 {
    font-size: 18px;
  }
  
  .modal-actions {
    flex-direction: column;
    padding: 15px 20px;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-header h2 {
    font-size: 18px;
  }
  
  .delete-content h3 {
    font-size: 16px;
  }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* Update Buyer Modal Styles */
.update-buyer-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 95vw !important;
  max-height: 80vh;
  min-width: 90vw !important;
  position: relative;
}

.update-buyer-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.update-buyer-modal .modal-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.update-buyer-modal .modal-close {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.update-buyer-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.update-buyer-modal .modal-body {
  padding: 40px;
  flex: 1 1;
  overflow-y: auto;
  min-height: 0;
}

.update-buyer-modal .form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.update-buyer-modal .form-section h4 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.update-buyer-modal .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

/* Basic Information Grid - Fixed 6 equal columns */
.update-buyer-modal .basic-info-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.update-buyer-modal .basic-info-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0; /* Prevents grid overflow */
}

.update-buyer-modal .basic-info-field .form-label {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.update-buyer-modal .basic-info-field .form-input,
.update-buyer-modal .basic-info-field .form-select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevents overflow */
}

.update-buyer-modal .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-buyer-modal .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.update-buyer-modal .form-label.required::after {
  content: ' *';
  color: #dc3545;
}

.update-buyer-modal .form-input,
.update-buyer-modal .form-select,
.update-buyer-modal .form-textarea {
  padding: 14px 18px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 15px;
  color: #2c3e50;
  background: white;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.update-buyer-modal .form-input:focus,
.update-buyer-modal .form-select:focus,
.update-buyer-modal .form-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.update-buyer-modal .form-select[multiple] {
  min-height: 150px;
  padding: 10px;
}

.update-buyer-modal .form-help {
  color: #6c757d;
  font-size: 12px;
  margin-top: 4px;
}

/* Array Input Groups */
.update-buyer-modal .array-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.update-buyer-modal .array-input-group .form-input {
  flex: 1 1;
}

.update-buyer-modal .remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.update-buyer-modal .remove-btn:hover {
  background: #c82333;
}

.update-buyer-modal .add-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
}

.update-buyer-modal .add-btn:hover {
  background: #218838;
  transform: translateY(-1px);
}

/* Contact Person Row Styles */
.update-buyer-modal .contact-person-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 12px;
  align-items: end;
}

.update-buyer-modal .contact-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* Prevents grid overflow */
  width: 100%;
}

.update-buyer-modal .contact-field-wrapper .form-label {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.update-buyer-modal .contact-field-wrapper .form-input,
.update-buyer-modal .contact-field-wrapper .form-select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevents overflow */
}

.update-buyer-modal .contact-remove-btn-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 40px;
  flex-shrink: 0;
}

/* Supplier Product Row Styles */
.update-buyer-modal .supplier-product-row {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 0.9fr 1fr 1fr auto;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #f9f9f9;
  align-items: end;
}

.update-buyer-modal .product-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* Prevents grid overflow */
}

.update-buyer-modal .product-field-wrapper .form-input,
.update-buyer-modal .product-field-wrapper .form-select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevents overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-buyer-modal .product-field-wrapper .form-input[readonly] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-buyer-modal .product-remove-btn-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 40px;
  flex-shrink: 0;
}

/* Ensure all inputs have consistent sizing */
.update-buyer-modal .form-input,
.update-buyer-modal .form-select {
  box-sizing: border-box;
}

/* Error Message */
.update-buyer-modal .error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.update-buyer-modal .error-message i {
  font-size: 16px;
}

/* Modal Footer */
.update-buyer-modal .modal-footer {
  display: flex !important;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 40px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 10;
  min-height: 80px;
}

.update-buyer-modal .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
  visibility: visible !important;
  height: auto;
}

.update-buyer-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.update-buyer-modal .btn-secondary {
  background: #6c757d;
  color: white;
  border: 2px solid #6c757d;
}

.update-buyer-modal .btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.update-buyer-modal .btn-primary {
  background: #007bff;
  color: white;
  border: 2px solid #007bff;
}

.update-buyer-modal .btn-primary:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.form-label.required.buyer-contact-person {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 15px;
}

.last-form-group-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
}

.supplier-product-row-buyer {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 0.9fr 1fr 1fr auto;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #f9f9f9;
  align-items: end;
}



/* Responsive Design */
@media (max-width: 1400px) {
  .update-buyer-modal {
    max-width: 75vw;
    min-width: 65vw;
  }
}

@media (max-width: 1200px) {
  .update-buyer-modal {
    max-width: 80vw;
    min-width: 70vw;
  }
  
  .update-buyer-modal .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  /* Stack Basic Information fields on smaller screens */
  .update-buyer-modal .basic-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .update-buyer-modal .supplier-product-row {
    grid-template-columns: 1.3fr 1.1fr 0.9fr 0.8fr 0.9fr 0.9fr auto;
  }
}

@media (max-width: 768px) {
  .update-buyer-modal {
    max-width: 95vw;
    min-width: 90vw;
    margin: 10px;
  }
  
  .update-buyer-modal .modal-header {
    padding: 20px 30px;
  }
  
  .update-buyer-modal .modal-header h3 {
    font-size: 18px;
  }
  
  .update-buyer-modal .modal-body {
    padding: 30px;
  }
  
  .update-buyer-modal .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .update-buyer-modal .array-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .update-buyer-modal .remove-btn {
    width: 100%;
    justify-content: center;
  }
  
  .update-buyer-modal .modal-footer {
    padding: 16px 30px;
    flex-direction: column;
  }
  
  .update-buyer-modal .btn {
    width: 100%;
  }
  
  /* Stack Basic Information fields on mobile */
  .update-buyer-modal .basic-info-grid {
    grid-template-columns: 1fr;
  }
  
  /* Stack contact person fields on mobile */
  .update-buyer-modal .contact-person-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .update-buyer-modal .contact-remove-btn-wrapper {
    justify-content: flex-start;
  }
  
  /* Stack product fields on mobile */
  .update-buyer-modal .supplier-product-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .update-buyer-modal .product-remove-btn-wrapper {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .update-buyer-modal .modal-header {
    padding: 15px 20px;
  }
  
  .update-buyer-modal .modal-body {
    padding: 20px;
  }
  
  .update-buyer-modal .form-section h4 {
    font-size: 16px;
  }
  
  .update-buyer-modal .form-input,
  .update-buyer-modal .form-select,
  .update-buyer-modal .form-textarea {
    padding: 12px 14px;
    font-size: 14px;
  }
}

@media (max-width: 567px) {
  .last-form-group-container{
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 10px;
    gap: 10px;
  }

  .supplier-product-row-buyer {
    display: grid;
    grid-template-columns: 1fr;
  }
}
/* Overlay to center the update modal above the page */
.update-consignment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

/* Update Product Modal Styles */
.update-product-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 900px;
  max-height: 90vh;
}

.update-product-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.update-product-modal .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.update-product-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-product-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.update-product-modal .modal-body {
  padding: 30px;
  flex: 1 1;
  overflow-y: auto;
}

.update-product-modal .error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-product-modal .error-message i {
  font-size: 16px;
}

.update-product-modal .update-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.update-product-modal .form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.update-product-modal .section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.update-product-modal .field-row {
  display: flex;
  gap: 20px;
}

.update-product-modal .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.update-product-modal .field-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-product-modal .field-box.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.update-product-modal .field-box.readonly {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
}

.update-product-modal .field-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.update-product-modal .field-value {
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  margin: 0;
  word-break: break-word;
  line-height: 1.4;
}

.update-product-modal .field-input {
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  color: #2c3e50;
  background: white;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.update-product-modal .field-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.update-product-modal .field-input:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.update-product-modal .field-input[multiple] {
  min-height: 100px;
}

.update-product-modal .field-help {
  font-size: 11px;
  color: #6c757d;
  margin-top: 4px;
  font-style: italic;
}

.update-product-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.update-product-modal .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.update-product-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.update-product-modal .btn-secondary {
  background: #6c757d;
  color: white;
}

.update-product-modal .btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.update-product-modal .btn-primary {
  background: #007bff;
  color: white;
}

.update-product-modal .btn-primary:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.update-product-modal .btn-primary:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .update-product-modal .modal-header,
  .update-product-modal .modal-body {
    padding: 20px;
  }
  
  .update-product-modal .field-grid {
    grid-template-columns: 1fr;
  }
  
  .update-product-modal .field-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .update-product-modal .form-actions {
    flex-direction: column;
  }
  
  .update-product-modal .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .update-product-modal .modal-header h2 {
    font-size: 20px;
  }
  
  .update-product-modal .section-title {
    font-size: 16px;
  }
  
  .update-product-modal .field-input {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Update Product Modal Styles */
.update-product-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 900px;
  max-height: 90vh;
}

.update-product-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.update-product-modal .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.update-product-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-product-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.update-product-modal .modal-body {
  padding: 30px;
  flex: 1 1;
  overflow-y: auto;
}

.update-product-modal .error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-product-modal .error-message i {
  font-size: 16px;
}

.update-product-modal .update-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.update-product-modal .form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.update-product-modal .section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.update-product-modal .field-row {
  display: flex;
  gap: 20px;
}

.update-product-modal .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.update-product-modal .field-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-product-modal .field-box.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.update-product-modal .field-box.readonly {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
}

.update-product-modal .field-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.update-product-modal .field-value {
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  margin: 0;
  word-break: break-word;
  line-height: 1.4;
}

.update-product-modal .field-input {
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  color: #2c3e50;
  background: white;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
  text-transform: uppercase;
}

.update-product-modal .field-input::placeholder {
  text-transform: none;
}

.update-product-modal .field-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.update-product-modal .field-input:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.update-product-modal .field-input[multiple] {
  min-height: 100px;
}

.update-product-modal .field-help {
  font-size: 11px;
  color: #6c757d;
  margin-top: 4px;
  font-style: italic;
}

.update-product-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.update-product-modal .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.update-product-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.update-product-modal .btn-secondary {
  background: #6c757d;
  color: white;
}

.update-product-modal .btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.update-product-modal .btn-primary {
  background: #007bff;
  color: white;
}

.update-product-modal .btn-primary:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.update-product-modal .btn-primary:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .update-product-modal .modal-header,
  .update-product-modal .modal-body {
    padding: 20px;
  }
  
  .update-product-modal .field-grid {
    grid-template-columns: 1fr;
  }
  
  .update-product-modal .field-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .update-product-modal .form-actions {
    flex-direction: column;
  }
  
  .update-product-modal .btn {
    width: 100%;
  }
}

/* Array Input Styles */
.update-product-modal .array-input {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.update-product-modal .array-input select {
  flex: 1 1;
}

.update-product-modal .btn-add-item {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.update-product-modal .btn-add-item:hover {
  background: #218838;
}

.update-product-modal .array-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.update-product-modal .array-item {
  background: #e9ecef;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-product-modal .array-item button {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-product-modal .array-item button:hover {
  background: #dc3545;
  color: white;
}

@media (max-width: 480px) {
  .update-product-modal .modal-header h2 {
    font-size: 20px;
  }
  
  .update-product-modal .section-title {
    font-size: 16px;
  }
  
  .update-product-modal .field-input {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Update Supplier Modal Styles */
.update-supplier-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 95vw !important;
  max-height: 80vh;
  min-width: 90vw !important;
  position: relative;
}

/* Document Upload Styles */
.document-upload-section {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.document-upload-section:hover {
  border-color: #007bff;
  background-color: #f8f9ff;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.file-upload-label:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.selected-files {
  margin-top: 20px;
  text-align: left;
}

.selected-files h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 14px;
}

.remove-file-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.remove-file-btn:hover {
  background: #c82333;
}

.upload-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.upload-btn:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
}

.upload-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.uploaded-documents {
  margin-top: 20px;
  text-align: left;
}

.uploaded-documents h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #e8f5e8;
  border: 1px solid #c3e6c3;
  border-radius: 4px;
  margin-bottom: 8px;
}

.document-url {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #155724;
  font-size: 14px;
  word-break: break-all;
}

.remove-document-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.remove-document-btn:hover {
  background: #c82333;
}

.update-supplier-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.update-supplier-modal .modal-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.update-supplier-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-supplier-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.update-supplier-modal .update-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.update-supplier-modal .modal-body {
  padding: 40px;
  flex: 1 1;
  overflow-y: auto;
  min-height: 0;
}

.update-supplier-modal .form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.update-supplier-modal .form-section h4 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.update-supplier-modal .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

/* Basic Information Grid - Fixed 5 equal columns */
.update-supplier-modal .basic-info-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.update-supplier-modal .basic-info-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0; /* Prevents grid overflow */
}

.update-supplier-modal .basic-info-field .form-label {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.update-supplier-modal .basic-info-field .form-input,
.update-supplier-modal .basic-info-field .form-select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevents overflow */
}

.update-supplier-modal .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-supplier-modal .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.update-supplier-modal .form-label.required::after {
  content: ' *';
  color: #dc3545;
}

.update-supplier-modal .form-input,
.update-supplier-modal .form-select,
.update-supplier-modal .form-textarea {
  padding: 14px 18px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 15px;
  color: #2c3e50;
  background: white;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.update-supplier-modal .form-input:focus,
.update-supplier-modal .form-select:focus,
.update-supplier-modal .form-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.update-supplier-modal .form-textarea {
  resize: vertical;
  min-height: 80px;
}

.update-supplier-modal .form-input[multiple] {
  min-height: 100px;
}

/* Multiple Select Styles */
.update-supplier-modal .form-select[multiple] {
  min-height: 150px;
  padding: 10px;
}

.update-supplier-modal .form-select[multiple] option {
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 4px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
}

.update-supplier-modal .form-select[multiple] option:checked {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}

.update-supplier-modal .form-help {
  font-size: 11px;
  color: #6c757d;
  margin-top: 4px;
  font-style: italic;
}

.read-only-field {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

/* Array Input Groups */
.update-supplier-modal .array-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.update-supplier-modal .array-input-group .form-input {
  flex: 1 1;
  margin-bottom: 0;
}

.update-supplier-modal .remove-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #dc3545;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.update-supplier-modal .remove-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.update-supplier-modal .add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.update-supplier-modal .add-btn:hover {
  background: #218838;
  transform: translateY(-1px);
}

/* Products Selection */
.products-selection {
  max-height: 150px;
  overflow-y: auto;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  padding: 12px;
  background: #f8f9fa;
}

.product-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
  font-size: 12px;
}

.product-checkbox:last-child {
  border-bottom: none;
}

.product-checkbox input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.product-name {
  font-weight: 500;
  color: #2c3e50;
}

.product-type {
  color: #7f8c8d;
  font-size: 11px;
  font-style: italic;
}

/* Error Message */
.update-supplier-modal .error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-supplier-modal .error-message i {
  font-size: 16px;
}

/* Modal Footer */
.update-supplier-modal .modal-footer {
  display: flex !important;
  justify-content: flex-end;
  gap: 12px;
  padding: 30px 40px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 10;
  min-height: 80px;
}

.update-supplier-modal .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
  visibility: visible !important;
  height: auto;
}

.update-supplier-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.update-supplier-modal .btn-secondary {
  background: #6c757d;
  color: white;
  border: 2px solid #6c757d;
}

.update-supplier-modal .btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.update-supplier-modal .btn-primary {
  background: #007bff;
  color: white;
  border: 2px solid #007bff;
}

.update-supplier-modal .btn-primary:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.update-supplier-modal .btn-primary:active {
  transform: translateY(0);
}

/* Loading Spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Contact Person Row Styles */
.update-supplier-modal .contact-person-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 12px;
  align-items: end;
}

.update-supplier-modal .contact-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* Prevents grid overflow */
  width: 100%;
}

.update-supplier-modal .contact-field-wrapper .form-label {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.update-supplier-modal .contact-field-wrapper .form-input,
.update-supplier-modal .contact-field-wrapper .form-select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevents overflow */
}

.update-supplier-modal .contact-remove-btn-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 40px;
  flex-shrink: 0;
}

/* Supplier Product Row Styles */
.update-supplier-modal .supplier-product-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #f9f9f9;
  align-items: end;
}

.update-supplier-modal .product-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* Prevents grid overflow */
}

.update-supplier-modal .product-field-wrapper .form-input,
.update-supplier-modal .product-field-wrapper .form-select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevents overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-supplier-modal .product-field-wrapper .form-input[readonly] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-supplier-modal .product-remove-btn-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 40px;
}

/* Ensure all inputs have consistent sizing */
.update-supplier-modal .form-input,
.update-supplier-modal .form-select {
  box-sizing: border-box;
}

.form-label.required.supplier-c-p {
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

 .supplier-outer-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .update-supplier-modal {
    max-width: 75vw;
    min-width: 65vw;
  }
  
}

@media (max-width: 1200px) {
  .update-supplier-modal {
    max-width: 80vw;
    min-width: 70vw;
  }
  
  .update-supplier-modal .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  /* Stack Basic Information fields on smaller screens */
  .update-supplier-modal .basic-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .update-supplier-modal {
    max-width: 95vw !important;
    min-width: 90vw !important;
  }
  
  .update-supplier-modal .modal-header,
  .update-supplier-modal .modal-body {
    padding: 20px;
  }
  
  .update-supplier-modal .form-grid {
    grid-template-columns: 1fr;
  }
  
  .update-supplier-modal .form-section {
    gap: 15px;
  }
  
  .update-supplier-modal .modal-footer {
    flex-direction: column;
  }
  
  .update-supplier-modal .btn {
    width: 100%;
  }
  
  .update-supplier-modal .array-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .update-supplier-modal .remove-btn {
    align-self: flex-end;
    width: auto;
    padding: 6px 10px;
  }
  
  /* Stack Basic Information fields on mobile */
  .update-supplier-modal .basic-info-grid {
    grid-template-columns: 1fr;
  }
  
  /* Stack contact person fields on mobile */
  .update-supplier-modal .contact-person-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .update-supplier-modal .contact-remove-btn-wrapper {
    justify-content: flex-start;
  }
  
  /* Stack product fields on mobile */
  .update-supplier-modal .supplier-product-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .update-supplier-modal .product-remove-btn-wrapper {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .update-supplier-modal .modal-header h3 {
    font-size: 20px;
  }
  
  .update-supplier-modal .form-section h4 {
    font-size: 16px;
  }
  
  .update-supplier-modal .form-input,
  .update-supplier-modal .form-select,
  .update-supplier-modal .form-textarea {
    padding: 10px 12px;
    font-size: 13px;
  }
}


@media (max-width: 567px) {
  .supplier-outer-3 {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 10px;
    gap: 10px;
  }
}
/* Update Warehouse Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.update-warehouse-modal {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 10px 10px 0 0;
}

.modal-header h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #7f8c8d;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #e74c3c;
  color: white;
}

.warehouse-form {
  padding: 30px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h3 {
  color: #2c3e50;
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e1e8ed;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 500;
  font-size: 14px;
}

.required {
  color: #e74c3c;
  margin-left: 3px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.form-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid #e1e8ed;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 100px;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #7f8c8d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 6px;
  margin: 0 30px 20px 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #f5c6cb;
  font-size: 14px;
}

.error-message i {
  font-size: 14px;
}

/* Loading State */
.btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 10px;
  }
  
  .update-warehouse-modal {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-header h2 {
    font-size: 20px;
  }
  
  .warehouse-form {
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-header h2 {
    font-size: 18px;
  }
  
  .form-section h3 {
    font-size: 16px;
  }
}

/* View Buyer Modal Styles */
.booking-details-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-width: 70vw;
  max-height: 80vh;
  min-width: 60vw;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.buyer-previous-company-section {
  margin-bottom: 20px;
}

.buyer-previous-company-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.buyer-previous-company-item {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.buyer-previous-company-line {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.buyer-previous-company-line:last-child {
  margin-bottom: 0;
}

.buyer-previous-company-date {
  color: #666;
  font-size: 13px;
}

.buyer-previous-company-empty {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 40px;
  flex: 1 1;
  overflow-y: auto;
  min-height: 0;
}

/* Field Layout */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.field-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 18px;
  transition: all 0.3s ease;
}

.field-box:hover {
  background: #e9ecef;
  border-color: #667eea;
}

.field-box.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.field-value {
  font-size: 14px;
  color: #2c3e50;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

/* Special Field Styles */
.buyer-id {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.buyer-id .field-label {
  color: rgba(255, 255, 255, 0.8);
}

.buyer-id .field-value {
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.company-under {
  text-align: center;
}

.company-under .field-value {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #d4edda;
  color: #155724;
}

/* Info Sections */
.info-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
  display: inline-block;
}

/* Latest Sales Order (India buyer view) */
.latest-sales-order-section .section-title {
  display: block;
  width: 100%;
}

.latest-sales-order-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-sales-order-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.latest-sales-order-products-box {
  margin-bottom: 0;
}

.latest-sales-order-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

.latest-sales-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.latest-sales-order-table thead {
  background: #eef1f6;
}

.latest-sales-order-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #dee2e6;
  white-space: nowrap;
}

.latest-sales-order-table td {
  padding: 10px 12px;
  color: #2c3e50;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
  word-break: break-word;
}

.latest-sales-order-table tbody tr:last-child td {
  border-bottom: none;
}

.latest-sales-order-table th:nth-child(1),
.latest-sales-order-table th:nth-child(2),
.latest-sales-order-table td:nth-child(1),
.latest-sales-order-table td:nth-child(2) {
  text-align: center;
}

.latest-sales-order-table .latest-sales-order-num {
  text-align: right;
  white-space: nowrap;
}

.latest-sales-order-table th:nth-child(3),
.latest-sales-order-table th:nth-child(4),
.latest-sales-order-table th:nth-child(5) {
  text-align: right;
}

.latest-sales-order-empty {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

/* Products List */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 13px;
}

.product-name {
  font-weight: 600;
  color: #2c3e50;
}

.product-type {
  color: #667eea;
  font-weight: 500;
}

.product-spec {
  color: #7f8c8d;
  font-style: italic;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 40px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 10;
  min-height: 80px;
}

.close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1400px) {
  .booking-details-modal {
    max-width: 75vw;
    min-width: 65vw;
  }
}

@media (max-width: 1200px) {
  .booking-details-modal {
    max-width: 80vw;
    min-width: 70vw;
  }
  
  .field-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .booking-details-modal {
    max-width: 95vw;
    min-width: 90vw;
    margin: 10px;
  }
  
  .modal-header {
    padding: 20px 30px;
  }
  
  .modal-header h3 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 30px;
  }
  
  .field-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .field-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .field-box {
    padding: 12px;
  }
  
  .modal-footer {
    padding: 16px 30px;
  }
  
  .close-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .field-box {
    padding: 10px;
  }
  
  .field-label {
    font-size: 11px;
  }
  
  .field-value {
    font-size: 13px;
  }
  
  .section-title {
    font-size: 14px;
  }
}

/* Booking Details Modal Styles - Matching Image Design */
.view-consignment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.view-consignment-modal-content {
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  box-shadow: var(--box-shadow-lg, 0 12px 24px rgba(0,0,0,0.2));
}

.view-consignment-modal-content-wide {
  max-width: 1200px;
}

.consignment-details-modal {
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
}

.consignment-details-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  flex-shrink: 0;
}

.consignment-details-modal .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.consignment-details-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consignment-details-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.consignment-details-modal .modal-body {
  padding: 30px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.consignment-details-modal .info-section {
  margin-bottom: 30px;
}

.consignment-details-modal .info-section:last-child {
  margin-bottom: 0;
}

.consignment-details-modal .section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.consignment-details-modal .field-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.consignment-details-modal .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.consignment-details-modal .field-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.consignment-details-modal .field-box:hover {
  border-color: #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.consignment-details-modal .field-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.consignment-details-modal .field-value {
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  margin: 0;
  word-break: break-word;
  line-height: 1.4;
}

.consignment-details-modal .field-value.price-value {
  font-weight: 600;
  color: #28a745;
  font-size: 16px;
}

.consignment-details-modal .type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.consignment-details-modal .type-extract {
  background: #d4edda;
  color: #155724;
}

.consignment-details-modal .type-powder {
  background: #fff3cd;
  color: #856404;
}

.consignment-details-modal .type-oil {
  background: #cce5ff;
  color: #004085;
}

.consignment-details-modal .type-liquid {
  background: #d1ecf1;
  color: #0c5460;
}

.consignment-details-modal .modal-footer {
  padding: 24px 30px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.consignment-details-modal .close-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.consignment-details-modal .close-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.consignment-details-modal .close-btn:active {
  transform: translateY(0);
}

.view-consignment-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fdecea;
  color: #c0392b;
  border-radius: 8px;
  font-size: 14px;
}

.view-consignment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #6c757d;
}

.view-consignment-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e9ecef;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: view-consignment-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes view-consignment-spin {
  to { transform: rotate(360deg); }
}

.view-consignment-products-table-container {
  overflow-x: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.view-consignment-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.view-consignment-products-table th,
.view-consignment-products-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e9ecef;
  text-align: left;
  white-space: nowrap;
}

.view-consignment-products-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.view-consignment-products-table tbody tr:hover {
  background: #f8f9fa;
}

.view-consignment-products-total-row {
  background: #f0f0f0;
  font-weight: 600;
}

.view-consignment-no-products {
  margin: 0;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  color: #6c757d;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .consignment-details-modal .modal-header,
  .consignment-details-modal .modal-body,
  .consignment-details-modal .modal-footer {
    padding: 20px;
  }
  
  .consignment-details-modal .field-grid {
    grid-template-columns: 1fr;
  }
  
  .consignment-details-modal .field-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .consignment-details-modal .field-box {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .consignment-details-modal .modal-header h2 {
    font-size: 20px;
  }
  
  .consignment-details-modal .section-title {
    font-size: 16px;
  }
  
  .consignment-details-modal .field-value {
    font-size: 13px;
  }
}

/* Booking Details Modal Styles - Matching Image Design */
.booking-details-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.booking-details-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.booking-details-modal .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.booking-details-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-details-modal .modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.booking-details-modal .modal-body {
  padding: 30px;
  flex: 1 1;
  overflow-y: auto;
}

.booking-details-modal .info-section {
  margin-bottom: 30px;
}

.booking-details-modal .info-section:last-child {
  margin-bottom: 0;
}

.booking-details-modal .section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.booking-details-modal .field-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.booking-details-modal .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.booking-details-modal .field-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.booking-details-modal .field-box:hover {
  border-color: #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-details-modal .field-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.booking-details-modal .field-value {
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  margin: 0;
  word-break: break-word;
  line-height: 1.4;
}

.booking-details-modal .field-value.price-value {
  font-weight: 600;
  color: #28a745;
  font-size: 16px;
}

.booking-details-modal .type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-details-modal .type-extract {
  background: #d4edda;
  color: #155724;
}

.booking-details-modal .type-powder {
  background: #fff3cd;
  color: #856404;
}

.booking-details-modal .type-oil {
  background: #cce5ff;
  color: #004085;
}

.booking-details-modal .type-liquid {
  background: #d1ecf1;
  color: #0c5460;
}

.booking-details-modal .modal-footer {
  padding: 24px 30px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: center;
}

.booking-details-modal .close-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.booking-details-modal .close-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.booking-details-modal .close-btn:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .booking-details-modal .modal-header,
  .booking-details-modal .modal-body,
  .booking-details-modal .modal-footer {
    padding: 20px;
  }
  
  .booking-details-modal .field-grid {
    grid-template-columns: 1fr;
  }
  
  .booking-details-modal .field-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .booking-details-modal .field-box {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .booking-details-modal .modal-header h2 {
    font-size: 20px;
  }
  
  .booking-details-modal .section-title {
    font-size: 16px;
  }
  
  .booking-details-modal .field-value {
    font-size: 13px;
  }
}

/* View Supplier Modal — scoped styles only */
.view-supplier-modal {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  max-width: 95vw !important;
  min-width: 90vw !important;
  max-height: 80vh;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.view-supplier-modal .vs-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  flex-shrink: 0;
}

.view-supplier-modal .vs-header-text h3 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
}

.view-supplier-modal .vs-header-subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.view-supplier-modal .vs-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.view-supplier-modal .vs-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.view-supplier-modal .vs-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 16px 28px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.view-supplier-modal .vs-hero-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.view-supplier-modal .vs-hero-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}

.view-supplier-modal .vs-hero-main strong {
  font-size: 1.1rem;
  color: #0f172a;
}

.view-supplier-modal .vs-status-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.view-supplier-modal .vs-status-active {
  background: #dcfce7;
  color: #166534;
}

.view-supplier-modal .vs-status-pending {
  background: #fef9c3;
  color: #854d0e;
}

.view-supplier-modal .vs-status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.view-supplier-modal .vs-status-default {
  background: #e2e8f0;
  color: #334155;
}

.view-supplier-modal .vs-hero-meta {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: #475569;
  font-size: 0.9rem;
}

.view-supplier-modal .vs-hero-meta i {
  margin-right: 6px;
  color: #6366f1;
}

.view-supplier-modal .vs-modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px 28px 28px;
  min-height: 0;
}

.view-supplier-modal .vs-loading-banner,
.view-supplier-modal .vs-error-banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.view-supplier-modal .vs-loading-banner {
  background: #eef2ff;
  color: #4338ca;
}

.view-supplier-modal .vs-error-banner {
  background: #fef2f2;
  color: #b91c1c;
}

.view-supplier-modal .vs-info-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px 8px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.view-supplier-modal .vs-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e7ff;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
}

.view-supplier-modal .vs-section-title i {
  color: #6366f1;
  width: 18px;
  text-align: center;
}

.view-supplier-modal .vs-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.view-supplier-modal .vs-field-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  min-height: 72px;
}

.view-supplier-modal .vs-field-box.vs-full-width,
.view-supplier-modal .vs-full-width {
  grid-column: 1 / -1;
}

.view-supplier-modal .vs-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.view-supplier-modal .vs-field-value {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.view-supplier-modal .vs-subsection-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 4px 0 10px;
}

.view-supplier-modal .vs-products-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.view-supplier-modal .vs-product-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.view-supplier-modal .vs-product-name {
  font-weight: 600;
  color: #0f172a;
}

.view-supplier-modal .vs-product-type {
  color: #4f46e5;
  font-weight: 600;
}

.view-supplier-modal .vs-product-spec {
  color: #64748b;
  font-style: italic;
}

.view-supplier-modal .vs-product-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid #ddd;
}

.view-supplier-modal .vs-product-tab {
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #333;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
}

.view-supplier-modal .vs-product-tab.active {
  background: #2e7d32;
  color: #fff;
  font-weight: 600;
  border-bottom-color: #2e7d32;
}

.view-supplier-modal .vs-empty-products {
  padding: 16px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.view-supplier-modal .vs-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 14px;
}

.view-supplier-modal .vs-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.view-supplier-modal .vs-data-table th,
.view-supplier-modal .vs-data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.view-supplier-modal .vs-data-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.view-supplier-modal .vs-data-table tr:last-child td {
  border-bottom: none;
}

.view-supplier-modal .vs-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 28px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.view-supplier-modal .vs-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.view-supplier-modal .vs-close-btn:hover {
  background: #4338ca;
}

@media (max-width: 768px) {
  .view-supplier-modal .vs-modal-header,
  .view-supplier-modal .vs-hero-bar,
  .view-supplier-modal .vs-modal-body,
  .view-supplier-modal .vs-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .view-supplier-modal .vs-hero-meta {
    margin-left: 0;
    width: 100%;
  }

  .view-supplier-modal .vs-field-grid {
    grid-template-columns: 1fr;
  }
}

/* View Warehouse Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-warehouse-modal {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 10px 10px 0 0;
}

.modal-header h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #7f8c8d;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #e74c3c;
  color: white;
}

.warehouse-details {
  padding: 30px;
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h3 {
  color: #2c3e50;
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e1e8ed;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.detail-label {
  color: #7f8c8d;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.detail-value {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2c3e50;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  min-height: 45px;
}

.detail-value i {
  color: #3498db;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.address-text {
  word-wrap: break-word;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  padding: 20px 30px;
  border-top: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 0 0 10px 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 100px;
  justify-content: center;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 10px;
  }
  
  .view-warehouse-modal {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-header h2 {
    font-size: 20px;
  }
  
  .warehouse-details {
    padding: 20px;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .modal-actions {
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .modal-header h2 {
    font-size: 18px;
  }
  
  .detail-section h3 {
    font-size: 16px;
  }
  
  .detail-value {
    font-size: 13px;
    padding: 10px 12px;
  }
}

.accounts-location-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.accounts-location-tab {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #555;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.accounts-location-tab:hover {
  border-color: #007bff;
  color: #007bff;
}

.accounts-location-tab.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
.all-tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.all-tickets-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 0 4px 0 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.all-tickets-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.all-tickets-tab:hover {
  color: #1e293b;
}

.all-tickets-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.all-tickets-tab-content {
  min-height: 200px;
}
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
/* Accounts Dashboard Styles - Matching Sales Dashboard Style */
.accounts-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.accounts-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.accounts-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.accounts-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.accounts-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

@keyframes accountsTaskAlertBlink {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35), 0 8px 18px rgba(59, 130, 246, 0.25);
  }
}

.accounts-dashboard .accounts-metric-card.accounts-task-alert-blink {
  animation: accountsTaskAlertBlink 1s infinite ease-in-out;
}

@keyframes accountsQcRejectedAlertBlink {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35), 0 8px 18px rgba(239, 68, 68, 0.25);
  }
}

.accounts-dashboard .accounts-metric-card.accounts-qc-rejected-alert-blink {
  animation: accountsQcRejectedAlertBlink 1s infinite ease-in-out;
}

.accounts-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.accounts-metric-card-1 { --metric-color: #3b82f6; }
.accounts-metric-card-2 { --metric-color: #f59e0b; }
.accounts-metric-card-3 { --metric-color: #10b981; }
.accounts-metric-card-4 { --metric-color: #8b5cf6; }
.accounts-metric-card-5 { --metric-color: #f59e0b; cursor: pointer; }
.accounts-metric-card-6 { --metric-color: #06b6d4; cursor: pointer; }
.accounts-metric-card-7 { --metric-color: #10b981; cursor: pointer; }
.accounts-metric-card-8 { --metric-color: #3b82f6; cursor: pointer; }
.accounts-metric-card-9 { --metric-color: #10b981; cursor: pointer; }
.accounts-metric-card-10 { --metric-color: #f59e0b; cursor: pointer; }
.accounts-metric-card-11 { --metric-color: #ef4444; cursor: pointer; }
.accounts-metric-card-12 { --metric-color: #0d9488; cursor: pointer; }
.accounts-metric-card-13 { --metric-color: #6366f1; cursor: pointer; }
.accounts-metric-card-qc-rejected { --metric-color: #ef4444; cursor: pointer; }

.bg-teal {
  background: #0d9488;
}

.bg-indigo {
  background: #6366f1;
}

.bg-danger {
  background: #ef4444;
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.accounts-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.accounts-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Invoice Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / Invoice Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Quick Actions */
.accounts-quick-actions {
  margin-top: 20px;
}

.accounts-action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.accounts-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.accounts-btn-primary {
  background: #3b82f6;
  color: white;
}

.accounts-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .accounts-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .accounts-dashboard {
    padding: 15px;
  }

  .accounts-metrics-row {
    grid-template-columns: 1fr;
  }

  .accounts-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


/* AdminLTE-style stat boxes — export consignment dashboard */
.export-consignment-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 18px;
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .export-consignment-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .export-consignment-stat-row {
    grid-template-columns: 1fr;
  }
}

.export-consignment-stat-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  min-height: 132px;
}

.export-consignment-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  color: #fff;
}

.export-consignment-stat-card--total {
  background: #3c8dbc;
}

.export-consignment-stat-card--process {
  background: #00a65a;
}

.export-consignment-stat-card--transit {
  background: #f39c12;
}

.export-consignment-stat-card--complete {
  background: #e74c3c;
}

.export-consignment-stat-card__inner {
  padding: 16px 18px 8px;
  flex: 1 1;
  position: relative;
  z-index: 1;
}

.export-consignment-stat-card__inner h3 {
  margin: 0 0 6px;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  color: inherit;
}

.export-consignment-stat-card__inner p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
  line-height: 1.35;
}

.export-consignment-stat-card__icon {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 3rem;
  opacity: 0.35;
  z-index: 0;
  line-height: 1;
}

.export-consignment-stat-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.export-consignment-stat-card__footer:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
}

.export-consignment-stat-card__footer i {
  font-size: 0.85rem;
}

.export-consignment-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 12px;
}

.accounts-sales-order {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.accounts-sales-order-header {
  margin-bottom: 30px;
}

.accounts-sales-order-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.accounts-sales-order-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.9rem;
  color: #555;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.9rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #059669;
}

/* Messages */
.accounts-sales-order-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* Loading State */
.accounts-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.accounts-sales-order-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.accounts-sales-order-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.accounts-sales-order-table {
  width: 100%;
  border-collapse: collapse;
}

.accounts-sales-order-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.accounts-sales-order-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 10;
}

.accounts-sales-order-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.accounts-sales-order-table tbody tr:hover {
  background-color: #f8f9fa;
}

.accounts-sales-order-table tbody tr.payment-terms-zero-row {
  background-color: #fff4cc;
}

.accounts-sales-order-table tbody tr.payment-terms-zero-row:hover {
  background-color: #ffeeb8;
}

.accounts-sales-order-table tbody tr:last-child {
  border-bottom: none;
}

.accounts-sales-order-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Action Buttons */
.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-btn {
  background-color: #059669;
  color: white;
}

.view-btn:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.view-btn i {
  font-size: 0.8rem;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.status-badge.status-verified {
  background-color: #28a745;
  color: white;
}

.status-badge.status-final {
  background-color: #007bff;
  color: white;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: white;
}

/* ACC Status */
.acc-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.acc-status.approved {
  background-color: #28a745;
  color: white;
}

.acc-status.pending {
  background-color: #ffc107;
  color: #856404;
}

.acc-status.hold {
  background-color: #ff9800;
  color: white;
}

/* Branch from sales order no. suffix (/01 BLR, /02 GUJ, else UK) */
.sales-order-branch-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sales-order-branch-badge.sales-order-branch-uk {
  background-color: #e8f5e9;
  color: #1b5e20;
}

.sales-order-branch-badge.sales-order-branch-blr {
  background-color: #e3f2fd;
  color: #0d47a1;
}

.sales-order-branch-badge.sales-order-branch-guj {
  background-color: #fff3e0;
  color: #e65100;
}

/* Pagination */
.accounts-sales-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.9rem;
  color: #555;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #059669;
  color: #059669;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #059669;
  color: white;
  border-color: #059669;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: #999;
}

/* Empty State */
.accounts-sales-order-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accounts-sales-order-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* View Section Styles */
.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

/* Note - Separate Section */
.view-note-section {
  background-color: #f8fafc;
  padding: 16px 20px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.view-note-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.view-note-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-note-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-note-item span {
  font-size: 0.95rem;
  color: #334155;
  padding: 8px 12px;
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  min-height: 0;
}

.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 150px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

/* View Order Details Section (Legacy - keeping for backward compatibility) */
.view-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-detail-field {
  display: flex;
  flex-direction: column;
}

.view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table thead th:nth-child(1),
.view-products-table tbody td:nth-child(1) {
  width: 44px;
  text-align: center;
  white-space: nowrap;
}

.view-products-table thead th:nth-child(2),
.view-products-table tbody td:nth-child(2) {
  min-width: 180px;
  max-width: 280px;
  vertical-align: top;
  word-break: break-word;
  line-height: 1.35;
}

.view-products-table thead th:nth-child(3),
.view-products-table tbody td:nth-child(3) {
  white-space: nowrap;
}

/* DP/TP */
.view-products-table thead th:nth-child(4),
.view-products-table tbody td:nth-child(4) {
  white-space: nowrap;
}

/* Factory product name — must wrap (long strings used to overlap Currency/Qty) */
.view-products-table thead th:nth-child(5),
.view-products-table tbody td:nth-child(5) {
  min-width: 140px;
  max-width: 280px;
  /* vertical-align: top; */
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.view-products-table thead th:nth-child(6),
.view-products-table tbody td:nth-child(6) {
  white-space: nowrap;
  text-align: center;
}

.view-products-table thead th:nth-child(7),
.view-products-table tbody td:nth-child(7),
.view-products-table thead th:nth-child(8),
.view-products-table tbody td:nth-child(8),
.view-products-table thead th:nth-child(9),
.view-products-table tbody td:nth-child(9),
.view-products-table thead th:nth-child(10),
.view-products-table tbody td:nth-child(10),
.view-products-table thead th:nth-child(11),
.view-products-table tbody td:nth-child(11) {
  text-align: right;
  white-space: nowrap;
}

/* Remark */
/* .view-products-table thead th:nth-child(12),
.view-products-table tbody td:nth-child(12) {
  min-width: 80px;
  max-width: 200px;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
} */

.view-products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

.no-products {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.view-modal-footer .close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-modal-footer .close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Verify Button */
.verify-btn {
  background-color: #059669;
  color: white;
}

.verify-btn:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.verify-btn i {
  font-size: 0.8rem;
}

/* Verify Modal */
.verify-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.verify-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.verify-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.verify-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
  text-transform: uppercase;
}

.verify-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.verify-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.verify-order-info {
  margin-bottom: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #059669;
}

.verify-order-id {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-id-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}

.order-details-label {
  font-size: 0.95rem;
  color: #666;
  font-weight: 500;
}

.verify-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.verify-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.verify-form-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.verify-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.verify-select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.verify-textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: white;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.verify-textarea:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.verify-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.verify-close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verify-close-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.verify-close-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.verify-update-btn {
  padding: 12px 30px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.verify-update-btn:hover:not(:disabled) {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.verify-update-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.verify-update-btn i {
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .accounts-sales-order {
    padding: 15px;
  }

  .accounts-sales-order-header h2 {
    font-size: 1.5rem;
  }

  .accounts-sales-order-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .accounts-sales-order-table {
    font-size: 0.85rem;
  }

  .accounts-sales-order-table th,
  .accounts-sales-order-table td {
    padding: 10px 12px;
  }

  .accounts-sales-order-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .view-detail-row {
    grid-template-columns: 1fr;
  }
}


.completed-sales-order {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.completed-sales-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.completed-sales-order-title {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.completed-sales-order-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #666;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.completed-sales-order-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.completed-sales-order-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.completed-sales-order-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.completed-sales-order-table thead {
  background-color: #f1f5f9;
}

.completed-sales-order-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.completed-sales-order-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.completed-sales-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.completed-sales-order-table td {
  padding: 12px 16px;
  text-align: left;
  color: #64748b;
  font-size: 0.875rem;
  vertical-align: middle;
}

.view-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.view-btn i {
  font-size: 0.875rem;
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-section {
  margin-bottom: 30px;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.view-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

/* View Order Info */
.view-order-info {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-order-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-order-info-field {
  display: flex;
  flex-direction: column;
}

.view-order-info-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-order-info-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.accounts-bill-to-details {
  margin-top: 16px;
}

.accounts-bill-to-details-title {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #1e293b;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

/* View Note Section */
.view-note-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.view-note-section label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.view-note-content {
  padding: 12px 15px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.modal-close-button {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.status-complete {
  display: inline-block;
  padding: 4px 8px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.completed-sales-order-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748b;
  font-size: 1.1rem;
}

.no-data {
  text-align: center;
  color: #94a3b8;
  padding: 40px 20px !important;
}

.completed-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.completed-sales-order-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* COA Action Buttons */
.coa-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.coa-download-btn {
  padding: 6px 12px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.coa-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.coa-download-btn.coa-one {
  background-color: #007bff;
}

.coa-download-btn.coa-one:hover {
  background-color: #0056b3;
}

.coa-download-btn.coa-two {
  background-color: #28a745;
}

.coa-download-btn.coa-two:hover {
  background-color: #1e7e34;
}

.coa-download-btn i {
  font-size: 11px;
}

.coa-no-action {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

@media(max-width: 480px){
  .completed-sales-order-controls{
    display: flex;
    flex-direction: column;
  }
}

.create-dispatch {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.create-dispatch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.create-dispatch-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 600;
}

.create-dispatch-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: #64748b;
}

.create-dispatch-header-info span:first-child {
  font-weight: 600;
}

.create-dispatch-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-dispatch-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.create-dispatch-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.create-dispatch-order-details {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.create-dispatch-invoice-files {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.create-dispatch-invoice-files-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.create-dispatch-invoice-files-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
}

.create-dispatch-invoice-files-hint {
  font-size: 0.85rem;
  color: #64748b;
}

.order-details-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.order-detail-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-detail-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

.order-detail-field span {
  font-size: 1rem;
  color: #1e293b;
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-approved {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.create-dispatch-products-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow-x: auto;
}

.create-dispatch-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.create-dispatch-products-table thead {
  background-color: #f1f5f9;
}

.create-dispatch-products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.create-dispatch-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
}

.create-dispatch-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.dispatch-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.875rem;
  width: 100%;
  min-width: 150px;
}

.dispatch-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.update-product-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-product-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.update-product-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.create-dispatch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 10px;
}

.action-buttons-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-buttons-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 100px;
  white-space: nowrap;
}

.action-btn i {
  font-size: 0.9rem;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.action-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.copy-btn {
  background-color: #6b7280;
  color: white;
  min-width: 80px;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.copy-btn:hover:not(:disabled) {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.billing-complete-btn {
  background-color: #7c3aed;
  color: white;
}

.billing-complete-btn:hover:not(:disabled) {
  background-color: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.invoice-btn {
  background-color: #059669;
  color: white;
}

.invoice-btn:hover:not(:disabled) {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.batch-btn {
  background-color: #3b82f6;
  color: white;
}

.batch-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.create-dispatch-copyright {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.875rem;
}

/* Scope button visuals to Create Dispatch to avoid global .action-btn collisions */
.create-dispatch .action-btn {
  border: none;
}

.create-dispatch .billing-complete-btn {
  background-color: #7c3aed;
  color: #fff;
}

.create-dispatch .invoice-btn {
  background-color: #059669;
  color: #fff;
}

.create-dispatch .batch-btn {
  background-color: #3b82f6;
  color: #fff;
}


.create-invoice {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.create-invoice-header {
  margin-bottom: 30px;
}

.create-invoice-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.create-invoice-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.9rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  min-width: 300px;
}

.search-input:focus {
  outline: none;
  border-color: #059669;
}

/* Error Message */
.create-invoice-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* Loading State */
.create-invoice-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.create-invoice-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Order Selection */
.create-invoice-order-selection {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.orders-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.orders-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.orders-table tbody tr:hover {
  background-color: #f8f9fa;
}

.orders-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
}

.select-order-btn {
  padding: 8px 16px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-order-btn:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.create-invoice-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

/* Invoice Form */
.create-invoice-form {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

/* Order Details Section */
.invoice-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.invoice-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.invoice-detail-field {
  display: flex;
  flex-direction: column;
}

.invoice-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.invoice-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.status-badge.status-verified {
  background-color: #28a745;
  color: white;
}

.status-badge.status-approved {
  background-color: #28a745;
  color: white;
}

.status-badge.status-final {
  background-color: #007bff;
  color: white;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: white;
}

/* Products Table */
.invoice-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.invoice-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1200px;
}

.invoice-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.invoice-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.invoice-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.invoice-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.invoice-products-table tbody tr:last-child {
  border-bottom: none;
}

.invoice-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.invoice-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  transition: border-color 0.3s ease;
}

.invoice-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.invoice-product-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.update-product-btn {
  padding: 6px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.update-product-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.packing-link {
  color: #007bff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.packing-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Note Section */
.invoice-note {
  margin-bottom: 20px;
  padding: 15px 20px;
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  border-radius: 4px;
}

.invoice-note-text {
  margin: 0;
  color: #155724;
  font-size: 0.95rem;
  line-height: 1.5;
}

.invoice-note-text strong {
  font-weight: 600;
}

/* Copyright */
.invoice-copyright {
  text-align: left;
  padding: 10px 0;
  border-top: 1px solid #e9ecef;
  margin-top: 20px;
  margin-bottom: 20px;
}

.invoice-copyright p {
  margin: 0;
  color: #999;
  font-size: 0.85rem;
}

/* Invoice Actions */
.invoice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.back-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .create-invoice {
    padding: 15px;
  }

  .create-invoice-header h2 {
    font-size: 1.5rem;
  }

  .create-invoice-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    min-width: 100%;
  }

  .invoice-detail-row {
    grid-template-columns: 1fr;
  }

  .invoice-products-table {
    font-size: 0.85rem;
  }

  .invoice-product-actions {
    flex-direction: column;
    align-items: stretch;
  }
}


.dispatched-sales-order {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.dispatched-sales-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.dispatched-sales-order-title {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.dispatched-sales-order-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #666;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dispatched-sales-order-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dispatched-sales-order-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.dispatched-sales-order-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.dispatched-sales-order-table thead {
  background-color: #f1f5f9;
}

.dispatched-sales-order-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.dispatched-sales-order-table th.sortable-header {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition: background-color 0.2s;
}

.dispatched-sales-order-table th.sortable-header:hover {
  background-color: #e2e8f0;
}

.dispatched-sales-order-table th.sortable-header span {
  margin-right: 6px;
}

.dispatched-sales-order-table th.sortable-header i {
  font-size: 0.75rem;
  color: #3b82f6;
}

.dispatched-sales-order-table th.sortable-header i.sort-inactive {
  color: #94a3b8;
  opacity: 0.7;
}

.dispatched-sales-order-table th.sortable-header:hover i.sort-inactive {
  opacity: 1;
}

.dispatched-sales-order-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.dispatched-sales-order-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Urgent highlight for ADVANCE rows (payment_terms = 0) */
.dispatched-sales-order-table tbody tr.payment-terms-zero-row {
  background-color: #ffe4e6;
}

.dispatched-sales-order-table tbody tr.payment-terms-zero-row td {
  background-color: #ffe4e6;
  border-top: 1px solid #fecdd3;
  border-bottom: 1px solid #fecdd3;
}

.dispatched-sales-order-table tbody tr.payment-terms-zero-row td:first-child {
  box-shadow: inset 5px 0 0 #dc2626;
}

.dispatched-sales-order-table tbody tr.payment-terms-zero-row:hover,
.dispatched-sales-order-table tbody tr.payment-terms-zero-row:hover td {
  background-color: #fecdd3;
}

.dispatched-sales-order-table td {
  padding: 12px 16px;
  color: #334155;
  font-size: 0.875rem;
}

.no-data {
  text-align: center;
  padding: 40px !important;
  color: #64748b;
  font-style: italic;
}

.view-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.view-btn i {
  font-size: 0.8rem;
}

.send-mail-select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.875rem;
  background-color: white;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.send-mail-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-mail-select:hover {
  border-color: #94a3b8;
}

.dispatched-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.dispatched-sales-order-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.view-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

/* View Order Info */
.view-order-info {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-order-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-order-info-field {
  display: flex;
  flex-direction: column;
}

.view-order-info-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-order-info-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.accounts-bill-to-details {
  margin-top: 16px;
}

.accounts-bill-to-details-title {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #1e293b;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

/* View Note Section */
.view-note-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.view-note-section label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.view-note-content {
  padding: 12px 15px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.modal-close-button {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* COA Action (aligned with Completed Sales Orders modal) */
.status-complete {
  display: inline-block;
  padding: 4px 8px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  display: inline-block;
  padding: 4px 8px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.coa-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.coa-download-btn {
  padding: 6px 12px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.coa-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.coa-download-btn.coa-one {
  background-color: #007bff;
}

.coa-download-btn.coa-one:hover {
  background-color: #0056b3;
}

.coa-download-btn.coa-two {
  background-color: #28a745;
}

.coa-download-btn.coa-two:hover {
  background-color: #1e7e34;
}

.coa-download-btn i {
  font-size: 11px;
}

.coa-no-action {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.dispatched-sales-order-table .expand-col {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}

.invoice-expand-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: #2563eb;
  border-radius: 4px;
  line-height: 1;
}

.invoice-expand-btn:hover {
  background-color: #eff6ff;
}

.invoice-expand-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 0;
}

.invoice-breakdown-row td {
  border-top: none;
}

.invoice-breakdown-cell {
  background: #f8fafc;
  padding: 12px 16px;
  vertical-align: top;
}

.invoice-breakdown-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 0.9rem;
}

.invoice-breakdown-error {
  color: #b91c1c;
  font-size: 0.9rem;
}

.invoice-breakdown-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.invoice-breakdown-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.invoice-breakdown-group-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #334155;
}

.invoice-breakdown-products {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.invoice-breakdown-products th {
  text-align: left;
  padding: 8px 10px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
}

.invoice-breakdown-products td {
  padding: 8px 10px;
  border-top: 1px solid #e2e8f0;
}

.freight-history-cell {
  max-width: 220px;
  white-space: normal;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.4;
}

.freight-history-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: #475569;
  font-size: 0.9rem;
}

.freight-history-list li + li {
  margin-top: 0.35rem;
}

.freight-history-modal-block {
  width: 100%;
}

@media(max-width: 480px){
  .dispatched-sales-order-controls{
    display: flex;
    flex-direction: column;
  }
}
.sales-billing-order {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.sales-billing-order-header {
  margin-bottom: 30px;
}

.sales-billing-order-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.sales-billing-order-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.9rem;
  color: #555;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.9rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sales-billing-order-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sales-billing-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.sales-billing-order-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sales-billing-order-table-container {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.sales-billing-order-table {
  width: 100%;
  border-collapse: collapse;
  /* min-width: 1400px; */
}

.sales-billing-order-table thead {
  background-color: #f1f5f9;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sales-billing-order-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.sales-billing-order-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
}

.sales-billing-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-approved {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge.status-final {
  background-color: #dbeafe;
  color: #1e40af;
}

.acc-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.acc-status.approved {
  background-color: #d1fae5;
  color: #065f46;
}

.acc-status.pending {
  background-color: #fef3c7;
  color: #92400e;
}

.acc-status.hold {
  background-color: #fee2e2;
  color: #991b1b;
}

.acc-status.final {
  background-color: #d1fae5;
  color: #065f46;
}

.acc-status.acc-status-final {
  background-color: transparent;
  color: #059669;
  font-weight: 600;
  text-transform: none;
  margin-left: 2px;
}

.sales-order-branch-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sales-order-branch-badge.sales-order-branch-uk {
  background-color: #e8f5e9;
  color: #1b5e20;
}

.sales-order-branch-badge.sales-order-branch-blr {
  background-color: #e3f2fd;
  color: #0d47a1;
}

.sales-order-branch-badge.sales-order-branch-guj {
  background-color: #fff3e0;
  color: #e65100;
}

.proceed-dispatch-btn {
  background-color: #059669;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.proceed-dispatch-btn:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.proceed-dispatch-btn i {
  font-size: 0.875rem;
}

.sales-billing-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #64748b;
}

.sales-billing-order-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sales-billing-order-empty p {
  color: #64748b;
  font-size: 1.1rem;
}

/* Actions column - buttons in a row */
.sales-billing-order-table td:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Print Button */
.print-btn {
  background-color: #059669;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.print-btn:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.print-btn i {
  font-size: 0.875rem;
}

/* View Button */
.view-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.view-btn i {
  font-size: 0.875rem;
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

/* View Section Styles (same as AccountsSalesOrder) */
.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 150px;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.view-note-section {
  background-color: #f8fafc;
  padding: 16px 20px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.view-note-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.view-note-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-note-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-note-item span {
  font-size: 0.95rem;
  color: #334155;
  padding: 10px 12px;
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

/* Order Details Section in View Modal (legacy) */
.view-order-details-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.view-order-details-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}

.view-order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px 24px;
  gap: 12px 24px;
}

.view-order-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.view-order-detail-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.view-order-detail-value {
  font-size: 0.9rem;
  color: #333;
}

.view-order-note-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.view-order-note-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.view-order-note-item:last-child {
  margin-bottom: 0;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.view-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

.view-billing-qty-rate-notice {
  margin: 0 0 12px 0;
  padding: 10px 14px;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 6px;
  color: #1565c0;
  font-size: 0.9rem;
}

.view-billing-qty-rate-notice i {
  margin-right: 8px;
}

.view-billing-qty-rate-input {
  width: 100px;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
}

.view-billing-qty-rate-input:disabled {
  background: #e9ecef;
  cursor: not-allowed;
}

.view-billing-save-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.view-billing-save-btn:hover:not(:disabled) {
  background: #2563eb;
}

.view-billing-save-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.view-billing-locked-label {
  font-size: 0.85rem;
  color: #64748b;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.modal-close-button {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}


/* Page layout */
.all-tickets-page {
  padding: 20px 24px;
  max-width: 100%;
  background: #f8fafc;
  min-height: calc(100vh - 100px);
}

.all-tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.all-tickets-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.all-tickets-create-btn {
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.all-tickets-create-btn:hover {
  background: #1d4ed8;
  color: #fff;
}

/* Tabs */
.all-tickets-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.all-tickets-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.all-tickets-tab:hover {
  color: #334155;
}

.all-tickets-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

.all-tickets-tab i {
  font-size: 13px;
}

.all-tickets-tab-content {
  min-height: 200px;
}

/* Status & loading */
.all-tickets-error {
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  font-size: 14px;
}

.all-tickets-empty {
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
  font-size: 15px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.all-tickets-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.all-tickets-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: all-tickets-spin 0.7s linear infinite;
  margin-bottom: 12px;
}

@keyframes all-tickets-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Table */
.all-tickets-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.all-tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.all-tickets-table th,
.all-tickets-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.all-tickets-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.all-tickets-th-sno,
.all-tickets-td-sno {
  width: 56px;
  min-width: 56px;
  text-align: center;
  white-space: nowrap;
}

.all-tickets-table tbody tr:hover {
  background: #f8fafc;
}

.all-tickets-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.all-tickets-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.all-tickets-status-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.all-tickets-status-open {
  background: #dbeafe;
  color: #1d4ed8;
}

.all-tickets-status-in_progress,
.all-tickets-status-inprogress {
  background: #fef3c7;
  color: #b45309;
}

.all-tickets-status-resolved,
.all-tickets-status-closed {
  background: #dcfce7;
  color: #15803d;
}

.all-tickets-status-on_hold {
  background: #f3e8ff;
  color: #7c3aed;
}

.all-tickets-status-cancelled,
.all-tickets-status-rejected {
  background: #fee2e2;
  color: #dc2626;
}

/* Action buttons and modals for ticket views */
.all-tickets-th-actions,
.all-tickets-td-actions {
  width: 180px;
  text-align: center;
}

.pv-ticket-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0 2px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pv-ticket-view {
  background: #dbeafe;
  color: #1d4ed8;
}

.pv-ticket-view:hover {
  background: #2563eb;
  color: #fff;
}

.pv-ticket-close {
  background: #fee2e2;
  color: #dc2626;
}

.pv-ticket-close:hover {
  background: #dc2626;
  color: #fff;
}

.pv-ticket-resolve {
  background: #d1fae5;
  color: #047857;
}

.pv-ticket-resolve:hover {
  background: #059669;
  color: #fff;
}

.pv-ticket-reopen {
  background: #dcfce7;
  color: #15803d;
}

.pv-ticket-reopen:hover {
  background: #15803d;
  color: #fff;
}

.pv-ticket-status {
  background: #fef3c7;
  color: #b45309;
}

.pv-ticket-status:hover {
  background: #d97706;
  color: #fff;
}

.pv-ticket-reassign {
  background: #e0e7ff;
  color: #4338ca;
}

.pv-ticket-reassign:hover {
  background: #4338ca;
  color: #fff;
}

.pv-ticket-comment {
  background: #f3e8ff;
  color: #7c3aed;
}

.pv-ticket-comment:hover {
  background: #7c3aed;
  color: #fff;
}

.pv-ticket-btn:disabled,
.pv-ticket-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.all-tickets-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.all-tickets-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.all-tickets-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.all-tickets-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.all-tickets-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
}

.all-tickets-modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.all-tickets-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.all-tickets-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px 24px;
  gap: 12px 24px;
}

.all-tickets-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.all-tickets-detail-row-full {
  grid-column-start: 1;
  grid-column-end: -1;
}

.all-tickets-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.all-tickets-detail-value {
  font-size: 14px;
  color: #1e293b;
}

.all-tickets-detail-description {
  white-space: pre-wrap;
  line-height: 1.5;
}

.all-tickets-detail-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #1e293b;
}

.pv-action-modal .all-tickets-modal-body {
  min-width: 360px;
}

.pv-action-field {
  margin-bottom: 16px;
}

.pv-action-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.pv-action-field input,
.pv-action-field select,
.pv-action-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
}

.pv-action-field textarea {
  resize: vertical;
  min-height: 80px;
}

.pv-action-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.pv-action-cancel {
  padding: 8px 16px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.pv-action-cancel:hover {
  background: #e2e8f0;
}

.pv-action-submit {
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.pv-action-submit:hover:not(:disabled) {
  background: #1d4ed8;
}

.pv-action-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.pv-add-comment-row .pv-action-field {
  margin-top: 8px;
}

.pv-add-comment-btn {
  margin-top: 10px;
}

.pv-comment-textarea {
  width: 100%;
  resize: vertical;
  margin-bottom: 4px;
}

.pv-action-field label.required::after {
  content: ' *';
  color: #dc2626;
}

.all-tickets-status-reopened {
  background: #fef3c7;
  color: #b45309;
}

.pv-comment-item {
  margin-bottom: 8px;
}

.pv-comment-author {
  font-weight: 600;
  color: #334155;
}

.all-tickets-assign-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.all-tickets-assign-history-table th,
.all-tickets-assign-history-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.all-tickets-assign-history-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.all-tickets-assign-history-label-icon {
  margin-right: 6px;
  color: #4338ca;
}

.all-tickets-assign-history-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.all-tickets-assign-history-action-icon {
  color: #4338ca;
  font-size: 12px;
}

.add-planning-consignment {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
  }
  
  .company-name {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
  }
  
  .dispatch-info {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
  }
  
  .planning-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
  }
  
  .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
  }
  
  .form-input,
  .form-select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-input:focus,
  .form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  }
  
  .form-input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
  }
  
  .remark-group {
    grid-column: span 2;
  }
  
  .remark-input-container {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .remark-input {
    flex: 1 1;
    padding-right: 60px;
  }
  
  .remark-icons {
    position: absolute;
    right: 10px;
    display: flex;
    gap: 8px;
  }
  
  .remark-icon {
    width: 24px;
    height: 24px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .remark-icon:hover {
    background: #218838;
  }
  
  .form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-start;
  }
  
  .save-product-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .save-product-btn:hover:not(:disabled) {
    background: #0056b3;
  }
  
  .save-product-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
  }
  
  .error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
  }
  
  .success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .form-row {
      grid-template-columns: 1fr;
    }
    
    .remark-group {
      grid-column: span 1;
    }
    
    .header-section {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
    
    .company-name {
      font-size: 20px;
    }
    
    .dispatch-info {
      font-size: 14px;
    }
  }
  
  @media (max-width: 480px) {
    .add-planning-consignment {
      padding: 15px;
    }
    
    .planning-form {
      padding: 20px 15px;
    }
    
    .form-row {
      gap: 15px;
    }
    
    .save-product-btn {
      width: 100%;
      padding: 15px;
    }
  }
  
  /* Products List Section */
  .consignment-products-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    overflow: hidden;
  }
  
  .consignment-products-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
  }
  
  .consignment-products-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
  }
  
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .no-products {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
  }
  
  .products-table-container {
    overflow-x: auto;
  }
  
  .products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  
  .products-table thead {
    background: #f8f9fa;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .products-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    font-size: 13px;
  }
  
  .products-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
    font-size: 13px;
  }
  
  .products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .product-name-cell {
    max-width: 200px;
    word-wrap: break-word;
    line-height: 1.4;
  }
  
  .quantity-cell {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
  }
  
  .remark-cell {
    max-width: 150px;
    word-wrap: break-word;
  }
  
  .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
  }
  
  .status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }
  
  .status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
  
  .status-in_progress {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b3d7ff;
  }
  
  .status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
  }
  
  /* Action Column Styles */
  .action-cell {
    text-align: center;
    white-space: nowrap;
    min-width: 100px;
  }
  
  .action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
  }
  
  .edit-btn,
  .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
  }
  
  .edit-btn {
    background-color: #e3f2fd;
    color: #1976d2;
  }
  
  .edit-btn:hover:not(:disabled) {
    background-color: #bbdefb;
    transform: scale(1.1);
  }
  
  .edit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .delete-btn {
    background-color: #ffebee;
    color: #d32f2f;
  }
  
  .delete-btn:hover:not(:disabled) {
    background-color: #ffcdd2;
    transform: scale(1.1);
  }
  
  .delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* Edit Mode Styles */
  .edit-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
  }
  
  .save-edit-btn,
  .cancel-edit-btn {
    background: none;
    border: 1px solid #ced4da;
    cursor: pointer;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 600;
    min-width: 40px;
    min-height: 32px;
  }
  
  .save-edit-btn {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
  }
  
  .save-edit-btn:hover:not(:disabled) {
    background-color: #218838;
    border-color: #1e7e34;
    transform: scale(1.05);
  }
  
  .save-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .cancel-edit-btn {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
  }
  
  .cancel-edit-btn:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #bd2130;
    transform: scale(1.05);
  }
  
  .cancel-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .edit-qty-input {
    width: 80px;
    padding: 4px 8px;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
  }
  
  .edit-qty-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  }
  
  /* Responsive adjustments for products table */
  @media (max-width: 1200px) {
    .products-table {
      font-size: 12px;
    }
    
    .products-table th,
    .products-table td {
      padding: 8px 6px;
    }
    
    .product-name-cell {
      max-width: 150px;
    }
  }
  
  @media (max-width: 768px) {
    .products-table-container {
      font-size: 11px;
    }
    
    .products-table th,
    .products-table td {
      padding: 6px 4px;
    }
    
    .product-name-cell {
      max-width: 120px;
    }
    
    .remark-cell {
      max-width: 100px;
    }
    
    .status-badge {
      font-size: 10px;
      padding: 2px 6px;
    }
    
    .consignment-products-header h3 {
      font-size: 16px;
    }
  }
  
  @media (max-width: 480px) {
    .consignment-products-header {
      padding: 10px 15px;
    }
    
    .consignment-products-header h3 {
      font-size: 14px;
    }
    
    .products-table th,
    .products-table td {
      padding: 4px 2px;
    }
    
    .product-name-cell {
      max-width: 80px;
    }
    
    .quantity-cell {
      font-size: 10px;
    }
    
    .action-buttons,
    .edit-actions {
      gap: 4px;
    }
    
    .edit-btn,
    .delete-btn,
    .save-edit-btn,
    .cancel-edit-btn {
      min-width: 28px;
      min-height: 28px;
      font-size: 14px;
      padding: 2px 4px;
    }
    
    .edit-qty-input {
      width: 60px;
      font-size: 11px;
      padding: 2px 4px;
    }
  }
  
  /* Status Action Buttons */
  .consignment-status-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
  }
  
  .status-action-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .forward-to-qc-btn {
    background-color: #007bff;
    color: white;
  }
  
  .forward-to-qc-btn:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  .forward-to-qc-btn.forwarded {
    background-color: #28a745;
    color: white;
  }
  
  .forward-to-qc-btn.forwarded:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .forward-to-logistic-btn {
    background-color: #007bff;
    color: white;
  }
  
  .forward-to-logistic-btn:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  .forward-to-logistic-btn.forwarded {
    background-color: #28a745;
    color: white;
  }
  
  .forward-to-logistic-btn.forwarded:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .status-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  .status-action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
  }
  
  /* Responsive adjustments for status buttons */
  @media (max-width: 768px) {
    .consignment-status-actions {
      flex-direction: column;
      gap: 10px;
    }
  
    .status-action-btn {
      width: 100%;
      min-width: auto;
      padding: 14px 20px;
      font-size: 14px;
    }
  }
  
  @media (max-width: 480px) {
    .status-action-btn {
      padding: 12px 15px;
      font-size: 13px;
    }
  }
  
  /* Confirmation Modal Styles */
  .confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  .confirm-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 1200px;
    width: 95%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
  }
  
  @keyframes modalSlideIn {
    from {
      opacity: 0;
      transform: translateY(-20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  .confirm-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
  }
  
  .confirm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .confirm-modal-header h3::before {
    content: '⚠️';
    font-size: 24px;
  }
  
  .confirm-modal-body {
    padding: 30px 24px;
    text-align: center;
  }
  
  .confirm-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
  }
  
  .confirm-icon i {
    font-size: 36px;
    color: #856404;
  }
  
  .confirm-message {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.5;
  }
  
  .confirm-details {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
  }
  
  .confirm-details strong {
    color: #007bff;
    font-weight: 600;
  }
  
  .confirm-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8f9fa;
  }
  
  .confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
  }
  
  .confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .cancel-btn {
    background: #6c757d;
    color: white;
  }
  
  .cancel-btn:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }
  
  .confirm-action-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
  }
  
  .confirm-action-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
  }
  
  /* Responsive adjustments for modal */
  @media (max-width: 480px) {
    .confirm-modal-content {
      max-width: 100%;
      margin: 10px;
    }
  
    .confirm-modal-header h3 {
      font-size: 18px;
    }
  
    .confirm-message {
      font-size: 16px;
    }
  
    .confirm-modal-footer {
      flex-direction: column-reverse;
    }
  
    .confirm-btn {
      width: 100%;
    }
  }
  
.global-consignment-modal-open {
  overflow: hidden;
}

.global-consignment-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
}

.global-consignment-modal-content {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.global-consignment-modal-content h3 {
  margin: 0 0 12px;
}

.global-consignment-modal-body {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

/* Global Consignment View Ticket - inherits from ViewTicketsWithActions */
.global-consignment-main-content .all-tickets-page {
  padding: 20px 15px;
}

@media (max-width: 768px) {
  .global-consignment-main-content .all-tickets-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .global-consignment-main-content .all-tickets-tabs {
    flex-wrap: wrap;
  }

  .global-consignment-main-content .all-tickets-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* HR View Ticket - inherits from ViewTicketsWithActions, section-specific overrides if needed */
.hr-main-content .all-tickets-page {
  padding: 20px 15px;
}

@media (max-width: 768px) {
  .hr-main-content .all-tickets-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hr-main-content .all-tickets-tabs {
    flex-wrap: wrap;
  }

  .hr-main-content .all-tickets-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* IT View Ticket - uses shared ViewTicketsWithActions styles */
.it-main-content .all-tickets-page {
  padding: 20px 24px;
  max-width: 100%;
}

@media (max-width: 768px) {
  .it-main-content .all-tickets-page {
    padding: 15px 12px;
  }
}

.it-product-merge {
  padding: 20px;
  max-width: 1200px;
}

.it-product-merge-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #0f172a;
}

.it-product-merge-header p {
  margin: 0 0 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.it-product-merge-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.it-product-merge-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #1e293b;
}

.it-product-merge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.it-product-merge-field {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.it-product-merge-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.it-product-merge-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
}

.it-product-merge-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.it-product-merge-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.it-product-merge-dropdown-item:hover,
.it-product-merge-dropdown-item.active {
  background: #eff6ff;
}

.it-product-merge-dropdown-item .code {
  color: #64748b;
  font-size: 0.8rem;
}

.it-product-merge-selected {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334155;
}

.it-product-merge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.it-product-merge-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.it-product-merge-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.it-product-merge-btn-primary {
  background: #2563eb;
  color: #fff;
}

.it-product-merge-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.it-product-merge-btn-danger {
  background: #dc2626;
  color: #fff;
}

.it-product-merge-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.it-product-merge-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.it-product-merge-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.9rem;
}

.it-product-merge-success {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #047857;
  font-size: 0.9rem;
}

.it-product-merge-table-wrap {
  overflow-x: auto;
}

.it-product-merge-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.it-product-merge-table th,
.it-product-merge-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.it-product-merge-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.it-product-merge-table tr.has-matches {
  background: #f0fdf4;
}

.it-product-merge-badge {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
}

.it-product-merge-badge.zero {
  background: #f1f5f9;
  color: #94a3b8;
}

.it-product-merge-sample {
  font-size: 0.8rem;
  color: #64748b;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.it-product-merge-replace-preview {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}

.it-product-merge-replace-title {
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.it-product-merge-replace-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.it-product-merge-replace-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9a3412;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.it-product-merge-replace-old {
  color: #b91c1c;
  text-decoration: line-through;
  margin-right: 6px;
  word-break: break-word;
}

.it-product-merge-replace-arrow {
  margin: 0 6px;
  color: #64748b;
  font-weight: 700;
}

.it-product-merge-replace-new {
  color: #047857;
  font-weight: 700;
  word-break: break-word;
}

.it-product-merge-replace-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: #7c2d12;
}

.it-so-admin {
  padding: 20px;
}

.it-so-admin-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #0f172a;
}

.it-so-admin-header p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 0.9rem;
}

.it-so-admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.it-so-admin-tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.it-so-admin-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.it-so-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.it-so-admin-toolbar input[type='search'] {
  flex: 1 1 280px;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
}

.it-so-admin-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.it-so-admin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.it-so-admin-btn-primary {
  background: #2563eb;
  color: #fff;
}

.it-so-admin-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.it-so-admin-btn-edit {
  background: #3b82f6;
  color: #fff;
  padding: 6px 10px;
  margin-right: 6px;
}

.it-so-admin-btn-delete {
  background: #ef4444;
  color: #fff;
  padding: 6px 10px;
}

.it-so-admin-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
}

.it-so-admin-success {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #047857;
}

.it-so-admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.it-so-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.it-so-admin-table th,
.it-so-admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.it-so-admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.it-so-admin-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: #475569;
}

.it-so-admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.it-so-admin-modal {
  background: #fff;
  border-radius: 12px;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 20px 22px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.it-so-admin-modal h3 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.it-so-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.it-so-admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.it-so-admin-form-grid input,
.it-so-admin-form-grid select,
.it-so-admin-form-grid textarea {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
}

.it-so-admin-form-grid textarea {
  min-height: 70px;
  grid-column: 1 / -1;
}

.it-so-admin-form-grid input.it-so-admin-readonly,
.it-so-admin-form-grid input:disabled,
.it-so-admin-form-grid select:disabled,
.it-so-admin-form-grid textarea:disabled {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}

.it-so-admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.it-sample-report {
  padding: 20px;
}

.it-sample-report-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #0f172a;
}

.it-sample-report-header p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 0.9rem;
}

.it-sample-report-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.it-sample-report-tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.it-sample-report-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.it-sample-report-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 14px;
  align-items: end;
}

.it-sample-report-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.it-sample-report-field select,
.it-sample-report-field input[type='date'] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

.it-sample-report-user-field {
  position: relative;
}

.it-sample-report-user-select {
  position: relative;
}

.it-sample-report-user-trigger {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  color: #0f172a;
}

.it-sample-report-user-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.it-sample-report-user-trigger.open,
.it-sample-report-user-trigger:focus-visible {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.it-sample-report-user-placeholder {
  color: #94a3b8;
}

.it-sample-report-user-trigger i {
  color: #64748b;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.it-sample-report-user-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 20;
  overflow: hidden;
}

.it-sample-report-user-search-wrap {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.it-sample-report-user-search-wrap input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
}

.it-sample-report-user-search-wrap input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.it-sample-report-user-options {
  max-height: 240px;
  overflow-y: auto;
}

.it-sample-report-user-option {
  width: 100%;
  border: none;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.it-sample-report-user-option:hover {
  background: #f8fafc;
}

.it-sample-report-user-option.selected {
  background: #eff6ff;
  color: #1d4ed8;
}

.it-sample-report-user-option i {
  color: #2563eb;
  font-size: 0.8rem;
}

.it-sample-report-user-empty {
  padding: 16px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.it-sample-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.it-sample-report-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.it-sample-report-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.it-sample-report-btn-primary {
  background: #2563eb;
  color: #fff;
}

.it-sample-report-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.it-sample-report-btn-success {
  background: #16a34a;
  color: #fff;
}

.it-sample-report-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.9rem;
}

.it-sample-report-success {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 0.9rem;
}

.it-sample-report-meta {
  margin-bottom: 10px;
  color: #475569;
  font-size: 0.9rem;
}

.it-sample-report-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.it-sample-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.it-sample-report-table th,
.it-sample-report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.it-sample-report-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
}

.it-sample-report-table tbody tr:hover {
  background: #f8fafc;
}

.it-sample-report-empty {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
}

.it-sample-report-loading {
  padding: 28px 16px;
  text-align: center;
  color: #475569;
}

.internal-sample-page {
  padding: 20px;
}

.internal-sample-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #0f172a;
}

.internal-sample-header p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 0.9rem;
}

.internal-sample-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.internal-sample-tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.internal-sample-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.internal-sample-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.internal-sample-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.internal-sample-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.internal-sample-field input,
.internal-sample-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

.internal-sample-field-wide {
  grid-column: 1 / -1;
}

.internal-sample-field input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.internal-sample-picker {
  position: relative;
}

.internal-sample-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.internal-sample-picker-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.9rem;
}

.internal-sample-picker-option:hover {
  background: #f1f5f9;
}

.internal-sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.internal-sample-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.internal-sample-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.internal-sample-btn-primary {
  background: #2563eb;
  color: #fff;
}

.internal-sample-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.internal-sample-btn-warning {
  background: #f59e0b;
  color: #fff;
}

.internal-sample-btn-edit {
  background: #3b82f6;
  color: #fff;
  padding: 6px 10px;
  margin-right: 6px;
}

.internal-sample-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.9rem;
}

.internal-sample-success {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 0.9rem;
}

.internal-sample-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.internal-sample-toolbar input[type='search'] {
  flex: 1 1 280px;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
}

.internal-sample-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.internal-sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.internal-sample-table th,
.internal-sample-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.internal-sample-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
}

.internal-sample-table tbody tr:hover {
  background: #f8fafc;
}

.internal-sample-empty,
.internal-sample-loading {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
}

.internal-sample-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.internal-sample-pagination button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

.internal-sample-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.internal-sample-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.internal-sample-badge-yes {
  background: #dcfce7;
  color: #166534;
}

.internal-sample-badge-no {
  background: #f1f5f9;
  color: #475569;
}

.internal-sample-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.internal-sample-modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
  overflow: visible;
}

.internal-sample-modal .internal-sample-picker-dropdown {
  z-index: 1100;
}

.internal-sample-modal h3 {
  margin: 0 0 14px;
}

.internal-sample-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.internal-sample-retest-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.internal-sample-retest-yes {
  color: #7c3aed;
}

.internal-sample-retest-no {
  color: #64748b;
}

.internal-sample-btn-retest {
  background: #7c3aed;
  color: #fff;
  border: none;
  margin-left: 6px;
}

.internal-sample-btn-retest:hover:not(:disabled) {
  background: #6d28d9;
}

.internal-sample-btn-retest:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.internal-sample-btn-retest i {
  margin-right: 4px;
}

.internal-sample-btn-view {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 6px 10px;
  min-width: 36px;
}

.internal-sample-btn-view:hover:not(:disabled) {
  background: #1d4ed8;
}

.internal-sample-remark-cell {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.internal-sample-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.internal-sample-status-approved {
  background: #dcfce7;
  color: #166534;
}

.internal-sample-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.internal-sample-status-retest {
  background: #ede9fe;
  color: #6d28d9;
}

.internal-sample-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.internal-sample-view-modal {
  width: min(1200px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
}

.internal-sample-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.internal-sample-view-header h3 {
  margin: 0;
}

.internal-sample-view-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.internal-sample-view-close:hover {
  color: #0f172a;
}

.internal-sample-view-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px 16px;
  gap: 12px 16px;
}

.internal-sample-view-item-wide {
  grid-column: 1 / -1;
}

.internal-sample-view-item label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.internal-sample-view-item p {
  margin: 0;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}

.internal-sample-reject-reason {
  color: #991b1b;
  font-weight: 600;
}

@media (max-width: 640px) {
  .internal-sample-view-grid {
    grid-template-columns: 1fr;
  }
}


.view-products-table-sales-complete-order{
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1000px;
  }
  
  .view-products-table-sales-complete-order thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .view-products-table-sales-complete-order th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .view-products-table-sales-complete-order tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .view-products-table-sales-complete-ordert body tr:hover {
    background-color: #f8f9fa;
  }
  
  .view-products-table-sales-complete-order tbody tr:last-child {
    border-bottom: none;
  }
  
  .view-products-table-sales-complete-order td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }
  
  .view-products-table-sales-complete-order tfoot {
    background-color: #e9ecef;
    border-top: 2px solid #dee2e6;
  }
  
  .view-products-table-sales-complete-order tfoot td {
    font-weight: 600;
    color: #333;
  }

  .complete-so-eway-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
  }

  .complete-so-eway-section > label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
  }

  .complete-so-eway-upload-cell {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 140px;
  }

  .complete-so-eway-file-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }

  .complete-so-eway-file-row a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.85rem;
  }

  .complete-so-eway-file-row a:hover {
    text-decoration: underline;
  }

  .complete-so-mail-attach-checkbox {
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
  }

  .complete-so-mail-attach-checkbox input {
    margin: 0;
    cursor: pointer;
  }

  .complete-so-invoice-mail-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 140px;
    max-width: 220px;
  }

  .complete-so-invoice-mail-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
    text-decoration: none;
    flex-shrink: 0;
  }

  .complete-so-invoice-mail-name {
    font-size: 0.75rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
  }

  .complete-so-invoice-mail-empty {
    font-size: 0.75rem;
    color: #94a3b8;
  }

  .complete-so-eway-remove-btn {
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
  }

  .complete-so-eway-remove-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .complete-so-eway-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: -webkit-fit-content;
    width: fit-content;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
  }

  .complete-so-eway-upload-btn:hover {
    background: #eef2ff;
    border-color: #93c5fd;
  }

  .complete-so-invoice-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
  }

  .complete-so-invoice-section > label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
  }

  .complete-so-send-mail-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }

  .complete-so-send-mail-btn:hover:not(:disabled) {
    background: #dbeafe;
  }

  .complete-so-send-mail-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .coa-send-mail-btn {
    margin-top: 0.25rem;
  }

  .complete-so-send-all-mail-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
  }

  .complete-so-mail-recipient {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 220px;
    flex: 1 1;
  }

  .complete-so-mail-recipient > label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
  }

  .complete-so-mail-recipient-value {
    display: inline-block;
    padding: 0.45rem 0.65rem;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.85rem;
  }

  .complete-so-mail-recipient-select {
    width: 100%;
    max-width: 320px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #334155;
    background: #fff;
  }

  .complete-so-send-all-mail-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }

  .view-modal-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: 0.9rem;
  }

  .view-products-table-sales-complete-order .coa-action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
  }

  .coa-action-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .coa-select-all-label {
    font-weight: normal;
    font-size: 0.75rem;
    gap: 0.35rem;
  }

  .coa-mail-attach-checkbox {
    flex-shrink: 0;
  }
  
/* Logistic Dashboard Styles - Matching Sales Dashboard Style */
.logistic-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.logistic-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.logistic-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 280px));
  grid-gap: 20px;
  gap: 20px;
  justify-content: start;
}

.logistic-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  box-sizing: border-box;
}

.logistic-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.logistic-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.logistic-metric-card-1 { --metric-color: #3b82f6; }
.logistic-metric-card-2 { --metric-color: #f59e0b; }
.logistic-metric-card-3 { --metric-color: #10b981; }
.logistic-metric-card-4 { --metric-color: #06b6d4; }
.logistic-metric-card-5 { --metric-color: #10b981; }
.logistic-metric-card-6 { --metric-color: #f59e0b; }
.logistic-metric-card-7 { --metric-color: #ef4444; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-danger {
  background: #ef4444;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.logistic-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.logistic-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Consignment Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / Consignment Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .logistic-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .logistic-dashboard {
    padding: 15px;
  }

  .logistic-metrics-row {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .logistic-metric-card {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .logistic-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
.logistics-master-page {
  padding: 0;
}

.logistics-master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.logistics-master-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #2c3e50;
}

.logistics-master-header p {
  margin: 4px 0 0;
  color: #666;
  font-size: 14px;
}

.logistics-alert {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.logistics-alert-error {
  background: #fdecea;
  color: #b71c1c;
  border: 1px solid #f5c6cb;
}

.logistics-alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
}

.logistics-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.logistics-search-input {
  min-width: 260px;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.logistics-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.logistics-btn-primary {
  background: #6c5ce7;
  color: #fff;
}

.logistics-btn-primary:hover {
  background: #5b4cdb;
  color: #fff;
}

.logistics-btn-secondary {
  background: #f1f3f5;
  color: #333;
  border-color: #dee2e6;
}

.logistics-btn-secondary:hover {
  background: #e9ecef;
  color: #333;
}

.logistics-table-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.logistics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.logistics-table th,
.logistics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.logistics-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.logistics-table tbody tr:hover {
  background: #fafbff;
}

.logistics-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.logistics-status-active {
  background: #d4edda;
  color: #155724;
}

.logistics-status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.logistics-action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.logistics-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #fff;
  color: #495057;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logistics-icon-btn.view:hover {
  background: #e9ecef;
}

.logistics-icon-btn.edit {
  background: #f0ad4e;
  border-color: #eea236;
  color: #fff;
}

.logistics-icon-btn.edit:hover {
  background: #ec971f;
}

.logistics-icon-btn.delete {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.logistics-icon-btn.delete:hover {
  background: #c82333;
}

.logistics-empty {
  padding: 40px 20px;
  text-align: center;
  color: #666;
}

.logistics-form-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 20px 24px;
}

.logistics-form-card-enhanced {
  border: 1px solid #eef1f6;
  box-shadow: 0 10px 28px rgba(44, 62, 80, 0.08);
  padding: 24px 28px;
}

.logistics-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.logistics-form-grid-first-row {
  grid-template-columns: minmax(160px, 1.1fr) minmax(140px, 0.95fr) minmax(120px, 0.75fr) minmax(220px, 1.4fr);
  align-items: start;
}

.logistics-form-group-address textarea.logistics-address-inline {
  min-height: 42px;
  resize: vertical;
}

.logistics-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logistics-form-group.full-width {
  grid-column: 1 / -1;
}

.logistics-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.logistics-form-group input,
.logistics-form-group select,
.logistics-form-group textarea {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.logistics-form-group input:focus,
.logistics-form-group select:focus,
.logistics-form-group textarea:focus {
  outline: none;
  border-color: #8c7cf4;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

.logistics-form-group textarea {
  min-height: 90px;
  resize: vertical;
}

.logistics-contacts-section {
  margin-top: 8px;
  margin-bottom: 20px;
}

.logistics-section-card {
  padding: 18px 18px 10px;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
}

.logistics-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.logistics-contacts-section h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #2c3e50;
}

.logistics-section-header p {
  margin: 0;
  color: #6c757d;
  font-size: 13px;
}

.logistics-contact-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  grid-gap: 12px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e9ecef;
}

.logistics-contact-remove-btn {
  min-width: 42px;
  justify-content: center;
  padding: 8px 10px;
}

.logistics-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.logistics-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.logistics-view-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.logistics-view-field p {
  margin: 0;
  color: #212529;
  font-size: 14px;
}

.logistics-contacts-view {
  margin-top: 20px;
}

.logistics-contacts-view table {
  width: 100%;
  border-collapse: collapse;
}

.logistics-contacts-view th,
.logistics-contacts-view td {
  padding: 10px 12px;
  border: 1px solid #e9ecef;
  font-size: 14px;
}

.logistics-contacts-view th {
  background: #f8f9fa;
}

.logistics-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.logistics-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1200;
}

.logistics-modal-content {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  padding: 20px 24px 24px;
}

.logistics-modal-content-wide {
  width: min(980px, 100%);
}

.logistics-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1f6;
}

.logistics-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #2c3e50;
}

.logistics-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  color: #495057;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logistics-modal-close:hover {
  background: #f1f3f5;
}

.logistics-modal-form {
  padding: 0;
}

.logistics-modal-view-body {
  padding: 0;
}

.logistics-invoices-panel {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eef1f6;
}

.logistics-invoices-panel.compact {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.logistics-invoices-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.logistics-invoices-header h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: #2c3e50;
}

.logistics-invoices-header p {
  margin: 0;
  color: #666;
  font-size: 13px;
}

.logistics-invoice-form {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fafbff;
}

.logistics-invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.logistics-invoice-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #495057;
}

.logistics-invoice-form-grid label.full-width {
  grid-column: 1 / -1;
}

.logistics-invoice-form-grid input,
.logistics-invoice-form-grid select,
.logistics-invoice-form-grid textarea {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.logistics-readonly-input,
.logistics-invoice-form-grid input.logistics-readonly-input:disabled {
  background: #f5f5f5;
  color: #495057;
  cursor: not-allowed;
}

.logistics-invoice-file-hint {
  display: block;
  margin-top: 6px;
  color: #666;
}

.logistics-invoice-remove-file {
  margin-top: 8px;
}

.logistics-invoice-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.logistics-invoice-status-pending,
.logistics-invoice-status-submitted {
  background: #fff3cd;
  color: #856404;
}

.logistics-invoice-status-approved {
  background: #d1ecf1;
  color: #0c5460;
}

.logistics-invoice-status-paid {
  background: #d4edda;
  color: #155724;
}

.logistics-invoice-status-rejected,
.logistics-invoice-status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

.logistics-link-btn {
  border: none;
  background: transparent;
  color: #6c5ce7;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  text-align: left;
}

.logistics-link-btn:hover {
  text-decoration: underline;
}

.logistics-icon-btn.invoice {
  color: #0c5460;
  border-color: #bee5eb;
  background: #e8f7fa;
}

@media (max-width: 900px) {
  .logistics-form-card-enhanced {
    padding: 20px;
  }

  .logistics-form-grid-first-row {
    grid-template-columns: 1fr;
  }

  .logistics-contact-row {
    grid-template-columns: 1fr;
  }

  .logistics-contact-remove-btn {
    width: -webkit-fit-content;
    width: fit-content;
  }
}

.pending-dispatch {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.pending-dispatch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

/* Complete Sales Order: title + UK/BLR/GUJ/All tabs + controls (matches Accounts layout) */
.pending-dispatch-header--with-location-tabs {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.pending-dispatch-header--with-location-tabs .pending-dispatch-controls {
  align-self: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (min-width: 900px) {
  .pending-dispatch-header--with-location-tabs .pending-dispatch-controls {
    align-self: stretch;
    justify-content: space-between;
  }
}

.pending-dispatch-title {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

/* Same branch badges as Accounts Sales Order (UK / BLR / GUJ from sales order no.) */
.sales-order-branch-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sales-order-branch-badge.sales-order-branch-uk {
  background-color: #e8f5e9;
  color: #1b5e20;
}

.sales-order-branch-badge.sales-order-branch-blr {
  background-color: #e3f2fd;
  color: #0d47a1;
}

.sales-order-branch-badge.sales-order-branch-guj {
  background-color: #fff3e0;
  color: #e65100;
}

.pending-dispatch-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #666;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.pending-dispatch-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-dispatch-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.pending-dispatch-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pending-dispatch-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.pending-dispatch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pending-dispatch-table thead {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.pending-dispatch-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  border-right: 1px solid #e2e8f0;
}

.pending-dispatch-table th:last-child {
  border-right: none;
}

.pending-dispatch-table th.sortable-header {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition: background-color 0.2s;
}

.pending-dispatch-table th.sortable-header:hover {
  background-color: #e2e8f0;
}

.pending-dispatch-table th.sortable-header span {
  margin-right: 6px;
}

.pending-dispatch-table th.sortable-header i {
  font-size: 0.75rem;
  color: #3b82f6;
}

.pending-dispatch-table th.sortable-header i.sort-inactive {
  color: #94a3b8;
  opacity: 0.7;
}

.pending-dispatch-table th.sortable-header:hover i.sort-inactive {
  opacity: 1;
}

.pending-dispatch-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  vertical-align: middle;
}

.pending-dispatch-table td:last-child {
  border-right: none;
}

.pending-dispatch-table tbody tr:hover {
  background-color: #f8fafc;
}

.pending-dispatch-table tbody tr.first-product-row {
  border-top: 2px solid #cbd5e1;
}

.no-data {
  text-align: center;
  padding: 40px !important;
  color: #64748b;
  font-style: italic;
}

.loading-products {
  text-align: center;
  padding: 20px !important;
  color: #64748b;
}

.loading-spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 10px;
}

.check-actions-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.check-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.check-btn:hover {
  background-color: #2563eb;
}

.check-btn.expanded {
  background-color: #059669;
}

.check-btn.expanded:hover {
  background-color: #047857;
}

.check-btn i {
  font-size: 0.8rem;
}

.view-btn {
  background-color: #6b7280;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.view-btn:hover {
  background-color: #4b5563;
}

.view-btn i {
  font-size: 0.8rem;
}

.order-header-row {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.order-header-row:hover {
  background-color: #f1f5f9;
}

.order-header-row.expanded {
  border-bottom: 1px solid #e2e8f0;
}

.product-row {
  background-color: #ffffff;
}

.product-row:hover {
  background-color: #f8fafc;
}

.collapsed-cell {
  color: #94a3b8;
  font-style: italic;
  text-align: center;
}

.collapsed-text {
  font-size: 0.85rem;
}

.empty-cell {
  background-color: transparent;
  border: none;
  padding: 0;
}

/* Hide product columns by default */
.pending-dispatch-table .product-column-header,
.pending-dispatch-table .product-column-cell {
  display: none;
}

/* Show product columns when at least one order is expanded */
.pending-dispatch-table:has(.order-header-row.expanded) .product-column-header,
.pending-dispatch-table:has(.order-header-row.expanded) .product-column-cell {
  display: table-cell;
}

/* Fallback for browsers that don't support :has() */
.pending-dispatch-table.has-expanded .product-column-header,
.pending-dispatch-table.has-expanded .product-column-cell {
  display: table-cell;
}

/* Product rows styling */
.product-row {
  background-color: #ffffff;
}

.product-row:hover {
  background-color: #f8fafc;
}

.product-row td {
  border-bottom: 1px solid #e2e8f0;
}

.empty-cell {
  background-color: transparent;
  border: none;
  padding: 8px 16px;
}

.empty-product-cell {
  background-color: transparent;
  border: none;
  padding: 12px 16px;
}

.dispatch-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.85rem;
  min-width: 100px;
}

.dispatch-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dispatch-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.dispatch-btn:hover:not(:disabled) {
  background-color: #059669;
}

.dispatch-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

/* Dispatched status and values */
.dispatched-status {
  background-color: #28a745;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dispatched-value {
  display: inline-block;
  padding: 6px 8px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  min-height: 20px;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.view-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 20px;
}

.view-modal-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.view-order-info {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f8fafc;
  border-radius: 6px;
}

.view-order-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.view-order-info-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-order-info-field label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.view-order-info-field span {
  font-size: 1rem;
  color: #1e293b;
  font-weight: 500;
}

.view-order-info-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.accounts-party-details-title,
.accounts-bill-to-details-title {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: #1e293b;
}

.view-products-section {
  margin-bottom: 24px;
}

.view-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.view-products-title {
  margin: 0;
  font-size: 1.2rem;
  color: #1e293b;
  font-weight: 600;
}

.copy-all-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-all-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.copy-all-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-all-btn i {
  font-size: 0.9rem;
}

.copy-all-btn span {
  letter-spacing: 0.3px;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.view-products-table thead {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.view-products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.view-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.view-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.view-order-info-field--stacked {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-order-info-sub-label {
  margin-top: 8px;
}

.view-products-total-row td {
  background-color: #f1f5f9;
  border-top: 2px solid #cbd5e1;
}

.view-products-total-label {
  text-align: right;
  font-weight: 600;
  color: #334155;
}

.view-products-total-value {
  font-weight: 700;
  color: #0f172a;
}

.logistics-expense-input {
  width: 100%;
  min-width: 6rem;
  max-width: 11rem;
  padding: 6px 8px;
  font-size: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-sizing: border-box;
}

.logistics-expense-remark {
  max-width: 14rem;
}

.logistics-expense-date-readonly {
  display: inline-block;
  min-width: 9rem;
  font-size: 0.85rem;
  color: #334155;
  white-space: nowrap;
}

.logistics-expense-save-btn {
  font-size: 0.8rem;
  padding: 6px 10px;
  white-space: nowrap;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.logistics-expense-save-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.logistics-order-other-section {
  margin-top: 20px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.logistics-order-other-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.logistics-order-other-title {
  display: block;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.logistics-order-other-hint {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  max-width: 42rem;
  line-height: 1.4;
}

.logistics-order-other-add-row {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #0f766e;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.logistics-order-other-add-row:hover {
  background: #0d9488;
}

.logistics-order-other-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.logistics-order-other-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.logistics-order-other-row-label {
  min-width: 1.5rem;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
}

.logistics-order-other-remove {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: #64748b;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
}

.logistics-order-other-remove:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.logistics-order-other-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.logistics-order-other-save-wrap {
  margin-top: 14px;
}

.logistics-order-other-save {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #4f46e5;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.logistics-order-other-save:hover:not(:disabled) {
  background: #4338ca;
}

.logistics-order-other-save:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.view-modal-empty {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-style: italic;
}

.view-note-section {
  margin-top: 24px;
  padding: 16px;
  background-color: #fef3c7;
  border-radius: 6px;
  border-left: 4px solid #f59e0b;
}

.view-note-section label {
  font-size: 0.9rem;
  color: #92400e;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.view-note-content {
  font-size: 0.95rem;
  color: #78350f;
  line-height: 1.6;
}

.view-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.modal-close-button {
  background-color: #64748b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.modal-close-button:hover {
  background-color: #475569;
}

/* COA Action in dispatched order modal (matches Accounts Completed Sales Orders) */
.status-complete {
  display: inline-block;
  padding: 4px 8px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.coa-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.coa-download-btn {
  padding: 6px 12px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.coa-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.coa-download-btn.coa-one {
  background-color: #007bff;
}

.coa-download-btn.coa-one:hover {
  background-color: #0056b3;
}

.coa-download-btn.coa-two {
  background-color: #28a745;
}

.coa-download-btn.coa-two:hover {
  background-color: #1e7e34;
}

.coa-download-btn i {
  font-size: 11px;
}

.coa-no-action {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

@media (max-width: 768px){
  .pending-dispatch-controls{
    flex-direction: column;
  }
}

@media(max-width: 480px){
  .pending-dispatch-controls{
    display: flex;
    flex-direction: column;
  }
}
.dispatch-main-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.dispatch-main-tab {
  padding: 10px 24px;
  border: none;
  background: #f5f5f5;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
}

.dispatch-main-tab:hover {
  background: #eaeaea;
}

.dispatch-main-tab.active {
  background: #1976d2;
  color: #fff;
}

.pending-sample-receive {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.pending-sample-receive-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pending-sample-receive-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.pending-sample-receive-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.logistic-dispatch-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.logistic-dispatch-search-row label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
  white-space: nowrap;
}

.logistic-dispatch-search-input {
  flex: 1 1;
  min-width: 220px;
  max-width: 480px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

.logistic-dispatch-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.pending-sample-receive-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.pending-sample-receive-table-container {
  overflow-x: auto;
}

.pending-sample-receive-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pending-sample-receive-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.pending-sample-receive-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pending-sample-receive-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.pending-sample-receive-table tbody tr:hover {
  background-color: #f8f9fa;
}

.pending-sample-receive-table tbody tr:last-child td {
  border-bottom: none;
}

.consignee-address {
  color: #64748b;
  font-size: 0.85rem;
}

.view-btn {
  background-color: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-style: italic;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  height: -webkit-fit-content;
  height: fit-content;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-error i {
  font-size: 1.1rem;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.view-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.view-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 12px;
  flex-wrap: wrap;
}

.sample-order-receive-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.sample-order-receive-complete-btn:hover:not(:disabled) {
  background-color: #5568d3;
}

.sample-order-receive-complete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dispatched-row {
  background-color: #f0f9ff;
  opacity: 0.8;
}

.dispatched-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pending-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.batch-number-display {
  font-weight: 600;
  color: #667eea;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 4px 8px;
  background-color: #f0f4ff;
  border-radius: 4px;
  display: inline-block;
}

.batch-type-badge-view {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

.dispatch-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.dispatch-status-badge.dispatched-main {
  background-color: #d1fae5;
  color: #065f46;
}

.dispatch-status-badge.pending-main {
  background-color: #fef3c7;
  color: #92400e;
}

.receive-single-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.receive-single-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.receive-single-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.receive-single-btn i {
  font-size: 0.8rem;
}

.received-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
}

.received-remark {
  color: #10b981;
  font-weight: 600;
  font-size: 0.9rem;
}

.pending-sample-receive-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.pending-sample-receive-footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .pending-sample-receive-table {
    font-size: 0.85rem;
  }

  .pending-sample-receive-table th,
  .pending-sample-receive-table td {
    padding: 8px 12px;
  }

  .view-modal-overlay {
    padding: 10px;
  }

  .view-modal-content {
    max-width: 100%;
    height: -webkit-fit-content;
    height: fit-content;
    max-height: 90vh;
  }

  .view-modal-header {
    padding: 15px 20px;
  }

  .view-modal-header h2 {
    font-size: 1.2rem;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-products-table {
    font-size: 0.85rem;
    min-width: 700px;
  }

  .view-products-table th,
  .view-products-table td {
    padding: 8px 10px;
  }
}


.pol-page .pol-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pol-page .pol-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.pol-page .pol-table {
  min-width: 1200px;
}

.pol-page .pol-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.pol-form-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px;
}

.pol-form-card .form-section + .form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eef2f7;
}

.pol-form-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
}

.pol-help-text {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
}

.pol-entry-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fff;
}

.pol-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.pol-entry-header h4 {
  margin: 0;
  color: #334155;
}

.pol-entry-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.pol-empty-saved {
  margin: 0;
  color: #64748b;
  font-style: italic;
}

.pol-saved-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.pol-saved-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
  margin: 0;
}

.pol-saved-table thead th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 11px 12px;
  border-bottom: 1px solid #dbe3ee;
  vertical-align: middle;
  white-space: nowrap;
}

.pol-saved-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: #0f172a;
  line-height: 1.4;
}

.pol-saved-table tbody tr:last-child td {
  border-bottom: none;
}

.pol-saved-table tbody tr:hover {
  background: #f8fafc;
}

.pol-saved-table .pol-col-sno {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.pol-saved-table thead .pol-col-sno {
  text-align: center;
}

.pol-saved-table .pol-col-partner {
  min-width: 120px;
  text-align: left;
  word-break: break-word;
}

.pol-saved-table .pol-col-num {
  min-width: 68px;
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pol-saved-table thead .pol-col-num {
  text-align: right;
}

.pol-saved-table .pol-col-remark {
  min-width: 90px;
  text-align: left;
  word-break: break-word;
}

.pol-saved-table .pol-col-date {
  min-width: 148px;
  text-align: left;
  white-space: nowrap;
}

.pol-saved-table .pol-col-status {
  min-width: 108px;
  text-align: center;
}

.pol-saved-table thead .pol-col-status {
  text-align: center;
}

.pol-saved-table .pol-col-actions {
  min-width: 112px;
  width: 112px;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
}

.pol-saved-table thead .pol-col-actions {
  text-align: center;
}

.pol-saved-table .pol-approve-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  white-space: nowrap;
  padding: 6px 12px;
  box-sizing: border-box;
}

.pol-approval-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.pol-approval-pending {
  background: #fff3cd;
  color: #856404;
}

.pol-approval-approved {
  background: #d4edda;
  color: #155724;
}

.pol-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.pol-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.pol-page .form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.pol-page .form-row-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

@media (max-width: 1100px) {
  .pol-page .form-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .pol-page .form-row-2,
  .pol-page .form-row-4 {
    grid-template-columns: 1fr;
  }
}

/* Scoped to Sales Order Freight page only — do not use these classes elsewhere */

.sales-order-freight-page .sof-freight-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0;
}

.sales-order-freight-page .sof-freight-tab {
  padding: 10px 18px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sales-order-freight-page .sof-freight-tab:hover {
  color: #334155;
}

.sales-order-freight-page .sof-freight-tab-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.sales-order-freight-page .sof-table-wrap {
  overflow-x: auto;
}

.sales-order-freight-page .sof-main-table {
  table-layout: fixed;
  width: 100%;
}

.sales-order-freight-page .sof-main-table col.sof-col-equal {
  width: 20%;
}

.sales-order-freight-page .sof-main-table th,
.sales-order-freight-page .sof-main-table td {
  width: 20%;
  min-width: 0;
  max-width: 20%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  vertical-align: middle;
  text-align: left;
  box-sizing: border-box;
}

.sales-order-freight-page .sof-main-table th {
  text-align: center;
  white-space: normal;
  line-height: 1.3;
  font-size: 13px;
  padding: 10px 8px;
}

.sales-order-freight-page .sof-main-table td {
  padding: 10px 8px;
  overflow: hidden;
}

.sales-order-freight-page .sof-main-table td.sof-col-text {
  text-align: left;
}

.sales-order-freight-page .sof-main-table td.sof-col-action {
  text-align: center;
  overflow: visible;
}

.sales-order-freight-page .sof-view-btn,
.sales-order-freight-page .sof-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.sales-order-freight-page .sof-view-btn {
  background-color: #0d9488;
  color: #ffffff;
}

.sales-order-freight-page .sof-view-btn:hover:not(:disabled) {
  background-color: #0f766e;
}

.sales-order-freight-page .sof-save-btn {
  background-color: #2563eb;
  color: #ffffff;
}

.sales-order-freight-page .sof-save-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
}

.sales-order-freight-page .sof-view-btn:disabled,
.sales-order-freight-page .sof-save-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.sales-order-freight-page .sof-freight-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
}

.sales-order-freight-page .sof-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.sales-order-freight-page .sof-pagination-info {
  font-size: 14px;
  color: #555;
}

.sales-order-freight-page .sof-pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sales-order-freight-page .sof-detail-table {
  table-layout: fixed;
  width: 100%;
}

.sales-order-freight-page .sof-detail-table th,
.sales-order-freight-page .sof-detail-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  vertical-align: top;
  font-size: 13px;
}

/* Modal is portaled to document.body — unique class avoids affecting other modals */
.view-modal-content.sales-order-freight-modal {
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-content.sales-order-freight-modal .view-modal-body {
  padding-bottom: 20px;
}

.view-modal-content.sales-order-freight-modal .sof-detail-table th:nth-child(8),
.view-modal-content.sales-order-freight-modal .sof-detail-table td.sof-freight-cell {
  width: 130px;
  min-width: 130px;
  text-align: center;
  vertical-align: middle;
}

.view-modal-content.sales-order-freight-modal .sof-detail-table th:nth-child(7),
.view-modal-content.sales-order-freight-modal .sof-detail-table td.sof-logistics-cell {
  width: 180px;
  min-width: 180px;
  vertical-align: middle;
}

.sales-order-freight-page .sof-logistics-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 13px;
}

.sof-logistics-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
}

.sof-logistics-hint-warning {
  color: #b45309;
}

.view-modal-content.sales-order-freight-modal .sof-detail-table .sof-freight-input {
  width: 100%;
  min-width: 0;
  max-width: 120px;
  margin: 0 auto;
  display: block;
  text-align: right;
}

.sof-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sof-modal-save-btn {
  min-width: 120px;
  padding: 10px 24px;
  font-size: 14px;
}

/* Sample dispatch View modal product table — PendingSampleReceive & SampleCompleted only */

.sample-dispatch-view-products.view-products-table-container {
  overflow-x: auto;
}

.sample-dispatch-view-products .view-products-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  min-width: 1200px;
}

.sample-dispatch-view-products .view-products-table th,
.sample-dispatch-view-products .view-products-table td {
  overflow: hidden;
  vertical-align: middle;
}

/* Batch No — allow wrap, reserve space so Qty column is not overlapped */
.sample-dispatch-view-products .view-products-table th:nth-child(4),
.sample-dispatch-view-products .view-products-table td:nth-child(4) {
  min-width: 150px;
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Quantity (gms) — fixed minimum width, separated from batch column */
.sample-dispatch-view-products .view-products-table th:nth-child(5),
.sample-dispatch-view-products .view-products-table td:nth-child(5) {
  min-width: 110px;
  width: 110px;
  white-space: nowrap;
  text-align: right;
  padding-left: 16px;
}

.sample-dispatch-view-products .batch-number-display {
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  box-sizing: border-box;
}

.sample-dispatch-view-products .batch-type-badge-view {
  margin-left: 0;
}

.sample-received {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.sample-received-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sample-received-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.sample-received-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.sample-received-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.sample-received-table-container {
  overflow-x: auto;
}

.sample-received-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sample-received-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sample-received-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sample-received-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.sample-received-table tbody tr:hover {
  background-color: #f8f9fa;
}

.sample-received-table tbody tr:last-child td {
  border-bottom: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge.yes-badge {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge.partial-badge {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

.status-badge.no-badge {
  background-color: #fef3c7;
  color: #92400e;
}

.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.view-btn, .print-btn, .docket-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.docket-btn-small {
  padding: 4px 8px;
  background-color: #f59e0b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.docket-btn-small:hover {
  background-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.courier-field {
  color: #64748b;
  font-style: italic;
}

.view-btn {
  background-color: #667eea;
  color: white;
}

.view-btn:hover {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.print-btn {
  background-color: #10b981;
  color: white;
}

.print-btn:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.print-btn-dated {
  font-size: 0.75rem;
  padding: 5px 8px;
}

.receive-complete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #0d9488;
  color: white;
  transition: all 0.2s;
}

.receive-complete-btn:hover:not(:disabled) {
  background-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.35);
}

.receive-complete-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.docket-btn {
  background-color: #f59e0b;
  color: white;
}

.docket-btn:hover {
  background-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.logistic-dispatch-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.logistic-dispatch-search-row label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
  white-space: nowrap;
}

.logistic-dispatch-search-input {
  flex: 1 1;
  min-width: 220px;
  max-width: 480px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

.logistic-dispatch-search-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.sample-received-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid #e2e8f0;
}

.sample-received-pagination-info {
  font-size: 0.875rem;
  color: #64748b;
}

.sample-received-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sample-received-pagination-btn {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sample-received-pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.sample-received-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sample-received-pagination-btn.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-style: italic;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 95vw;
  max-width: 1400px !important;
  height: -webkit-fit-content;
  height: fit-content;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-error i {
  font-size: 1.1rem;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logistic-view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.logistic-view-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1500px;
  table-layout: auto;
}

.logistic-view-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.logistic-view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.logistic-view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.logistic-view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.logistic-view-products-table tbody tr:last-child {
  border-bottom: none;
}

.logistic-view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.view-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.received-row {
  background-color: #f0f9ff;
  opacity: 0.8;
}

.received-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pending-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.batch-number-display {
  font-weight: 600;
  color: #667eea;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 4px 8px;
  background-color: #f0f4ff;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
  word-break: normal;
}

.logistic-view-batch-no-col {
  min-width: 140px;
  max-width: 220px;
  width: 220px;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.logistic-view-batch-no-col .batch-number-display {
  display: block;
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  line-height: 1.4;
}

.logistic-view-qty-col {
  min-width: 100px;
  width: 100px;
  white-space: nowrap;
  text-align: right;
  padding-left: 12px !important;
  vertical-align: top;
}

.batch-type-badge-view {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

.received-remark {
  color: #10b981;
  font-weight: 600;
  font-size: 0.9rem;
}

.sample-received-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.sample-received-footer p {
  margin: 0;
}

.docket-no {
  color: #667eea;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Docket Modal Styles */
.docket-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.docket-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.docket-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.docket-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.docket-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.docket-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.docket-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.docket-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docket-form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.docket-input,
.docket-select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.docket-input:focus,
.docket-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.docket-select {
  cursor: pointer;
  background-color: white;
}

.docket-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.docket-close-btn,
.docket-update-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.docket-close-btn {
  background-color: #10b981;
  color: white;
}

.docket-close-btn:hover:not(:disabled) {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.docket-update-btn {
  background-color: #667eea;
  color: white;
}

.docket-update-btn:hover:not(:disabled) {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.docket-close-btn:disabled,
.docket-update-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sample-received-view-input {
  width: 100%;
  min-width: 110px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.sample-received-view-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sample-received-view-input:disabled {
  background-color: #f8fafc;
  cursor: not-allowed;
}

.sample-received-view-select {
  cursor: pointer;
  background-color: white;
}

.sample-received-view-select:disabled {
  cursor: not-allowed;
}

.sample-received-docket-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 150px;
}

.sample-received-docket-cell .sample-received-view-input {
  flex: 1 1;
  min-width: 0;
}

.sample-received-docket-copy-btn {
  flex-shrink: 0;
  background-color: #667eea;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.sample-received-docket-copy-btn:hover:not(:disabled) {
  background-color: #5568d3;
}

.sample-received-docket-copy-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sample-received-product-save-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.sample-received-product-save-btn:hover:not(:disabled) {
  background-color: #059669;
}

.sample-received-product-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
  .sample-received-table {
    font-size: 0.85rem;
  }

  .sample-received-table th,
  .sample-received-table td {
    padding: 8px 12px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .view-modal-overlay {
    padding: 10px;
  }

  .view-modal-content {
    width: 100%;
    max-width: 1400px !important;
    height: -webkit-fit-content;
    height: fit-content;
    max-height: 90vh;
  }

  .view-modal-header {
    padding: 15px 20px;
  }

  .view-modal-header h2 {
    font-size: 1.2rem;
  }

  .view-modal-body {
    padding: 20px;
  }

  .logistic-view-products-table {
    font-size: 0.85rem;
    min-width: 700px;
  }

  .logistic-view-products-table th,
  .logistic-view-products-table td {
    padding: 8px 10px;
  }
}


.create-consignee {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.create-consignee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-consignee-header-left h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.create-consignee-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.create-consignee-header-right span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.create-consignee-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.create-consignee-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-consignee-success {
  background-color: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-consignee-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.create-consignee-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.create-consignee-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.create-consignee-form .form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.create-consignee-form .form-control {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

.create-consignee-form .form-control.create-consignee-buyer-readonly {
  background-color: #f5f5f5;
  cursor: default;
  color: #374151;
}

.create-consignee-form .form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.create-consignee-form .form-control::placeholder {
  color: #94a3b8;
}

.create-consignee-form textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.create-consignee-form .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.create-consignee-form .submit-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.create-consignee-form .submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.create-consignee-form .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.consignees-table-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.consignees-table-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.loading-message,
.empty-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.table-container {
  overflow-x: auto;
}

.consignees-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignees-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.consignees-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.consignees-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.consignees-table tbody tr:hover {
  background-color: #f8f9fa;
}

.consignees-table tbody tr:last-child td {
  border-bottom: none;
}

.create-consignee .edit-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.create-consignee .edit-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.create-consignee-form .cancel-btn {
  padding: 12px 32px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 10px;
}

.create-consignee-form .cancel-btn:hover:not(:disabled) {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.create-consignee-form .cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-link {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.back-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.create-consignee-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.create-consignee-footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .create-consignee-form .form-row {
    grid-template-columns: 1fr;
  }

  .consignees-table {
    font-size: 0.85rem;
  }

  .consignees-table th,
  .consignees-table td {
    padding: 8px 12px;
  }
}


/* DWR List Styles */

.dwr-list {
  padding: 20px 30px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
  box-sizing: border-box;
}

.dwr-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dwr-list-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.btn-primary {
  background-color: #0ea5e9;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background-color: #0284c7;
  transform: translateY(-1px);
}

.dwr-list-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dwr-list-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1;
  min-width: 300px;
}

.search-input {
  flex: 1 1;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-btn, .clear-search-btn {
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.search-btn:hover {
  background-color: #0ea5e9;
  color: white;
  border-color: #0ea5e9;
}

.clear-search-btn:hover {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.95rem;
  color: #555;
}

.entries-select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
}

.entries-select:focus {
  outline: none;
  border-color: #0ea5e9;
}

.dwr-list-loading, .dwr-list-empty {
  background: white;
  padding: 60px 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dwr-list-loading i, .dwr-list-empty i {
  font-size: 3rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dwr-list-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

.dwr-list-table {
  width: 100%;
  border-collapse: collapse;
}

.dwr-list-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.dwr-list-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dwr-list-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.dwr-list-table tbody tr:hover {
  background-color: #f8f9fa;
}

.dwr-list-table tbody tr.expanded {
  background-color: #f0f9ff;
}

.dwr-list-table tbody tr:last-child {
  border-bottom: none;
}

.dwr-list-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.expand-icon {
  color: #0ea5e9;
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  padding: 4px;
}

.expand-icon:hover {
  color: #0284c7;
  transform: scale(1.1);
}

.action-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-new-product-enquiry {
  background-color: #dbeafe;
  color: #1e40af;
}

.action-introductory-mail {
  background-color: #d1fae5;
  color: #065f46;
}

.action-quotation {
  background-color: #fef3c7;
  color: #92400e;
}

.action-follow-up {
  background-color: #fce7f3;
  color: #9f1239;
}

.action-sample-to-be-sent {
  background-color: #e0e7ff;
  color: #3730a3;
}

.action-no-action {
  background-color: #f3f4f6;
  color: #374151;
}

.action-query-closed {
  background-color: #fee2e2;
  color: #991b1b;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-view {
  background-color: #0ea5e9;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
}

.btn-view:hover {
  background-color: #0284c7;
}

.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px !important;
  background-color: #f8f9fa;
}

.expanded-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.expanded-section {
  background: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.expanded-section h4 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item p {
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.products-table-wrapper {
  background: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 1000px;
}

.products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  white-space: nowrap;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 10px 12px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.no-products {
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-size: 0.95rem;
}

.dwr-list-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-info {
  color: #64748b;
  font-size: 0.95rem;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #0ea5e9;
  color: white;
  border-color: #0ea5e9;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page-info {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #e2e8f0;
  background-color: #f8fafc;
}

.view-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.view-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.view-modal-close:hover {
  background-color: #e2e8f0;
  color: #1e293b;
}

.view-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1;
}

.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h4 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
}

.view-info-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 10px;
  gap: 10px;
}

.view-info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.view-info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-info-item p {
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.view-modal-footer {
  padding: 16px 24px;
  border-top: 2px solid #e2e8f0;
  background-color: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

/* Edit Button */
.btn-edit {
  background-color: #f59e0b;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
}

.btn-edit:hover {
  background-color: #d97706;
}

/* Edit Modal Form */
.edit-modal-content {
  display: flex;
  flex-direction: column;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 24px;
}

.edit-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edit-form-group.full-width {
  grid-column: 1 / -1;
}

.edit-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.edit-form-group input,
.edit-form-group select,
.edit-form-group textarea {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.edit-form-group input:focus,
.edit-form-group select:focus,
.edit-form-group textarea:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

.edit-form-group textarea {
  resize: vertical;
}

/* Edit Products Section */
.edit-products-section {
  border-top: 2px solid #e2e8f0;
  padding-top: 18px;
}

.edit-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.edit-products-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.btn-add-product {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.btn-add-product:hover {
  background-color: #059669;
}

.edit-product-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.edit-product-fields {
  flex: 1 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 10px;
  gap: 10px;
}

.btn-remove-product {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
  margin-top: 20px;
}

.btn-remove-product:hover {
  background-color: #dc2626;
}

.btn-secondary {
  background-color: #94a3b8;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dwr-list {
    padding: 15px;
  }

  .dwr-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dwr-list-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: 100%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .dwr-list-pagination {
    flex-direction: column;
    gap: 15px;
  }

  .view-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .view-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .edit-form-grid {
    grid-template-columns: 1fr;
  }

  .edit-product-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .view-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .view-info-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}


.dwr-request {
  padding: 30px;
}

.dwr-request-header {
  margin-bottom: 30px;
}

.dwr-request-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.dwr-request-error,
.dwr-request-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dwr-request-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.dwr-request-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.dwr-request-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
  min-width: 300px;
}

.search-input {
  flex: 1 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.clear-search-btn {
  padding: 10px 15px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.clear-search-btn:hover {
  background-color: #5a6268;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entries-selector label {
  font-size: 14px;
  color: #666;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.dwr-request-loading,
.dwr-request-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dwr-request-table-container {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.dwr-request-table {
  width: 100%;
  border-collapse: collapse;
}

.dwr-request-table thead {
  background-color: #f8f9fa;
}

.dwr-request-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.dwr-request-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
  color: #555;
}

.dwr-request-table tbody tr:hover {
  background-color: #f8f9fa;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-view,
.btn-verify,
.btn-reject {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-view {
  background-color: #007bff;
  color: white;
}

.btn-view:hover {
  background-color: #0056b3;
}

.btn-verify {
  background-color: #28a745;
  color: white;
}

.btn-verify:hover:not(:disabled) {
  background-color: #218838;
}

.btn-reject {
  background-color: #dc3545;
  color: white;
}

.btn-reject:hover:not(:disabled) {
  background-color: #c82333;
}

.btn-view:disabled,
.btn-verify:disabled,
.btn-reject:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dwr-request-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page-info {
  font-size: 14px;
  color: #666;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 900px;
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.view-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.view-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.view-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.view-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.view-section {
  margin-bottom: 30px;
}

.view-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.view-info-item {
  display: flex;
  flex-direction: column;
}

.view-info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-info-item label {
  font-weight: 600;
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
}

.view-info-item p {
  margin: 0;
  color: #333;
  font-size: 14px;
}

.action-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.view-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

.btn-primary {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.view-modal-footer .btn-verify,
.view-modal-footer .btn-reject {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .dwr-request {
    padding: 15px;
  }

  .dwr-request-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .view-info-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .view-modal-content {
    width: 95%;
  }
}


.dwr-request-approved {
  padding: 30px;
}

.dwr-request-approved-header {
  margin-bottom: 30px;
}

.dwr-request-approved-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.dwr-request-approved-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.dwr-request-approved-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  font-size: 16px;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

.dwr-request-approved-success i {
  font-size: 20px;
  color: #10b981;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.dwr-request-approved-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
  min-width: 300px;
}

.search-input {
  flex: 1 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.clear-search-btn {
  padding: 10px 15px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.clear-search-btn:hover {
  background-color: #5a6268;
}

/* Search toolbar — input + Search / Reset buttons */
.dwr-filter-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
  min-width: 320px;
  max-width: 900px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.dwr-filter-search-input-wrap {
  position: relative;
  flex: 1 1;
  min-width: 0;
}

.dwr-filter-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.dwr-filter-search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dwr-filter-search-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.dwr-filter-search-input::placeholder {
  color: #94a3b8;
}

.dwr-filter-search-btn,
.dwr-filter-search-reset-btn {
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.dwr-filter-search-btn {
  background-color: #0ea5e9;
  color: #fff;
}

.dwr-filter-search-btn:hover {
  background-color: #0284c7;
}

.dwr-filter-search-reset-btn {
  background-color: #64748b;
  color: #fff;
}

.dwr-filter-search-reset-btn:hover {
  background-color: #475569;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entries-selector label {
  font-size: 14px;
  color: #666;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.dwr-request-approved-loading,
.dwr-request-approved-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dwr-request-approved-table-container {
  background: white;
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.dwr-request-approved-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 2280px;
}

.dwr-request-approved-table thead {
  background-color: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.dwr-request-approved-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 13px;
  white-space: nowrap;
  background-color: #f8f9fa;
}

.dwr-request-approved-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  color: #555;
  white-space: nowrap;
}

.dwr-request-approved-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Whole-row cue until all six Dist/Cons tier prices are set */
.dwr-request-approved-table tbody tr.dwr-tier-row-incomplete {
  background-color: #ffedd5;
}

.dwr-request-approved-table tbody tr.dwr-tier-row-incomplete:hover {
  background-color: #fed7aa;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-view {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  background-color: #007bff;
  color: white;
}

.btn-view:hover {
  background-color: #0056b3;
}

.btn-take-follow-up {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s, opacity 0.2s;
  background-color: #6366f1;
  color: white;
  white-space: nowrap;
}

.btn-take-follow-up:hover:not(:disabled) {
  background-color: #4f46e5;
}

.btn-take-follow-up:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dwr-request-approved .form-input-readonly {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  background-color: #f1f5f9;
  color: #475569;
  cursor: default;
  width: 100%;
  box-sizing: border-box;
}

.btn-edit,
.btn-save,
.btn-cancel {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-edit {
  background-color: #28a745;
  color: white;
}

.btn-edit:hover:not(:disabled) {
  background-color: #218838;
}

.btn-edit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-save {
  background-color: #28a745;
  color: white;
}

.btn-save:hover:not(:disabled) {
  background-color: #218838;
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-cancel {
  background-color: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background-color: #5a6268;
}

.btn-mpl-update {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  background-color: #6f42c1;
  color: white;
  white-space: nowrap;
}

.btn-mpl-update:hover:not(:disabled) {
  background-color: #5a32a3;
}

.btn-mpl-update:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-mpl-update-label {
  letter-spacing: 0.02em;
}

.sales-price-input {
  width: 100px;
  padding: 6px 8px;
  border: 1px solid #28a745;
  border-radius: 4px;
  font-size: 12px;
}

.sales-price-input:focus {
  outline: none;
  border-color: #218838;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.dwr-request-approved-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page-info {
  font-size: 14px;
  color: #666;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 900px;
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.view-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.view-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.view-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.view-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.view-section {
  margin-bottom: 30px;
}

.view-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.view-info-item {
  display: flex;
  flex-direction: column;
}

.view-info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-info-item label {
  font-weight: 600;
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
}

.view-info-item p {
  margin: 0;
  color: #333;
  font-size: 14px;
}

.action-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.view-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

.btn-primary {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #0056b3;
}

/* My DWR Requests — status tabs */
.my-dwr-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.my-dwr-status-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.my-dwr-status-tab:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.my-dwr-status-tab-active {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

.my-dwr-status-tab-active:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}

.my-dwr-status-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.my-dwr-status-tab-active .my-dwr-status-tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .dwr-request-approved {
    padding: 15px;
  }

  .dwr-request-approved-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .dwr-filter-search-bar {
    flex-wrap: wrap;
    max-width: none;
  }

  .dwr-filter-search-input-wrap {
    flex: 1 1 100%;
  }

  .dwr-filter-search-btn,
  .dwr-filter-search-reset-btn {
    flex: 1 1;
  }

  .dwr-request-approved-table-container {
    overflow-x: scroll;
  }

  .dwr-request-approved-table {
    min-width: 1800px;
  }

  .view-info-grid {
    grid-template-columns: 1fr;
  }

  .view-modal-content {
    width: 95%;
  }
}

.dwr-view-loading {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
}


.dwr-request-rejected {
  padding: 30px;
}

.dwr-request-rejected-header {
  margin-bottom: 30px;
}

.dwr-request-rejected-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.dwr-request-rejected-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.dwr-request-rejected-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
  min-width: 300px;
}

.search-input {
  flex: 1 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.clear-search-btn {
  padding: 10px 15px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.clear-search-btn:hover {
  background-color: #5a6268;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entries-selector label {
  font-size: 14px;
  color: #666;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.dwr-request-rejected-loading,
.dwr-request-rejected-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dwr-request-rejected-table-container {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.dwr-request-rejected-table {
  width: 100%;
  border-collapse: collapse;
}

.dwr-request-rejected-table thead {
  background-color: #f8f9fa;
}

.dwr-request-rejected-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.dwr-request-rejected-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
  color: #555;
}

.dwr-request-rejected-table tbody tr:hover {
  background-color: #f8f9fa;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-view {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  background-color: #007bff;
  color: white;
}

.btn-view:hover {
  background-color: #0056b3;
}

.dwr-request-rejected-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page-info {
  font-size: 14px;
  color: #666;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 900px;
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.view-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.view-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.view-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.view-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.view-section {
  margin-bottom: 30px;
}

.view-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.view-info-item {
  display: flex;
  flex-direction: column;
}

.view-info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-info-item label {
  font-weight: 600;
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
}

.view-info-item p {
  margin: 0;
  color: #333;
  font-size: 14px;
}

.action-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.view-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

.btn-primary {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #0056b3;
}

/* Responsive */
@media (max-width: 768px) {
  .dwr-request-rejected {
    padding: 15px;
  }

  .dwr-request-rejected-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .view-info-grid {
    grid-template-columns: 1fr;
  }

  .view-modal-content {
    width: 95%;
  }
}


/* Daily Work Report Styles */

.daily-work-report {
  padding: 20px 30px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
  box-sizing: border-box;
}

.dwr-header {
  margin-bottom: 30px;
}

.dwr-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.dwr-description {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  padding: 15px;
  background-color: #e0f2fe;
  border-left: 4px solid #0ea5e9;
  border-radius: 4px;
}

.dwr-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dwr-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dwr-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.form-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e2e8f0;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(25% - 15px);
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  flex: 1 1 100%;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background-color: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  cursor: pointer;
  background-color: white;
}

.joint-visit-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

.joint-visit-user-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
}

.joint-visit-user-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.joint-visit-users-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #64748b;
}

.field-note {
  margin-top: 5px;
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
  line-height: 1.4;
}

.info-message {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 15px 20px;
  margin-top: 10px;
}

.info-message p {
  margin: 0;
  color: #0c4a6e;
  line-height: 1.6;
}

.form-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.submit-btn {
  background-color: #0ea5e9;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  min-width: 150px;
}

.submit-btn:hover:not(:disabled) {
  background-color: #0284c7;
  transform: translateY(-1px);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .daily-work-report {
    padding: 15px;
  }

  .dwr-form {
    padding: 20px;
  }

  .form-group {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .dwr-header h2 {
    font-size: 1.5rem;
  }
}

.dwr-contact-person-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.dwr-contact-person-label-row label {
  margin-bottom: 0;
}

.dwr-edit-buyer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

.dwr-edit-buyer-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.dwr-buyer-edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}


.export-dashboard {
  padding: 24px;
  background: #f5f7fa;
  min-height: calc(100vh - 200px);
}

.export-dashboard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.export-dashboard-error {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.export-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.export-dashboard-country-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.export-dashboard-country-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.export-dashboard-country-header h2 {
  margin: 0 0 16px 0;
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Cards Grid Layout */
.export-dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.export-dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.export-dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Pending DWR Price Updates: stronger glow + top-bar pulse when count > 0 */
@keyframes export-dashboard-pending-dwr-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(249, 115, 22, 0.35),
      0 0 12px rgba(249, 115, 22, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(249, 115, 22, 0.65),
      0 0 28px 6px rgba(249, 115, 22, 0.35),
      0 0 48px 10px rgba(251, 146, 60, 0.22);
  }
}

@keyframes export-dashboard-pending-dwr-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.export-dashboard-card.export-dashboard-card--blink-pending-dwr {
  animation: export-dashboard-pending-dwr-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-pending-dwr:hover {
  animation: export-dashboard-pending-dwr-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-pending-dwr::before {
  height: 5px;
  background: linear-gradient(90deg, #ea580c, #f97316, #fb923c, #fdba74);
  animation: export-dashboard-pending-dwr-topbar 1s ease-in-out infinite;
}

/* DWR Request: blink whenever count > 0 */
@keyframes export-dashboard-dwr-request-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(14, 165, 233, 0.35),
      0 0 12px rgba(14, 165, 233, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(14, 165, 233, 0.65),
      0 0 28px 6px rgba(14, 165, 233, 0.3),
      0 0 48px 10px rgba(56, 189, 248, 0.2);
  }
}

@keyframes export-dashboard-dwr-request-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.export-dashboard-card.export-dashboard-card--blink-dwr-request {
  animation: export-dashboard-dwr-request-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-dwr-request:hover {
  animation: export-dashboard-dwr-request-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-dwr-request::before {
  height: 5px;
  background: linear-gradient(90deg, #0284c7, #0ea5e9, #38bdf8, #7dd3fc);
  animation: export-dashboard-dwr-request-topbar 1s ease-in-out infinite;
}

/* Pending Received Trading Products: blink whenever count > 0 */
@keyframes export-dashboard-pending-trading-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(16, 185, 129, 0.35),
      0 0 12px rgba(16, 185, 129, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(16, 185, 129, 0.65),
      0 0 28px 6px rgba(16, 185, 129, 0.32),
      0 0 48px 10px rgba(52, 211, 153, 0.2);
  }
}

@keyframes export-dashboard-pending-trading-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.export-dashboard-card.export-dashboard-card--blink-pending-trading {
  animation: export-dashboard-pending-trading-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-pending-trading:hover {
  animation: export-dashboard-pending-trading-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-pending-trading::before {
  height: 5px;
  background: linear-gradient(90deg, #059669, #10b981, #34d399, #6ee7b7);
  animation: export-dashboard-pending-trading-topbar 1s ease-in-out infinite;
}

/* Job Work Processing: purple accent pulse when pending count > 0 */
@keyframes export-dashboard-job-work-processing-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(124, 58, 237, 0.35),
      0 0 12px rgba(124, 58, 237, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(124, 58, 237, 0.65),
      0 0 28px 6px rgba(124, 58, 237, 0.32),
      0 0 48px 10px rgba(167, 139, 250, 0.2);
  }
}

@keyframes export-dashboard-job-work-processing-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.export-dashboard-card.export-dashboard-card-job-work-processing {
  --card-color: #7c3aed;
}

.export-dashboard-card.export-dashboard-card--blink-job-work-processing {
  animation: export-dashboard-job-work-processing-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-job-work-processing:hover {
  animation: export-dashboard-job-work-processing-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-job-work-processing::before {
  height: 5px;
  background: linear-gradient(90deg, #6d28d9, #7c3aed, #8b5cf6, #c4b5fd);
  animation: export-dashboard-job-work-processing-topbar 1s ease-in-out infinite;
}

/* My Product DWR Price: teal accent pulse (matches --card-color #14b8a6) */
@keyframes export-dashboard-my-dwr-product-price-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(20, 184, 166, 0.38),
      0 0 12px rgba(20, 184, 166, 0.14);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(20, 184, 166, 0.68),
      0 0 28px 6px rgba(20, 184, 166, 0.32),
      0 0 48px 10px rgba(45, 212, 191, 0.22);
  }
}

@keyframes export-dashboard-my-dwr-product-price-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.export-dashboard-card.export-dashboard-card--blink-my-dwr-product-price {
  animation: export-dashboard-my-dwr-product-price-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-my-dwr-product-price:hover {
  animation: export-dashboard-my-dwr-product-price-blink 1s ease-in-out infinite;
}

.export-dashboard-card.export-dashboard-card--blink-my-dwr-product-price::before {
  height: 5px;
  background: linear-gradient(90deg, #0f766e, #14b8a6, #2dd4bf, #5eead4);
  animation: export-dashboard-my-dwr-product-price-topbar 1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .export-dashboard-card.export-dashboard-card--blink-pending-dwr {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(249, 115, 22, 0.5),
      0 0 20px rgba(249, 115, 22, 0.25);
  }

  .export-dashboard-card.export-dashboard-card--blink-pending-dwr::before {
    animation: none;
    opacity: 1;
    filter: none;
  }

  .export-dashboard-card.export-dashboard-card--blink-dwr-request {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(14, 165, 233, 0.5),
      0 0 20px rgba(14, 165, 233, 0.25);
  }

  .export-dashboard-card.export-dashboard-card--blink-dwr-request::before {
    animation: none;
    opacity: 1;
    filter: none;
  }

  .export-dashboard-card.export-dashboard-card--blink-pending-trading {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(16, 185, 129, 0.5),
      0 0 20px rgba(16, 185, 129, 0.25);
  }

  .export-dashboard-card.export-dashboard-card--blink-pending-trading::before {
    animation: none;
    opacity: 1;
    filter: none;
  }

  .export-dashboard-card.export-dashboard-card--blink-my-dwr-product-price {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(20, 184, 166, 0.5),
      0 0 20px rgba(20, 184, 166, 0.25);
  }

  .export-dashboard-card.export-dashboard-card--blink-my-dwr-product-price::before {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

.export-dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--card-color, #3b82f6), transparent);
}

.export-dashboard-card-1 { --card-color: #3b82f6; }
/* Total export SO card: same accent as DWR List */
.export-dashboard-card-total-export-so { --card-color: #3b82f6; }
.export-dashboard-card-2 { --card-color: #f59e0b; }
.export-dashboard-card-3 { --card-color: #06b6d4; }
.export-dashboard-card-4 { --card-color: #10b981; }
.export-dashboard-card-5 { --card-color: #8b5cf6; }
.export-dashboard-card-6 { --card-color: #ef4444; }
.export-dashboard-card-7 { --card-color: #0ea5e9; }
.export-dashboard-card-exhibition { --card-color: #10b981; }
.export-dashboard-card-exhibition-complete { --card-color: #059669; }
.export-dashboard-card-purchase-rfq { --card-color: #6366f1; }
.export-dashboard-card-indent-pending { --card-color: #10b981; }
.export-dashboard-card-indent-complete { --card-color: #059669; }
.export-dashboard-card-dwr-price-request { --card-color: #0ea5e9; }
.export-dashboard-card-dwr-pending-tier { --card-color: #f97316; }
.export-dashboard-card-my-dwr-product-price { --card-color: #14b8a6; }
.export-dashboard-card-team-overdue-dwr { --card-color: #f59e0b; }
.export-dashboard-card-my-new-buyers { --card-color: #a855f7; }

.export-dashboard-my-new-buyers-section {
  margin-top: 32px;
}

.export-dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.export-dashboard-card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.export-dashboard-card-info {
  flex: 1 1;
  min-width: 0;
}

.export-dashboard-card-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.export-dashboard-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.export-dashboard-card-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.export-dashboard-mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.export-dashboard-mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--card-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.export-dashboard-card-footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

.export-dashboard-card-link {
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  font-weight: 500;
}

.export-dashboard-card-link:hover {
  color: #3b82f6;
}

.export-dashboard-card-link span {
  transition: transform 0.2s ease;
}

.export-dashboard-card:hover .export-dashboard-card-link span {
  transform: translateX(4px);
}

.export-dashboard-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.export-dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.export-dashboard-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  top: 2px;
}

.export-dashboard-tab:hover {
  color: #3b82f6;
  background: #f8fafc;
}

.export-dashboard-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  font-weight: 600;
}

.export-dashboard-content {
  min-height: 400px;
}

.export-dashboard-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.export-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
}

.export-dashboard-table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.export-dashboard-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.export-dashboard-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
}

.export-dashboard-table tbody tr {
  transition: all 0.2s ease;
}

.export-dashboard-table tbody tr:hover {
  background-color: #f8fafc;
}

.export-dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.export-dashboard-action-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.export-dashboard-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-sent {
  background: #dbeafe;
  color: #1e40af;
}

.status-partially-created {
  background: #fef3c7;
  color: #92400e;
}

.no-data {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-style: italic;
}

/* Follow-Up Date Box (Yesterday, Today, Pending) */
.export-followup-date-box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.export-followup-date-box h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
}

.export-followup-date-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.export-followup-date-card {
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.export-followup-date-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes export-followup-today-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(249, 115, 22, 0.35),
      0 0 12px rgba(249, 115, 22, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(249, 115, 22, 0.65),
      0 0 28px 6px rgba(249, 115, 22, 0.35),
      0 0 48px 10px rgba(251, 146, 60, 0.22);
  }
}

.export-followup-date-card.export-followup-date-card--blink-today {
  animation: export-followup-today-blink 1s ease-in-out infinite;
}

.export-followup-date-card.export-followup-date-card--blink-today:hover {
  animation: export-followup-today-blink 1s ease-in-out infinite;
}

.export-followup-overdue {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
}

.export-followup-yesterday {
  background: #f59e0b;
  border-color: #f59e0b;
  color: white;
}

.export-followup-today {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.export-followup-pending {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.export-followup-closed {
  background: #475569;
  border-color: #475569;
  color: white;
}

.export-followup-date-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.export-followup-date-label {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 5px;
}

.export-followup-date-hint {
  font-size: 12px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .export-dashboard {
    padding: 16px;
  }

  .export-dashboard-country-section {
    padding: 16px;
  }

  .export-dashboard-stats {
    gap: 8px;
  }

  .stat-card {
    min-width: 100px;
    padding: 10px 16px;
  }

  .export-dashboard-tabs {
    flex-direction: column;
  }

  .export-dashboard-tab {
    width: 100%;
    text-align: left;
  }

  .export-followup-date-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .export-followup-date-card.export-followup-date-card--blink-today {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(249, 115, 22, 0.5),
      0 0 20px rgba(249, 115, 22, 0.25);
  }
}


.export-sales-order-report {
  padding: 20px 30px;
  max-width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.report-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  text-align: center;
}

.export-sales-order-report-region-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.export-sales-order-report-region-tab {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #2c3e50;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-sales-order-report-region-tab:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.export-sales-order-report-region-tab.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.export-payment-due-hint {
  margin: 0 0 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.report-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: report-spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes report-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.report-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-filters {
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item label {
  font-weight: 500;
  color: #475569;
  font-size: 13px;
}

.filter-item input,
.filter-item select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  min-width: 140px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.btn-apply {
  padding: 8px 18px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.btn-apply:hover {
  background: #2563eb;
}

.btn-clear {
  padding: 8px 18px;
  background: #94a3b8;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.btn-clear:hover {
  background: #64748b;
}

.report-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-control label {
  font-weight: 500;
  color: #555;
}

.entries-control select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-control label {
  font-weight: 500;
  color: #555;
}

.search-control input {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 220px;
}

.report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.report-table th,
.report-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.report-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.report-table tbody tr:hover {
  background: #f8fafc;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-partially-created { background: #dbeafe; color: #1e40af; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-complete { background: #d1fae5; color: #065f46; }
.status-proceeded { background: #d1fae5; color: #047857; }
.status-ready-for-pickup { background: #dbeafe; color: #1e40af; margin-right: 6px; }
.status-delivered { background: #d1fae5; color: #065f46; }

.return-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #fef3c7;
  color: #92400e;
}

.return-none {
  color: #94a3b8;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-btn {
  background: #3b82f6;
  color: white;
}

.view-btn:hover {
  background: #2563eb;
}

.no-data {
  text-align: center;
  padding: 40px !important;
  color: #64748b;
}

.report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 14px;
  color: #64748b;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-btn {
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-pages {
  font-size: 14px;
  color: #475569;
}

/* Modal */
.report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.report-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
  padding: 4px;
}

.close-btn:hover {
  color: #1e293b;
}

.report-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.report-modal-body section {
  margin-bottom: 24px;
}

.report-modal-body section:last-child {
  margin-bottom: 0;
}

.report-modal-body h3 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: #334155;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 6px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px 24px;
  gap: 12px 24px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.info-item span {
  font-size: 14px;
  color: #1e293b;
}

.products-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.products-table th,
.products-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid #e2e8f0;
}

.products-table th {
  background: #f1f5f9;
  font-weight: 600;
}

.export-stock-received-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.export-stock-received-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.export-stock-received-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
}

.export-stock-received-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.export-stock-received-filters .form-group {
  min-width: 160px;
}

.export-stock-received-alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.export-stock-received-alert-error {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.export-stock-received-alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.export-stock-received-muted {
  color: #6c757d;
  margin: 0;
}

.export-stock-received-table-wrap {
  overflow-x: auto;
}

.export-stock-received-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.export-stock-received-table th,
.export-stock-received-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
}

.export-stock-received-table thead {
  background: #f8f9fa;
}

.export-stock-received-table tbody tr:hover {
  background: #f8f9fa;
}

.export-stock-received-remark-input {
  width: 100%;
  min-width: 140px;
  max-width: 220px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.85rem;
}

.export-stock-received-actions .btn {
  white-space: nowrap;
}

.export-stock-transfer-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.export-stock-transfer-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.export-stock-transfer-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
}

.export-stock-transfer-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 1rem 1.25rem;
  gap: 1rem 1.25rem;
}

.export-stock-transfer-form-span-2 {
  grid-column: span 2;
}

.export-stock-transfer-form-grid textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

.export-stock-transfer-form-actions {
  margin-top: 1.25rem;
}

.export-stock-transfer-final-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.export-stock-transfer-final-actions .btn-success {
  min-width: 180px;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.export-stock-transfer-hint {
  display: block;
  margin-top: 0.35rem;
  color: #6c757d;
}

.export-stock-transfer-form-grid select:disabled,
.export-stock-transfer-form-grid input:disabled,
.export-stock-transfer-form-grid .est-product-dropdown-btn:disabled {
  background: #f1f3f5;
  color: #495057;
  cursor: not-allowed;
}

.est-product-dropdown-field {
  position: relative;
}

.est-product-dropdown-field.is-open {
  z-index: 30;
}

.est-product-dropdown {
  position: relative;
}

.est-product-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 38px;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  color: #495057;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.est-product-dropdown-btn.has-value {
  color: #212529;
}

.est-product-dropdown-label {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-product-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 280px;
  max-width: min(480px, 90vw);
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 40;
  overflow: hidden;
}

.est-product-dropdown-search-wrap {
  position: relative;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

.est-product-dropdown-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 0.8rem;
  pointer-events: none;
}

.est-product-dropdown-search {
  width: 100%;
  padding: 0.5rem 0.65rem 0.5rem 2rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.est-product-dropdown-search:focus {
  outline: none;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.est-product-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
}

.est-product-dropdown-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.est-product-dropdown-option:hover {
  background: #f8f9fa;
}

.est-product-dropdown-option.is-selected {
  background: #e7f1ff;
}

.est-product-dropdown-option-name {
  color: #212529;
  font-size: 0.9rem;
  line-height: 1.3;
  word-break: break-word;
  white-space: normal;
}

.est-product-dropdown-option-qty {
  color: #6c757d;
  font-size: 0.78rem;
}

.est-product-dropdown-empty {
  padding: 0.85rem 0.75rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.export-stock-transfer-alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.export-stock-transfer-alert-error {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.export-stock-transfer-alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.export-stock-transfer-muted {
  color: #6c757d;
  margin: 0;
}

.export-stock-transfer-table-wrap {
  overflow-x: auto;
}

.export-stock-transfer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.export-stock-transfer-table th,
.export-stock-transfer-table td {
  border: 1px solid #dee2e6;
  padding: 0.5rem 0.65rem;
  text-align: left;
  white-space: nowrap;
}

.export-stock-transfer-table thead {
  background: #f8f9fa;
}

.export-stock-transfer-table tbody tr:hover {
  background: #f8f9fa;
}

@media (max-width: 1200px) {
  .export-stock-transfer-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .export-stock-transfer-form-grid {
    grid-template-columns: 1fr;
  }
  .export-stock-transfer-form-span-2 {
    grid-column: auto;
  }
}

.job-work-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 24px 28px 32px;
  min-height: 100%;
  box-sizing: border-box;
}

/* ── Job Work List page ── */
.job-work-list-page {
  background-color: #f1f5f9;
  gap: 1rem;
}

.job-work-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(91, 33, 182, 0.25);
}

.job-work-list-header-text h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

.job-work-list-header-text p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
}

.job-work-list-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  color: #5b21b6;
  border: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.job-work-list-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  color: #4c1d95;
}

.job-work-list-create-btn-sm {
  margin-top: 12px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  color: #fff;
}

.job-work-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.job-work-products-warehouse-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-work-products-warehouse-filter label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.job-work-products-warehouse-filter select {
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.9rem;
}

.job-work-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.job-work-country-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.job-work-country-badge i {
  color: #7c3aed;
}

.job-work-record-count {
  padding: 8px 14px;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.job-work-list-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(30, 45, 80, 0.06);
  overflow: hidden;
}

.job-work-list-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: #64748b;
  font-size: 0.95rem;
}

.job-work-list-state i {
  font-size: 1.75rem;
  color: #7c3aed;
}

.job-work-list-state-empty i {
  color: #94a3b8;
}

.job-work-list-table-wrap {
  border-radius: 0;
}

.job-work-list-table {
  margin: 0;
}

.job-work-list-table thead th {
  background: #f5f3ff;
  color: #5b21b6;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border: none;
  border-bottom: 2px solid #e9d5ff;
  white-space: nowrap;
  vertical-align: middle;
}

.job-work-list-table tbody tr {
  transition: background-color 0.15s ease;
}

.job-work-list-table tbody tr:hover {
  background-color: #f8fafc;
}

.job-work-list-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.job-work-list-table tbody tr:nth-child(even):hover {
  background-color: #f1f5f9;
}

.job-work-list-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: middle;
}

.job-work-col-sn {
  font-weight: 600;
  color: #64748b;
  width: 56px;
}

.job-work-col-no {
  font-weight: 600;
  color: #5b21b6;
  white-space: nowrap;
}

.job-work-col-num {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.job-work-list-table thead th:nth-child(5),
.job-work-list-table thead th:nth-child(6) {
  text-align: right;
}

.job-work-status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.job-work-status-badge-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.job-work-status-badge-final {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.job-work-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.job-work-alert-error {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.job-work-alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.job-work-table-wrap {
  overflow-x: auto;
}

.job-work-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.job-work-table th,
.job-work-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
}

.job-work-table thead {
  background: #f8f9fa;
}

.job-work-hint {
  display: block;
  margin-top: 0.35rem;
  color: #6c757d;
  font-size: 0.85rem;
}

.job-work-status-final {
  color: #0f5132;
  font-weight: 600;
}

.job-work-status-pending {
  color: #664d03;
  font-weight: 600;
}

.job-work-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.job-work-action-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.job-work-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.job-work-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.job-work-action-btn.view-btn {
  background-color: #17a2b8;
  color: #fff;
}

.job-work-action-btn.edit-btn {
  background-color: #3b82f6;
  color: #fff;
}

.job-work-action-btn.status-btn {
  background-color: #fff;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.job-work-action-btn.received-btn {
  background-color: #10b981;
  color: #fff;
}

.job-work-action-btn.receive-complete-btn {
  background-color: #7c3aed;
  color: #fff;
}

.job-work-action-btn.reject-btn {
  background-color: #dc2626;
  color: #fff;
}

.job-work-action-btn.print-btn {
  background-color: #fff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  min-width: 36px;
  padding: 8px 10px;
  justify-content: center;
}

.job-work-action-btn.print-btn:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.job-work-status-badge-rejected {
  background-color: #fee2e2;
  color: #991b1b;
}

.job-work-reject-confirm-btn {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

.job-work-reject-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.job-work-status-badge-received-complete {
  background-color: #ede9fe;
  color: #5b21b6;
}

.job-work-receive-modal {
  max-width: 960px;
}

.job-work-receive-qty-input {
  width: 100%;
  min-width: 90px;
  max-width: 140px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
}

.job-work-receive-hint {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.job-work-receive-capacity {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #475569;
}

.job-work-receive-field-hint {
  font-size: 0.82rem;
  color: #b45309;
}

.job-work-receive-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.job-work-receive-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.job-work-receive-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.job-work-receive-text-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
}

.job-work-receive-product-picker {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}

.job-work-receive-clear-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #475569;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}

.job-work-receive-product-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.job-work-receive-product-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 10px 12px;
  font-size: 0.88rem;
  cursor: pointer;
}

.job-work-receive-product-option:hover {
  background: #f8fafc;
}

.job-work-receive-product-empty {
  color: #64748b;
  cursor: default;
}

.job-work-view-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.job-work-view-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.job-work-view-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.job-work-view-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #333;
}

.job-work-view-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.job-work-view-modal-close:hover {
  background: #e9ecef;
}

.job-work-view-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.job-work-view-section {
  margin-bottom: 24px;
}

.job-work-view-section h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #333;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
}

.job-work-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.job-work-view-item label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.job-work-view-item span {
  display: block;
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  color: #333;
  min-height: 36px;
}

.job-work-confirm-modal {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.job-work-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.job-work-finalize-modal {
  max-width: 480px;
}

.job-work-finalize-hint {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}

.job-work-finalize-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 0.75rem;
}

.job-work-finalize-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.job-work-finalize-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.job-work-finalize-field label .required {
  color: #dc2626;
  margin-left: 2px;
}

.job-work-finalize-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.job-work-finalize-field input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.job-work-finalize-error {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #b91c1c;
}

@media (max-width: 520px) {
  .job-work-finalize-fields-row {
    grid-template-columns: 1fr;
  }
}

.job-work-product-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.job-work-product-actions .edit-btn,
.job-work-product-actions .delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
}

.job-work-product-actions .edit-btn:disabled,
.job-work-product-actions .delete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Job Work Upload Document page ── */
.job-work-upload-doc-page {
  gap: 1.125rem;
}

.jw-upload-doc-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 55%, #a78bfa 100%);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(91, 33, 182, 0.18);
}

.jw-upload-doc-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.jw-upload-doc-header-text h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.02em;
}

.jw-upload-doc-header-text p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  max-width: 52ch;
}

.jw-upload-doc-filters-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.jw-upload-doc-filters-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.jw-upload-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #475569;
}

.jw-upload-doc-chip i {
  font-size: 0.82rem;
}

.jw-upload-doc-chip-country {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.jw-upload-doc-chip-country i {
  color: #7c3aed;
}

.jw-upload-doc-chip-country strong {
  color: #1e293b;
  font-weight: 600;
}

.jw-upload-doc-chip-count {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #e9d5ff;
}

.jw-upload-doc-chip-count i {
  color: #7c3aed;
}

.jw-upload-doc-warehouse-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(100%, 320px);
}

.jw-upload-doc-warehouse-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.jw-upload-doc-warehouse-field label i {
  color: #7c3aed;
}

.jw-upload-doc-warehouse-select {
  width: 100%;
  min-width: 280px;
  padding: 11px 14px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 viewBox=%270 0 12 8%27%3E%3Cpath fill=%27%2364748b%27 d=%27M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.jw-upload-doc-warehouse-select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.jw-upload-doc-warehouse-select:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.jw-upload-doc-alert {
  margin-top: 0;
}

.jw-upload-doc-panel {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.jw-upload-doc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #eef2f6;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.jw-upload-doc-panel-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  color: #1e293b;
}

.jw-upload-doc-panel-head p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: #64748b;
}

.jw-upload-doc-panel-badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.78rem;
  font-weight: 700;
}

.jw-upload-doc-panel-empty {
  padding: 0;
}

.jw-upload-doc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 28px;
  text-align: center;
  color: #64748b;
}

.jw-upload-doc-empty-state h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #334155;
}

.jw-upload-doc-empty-state p {
  margin: 0;
  max-width: 36ch;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.jw-upload-doc-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 1.4rem;
}

.jw-upload-doc-loading {
  padding: 44px 24px;
}

.jw-upload-doc-loading i {
  font-size: 1.5rem;
  color: #7c3aed;
}

.jw-upload-doc-table-wrap {
  overflow-x: auto;
}

.jw-upload-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.jw-upload-doc-table thead th {
  padding: 13px 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid #e8edf3;
  white-space: nowrap;
}

.jw-upload-doc-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.jw-upload-doc-table tbody tr {
  transition: background-color 0.12s ease;
}

.jw-upload-doc-table tbody tr:hover {
  background: #fafbff;
}

.jw-upload-doc-table tbody tr:last-child td {
  border-bottom: none;
}

.jw-upload-doc-col-center {
  text-align: center;
}

.jw-upload-doc-date {
  color: #64748b;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.jw-upload-doc-job-no {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: nowrap;
}

.jw-upload-doc-product {
  font-weight: 500;
  color: #1e293b;
  max-width: 280px;
}

.jw-upload-doc-batch {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.84rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.jw-upload-doc-batch-missing {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.jw-upload-doc-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.jw-upload-doc-status.is-yes {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.jw-upload-doc-status.is-no {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.jw-upload-doc-doc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.jw-upload-doc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
  color: #6d28d9;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.jw-upload-doc-action-btn:hover:not(:disabled) {
  background: #f5f3ff;
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.12);
  transform: translateY(-1px);
}

.jw-upload-doc-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  transform: none;
}

.jw-upload-doc-action-btn i {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .job-work-page {
    padding: 16px;
  }

  .job-work-list-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px;
  }

  .job-work-list-create-btn {
    justify-content: center;
  }

  .job-work-list-table thead th,
  .job-work-list-table tbody td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .jw-upload-doc-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .jw-upload-doc-filters-card {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .jw-upload-doc-warehouse-field {
    min-width: 100%;
  }

  .jw-upload-doc-warehouse-select {
    min-width: 100%;
  }

  .jw-upload-doc-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .jw-upload-doc-action-btn span {
    display: none;
  }

  .jw-upload-doc-table thead th,
  .jw-upload-doc-table tbody td {
    padding: 12px 14px;
    font-size: 0.82rem;
  }
}

/* View Buyer Modal Styles */
.booking-details-modal {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 70vw;
    max-height: 80vh;
    min-width: 60vw;
    position: relative;
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid #e9ecef;
  }
  
  .modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
  }
  
  .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
  }
  
  .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .modal-body {
    padding: 40px;
    flex: 1 1;
    overflow-y: auto;
    min-height: 0;
  }
  
  /* Field Layout */
  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 20px;
  }

  .buyer-previous-company-section {
    margin-bottom: 20px;
  }

  .buyer-previous-company-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .buyer-previous-company-item {
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
  }

  .buyer-previous-company-line {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
  }

  .buyer-previous-company-line:last-child {
    margin-bottom: 0;
  }

  .buyer-previous-company-date {
    color: #666;
    font-size: 13px;
  }

  .buyer-previous-company-empty {
    margin: 0;
    color: #666;
    font-size: 14px;
  }
  
  .field-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 18px;
    transition: all 0.3s ease;
  }
  
  .field-box:hover {
    background: #e9ecef;
    border-color: #667eea;
  }
  
  .field-box.full-width {
    grid-column-start: 1; grid-column-end: -1;
  }
  
  .field-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }
  
  .field-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
  }
  
  /* Special Field Styles */
  .buyer-id {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
  }
  
  .buyer-id .field-label {
    color: rgba(255, 255, 255, 0.8);
  }
  
  .buyer-id .field-value {
    color: white;
    font-weight: 700;
    font-size: 16px;
  }
  
  .company-under {
    text-align: center;
  }
  
  .company-under .field-value {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #d4edda;
    color: #155724;
  }
  
  /* Info Sections */
  .info-section {
    margin-bottom: 32px;
  }
  
  .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
    display: inline-block;
  }
  
  /* Products List */
  .products-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
  }
  
  .product-name {
    font-weight: 600;
    color: #2c3e50;
  }
  
  .product-type {
    color: #667eea;
    font-weight: 500;
  }
  
  .product-spec {
    color: #7f8c8d;
    font-style: italic;
  }
  
  /* Modal Footer */
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 40px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    z-index: 10;
    min-height: 80px;
  }
  
  .close-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .close-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
  }
  
  /* Responsive Design */
  @media (max-width: 1400px) {
    .booking-details-modal {
      max-width: 75vw;
      min-width: 65vw;
    }
  }
  
  @media (max-width: 1200px) {
    .booking-details-modal {
      max-width: 80vw;
      min-width: 70vw;
    }
    
    .field-grid {
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
  }
  
  @media (max-width: 768px) {
    .booking-details-modal {
      max-width: 95vw;
      min-width: 90vw;
      margin: 10px;
    }
    
    .modal-header {
      padding: 20px 30px;
    }
    
    .modal-header h3 {
      font-size: 18px;
    }
    
    .modal-body {
      padding: 30px;
    }
    
    .field-row {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    
    .field-grid {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    
    .field-box {
      padding: 12px;
    }
    
    .modal-footer {
      padding: 16px 30px;
    }
    
    .close-btn {
      width: 100%;
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .modal-header {
      padding: 15px 20px;
    }
    
    .modal-body {
      padding: 20px;
    }
    
    .field-box {
      padding: 10px;
    }
    
    .field-label {
      font-size: 11px;
    }
    
    .field-value {
      font-size: 13px;
    }
    
    .section-title {
      font-size: 14px;
    }
  }
  
/* Add Buyer Full Page Styles */
.add-buyer {
    width: 100%;
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
  }
  
  /* Form Header */
  .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .form-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
  }
  
  .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
  }
  
  .back-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
  }
  
  /* Error Message */
  .error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
  }
  
  .error-message i {
    font-size: 16px;
  }
  
  /* Success Message */
  .success-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
  }
  
  .success-message i {
    font-size: 16px;
  }
  
  /* Form Styles */
  .buyer-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* Phase Indicator */
  .phase-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
  }
  
  .phase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
    position: relative;
  }
  
  .phase-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 100%;
    width: 40px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
  }
  
  .phase-step.active:not(:last-child)::after {
    background: #667eea;
  }
  
  .phase-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
  }
  
  .phase-step.active .phase-number {
    background: #667eea;
    color: white;
  }
  
  .phase-label {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
  }
  
  .phase-step.active .phase-label {
    color: #667eea;
    font-weight: 600;
  }
  
  /* Form Sections */
  .form-section {
    margin-bottom: 40px;
  }
  
  .form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    font-size: 20px;
    font-weight: 600;
  }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px 28px;
    gap: 20px 28px;
    margin-bottom: 20px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Grid items default to min-width:auto and can overflow into the next column; clamp width */
  .form-grid > .form-group {
    min-width: 0;
    box-sizing: border-box;
  }

  /* Extra separation before the next column (e.g. GSTIN/Company Type) — company field has autocomplete dropdown */
  .form-grid > .form-group--company-name {
    -webkit-padding-end: 12px;
            padding-inline-end: 12px;
  }
  
  .form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
  }
  
  .form-label.required::after {
    content: ' *';
    color: #dc3545;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  }
  
  .form-select[multiple] {
    min-height: 120px;
    padding: 8px;
  }
  
  .form-help {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
  }
  
  /* Array Input Groups */
  .array-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .array-input-group .form-input {
    flex: 1 1;
  }
  
  .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
  }
  
  .remove-btn:hover {
    background: #c82333;
  }
  
  .add-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
  }
  
  .add-btn:hover {
    background: #218838;
  }
  
  /* Form Actions */
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
  }
  
  .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
  }
  
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .btn-primary {
    background: #007bff;
    color: white;
  }
  
  .btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  .btn-secondary {
    background: #6c757d;
    color: white;
  }
  
  .btn-secondary:hover:not(:disabled) {
    background: #5a6268;
  }
  
  .btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
  }
  
  .btn-outline:hover:not(:disabled) {
    background: #007bff;
    color: white;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .add-buyer {
      padding: 10px;
    }
    
    .form-header {
      flex-direction: column;
      gap: 15px;
      align-items: stretch;
    }
    
    .form-header h2 {
      font-size: 24px;
      text-align: center;
    }
    
    .back-btn {
      align-self: center;
    }
    
    .buyer-form {
      padding: 20px;
    }
    
    .form-grid {
      grid-template-columns: 1fr;
      gap: 15px;
    }
    
    .phase-indicator {
      flex-direction: column;
      gap: 20px;
    }
    
    .phase-step {
      margin: 0;
    }
    
    .phase-step:not(:last-child)::after {
      display: none;
    }
    
    .form-actions {
      flex-direction: column;
    }
    
    .btn {
      width: 100%;
    }
    
    .array-input-group {
      flex-direction: column;
      align-items: stretch;
    }
    
    .remove-btn {
      width: 100%;
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .form-header h2 {
      font-size: 20px;
    }
    
    .buyer-form {
      padding: 15px;
    }
    
    .form-section h3 {
      font-size: 18px;
    }
    
    .back-btn {
      width: 100%;
      justify-content: center;
    }
  }
/* MarketingAddExportSampleStock + ExportSampleStockList shared styling */

.ess-add-page,
.ess-list-page {
  padding: 24px 28px 40px;
  background: #f5f7fb;
  min-height: 100%;
  box-sizing: border-box;
}

.ess-add-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  padding: 24px 26px 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.ess-list-page {
  width: 100%;
  max-width: 100%;
}

.ess-list-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  padding: 24px 26px 28px;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.ess-add-header,
.ess-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ess-add-title,
.ess-list-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.ess-add-subtitle,
.ess-list-subtitle {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.ess-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 16px 18px;
  gap: 16px 18px;
  margin-bottom: 22px;
}

.ess-form-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ess-form-field-full {
  grid-column: 1 / -1;
}

.ess-form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.ess-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.ess-required {
  color: #dc2626;
  margin-left: 2px;
}

.ess-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.ess-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.ess-input-readonly,
.ess-input:disabled {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}

.ess-textarea {
  resize: vertical;
  min-height: 78px;
  font-family: inherit;
  line-height: 1.4;
}

.ess-search-wrapper {
  position: relative;
}

.ess-clear-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
}
.ess-clear-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

.ess-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.ess-dropdown-empty {
  padding: 10px 14px;
  color: #94a3b8;
  font-size: 13px;
}

.ess-dropdown-item {
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #0f172a;
}
.ess-dropdown-item:hover,
.ess-dropdown-item[aria-selected="true"] {
  background: #eff6ff;
}

.ess-dropdown-primary {
  font-weight: 500;
}

.ess-dropdown-secondary {
  font-size: 11px;
  color: #64748b;
}

.ess-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ess-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.ess-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ess-btn-primary {
  background: #2563eb;
  color: #ffffff;
}
.ess-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.ess-btn-secondary {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}
.ess-btn-secondary:hover:not(:disabled) {
  background: #f1f5f9;
}

.ess-btn-light {
  background: #f1f5f9;
  color: #334155;
}
.ess-btn-light:hover:not(:disabled) {
  background: #e2e8f0;
}

.ess-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ess-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.ess-alert-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
}

.ess-meta {
  margin: 16px 0 0;
  font-size: 12px;
  color: #64748b;
  text-align: right;
}

/* List page-specific */
.ess-list-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ess-list-search {
  flex: 1 1 280px;
  min-width: 200px;
  max-width: none;
}

.ess-total-stock-display {
  background-color: #ffeb3b;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.ess-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.ess-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
}

.ess-table thead th {
  background: #f8fafc;
  color: #334155;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.ess-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  vertical-align: top;
}

.ess-table tbody tr:hover {
  background: #f8fafc;
}

.ess-table-empty {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
}

.ess-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 600;
}

.ess-loading-row {
  text-align: center;
  padding: 24px 12px;
  color: #475569;
}

.ess-list-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
}

.ess-product-group-row {
  cursor: pointer;
}

.ess-product-group-row:hover {
  background: #f8fafc;
}

.ess-expand-cell {
  width: 44px;
  text-align: center;
  color: #2563eb;
  font-size: 14px;
}

.ess-batch-detail-row td {
  padding: 0 !important;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.ess-batch-inner {
  padding: 20px 24px 24px 56px;
}

.ess-batch-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ess-batch-panel-title {
  margin: 0;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
}

.ess-batch-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 15px;
  background: #ffffff;
}

.ess-batch-table thead th {
  background: #e2e8f0;
  color: #1e293b;
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.ess-batch-table tbody td {
  padding: 20px 18px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: middle;
  line-height: 1.5;
  font-size: 15px;
}

.ess-batch-table tbody tr.ess-batch-row td:first-child {
  border-left: 1px solid #e2e8f0;
  border-radius: 8px 0 0 8px;
}

.ess-batch-table tbody tr.ess-batch-row td:last-child {
  border-right: 1px solid #e2e8f0;
  border-radius: 0 8px 8px 0;
}

.ess-batch-table tbody tr.ess-batch-row:hover td {
  background: #f8fafc;
}

.ess-batch-col-sno {
  width: 88px;
  min-width: 88px;
  text-align: center;
}

.ess-batch-table thead th.ess-batch-col-sno {
  text-align: center;
}

.ess-batch-sno-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 15px;
  font-weight: 600;
}

.ess-batch-col-batch {
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.ess-batch-col-qty {
  text-align: center;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
}

.ess-batch-table thead th.ess-batch-col-qty {
  text-align: center;
}

.ess-batch-col-date {
  min-width: 120px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
}

.ess-batch-table thead th.ess-batch-col-date {
  text-align: center;
}

.ess-batch-col-view {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.ess-batch-table thead th.ess-batch-col-view {
  text-align: center;
}

.ess-batch-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #2563eb;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ess-batch-view-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.ess-batch-view-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ess-report-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}

.ess-report-modal {
  width: min(960px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.ess-report-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ess-report-modal-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.ess-report-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.ess-report-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
}

.ess-report-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ess-report-modal-body {
  padding: 20px 24px 24px;
  overflow: auto;
}

.ess-report-modal-status {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.ess-report-modal-table-wrap {
  overflow-x: auto;
}

.ess-report-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ess-report-modal-table thead th {
  background: #e2e8f0;
  color: #1e293b;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid #cbd5e1;
}

.ess-report-modal-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: middle;
}

.ess-report-modal-table tbody tr:hover td {
  background: #f8fafc;
}

@media (max-width: 640px) {
  .ess-add-page,
  .ess-list-page {
    padding: 16px;
  }

  .ess-add-card,
  .ess-list-card {
    padding: 18px 16px 20px;
  }

  .ess-actions {
    justify-content: stretch;
  }

  .ess-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Buyers Page Styles - Matching Supplier Management Design */
.buyers-page {
  min-height: 100vh;
  background: #f8f9fa;
  padding: 20px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
  color: #2c3e50;
  margin: 0 0 5px 0;
  font-size: 28px;
  font-weight: 700;
}

.header-content p {
  color: #6c757d;
  margin: 0;
  font-size: 16px;
}

.add-btn {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.error-message i {
  font-size: 16px;
}

.buyers-view-as-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
  border: 1px solid #c5cae9;
  border-radius: 8px;
  color: #37474f;
  font-size: 15px;
}

.buyers-view-as-banner button {
  background: #5c6bc0;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.buyers-view-as-banner button:hover {
  background: #3f51b5;
}

.buyers-peer-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.buyers-peer-select-wrap label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.buyers-peer-select {
  min-width: 260px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.buyers-admin-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.buyers-admin-tab {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #2c3e50;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buyers-admin-tab:hover {
  border-color: #667eea;
  color: #667eea;
}

.buyers-admin-tab.active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.card-icon.purple {
  background: #667eea;
}

.card-icon.pink {
  background: #e91e63;
}

.card-icon.blue {
  background: #2196f3;
}

.card-icon.green {
  background: #4caf50;
}

.card-content {
  flex: 1 1;
}

.card-number {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.card-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

/* Search Section */
.search-section {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
  color: #6c757d;
}

/* Table Container */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Buyers Table */
.buyers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.buyers-table thead {
  background: #f8f9fa;
}

.buyers-table th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.buyers-table th.sortable-header {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.buyers-table th.sortable-header:hover {
  background-color: #e9ecef;
}

.buyers-table th.sortable-header span {
  margin-right: 8px;
}

.buyers-table th.sortable-header i {
  font-size: 12px;
  color: #667eea;
  margin-left: 4px;
}

.buyers-table th.sortable-header i.sort-inactive {
  color: #adb5bd;
  opacity: 0.5;
}

.buyers-table th.sortable-header:hover i.sort-inactive {
  opacity: 1;
  color: #667eea;
}

.buyers-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
}

.buyers-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.buyers-table tbody tr:hover {
  background: #f8f9fa;
}

/* Table Column Styles */
.sno {
  width: 60px;
  text-align: center;
  font-weight: 600;
  color: #6c757d;
}

.company {
  min-width: 200px;
}

.company-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.gstin {
  font-size: 12px;
  color: #6c757d;
}

.contact {
  min-width: 180px;
}

.contact-name {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 4px;
}

.contact-email {
  font-size: 12px;
  color: #6c757d;
}

.location {
  min-width: 200px;
  color: #2c3e50;
}

.status {
  min-width: 100px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.inactive {
  background: #f8d7da;
  color: #721c24;
}

.created {
  min-width: 120px;
  color: #6c757d;
  font-size: 13px;
}

.actions {
  width: 120px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.view-btn {
  background: #e3f2fd;
  color: #1976d2;
}

.view-btn:hover {
  background: #bbdefb;
}

.edit-btn {
  background: #fff3e0;
  color: #f57c00;
}

.edit-btn:hover {
  background: #ffe0b2;
}

.delete-btn {
  background: #ffebee;
  color: #d32f2f;
}

.delete-btn:hover:not(:disabled) {
  background: #ffcdd2;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-content {
  color: #6c757d;
}

.empty-content i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #dee2e6;
}

.empty-content h3 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 600;
}

.empty-content p {
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.5;
}

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #6c757d;
}

.loading-container i {
  font-size: 32px;
  margin-bottom: 15px;
}

.loading-container p {
  font-size: 16px;
  margin: 0;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.page-info {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e9ecef;
  background: white;
  color: #2c3e50;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination-btn.active:hover {
  background: #5a6fd8;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

/* Report Modal Styles (matching AllStock.js) */
.report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.report-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f7fafc;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1a202c;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #718096;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background-color: #e2e8f0;
  color: #2d3748;
}

.report-modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px;
}

.report-modal-info {
  background-color: #f7fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.report-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.report-info-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-info-field label {
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-info-field span {
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
}

.report-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background-color: #f7fafc;
  display: flex;
  justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
  .buyers-page {
    padding: 10px;
  }
  
  .page-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .header-content {
    text-align: center;
  }
  
  .header-content h1 {
    font-size: 24px;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .search-box {
    max-width: none;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .buyers-table {
    min-width: 800px;
  }
  
  .buyers-table th,
  .buyers-table td {
    padding: 10px 8px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 4px;
  }
  
  .action-btn {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .pagination-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 20px;
  }
  
  .summary-card {
    padding: 15px;
  }
  
  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .card-number {
    font-size: 20px;
  }
  
  .buyers-table th,
  .buyers-table td {
    padding: 8px 6px;
    font-size: 12px;
  }
  
  .company-name,
  .contact-name {
    font-size: 13px;
  }
  
  .gstin,
  .contact-email {
    font-size: 11px;
  }
}
.mcd-page {
  max-width: 1200px;
  margin: 0 auto;
}

.mcd-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.mcd-card h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: #1a1a2e;
}

.mcd-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  align-items: end;
}

.mcd-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.35rem;
}

.mcd-field input,
.mcd-field select,
.mcd-field textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

.mcd-field textarea {
  min-height: 48px;
  resize: vertical;
}

.mcd-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.mcd-btn-primary {
  background: #2c6ecb;
  color: #fff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.mcd-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mcd-note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.mcd-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.mcd-table-wrap {
  overflow-x: auto;
}

.mcd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mcd-table th,
.mcd-table td {
  border: 1px solid #e0e0e0;
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.mcd-table th {
  background: #f5f6f8;
  font-weight: 600;
}

.mcd-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.mcd-row-expiry-soon {
  background: #fff3e0 !important;
}

.mcd-row-expiry-urgent {
  background: #ffebee !important;
}

.mcd-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: none;
  background: #2c6ecb;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.mcd-view-btn:hover {
  background: #1e5aa8;
}

.mcd-view-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.mcd-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.mcd-error {
  color: #c62828;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.mcd-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mcd-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: 1px solid #2c6ecb;
  background: #fff;
  color: #2c6ecb;
  border-radius: 4px;
  cursor: pointer;
}

.mcd-edit-btn:hover {
  background: #e8f0fc;
}

.mcd-edit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.mcd-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}

.mcd-modal-panel {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.mcd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e0e0e0;
}

.mcd-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.mcd-modal-close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0.25rem;
}

.mcd-modal-close:hover {
  color: #111;
}

.mcd-modal-body {
  padding: 1.25rem;
}

.mcd-modal-hint {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
}

.mcd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.mcd-btn-secondary {
  padding: 0.45rem 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.mcd-btn-secondary:hover:not(:disabled) {
  background: #f5f5f5;
}

.mcd-btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.complete-order {
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f5f5;
  }
  
  .complete-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .complete-order-title {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
    font-weight: 600;
  }
  
  .complete-order-controls {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .search-box label {
    color: #666;
    font-size: 0.9rem;
  }
  
  .search-input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 200px;
  }
  
  .search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .complete-order-error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .complete-order-table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 20px;
  }
  
  .complete-order-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
  }
  
  .complete-order-table thead {
    background-color: #f1f5f9;
  }
  
.complete-order-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.complete-order-table th:first-child {
  text-align: center;
}
  
  .complete-order-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
  }
  
  .complete-order-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
.complete-order-table td {
  padding: 12px 16px;
  color: #334155;
  font-size: 0.875rem;
}

.complete-order-table td:first-child {
  text-align: center;
  font-weight: 500;
}
  
  .no-data {
    text-align: center;
    padding: 40px !important;
    color: #64748b;
    font-style: italic;
  }
  
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
  
  .view-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .view-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  }
  
  .view-btn i {
    font-size: 0.8rem;
  }
  
  .copy-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .copy-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  }
  
  .copy-btn i {
    font-size: 0.8rem;
  }
  
  .send-mail-select {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: white;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
  }
  
  .send-mail-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .send-mail-select:hover {
    border-color: #94a3b8;
  }
  
  .complete-order-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .complete-order-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* Pagination Styles */
  .complete-order-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .pagination-info {
    color: #64748b;
    font-size: 0.9rem;
  }
  
  .pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    background-color: white;
    color: #475569;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    min-width: 40px;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #94a3b8;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
  }
  
  .pagination-ellipsis {
    padding: 0 8px;
    color: #64748b;
  }
  
  .page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .entries-selector {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .entries-selector label {
    color: #666;
    font-size: 0.9rem;
  }
  
  .entries-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
    color: #334155;
    cursor: pointer;
  }
  
  .entries-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  /* View Modal Styles */
  .view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }
  
  .view-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .view-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
  }
  
  .view-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }
  
  .modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
  }
  
  .modal-close-btn:hover {
    background-color: #e9ecef;
    color: #333;
  }
  
  .view-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .view-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .view-modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  .view-modal-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
  }
  
  .view-modal-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 1.1rem;
  }
  
  /* View Order Info */
  .view-order-info {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
  }
  
  .view-order-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
  }
  
  .view-order-info-field {
    display: flex;
    flex-direction: column;
  }
  
  .view-order-info-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
  }
  
  .view-order-info-field span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
  }

  .view-order-info-title {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
  }
  
  /* View Products Table */
  .view-products-section {
    margin-bottom: 30px;
    overflow-x: auto;
  }
  
  .view-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1000px;
  }
  
  .view-products-table thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .view-products-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .view-products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .view-products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .view-products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .view-products-table td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }
  
  /* View Note Section */
  .view-note-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
  }
  
  .view-note-section label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: block;
  }
  
  .view-note-content {
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  
  /* View Modal Footer */
  .view-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
  }
  
  .modal-close-button {
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .modal-close-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }
  
  @media(max-width: 480px){
  .complete-order-controls{
    display: flex;
    flex-direction: column;
  }
}
/* Marketing Create Order Styles */

.marketing-create-order {
  padding: 5px 20px 10px 20px;
  max-width: 100%;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.marketing-order-header {
  margin-bottom: 10px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.marketing-order-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.marketing-order-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.marketing-order-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.marketing-order-form {
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: none !important;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #e2e8f0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.form-group {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(16.666% - 17px);
  min-width: 150px;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  flex: 1 1 100%;
}

.form-group label {
  margin-bottom: 3px;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.form-group input[type="text"]:not(.readonly-input):not([readonly]),
.form-group textarea {
  text-transform: uppercase;
}

.form-group input[type="text"].readonly-input,
.form-group input[type="number"].readonly-input,
.form-group input[type="text"][readonly],
.form-group input[type="number"][readonly],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select {
  text-transform: none;
}

.form-group input.no-number-spinner {
  -webkit-appearance: textfield;
          appearance: textfield;
}

.form-group input.no-number-spinner::-webkit-outer-spin-button,
.form-group input.no-number-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.readonly-input {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #666;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 5px;
}

.form-actions.save-section {
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.add-btn {
  padding: 8px 20px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.add-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.cancel-btn {
  padding: 8px 20px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.cancel-btn:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
}

.save-btn {
  padding: 8px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

/* Products Table */
.products-table-container {
  overflow-x: auto;
  margin-top: 3px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  background: white;
}

.products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 8px 12px;
  color: #555;
  font-size: 0.85rem;
  vertical-align: middle;
}

.po-upload-view-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.po-upload-remove-cross {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: white;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.po-upload-remove-cross:hover {
  filter: brightness(0.95);
}

.products-table tfoot {
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
  font-weight: 600;
}

.products-table tfoot td {
  padding: 8px 12px;
  color: #1e293b;
}

.marketing-create-order .products-table .edit-btn,
.marketing-create-order .products-table .delete-btn {
  padding: 8px 12px;
  margin: 0 4px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

.marketing-create-order .products-table .edit-btn {
  background-color: #3b82f6;
  color: #ffffff;
}

.marketing-create-order .products-table .edit-btn:hover:not(:disabled) {
  background-color: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.marketing-create-order .products-table .edit-btn i {
  color: inherit;
  font-size: 0.9rem;
}

.marketing-create-order .products-table .delete-btn {
  background-color: #ef4444;
  color: #ffffff;
}

.marketing-create-order .products-table .delete-btn:hover:not(:disabled) {
  background-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.marketing-create-order .products-table .delete-btn i {
  color: inherit;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(25% - 15px);
  }
}

@media (max-width: 768px) {
  .marketing-create-order {
    padding: 15px;
  }

  .marketing-order-form {
    padding: 20px;
  }

  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(50% - 10px);
  }

  .products-table {
    font-size: 0.85rem;
  }

  .products-table th,
  .products-table td {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .form-group {
    flex: 1 1 100%;
  }

  .save-btn,
  .add-btn {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }
}

.form-s-inside{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.form-order-top-fields {
  width: 100%;
}

.form-order-mode-field {
  max-width: 220px;
  margin-bottom: 10px;
}

.form-s-inside-order-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  width: 100%;
}

.form-s-inside-order-row .form-group {
  min-width: 0;
}

.form-s-inside-order-row .form-group select,
.form-s-inside-order-row .form-group input,
.form-s-inside-order-row .form-group button.form-input {
  width: 100%;
  box-sizing: border-box;
}

.form-s-inside-po-row {
  width: 100%;
  margin-top: 10px;
}

.form-s-inside-po-row .form-group {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1400px) {
  .form-s-inside-order-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .form-s-inside-order-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .form-s-inside-order-row {
    grid-template-columns: 1fr;
  }
}
/* Marketing Dashboard Styles - Matching Sales Dashboard Style */
.marketing-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.marketing-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.marketing-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.marketing-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.marketing-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Rejected Sales Order: blink whenever count > 0 */
@keyframes marketing-rejected-sales-order-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(236, 72, 153, 0.35),
      0 0 12px rgba(236, 72, 153, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(236, 72, 153, 0.65),
      0 0 28px 6px rgba(236, 72, 153, 0.3),
      0 0 48px 10px rgba(244, 114, 182, 0.2);
  }
}

@keyframes marketing-rejected-sales-order-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.marketing-metric-card.marketing-metric-card--blink-rejected-sales-order {
  animation: marketing-rejected-sales-order-blink 1s ease-in-out infinite;
}

.marketing-metric-card.marketing-metric-card--blink-rejected-sales-order:hover {
  animation: marketing-rejected-sales-order-blink 1s ease-in-out infinite;
}

.marketing-metric-card.marketing-metric-card--blink-rejected-sales-order::before {
  height: 5px;
  background: linear-gradient(90deg, #db2777, #ec4899, #f472b6, #f9a8d4);
  animation: marketing-rejected-sales-order-topbar 1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .marketing-metric-card.marketing-metric-card--blink-rejected-sales-order {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(236, 72, 153, 0.5),
      0 0 20px rgba(236, 72, 153, 0.25);
  }

  .marketing-metric-card.marketing-metric-card--blink-rejected-sales-order::before {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

/* Pending Payment: blink whenever count > 0 */
@keyframes marketing-pending-payment-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(245, 158, 11, 0.35),
      0 0 12px rgba(245, 158, 11, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(245, 158, 11, 0.65),
      0 0 28px 6px rgba(245, 158, 11, 0.3),
      0 0 48px 10px rgba(251, 191, 36, 0.2);
  }
}

@keyframes marketing-pending-payment-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.marketing-metric-card.marketing-metric-card--blink-pending-payment {
  animation: marketing-pending-payment-blink 1s ease-in-out infinite;
}

.marketing-metric-card.marketing-metric-card--blink-pending-payment:hover {
  animation: marketing-pending-payment-blink 1s ease-in-out infinite;
}

.marketing-metric-card.marketing-metric-card--blink-pending-payment::before {
  height: 5px;
  background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24, #fcd34d);
  animation: marketing-pending-payment-topbar 1s ease-in-out infinite;
}

/* Overdue Payment: blink whenever count > 0 */
@keyframes marketing-overdue-payment-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(239, 68, 68, 0.35),
      0 0 12px rgba(239, 68, 68, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(239, 68, 68, 0.65),
      0 0 28px 6px rgba(239, 68, 68, 0.3),
      0 0 48px 10px rgba(248, 113, 113, 0.2);
  }
}

@keyframes marketing-overdue-payment-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.marketing-metric-card.marketing-metric-card--blink-overdue-payment {
  animation: marketing-overdue-payment-blink 1s ease-in-out infinite;
}

.marketing-metric-card.marketing-metric-card--blink-overdue-payment:hover {
  animation: marketing-overdue-payment-blink 1s ease-in-out infinite;
}

.marketing-metric-card.marketing-metric-card--blink-overdue-payment::before {
  height: 5px;
  background: linear-gradient(90deg, #dc2626, #ef4444, #f87171, #fca5a5);
  animation: marketing-overdue-payment-topbar 1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .marketing-metric-card.marketing-metric-card--blink-pending-payment {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(245, 158, 11, 0.5),
      0 0 20px rgba(245, 158, 11, 0.25);
  }

  .marketing-metric-card.marketing-metric-card--blink-pending-payment::before {
    animation: none;
    opacity: 1;
    filter: none;
  }

  .marketing-metric-card.marketing-metric-card--blink-overdue-payment {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(239, 68, 68, 0.5),
      0 0 20px rgba(239, 68, 68, 0.25);
  }

  .marketing-metric-card.marketing-metric-card--blink-overdue-payment::before {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

.marketing-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.marketing-metric-card-1 { --metric-color: #3b82f6; }
.marketing-metric-card-2 { --metric-color: #10b981; }
.marketing-metric-card-3 { --metric-color: #ec4899; }
.marketing-metric-card-4 { --metric-color: #f59e0b; }
.marketing-metric-card-5 { --metric-color: #10b981; }
.marketing-metric-card-6 { --metric-color: #f59e0b; }
.marketing-metric-card-7 { --metric-color: #06b6d4; }
.marketing-metric-card-8 { --metric-color: #f59e0b; }
.marketing-metric-card-9 { --metric-color: #ec4899; }
.marketing-metric-card-10 { --metric-color: #3b82f6; }
.marketing-metric-card-11 { --metric-color: #06b6d4; }
.marketing-metric-card-12 { --metric-color: #10b981; }
.marketing-metric-card-13 { --metric-color: #ec4899; }
.marketing-metric-card-price-requests { --metric-color: #dc2626; }
.marketing-metric-card-dwr-price-request { --metric-color: #0ea5e9; }
.marketing-metric-card-total-sales-report { --metric-color: #6366f1; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.bg-secondary {
  background: #6366f1;
}

.bg-danger{
  background: rgba(235, 43, 43, 0.815);
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  text-decoration: none;
  display: block;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

.metric-change:hover {
  color: #3b82f6;
}

/* Charts Row */
.marketing-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.marketing-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Follow-Up Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / DWR Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Follow-Up Date Box */
.followup-date-box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.followup-date-box h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
}

.followup-date-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.followup-date-card {
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.followup-date-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.followup-overdue {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
}

.followup-yesterday {
  background: #f59e0b;
  border-color: #f59e0b;
  color: white;
}

.followup-today {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.followup-upcoming {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.followup-date-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.followup-date-label {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 5px;
}

.followup-date-hint {
  font-size: 12px;
  opacity: 0.9;
}

/* Companies Table */
.marketing-companies-table-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.marketing-companies-table-section h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
}

.marketing-companies-table-container {
  overflow-x: auto;
}

.marketing-companies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.marketing-companies-table thead {
  background: #f8fafc;
}

.marketing-companies-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

.marketing-companies-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
}

.marketing-companies-table tbody tr:hover {
  background: #f8fafc;
}

/* Pagination */
.marketing-table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.pagination-info {
  font-size: 0.875rem;
  color: #64748b;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: #64748b;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #f8fafc;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page-info {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* Loading */
.marketing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #64748b;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.marketing-loading p {
  font-size: 16px;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .marketing-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .marketing-dashboard {
    padding: 15px;
  }

  .marketing-metrics-row {
    grid-template-columns: 1fr;
  }

  .marketing-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }

  .followup-date-grid {
    grid-template-columns: 1fr;
  }

  .marketing-table-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}


/* Page layout */
.exhibition-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  background-color: #f5f6fa;
  padding: 24px 16px 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

/* Header */
.exhibition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.exhibition-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.exhibition-app-icon-symbol {
  font-size: 24px;
}

.exhibition-header-text {
  flex: 1 1;
  margin-left: 12px;
}

.exhibition-app-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.exhibition-app-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.exhibition-profile-button {
  border: none;
  background: #eef2ff;
  color: #4f46e5;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.exhibition-profile-icon {
  font-size: 20px;
}

.exhibition-refresh-button {
  border: none;
  background: #eef2ff;
  color: #4f46e5;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s ease, transform 0.05s ease;
}

.exhibition-refresh-button:hover {
  background: #e0e7ff;
}

.exhibition-refresh-button:active {
  transform: translateY(1px);
}

/* Content */
.exhibition-content {
  flex: 1 1;
}

.exhibition-section-title {
  font-size: 22px;
  margin: 0 0 4px;
  color: #111827;
}

.exhibition-section-subtitle {
  margin: 0 0 20px;
  font-size: 13px;
  color: #9ca3af;
}

/* Cards row */
.exhibition-cards-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.exhibition-card {
  position: relative;
  flex: 1 1;
  min-height: 160px;
  border-radius: 24px;
  background: #e5e7eb;
  border: 2px dashed rgba(156, 163, 175, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.1s ease,
    border-color 0.2s ease;
}

.exhibition-card:hover {
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
  border-color: #4f46e5;
}

.exhibition-card-disabled {
  background: #f3f4f6;
}

.exhibition-card-placeholder {
  text-align: center;
  color: #6b7280;
}

.exhibition-card-placeholder-disabled {
  opacity: 0.5;
}

.exhibition-card-camera-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.exhibition-card-label {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}

.exhibition-card-cta {
  font-size: 12px;
  color: #4f46e5;
}

.exhibition-card-cta-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.exhibition-card-cta-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #4f46e5;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.exhibition-card-cta-btn:hover {
  background: #4f46e5;
  color: #fff;
}

.exhibition-card-cta-btn:active {
  transform: translateY(1px);
}

.exhibition-card-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.exhibition-card-action-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.exhibition-card-action-btn:hover {
  background: #fff;
}

.exhibition-card-action-btn:active {
  transform: translateY(1px);
}

.exhibition-file-input {
  display: none;
}

.exhibition-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exhibition-card-has-image {
  border-style: solid;
  border-color: #4f46e5;
}

/* Extract button */
.exhibition-extract-button {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
  transition: background 0.15s ease, box-shadow 0.15s ease,
    transform 0.05s ease;
}

.exhibition-extract-button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
}

.exhibition-extract-button:not(:disabled):hover {
  background: #4338ca;
}

.exhibition-extract-button:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.4);
}

.exhibition-status-area {
  margin-top: 16px;
}

.exhibition-status-text {
  padding: 10px 14px;
  border-radius: 16px;
  background: #e5e7eb;
  font-size: 13px;
  color: #4b5563;
}

.exhibition-error-text {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fee2e2;
  font-size: 13px;
  color: #b91c1c;
}

.exhibition-result-card {
  margin-top: 20px;
  padding: 16px 14px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.exhibition-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.exhibition-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.exhibition-result-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;
}

.exhibition-result-row:last-of-type {
  border-bottom: none;
}

.exhibition-result-label {
  color: #6b7280;
}

.exhibition-result-value {
  color: #111827;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.exhibition-data-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f9fafb;
  margin-top: 8px;
}

.exhibition-data-chip-clickable {
  cursor: pointer;
}

.exhibition-data-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  font-size: 16px;
}

.exhibition-data-main {
  flex: 1 1;
  min-width: 0;
}

.exhibition-data-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.exhibition-data-value {
  font-size: 13px;
  color: #111827;
}

.exhibition-data-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.exhibition-data-chevron {
  font-size: 10px;
  color: #9ca3af;
}

.exhibition-data-list {
  margin-top: 4px;
  padding-left: 44px;
}

.exhibition-data-list-item {
  font-size: 13px;
  color: #111827;
  padding: 3px 0;
}

.exhibition-data-input,
.exhibition-data-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease;
}

.exhibition-data-input:focus,
.exhibition-data-textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.exhibition-data-textarea {
  resize: vertical;
  min-height: 50px;
  font-family: inherit;
}

.exhibition-save-lead-card {
  margin-top: 20px;
  padding: 16px 14px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.exhibition-save-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #111827;
}

.exhibition-form-group {
  margin-bottom: 12px;
}

.exhibition-form-label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.exhibition-select,
.exhibition-input,
.exhibition-textarea {
  width: auto;
  width: initial;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  background: #f9fafb;
}

.exhibition-select:focus,
.exhibition-input:focus,
.exhibition-textarea:focus {
  border-color: #4f46e5;
  background: #ffffff;
}

.exhibition-textarea {
  resize: vertical;
}

.exhibition-input-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exhibition-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.exhibition-input-row .exhibition-input {
  flex: 1 1;
  min-width: 0;
}

.exhibition-slot-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.exhibition-slot-remove:hover {
  background: #fecaca;
}

.exhibition-add-slot {
  margin-top: 4px;
  padding: 6px 10px;
  border: 1px dashed #4f46e5;
  border-radius: 8px;
  background: transparent;
  color: #4f46e5;
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease, color 0.15s ease;
}

.exhibition-add-slot:hover {
  background: #eef2ff;
}

.exhibition-save-button {
  margin-top: 4px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.exhibition-save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.exhibition-save-button:not(:disabled):hover {
  background: #020617;
}

.exhibition-save-success {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  text-align: center;
}

.exhibition-save-summary {
  margin-top: 16px;
}

.exhibition-save-badge {
  text-align: center;
  font-size: 13px;
  color: #1f2937;
  margin-bottom: 10px;
}

.exhibition-save-card {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 24px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.18);
}

.exhibition-save-check {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.exhibition-save-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 4px;
}

.exhibition-save-card-subtitle {
  font-size: 13px;
  color: #166534;
  margin-bottom: 12px;
}

.exhibition-save-added-by {
  font-size: 13px;
  color: #374151;
  margin-bottom: 12px;
}

.exhibition-save-added-by strong {
  color: #111827;
}

.exhibition-save-note {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: #1f2937;
  margin-bottom: 14px;
}

.exhibition-save-actions {
  display: flex;
  gap: 10px;
}

.exhibition-action-button {
  flex: 1 1;
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.15s ease, background 0.15s ease;
}

.exhibition-action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.exhibition-action-button:not(:disabled):active {
  transform: translateY(1px);
}

.exhibition-action-primary {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.exhibition-action-primary:not(:disabled):hover {
  background: #4338ca;
}

.exhibition-action-secondary {
  background: #111827;
  color: #ffffff;
}

.exhibition-action-secondary:not(:disabled):hover {
  background: #020617;
}

.exhibition-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.exhibition-modal-card {
  width: min(360px, 100%);
  background: #ffffff;
  border-radius: 24px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.exhibition-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.exhibition-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
}

.exhibition-modal-button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
  transition: background 0.15s ease, transform 0.05s ease;
}

.exhibition-modal-button:hover {
  background: #4338ca;
}

.exhibition-modal-button:active {
  transform: translateY(1px);
}

@media (min-width: 768px) {
  .exhibition-page {
    max-width: 480px;
    margin: 0 auto;
  }
}

.marketing-final-list {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.marketing-final-header {
  margin-bottom: 30px;
}

.marketing-final-exhibition-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.marketing-final-exhibition-filter label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
}

.marketing-final-exhibition-select {
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  min-width: 200px;
  max-width: 100%;
}

.marketing-final-exhibition-select:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.marketing-final-tabs {
  display: flex;
  gap: 0;
  margin-top: 12px;
  border-bottom: 2px solid #e0e0e0;
}

.marketing-final-tab {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.marketing-final-tab:hover {
  color: #333;
}

.marketing-final-tab.active {
  color: #1976d2;
  border-bottom-color: #1976d2;
}

.marketing-final-title {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  background-color: #ffeb3b;
  padding: 15px 20px;
  border-radius: 6px;
  text-align: center;
}

.marketing-final-filters {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.supplier-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.supplier-filter label {
  font-weight: 600;
  color: #555;
  font-size: 0.95rem;
}

.supplier-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  min-width: 200px;
}

.supplier-select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Messages */
.marketing-final-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.marketing-final-error i {
  font-size: 1.1rem;
}

/* Loading State */
.marketing-final-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.marketing-final-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Controls */
.marketing-final-table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.95rem;
  color: #555;
}

.entries-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.entries-select:focus {
  outline: none;
  border-color: #7c3aed;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.95rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Table Container */
.marketing-final-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.marketing-final-table-wrapper {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.marketing-final-table {
  width: 100%;
  border-collapse: collapse;
}

.marketing-final-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.marketing-final-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.marketing-final-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.marketing-final-table tbody tr:hover {
  background-color: #f8f9fa;
}

.marketing-final-table tbody tr:last-child {
  border-bottom: none;
}

.marketing-final-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.marketing-final-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-right: 8px;
  font-size: 16px;
}

.marketing-final-action-btn:last-child {
  margin-right: 0;
}

.assignment-note {
  margin-top: 6px;
  font-size: 12px;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Assignment modal styles (shared with buyer list) */
.report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.report-modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 1100px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.report-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
}

.report-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.report-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.buyers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.buyers-table thead {
  background: #f8f9fa;
}

.buyers-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 1px solid #e9ecef;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.buyers-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
}

.buyers-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.buyers-table tbody tr:hover {
  background: #f8f9fa;
}

.expand-icon {
  color: #7c3aed;
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  padding: 4px;
}

.expand-icon:hover {
  color: #5b21b6;
  transform: scale(1.1);
}

.pending-row {
  background-color: #fff5f5;
}

.pending-row:hover {
  background-color: #ffe5e5;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-verified {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-final {
  background-color: #d4edda;
  color: #155724;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

/* Action Buttons */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100px;
}

.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #6c757d !important;
}

.view-btn {
  background-color: #17a2b8;
  color: white;
}

.view-btn:hover:not(:disabled) {
  background-color: #138496;
}

.reject-btn {
  background-color: #dc3545;
  color: white !important;
}

.reject-btn:hover:not(:disabled) {
  background-color: #c82333;
  color: white !important;
}

.reject-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  color: white !important;
}

.edit-btn {
  background-color: #7c3aed;
  color: white;
  font-weight: 700;
}

.edit-btn:hover:not(:disabled) {
  background-color: #6d28d9;
}

.edit-btn i {
  margin-right: 5px;
}

.final-btn {
  background-color: #6c757d;
  color: white;
}

.final-btn:hover:not(:disabled) {
  background-color: #5a6268;
}

.final-btn.final-active {
  background-color: #28a745;
  color: white;
}

.final-btn.final-active:hover:not(:disabled) {
  background-color: #218838;
}

.final-btn i {
  margin-right: 5px;
}

/* Disabled state for Edit button when order is finalized */
.edit-btn:disabled,
.edit-btn.disabled {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  opacity: 0.7;
}

.edit-btn:disabled:hover,
.edit-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Disabled state for Final button when already finalized */
.final-btn:disabled,
.final-btn.final-active:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.final-btn.final-active:disabled {
  background-color: #28a745 !important;
}

.final-btn:disabled:hover,
.final-btn.final-active:disabled:hover {
  transform: none;
  box-shadow: none;
}

.expand-btn {
  background-color: #6c757d;
  color: white;
}

.expand-btn:hover:not(:disabled) {
  background-color: #5a6268;
}

.expand-btn i {
  margin-right: 5px;
}

/* Pagination */
.marketing-final-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.9rem;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #7c3aed;
  color: #7c3aed;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: #666;
}

/* Empty State */
.marketing-final-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marketing-final-empty p {
  color: #999;
  font-size: 0.95rem;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.account-remark-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
  padding: 16px;
}

.account-remark-modal-content {
  width: min(560px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.verify-modal-body {
  padding: 20px;
}

.account-remark-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-remark-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-remark-form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.account-remark-textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #1e293b;
  resize: vertical;
  background: #f8fafc;
}

.view-section {
  margin-bottom: 28px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.15rem;
  color: #333;
  margin-bottom: 16px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

/* View Detail Styles (matching FinalOrderList) */
.view-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-gap: 16px 24px;
  gap: 16px 24px;
  padding: 10px 0;
  width: 100%;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px 24px;
  gap: 16px 24px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: visible;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.view-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-error i {
  font-size: 1.1rem;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

/* Products Table in View Modal */
.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.view-products-table th:nth-child(2),
.view-products-table td:nth-child(2) {
  min-width: 140px;
  max-width: 220px;
  word-break: break-word;
}

.view-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
  padding: 12px 14px;
}

.view-products-tfoot-label {
  text-align: right !important;
  padding-right: 16px !important;
}

.view-products-tfoot-num {
  text-align: right !important;
  white-space: nowrap;
}

.view-products-grand-total {
  background-color: #e3f2fd !important;
  border-top: 2px solid #3b82f6 !important;
}

.view-products-grand-total .view-products-tfoot-label {
  font-size: 1.1rem;
  color: #1e293b;
}

.view-products-grand-amount {
  font-size: 1.1rem !important;
  color: #1e293b !important;
}

/* Note section at bottom of view modal */
.view-note-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
}

.view-note-text {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  padding: 16px 18px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 60px;
}

/* Product table alignment - numeric columns right-aligned */
.view-products-table th:nth-child(5),
.view-products-table th:nth-child(6),
.view-products-table th:nth-child(7),
.view-products-table td:nth-child(5),
.view-products-table td:nth-child(6),
.view-products-table td:nth-child(7) {
  text-align: right;
}

/* Expanded Row Styles */
.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px !important;
  background-color: #f8f9fa;
}

.products-table-wrapper {
  background: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  white-space: nowrap;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 10px 12px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.products-table tfoot td {
  font-weight: 600;
  color: #333;
  padding: 12px;
}

.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.products-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.no-products {
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .marketing-final-list {
    padding: 15px;
  }

  .marketing-final-title {
    font-size: 1.2rem;
    padding: 12px 15px;
  }

  .marketing-final-exhibition-filter {
    flex-wrap: wrap;
  }

  .marketing-final-exhibition-select {
    min-width: 100%;
  }

  .marketing-final-table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .entries-selector,
  .search-box {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .marketing-final-table {
    font-size: 0.8rem;
  }

  .marketing-final-table th,
  .marketing-final-table td {
    padding: 8px 10px;
  }

  .action-buttons-group {
    min-width: 90px;
  }

  .action-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .marketing-final-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .view-modal-overlay {
    padding: 10px;
  }

  .view-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .view-modal-header {
    padding: 15px 20px;
  }

  .view-modal-header h2 {
    font-size: 1.2rem;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-products-table {
    font-size: 0.85rem;
    min-width: 700px;
  }

  .view-products-table th,
  .view-products-table td {
    padding: 8px 10px;
  }
}

/* Edit Modal Styles */
.edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.edit-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.edit-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.edit-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.edit-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
  width: 100%;
  box-sizing: border-box;
}

.edit-section {
  margin-bottom: 30px;
}

.edit-section:last-child {
  margin-bottom: 0;
}

.edit-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
  width: 100%;
}

@media (max-width: 768px) {
  .edit-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0; /* Prevent overflow */
}

.form-field.full-width {
  grid-column-start: 1; grid-column-end: -1;
  margin-top: 10px;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  display: block;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: white;
  transition: border-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Prevent overflow */
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-field input.readonly-input,
.form-field textarea.readonly-input {
  background: #f8f9fa;
  cursor: not-allowed;
  color: #666;
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-field select {
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
  background-image: url("data:image%2Fsvg+xml,%3Csvg xmlns=%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27 width=%2712%27 height=%2712%27 viewBox=%270 0 12 12%27%3E%3Cpath fill=%27%23333%27 d=%27M6 9L1 4h10z%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.product-entry-form {
  margin-bottom: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.product-entry-form .edit-form-grid {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

@media (max-width: 1200px) {
  .product-entry-form .edit-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-entry-form .edit-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.add-btn,
.cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-btn {
  background-color: #28a745;
  color: white;
}

.add-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.cancel-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.edit-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.save-btn {
  padding: 12px 30px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.edit-btn-small,
.delete-btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 5px;
}

.edit-btn-small {
  background-color: #007bff;
  color: white;
}

.edit-btn-small:hover {
  background-color: #0056b3;
}

.delete-btn-small {
  background-color: #dc3545;
  color: white;
}

.delete-btn-small:hover {
  background-color: #c82333;
}

.marketing-order-error,
.marketing-order-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.marketing-order-error {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.marketing-order-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Email success modal (same as MarketingExhibition.js) */
.exhibition-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.exhibition-modal-card {
  width: min(360px, 100%);
  background: #ffffff;
  border-radius: 24px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.exhibition-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.exhibition-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
}

.exhibition-modal-button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
  transition: background 0.15s ease, transform 0.05s ease;
}

.exhibition-modal-button:hover {
  background: #4338ca;
}

.exhibition-modal-button:active {
  transform: translateY(1px);
}

.price-list-container {
    padding: 24px;
    background: #f5f7fa;
    min-height: calc(100vh - 200px);
  }
  
  .price-list-error,
  .price-list-success {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease-out;
  }
  
  .price-list-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    color: #991b1b;
  }
  
  .price-list-error div {
    flex: 1 1;
  }
  
  .price-list-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
  }
  
  .price-list-error p {
    margin: 4px 0;
    line-height: 1.5;
  }
  
  .price-list-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    color: #065f46;
  }
  
  .price-list-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .price-list-table-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
  }
  
  .price-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 1400px;
  }
  
  .price-list-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  }
  
  .price-list-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .price-list-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
  }
  
  .price-list-table tbody tr {
    transition: all 0.2s ease;
  }
  
  .price-list-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .price-list-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .price-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
    min-width: 80px;
  }
  
  .price-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
  }
  
  .edit-price-btn,
  .save-price-btn,
  .cancel-price-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
  }
  
  .edit-price-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  }
  
  .edit-price-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
  }
  
  .save-price-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  }
  
  .save-price-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
  }
  
  .save-price-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .cancel-price-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.3);
  }
  
  .cancel-price-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.4);
  }
  
  .cancel-price-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .no-data {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-style: italic;
  }
  
  @media (max-width: 768px) {
    .price-list-container {
      padding: 16px;
    }
  
    .price-list-table-container {
      padding: 16px;
    }
  
    .price-list-table {
      font-size: 0.85rem;
    }
  
    .price-list-table th,
    .price-list-table td {
      padding: 10px 8px;
    }
  }
  
  
.processing-planning-consignment-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
  box-sizing: border-box;
}

.processing-planning-consignment-header {
  margin-bottom: 20px;
}

.processing-planning-consignment-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 600;
}

.consignment-selector-section {
  margin-bottom: 20px;
}

.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.products-in-process-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.products-in-process-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table-container {
  overflow-x: auto;
  width: 100%;
}

.products-in-process-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 600px;
}

.products-in-process-table thead {
  background-color: #f8fafc;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-in-process-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
  background-color: #f8fafc;
}

.products-in-process-table th:first-child {
  min-width: 250px;
}

.products-in-process-table th:nth-child(2) {
  min-width: 150px;
}

.products-in-process-table th.consignment-header-cell {
  min-width: 95px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.2;
  padding: 8px 6px;
}

.consignment-header-number {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1f2937;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid #cbd5e1;
}

.consignment-header-mode {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.2px;
}

.products-in-process-table th:last-child {
  text-align: right;
  font-weight: 700;
  background-color: #e0e7ff;
  color: #3730a3;
}

.products-in-process-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  color: #334155;
  white-space: nowrap;
}

.products-in-process-table th:first-child,
.products-in-process-table td:first-child {
  border-left: 1px solid #e2e8f0;
}

.products-in-process-table tbody tr:hover {
  background-color: #f8fafc;
}

.products-in-process-table tbody tr:last-child td {
  border-bottom: none;
}

.no-data-cell {
  text-align: center;
  padding: 40px 20px;
}

.no-data-message {
  color: #64748b;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-in-process-table {
    font-size: 0.8rem;
  }

  .products-in-process-table th,
  .products-in-process-table td {
    padding: 8px;
  }
}


.marketing-rejected-orders {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.marketing-rejected-orders-header {
  margin-bottom: 30px;
}

.marketing-rejected-orders-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Messages */
.marketing-rejected-orders-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.marketing-rejected-orders-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.marketing-rejected-orders-error i,
.marketing-rejected-orders-success i {
  font-size: 1.1rem;
}

/* Loading State */
.marketing-rejected-orders-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 400px;
}

.marketing-rejected-orders-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.marketing-rejected-orders-loading p {
  color: #666;
  font-size: 1rem;
}

/* Table Container */
.marketing-rejected-orders-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
  overflow-x: auto;
}

.marketing-rejected-orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.marketing-rejected-orders-table thead {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}

.marketing-rejected-orders-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.marketing-rejected-orders-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.marketing-rejected-orders-table tbody tr:hover {
  background-color: #f8fafc;
}

.marketing-rejected-orders-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #334155;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-rejected {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Empty State */
.marketing-rejected-orders-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marketing-rejected-orders-empty p {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0;
}

/* Action Buttons */
.view-btn,
.edit-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  font-weight: 500;
}

.view-btn {
  background-color: #007bff;
  color: white;
}

.view-btn:hover {
  background-color: #0056b3;
}

.edit-btn {
  background-color: #28a745;
  color: white;
}

.edit-btn:hover {
  background-color: #218838;
}

/* Modal Styles */
.edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.edit-modal-content {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 2px solid #e2e8f0;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}

.edit-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.edit-modal-body {
  padding: 30px;
}

.edit-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.edit-section:last-child {
  border-bottom: none;
}

.edit-section h3 {
  font-size: 1.3rem;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #7c3aed;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.9rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-field.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.readonly-input {
  background-color: #f1f5f9;
  cursor: not-allowed;
}

/* View Detail Styles */
.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 6px;
  overflow-x: auto;
}

.view-detail-item {
  flex: 1 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.view-detail-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 6px;
}

/* Products Table */
.products-table-wrapper {
  margin-top: 20px;
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
}

.products-table thead {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}

.products-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.products-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.products-table td {
  padding: 12px;
  font-size: 0.9rem;
}

.edit-product-btn,
.delete-product-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
  transition: all 0.2s;
}

.edit-product-btn {
  background-color: #007bff;
  color: white;
}

.edit-product-btn:hover {
  background-color: #0056b3;
}

.delete-product-btn {
  background-color: #dc3545;
  color: white;
}

.delete-product-btn:hover {
  background-color: #c82333;
}

/* Product Entry Form */
.product-entry-form {
  background: #f8fafc;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.add-btn,
.save-btn,
.cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.add-btn,
.save-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}

.add-btn:hover,
.save-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.cancel-btn:hover {
  background-color: #5a6268;
}

.edit-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px 30px;
  border-top: 2px solid #e2e8f0;
  background: #f8fafc;
}

/* Buyer Search Dropdown */
.buyer-search-container,
.factory-record-search-container {
  position: relative;
}

.buyer-dropdown,
.factory-record-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 2px;
}

.buyer-dropdown div,
.factory-record-dropdown div {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.buyer-dropdown div:hover,
.factory-record-dropdown div:hover {
  background-color: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
  .edit-form-grid {
    grid-template-columns: 1fr;
  }
  
  .view-detail-row {
    flex-wrap: wrap;
  }
  
  .marketing-rejected-orders-table {
    font-size: 0.85rem;
  }
  
  .marketing-rejected-orders-table th,
  .marketing-rejected-orders-table td {
    padding: 8px;
  }
}


.marketing-sales-report {
  padding: 20px 24px 32px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8ecf4 100%);
  min-height: 100vh;
}

.marketing-sales-report-header {
  margin-bottom: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.15);
  overflow: hidden;
}

.marketing-sales-report-header::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.marketing-sales-report-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px 16px;
  flex-wrap: wrap;
}

.marketing-sales-report-header h1 {
  margin: 0 0 6px 0;
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.marketing-sales-report-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
  max-width: 36rem;
  line-height: 1.45;
}

.marketing-sales-report-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-radius: 10px;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.marketing-sales-report-count-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #5b21b6;
  line-height: 1.2;
}

.marketing-sales-report-count-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.marketing-sales-report-updating {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 4px;
  animation: pulse-soft 1.2s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.marketing-sales-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
  padding: 0 24px 20px;
  border-top: 1px solid #f1f5f9;
}

.marketing-sales-report-search-wrap {
  position: relative;
  flex: 1 1;
  min-width: 260px;
  max-width: 520px;
}

.marketing-sales-report-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

.marketing-sales-report-search-input {
  width: 100%;
  padding: 11px 40px 11px 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9375rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.marketing-sales-report-search-input::placeholder {
  color: #94a3b8;
}

.marketing-sales-report-search-input:hover {
  border-color: #cbd5e1;
}

.marketing-sales-report-search-input:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.marketing-sales-report-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.marketing-sales-report-search-clear:hover {
  background: #f1f5f9;
  color: #334155;
}

.marketing-sales-report-filters {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.date-filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.date-input {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #1e293b;
  background: #fff;
  min-width: 150px;
}

.date-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.marketing-sales-report-reset-dates {
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  height: -webkit-fit-content;
  height: fit-content;
}

.marketing-sales-report-reset-dates:hover:not(:disabled) {
  background: #e2e8f0;
  color: #334155;
}

.marketing-sales-report-reset-dates:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.marketing-sales-report-error {
  background: linear-gradient(90deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #fecaca;
}

.marketing-sales-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.marketing-sales-report-loading-spinner {
  border: 3px solid #e2e8f0;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.85s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.marketing-sales-report-table-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}

.marketing-sales-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.marketing-sales-report-table thead {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.marketing-sales-report-table th {
  padding: 14px 10px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.marketing-sales-report-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 12px;
  vertical-align: top;
}

.marketing-sales-report-table tbody tr:hover {
  background-color: #fafbff;
}

.cell-so {
  font-weight: 600;
  color: #4c1d95;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

.status-pill--final {
  background: #dcfce7;
  color: #166534;
}

.status-pill--verified {
  background: #dbeafe;
  color: #1e40af;
}

.status-pill--pending,
.status-pill--na {
  background: #f1f5f9;
  color: #64748b;
}

.actions-cell {
  min-width: 140px;
}

.actions-cell-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.actions-user {
  font-weight: 600;
  color: #1e293b;
  font-size: 11px;
}

.actions-sales {
  font-size: 10px;
  color: #64748b;
  max-width: 120px;
  line-height: 1.3;
}

.actions-no-lines {
  font-size: 12px;
  color: #cbd5e1;
}

.order-row {
  background-color: #fff;
}

.products-row {
  background-color: #f8fafc;
}

.products-row td {
  padding: 0;
  border: none;
}

.products-table-container {
  padding: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.products-table thead {
  background: #e2e8f0;
}

.products-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.products-table td {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 11px;
  color: #475569;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.expand-btn {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  cursor: pointer;
  color: #4f46e5;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.expand-btn:hover {
  background: #e0e7ff;
  color: #3730a3;
}

.remark-cell {
  max-width: 220px;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
}

.marketing-sales-report-empty {
  text-align: center;
  padding: 56px 24px;
  color: #64748b;
  font-size: 1rem;
}

.marketing-sales-report-clear-search-btn {
  margin-top: 14px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.marketing-sales-report-clear-search-btn:hover {
  filter: brightness(1.05);
}

.account-remark-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
  padding: 16px;
}

.account-remark-modal-content {
  width: min(560px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.verify-modal-body {
  padding: 20px;
}

.account-remark-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-remark-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-remark-form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.account-remark-textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #1e293b;
  resize: vertical;
}

.account-remark-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

@media (max-width: 1200px) {
  .marketing-sales-report-header-top {
    flex-direction: column;
  }

  .marketing-sales-report-count {
    align-self: stretch;
    align-items: flex-start;
  }

  .marketing-sales-report-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .marketing-sales-report-search-wrap {
    max-width: none;
  }
}

.search-by-batch-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
}

.search-by-batch-header {
  margin-bottom: 30px;
}

.search-by-batch-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.batch-selector-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.batch-select-button {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: border-color 0.2s;
}

.batch-select-button:hover {
  border-color: #3b82f6;
}

.batch-select-button i {
  color: #666;
  font-size: 12px;
}

.batch-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.batch-search-input-wrapper {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.batch-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.batch-search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.batch-dropdown-list {
  overflow-y: auto;
  max-height: 250px;
}

.batch-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.batch-dropdown-item:hover {
  background-color: #f3f4f6;
}

.batch-dropdown-item.selected {
  background-color: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

.batch-dropdown-item.no-results {
  color: #666;
  cursor: default;
  font-style: italic;
}

.error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.batch-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .top-details-row {
    grid-template-columns: 1fr;
  }
}

.product-details-section,
.document-details-section,
.product-record-section,
.msds-section,
.export-sales-orders-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-details-section {
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.document-details-section .document-table-container {
  flex: 1 1;
  overflow-y: auto;
}

.no-documents-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
}

.no-documents-message i {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 10px;
}

.product-details-section h3,
.document-details-section h3,
.product-record-section h3,
.msds-section h3,
.export-sales-orders-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.yes-badge {
  color: #059669;
  font-weight: 600;
}

.no-badge {
  color: #dc2626;
  font-weight: 600;
}

.document-table-container,
.product-record-table-container {
  overflow-x: auto;
}

.document-table,
.product-record-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.product-record-table tbody tr.expanded-details-row {
  background-color: #f9fafb;
}

.product-record-table tbody tr.expanded-details-row td {
  padding: 0;
  border-top: none;
}

.expanded-details-container {
  padding: 20px;
  background-color: #f9fafb;
}

.expanded-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.expanded-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.expanded-detail-item label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expanded-detail-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.document-table thead,
.product-record-table thead {
  background: #f3f4f6;
}

.document-table th,
.product-record-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  border-bottom: 2px solid #e5e7eb;
}

.document-table td,
.product-record-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #666;
  font-size: 14px;
}

.document-table tbody tr:hover,
.product-record-table tbody tr:hover {
  background: #f9fafb;
}

.view-document-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-document-btn:hover {
  background: #2563eb;
}

.section-hint {
  margin: -10px 0 15px 0;
  color: #666;
  font-size: 13px;
  font-style: italic;
}

.no-data-message {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #666;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .product-details-grid {
    grid-template-columns: 1fr;
  }

  .document-table-container,
  .product-record-table-container {
    overflow-x: scroll;
  }
}


.search-by-consignment-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
  box-sizing: border-box;
}

.search-by-consignment-header {
  margin-bottom: 20px;
}

.search-by-consignment-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 600;
}

.consignment-selector-section {
  margin-bottom: 20px;
}

.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.consignment-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Consignment Info Section */
.consignment-info-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-info-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.consignment-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-complete {
  background-color: #d1fae5;
  color: #065f46;
}

.status-under-processing,
.status-under-process {
  background-color: #fef3c7;
  color: #92400e;
}

.status-in-transit {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-forwarded-to-qc,
.status-forwarded-to-logistic {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* Document List Section */
.consignment-documents-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-documents-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.document-table-container {
  overflow-x: auto;
}

.document-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.document-table thead {
  background-color: #f8fafc;
}

.document-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.document-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.document-table tbody tr:hover {
  background-color: #f8fafc;
}

.download-document-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
}

.download-document-btn:hover {
  background-color: #2563eb;
}

/* Status History Section */
.consignment-status-history-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-status-history-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.status-history-table-container {
  overflow-x: auto;
}

.status-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.status-history-table thead {
  background-color: #f8fafc;
}

.status-history-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.status-history-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.status-history-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Products Section */
.consignment-products-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-products-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table-container {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.products-table thead {
  background-color: #f8fafc;
}

.products-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.products-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.no-data-message {
  background-color: #f1f5f9;
  color: #64748b;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .consignment-info-grid {
    grid-template-columns: 1fr;
  }

  .document-table,
  .status-history-table,
  .products-table {
    font-size: 0.8rem;
  }

  .document-table th,
  .document-table td,
  .status-history-table th,
  .status-history-table td,
  .products-table th,
  .products-table td {
    padding: 8px;
  }
}


.search-by-product-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
}

.search-by-product-header {
  margin-bottom: 30px;
}

.search-by-product-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.product-selector-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.product-select-button {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: border-color 0.2s;
}

.product-select-button:hover {
  border-color: #3b82f6;
}

.product-select-button i {
  color: #666;
  font-size: 12px;
}

.product-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-search-input-wrapper {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.product-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.product-search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.product-dropdown-list {
  overflow-y: auto;
  max-height: 250px;
}

.product-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.product-dropdown-item:hover {
  background-color: #f3f4f6;
}

.product-dropdown-item.selected {
  background-color: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

.product-dropdown-item.no-results {
  color: #666;
  cursor: default;
  font-style: italic;
}

.error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.product-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-records-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-records-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.product-records-table-container {
  overflow-x: auto;
}

.product-records-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.product-records-table thead {
  background: #f3f4f6;
}

.product-records-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.product-records-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #666;
  font-size: 14px;
}

.product-records-table tbody tr:hover {
  background: #f9fafb;
}

.view-details-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-details-btn:hover {
  background: #2563eb;
}

.no-data-cell {
  text-align: center;
  padding: 40px 20px;
}

.no-data-message {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #666;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.batch-number-link {
  color: #3b82f6;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.batch-number-link:hover {
  color: #2563eb;
  text-decoration: none;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background-color: #f3f4f6;
  color: #333;
}

.modal-body {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-detail-item label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-detail-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  word-break: break-word;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.modal-close-button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.modal-close-button:hover {
  background: #2563eb;
}

/* View Modal Styles - Matching ExportPendingSalesOrder */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.view-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.order-info-section {
  margin-bottom: 30px;
}

.order-info-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.view-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 20px;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: #6d28d9;
}

@media (max-width: 768px) {
  .product-records-table-container {
    overflow-x: scroll;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
    width: 95%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}


/* Update Buyer Modal Styles */
.update-buyer-modal {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    max-width: 70vw;
    max-height: 80vh;
    min-width: 60vw;
    position: relative;
  }
  
  .update-buyer-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
  }
  
  .update-buyer-modal .modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
  }
  
  .update-buyer-modal .modal-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
  }
  
  .update-buyer-modal .modal-close:hover {
    background: #e9ecef;
    color: #495057;
  }
  
  .update-buyer-modal .modal-body {
    padding: 40px;
    flex: 1 1;
    overflow-y: auto;
    min-height: 0;
  }
  
  .update-buyer-modal .form-section {
    margin-bottom: 30px;
  }
  
  .update-buyer-modal .form-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
  }
  
  .update-buyer-modal .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .update-buyer-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .update-buyer-modal .form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
  }
  
  .update-buyer-modal .form-label.required::after {
    content: ' *';
    color: #dc3545;
  }
  
  .update-buyer-modal .form-input,
  .update-buyer-modal .form-select,
  .update-buyer-modal .form-textarea {
    padding: 14px 18px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    color: #2c3e50;
    background: white;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
  }
  
  .update-buyer-modal .form-input:focus,
  .update-buyer-modal .form-select:focus,
  .update-buyer-modal .form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .update-buyer-modal .form-select[multiple] {
    min-height: 150px;
    padding: 10px;
  }
  
  .update-buyer-modal .form-help {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
  }
  
  /* Array Input Groups */
  .update-buyer-modal .array-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .update-buyer-modal .array-input-group .form-input {
    flex: 1 1;
  }
  
  .update-buyer-modal .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
  }
  
  .update-buyer-modal .remove-btn:hover {
    background: #c82333;
  }
  
  .update-buyer-modal .add-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
  }
  
  .update-buyer-modal .add-btn:hover {
    background: #218838;
  }
  
  /* Error Message */
  .update-buyer-modal .error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
  }
  
  .update-buyer-modal .error-message i {
    font-size: 16px;
  }
  
  /* Modal Footer */
  .update-buyer-modal .modal-footer {
    display: flex !important;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 40px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    z-index: 10;
    min-height: 80px;
  }
  
  .update-buyer-modal .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 1 !important;
    visibility: visible !important;
    height: auto;
  }
  
  .update-buyer-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .update-buyer-modal .btn-secondary {
    background: #6c757d;
    color: white;
    border: 2px solid #6c757d;
  }
  
  .update-buyer-modal .btn-secondary:hover:not(:disabled) {
    background: #5a6268;
  }
  
  .update-buyer-modal .btn-primary {
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
  }
  
  .update-buyer-modal .btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  /* Responsive Design */
  @media (max-width: 1400px) {
    .update-buyer-modal {
      max-width: 75vw;
      min-width: 65vw;
    }
  }
  
  @media (max-width: 1200px) {
    .update-buyer-modal {
      max-width: 80vw;
      min-width: 70vw;
    }
    
    .update-buyer-modal .form-grid {
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
  }
  
  @media (max-width: 768px) {
    .update-buyer-modal {
      max-width: 95vw;
      min-width: 90vw;
      margin: 10px;
    }
    
    .update-buyer-modal .modal-header {
      padding: 20px 30px;
    }
    
    .update-buyer-modal .modal-header h3 {
      font-size: 18px;
    }
    
    .update-buyer-modal .modal-body {
      padding: 30px;
    }
    
    .update-buyer-modal .form-grid {
      grid-template-columns: 1fr;
      gap: 15px;
    }
    
    .update-buyer-modal .array-input-group {
      flex-direction: column;
      align-items: stretch;
    }
    
    .update-buyer-modal .remove-btn {
      width: 100%;
      justify-content: center;
    }
    
    .update-buyer-modal .modal-footer {
      padding: 16px 30px;
      flex-direction: column;
    }
    
    .update-buyer-modal .btn {
      width: 100%;
    }
  }
  
  @media (max-width: 480px) {
    .update-buyer-modal .modal-header {
      padding: 15px 20px;
    }
    
    .update-buyer-modal .modal-body {
      padding: 20px;
    }
    
    .update-buyer-modal .form-section h4 {
      font-size: 16px;
    }
    
    .update-buyer-modal .form-input,
    .update-buyer-modal .form-select,
    .update-buyer-modal .form-textarea {
      padding: 12px 14px;
      font-size: 14px;
    }
  }
  
.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
.team-overdue-page {
  padding: 20px 30px;
  background: #f8fafc;
  min-height: calc(100vh - 100px);
}

.team-overdue-header {
  margin-bottom: 18px;
}

.team-overdue-header h2 {
  margin: 0;
  font-size: 2rem;
  color: #0f172a;
}

.team-overdue-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.team-overdue-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.team-overdue-summary {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #334155;
  margin-bottom: 14px;
}

.team-overdue-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.team-overdue-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.team-overdue-table thead th {
  background: #f8fafc;
  font-size: 0.82rem;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 11px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.team-overdue-table td {
  padding: 11px 10px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  word-break: break-word;
}

.team-overdue-table tbody tr:hover {
  background: #f8fafc;
}

.team-overdue-date {
  color: #5b21b6 !important;
  font-weight: 700;
  white-space: nowrap;
}

.team-overdue-action-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.team-overdue-action-new-product-enquiry {
  background: #dbeafe;
  color: #1d4ed8;
}

.team-overdue-action-introductory-mail {
  background: #e0e7ff;
  color: #4338ca;
}

.team-overdue-action-quotation {
  background: #fef3c7;
  color: #92400e;
}

.team-overdue-action-follow-up {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 768px) {
  .team-overdue-page {
    padding: 14px;
  }

  .team-overdue-header h2 {
    font-size: 1.45rem;
  }
}

.pending-export-sales-order {
  padding: 20px 30px;
  max-width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.pending-export-sales-order-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  text-align: center;
}

.pending-export-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.pending-export-sales-order-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pending-export-sales-order-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-export-sales-order-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-control label {
  font-weight: 500;
  color: #555;
}

.entries-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-control label {
  font-weight: 500;
  color: #555;
}

.search-input {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.pending-export-sales-order-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.pending-export-sales-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pending-export-sales-order-table thead {
  background-color: #f1f5f9;
}

.pending-export-sales-order-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.pending-export-sales-order-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.pending-export-sales-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.pending-export-sales-order-table .no-data {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-style: italic;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: #475569;
}

.action-btn:hover {
  background-color: #f1f5f9;
}

.action-btn.print-btn:hover {
  color: #2563eb;
}

.action-btn.edit-btn {
  color: #2563eb;
  font-weight: 500;
}

.action-btn.edit-btn:hover {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.action-btn.request-edit-btn {
  color: #c2410c;
  font-weight: 500;
}

.action-btn.request-edit-btn:hover {
  background-color: #ffedd5;
  color: #9a3412;
}

.action-btn.pi-btn:hover {
  color: #059669;
}

.action-btn.view-btn {
  color: #7c3aed;
  font-weight: 500;
}

.action-btn.view-btn:hover {
  background-color: #ede9fe;
  color: #6d28d9;
}

.action-btn i {
  margin-right: 4px;
}

.pending-export-sales-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
}

.pagination-controls {
  display: flex;
  gap: 5px;
}

.pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  color: #475569;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #7c3aed;
  color: #7c3aed;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

.copyright {
  text-align: left;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.view-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.order-info-section {
  margin-bottom: 30px;
}

.order-info-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.products-section {
  margin-top: 30px;
}

.products-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 15px;
}

.products-table thead {
  background-color: #f1f5f9;
}

.products-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

.products-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.products-table tfoot {
  background-color: #f1f5f9;
  font-weight: 600;
}

.products-table tfoot td {
  padding: 12px 8px;
  color: #1e293b;
}

.no-products {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-style: italic;
}

.view-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 20px;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: #6d28d9;
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .pending-export-sales-order-table-container {
    overflow-x: scroll;
  }
  
  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .search-control{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.pending-sample-dispatch {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.pending-sample-dispatch-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pending-sample-dispatch-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.pending-sample-dispatch-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.pending-sample-dispatch-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pending-sample-dispatch-search-row label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
}

.pending-sample-dispatch-search-input {
  flex: 1 1;
  min-width: 220px;
  max-width: 480px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
}

.pending-sample-dispatch-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.pending-sample-dispatch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e5e7eb;
}

.pending-sample-dispatch-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: #64748b;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.pending-sample-dispatch-tab:hover {
  color: #667eea;
  background: #f8fafc;
}

.pending-sample-dispatch-tab.active {
  color: #667eea;
  font-weight: 600;
  border-bottom-color: #667eea;
}

.pending-sample-dispatch-filter-select {
  min-width: 140px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  background-color: #fff;
  color: #334155;
}

.pending-sample-dispatch-filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.pending-sample-dispatch-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.pending-sample-dispatch-table-container {
  overflow-x: auto;
}

.pending-sample-dispatch-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pending-sample-dispatch-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.pending-sample-dispatch-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pending-sample-dispatch-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.pending-sample-dispatch-table tbody tr:hover {
  background-color: #f8f9fa;
}

.pending-sample-dispatch-table tbody tr:last-child td {
  border-bottom: none;
}

.consignee-address {
  color: #64748b;
  font-size: 0.85rem;
}

.batch-type-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.batch-type-lab {
  background-color: #dbeafe;
  color: #1e40af;
}

.batch-type-comercial {
  background-color: #fef3c7;
  color: #92400e;
}

.batch-type-ws {
  background-color: #d1fae5;
  color: #065f46;
}

.view-btn {
  background-color: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-style: italic;
}

/* View Modal Styles - Matching MarketingFinalRecords */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-error i {
  font-size: 1.1rem;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dispatch-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
  margin-top: 15px;
}

.dispatch-details-grid-six-col {
  grid-template-columns: repeat(6, 1fr);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.detail-item label {
  font-weight: 600;
  color: #667eea;
  font-size: 0.9rem;
}

.detail-item span {
  color: #333;
  font-size: 0.95rem;
}

.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.view-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.view-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.select-all-controls {
  display: flex;
  align-items: center;
}

.select-all-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.select-all-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.dispatched-row {
  background-color: #f0f9ff;
  opacity: 0.8;
}

.dispatched-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pending-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.dispatch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
}

.dispatch-selected-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dispatch-selected-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.dispatch-selected-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.selected-count {
  color: #667eea;
  font-weight: 600;
  font-size: 0.9rem;
}

.batch-number-display {
  font-weight: 600;
  color: #667eea;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 4px 8px;
  background-color: #f0f4ff;
  border-radius: 4px;
  display: inline-block;
}

.batch-number-generating {
  color: #999;
  font-style: italic;
  font-size: 0.85rem;
}

.batch-type-info {
  margin: 8px 0 0 0;
  font-size: 0.9rem;
  color: #666;
}

.batch-type-badge-view {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

.dispatched-check-icon {
  color: #10b981;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dispatch-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.dispatch-status-badge.dispatched-main {
  background-color: #d1fae5;
  color: #065f46;
}

.dispatch-status-badge.pending-main {
  background-color: #fef3c7;
  color: #92400e;
}

.dispatch-single-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dispatch-single-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.dispatch-single-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dispatch-single-btn i {
  font-size: 0.8rem;
}

.dispatched-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
}

.pending-sample-dispatch-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.pending-sample-dispatch-footer p {
  margin: 0;
}

.approval-status-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.approval-status-label--approved {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
}

.approval-status-label--rejected {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-btn,
.edit-btn,
.finalize-btn,
.dispatch-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

.view-btn {
  background-color: #667eea;
  color: white;
}

.view-btn:hover {
  background-color: #5568d3;
  transform: translateY(-1px);
}

.edit-btn {
  background-color: #f59e0b;
  color: white;
}

.edit-btn:hover:not(:disabled) {
  background-color: #d97706;
  transform: translateY(-1px);
}

.edit-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.finalize-btn {
  background-color: #10b981;
  color: white;
}

.finalize-btn:hover:not(:disabled) {
  background-color: #059669;
  transform: translateY(-1px);
}

.finalize-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.finalize-btn.finalized {
  background-color: #6b7280;
  cursor: default;
}

.dispatch-btn {
  background-color: #3b82f6;
  color: white;
  margin-left: 6px;
}

.dispatch-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.dispatch-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.dispatch-btn.dispatched {
  background-color: #6b7280;
  cursor: default;
}

/* Final Status Badge */
.final-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.final-status-badge.finalized {
  background-color: #d1fae5;
  color: #065f46;
}

.final-status-badge.not-finalized {
  background-color: #e5e7eb;
  color: #6b7280;
}

/* Finalized Row Styling */
.finalized-row {
  background-color: #f0fdf4 !important;
}

.finalized-row:hover {
  background-color: #dcfce7 !important;
}

/* Edit Modal Styles */
.edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.edit-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.edit-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.edit-modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.edit-modal-header .modal-close-btn {
  color: white;
}

.edit-modal-header .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.edit-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.edit-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.edit-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-form-group.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.edit-form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.edit-form-group input,
.edit-form-group select,
.edit-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.edit-form-group input:focus,
.edit-form-group select:focus,
.edit-form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.edit-form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* Edit Products Section */
.edit-products-section {
  margin-top: 20px;
}

.edit-products-section h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.edit-products-table-container {
  overflow-x: auto;
}

.edit-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.edit-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.edit-products-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  white-space: nowrap;
}

.edit-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.edit-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.edit-products-table td {
  padding: 10px;
  vertical-align: middle;
}

.edit-products-table input,
.edit-products-table select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.9rem;
}

.edit-products-table input:focus,
.edit-products-table select:focus {
  outline: none;
  border-color: #667eea;
}

/* Edit Modal Footer */
.edit-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.cancel-btn,
.save-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cancel-btn {
  background-color: #e5e7eb;
  color: #374151;
}

.cancel-btn:hover:not(:disabled) {
  background-color: #d1d5db;
}

.save-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.save-btn:disabled,
.cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
  .dispatch-details-grid,
  .dispatch-details-grid-six-col {
    grid-template-columns: 1fr;
  }

  .pending-sample-dispatch-table {
    font-size: 0.85rem;
  }

  .pending-sample-dispatch-table th,
  .pending-sample-dispatch-table td {
    padding: 8px 12px;
  }

  .view-modal-overlay {
    padding: 10px;
  }

  .view-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .view-modal-header {
    padding: 15px 20px;
  }

  .view-modal-header h2 {
    font-size: 1.2rem;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-products-table {
    font-size: 0.85rem;
    min-width: 700px;
  }

  .view-products-table th,
  .view-products-table td {
    padding: 8px 10px;
  }
  
  .action-buttons {
    flex-wrap: wrap;
  }
  
  .edit-form-grid {
    grid-template-columns: 1fr;
  }
  
  .edit-modal-content {
    max-width: 100%;
  }
}

/* Export Sample Logistic modal — wide product table with constrained method column */
.export-logistic-modal-table {
  table-layout: fixed;
  min-width: 1680px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.export-logistic-modal-table th,
.export-logistic-modal-table td {
  overflow: hidden;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

.export-logistic-modal-table th {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: 11px;
  line-height: 1.3;
  padding: 10px 8px;
}

.export-logistic-modal-table td {
  padding: 8px;
}

/* 1 Buyer product, 2 Product name */
.export-logistic-modal-table th:nth-child(1),
.export-logistic-modal-table td:nth-child(1),
.export-logistic-modal-table th:nth-child(2),
.export-logistic-modal-table td:nth-child(2) {
  width: 100px;
}

/* 3 Qty, 4 Payment */
.export-logistic-modal-table th:nth-child(3),
.export-logistic-modal-table td:nth-child(3) {
  width: 56px;
}

.export-logistic-modal-table th:nth-child(4),
.export-logistic-modal-table td:nth-child(4) {
  width: 72px;
}

/* 5 Batch */
.export-logistic-modal-table th:nth-child(5),
.export-logistic-modal-table td:nth-child(5) {
  width: 90px;
}

/* 6 Method */
.export-logistic-modal-table th:nth-child(6),
.export-logistic-modal-table td:nth-child(6) {
  width: 180px;
  min-width: 140px;
}

/* 7 Sample stock type */
.export-logistic-modal-table th:nth-child(7),
.export-logistic-modal-table td:nth-child(7) {
  width: 100px;
}

/* 8 Freight */
.export-logistic-modal-table th:nth-child(8),
.export-logistic-modal-table td:nth-child(8) {
  width: 130px;
  min-width: 130px;
}

/* 9 Invoice Amount */
.export-logistic-modal-table th:nth-child(9),
.export-logistic-modal-table td:nth-child(9) {
  width: 140px;
  min-width: 140px;
}

/* 10 Upload Invoice */
.export-logistic-modal-table th:nth-child(10),
.export-logistic-modal-table td:nth-child(10) {
  width: 130px;
  min-width: 130px;
}

/* 11 Invoice Status */
.export-logistic-modal-table th:nth-child(11),
.export-logistic-modal-table td:nth-child(11) {
  width: 100px;
  min-width: 100px;
  text-align: center;
}

/* 12 Courier, 13 Docket */
.export-logistic-modal-table th:nth-child(12),
.export-logistic-modal-table td:nth-child(12),
.export-logistic-modal-table th:nth-child(13),
.export-logistic-modal-table td:nth-child(13) {
  width: 96px;
}

/* 14 Date */
.export-logistic-modal-table th:nth-child(14),
.export-logistic-modal-table td:nth-child(14) {
  width: 118px;
}

/* 15 Remark */
.export-logistic-modal-table th:nth-child(15),
.export-logistic-modal-table td:nth-child(15) {
  width: 100px;
}

/* 16 Action */
.export-logistic-modal-table th:nth-child(16),
.export-logistic-modal-table td:nth-child(16) {
  width: 110px;
}

.export-logistic-amount-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.export-logistic-amount-cell .dispatch-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.export-logistic-amount-cell .dispatch-btn {
  flex: 0 0 auto;
}

.export-logistic-invoice-upload-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
}

.export-logistic-invoice-upload-cell a {
  font-size: 12px;
  line-height: 1.3;
  word-break: break-all;
}

.export-logistic-invoice-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.export-logistic-invoice-upload-btn:hover {
  background: #dbeafe;
}

.export-logistic-invoice-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}

.export-logistic-invoice-status.is-pending {
  background: #fef9c3;
  color: #854d0e;
}

.export-logistic-invoice-status.is-received {
  background: #dcfce7;
  color: #166534;
}

.export-logistic-method-cell {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
  cursor: help;
}

.export-logistic-stock-type-cell {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #475569;
  word-break: break-word;
}

.export-logistic-batch-cell {
  max-width: 100%;
}

.export-logistic-batch-cell .finalize-btn,
.export-logistic-batch-btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  line-height: 1.25;
  padding: 6px 8px;
  font-size: 0.75rem;
  text-align: center;
}

.export-logistic-modal-table .dispatch-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 12px;
}

/* Export Pending Final Sample — view modal dispatch info (5 equal columns) */
.export-pending-final-view-modal .dispatch-details-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 16px 12px;
  gap: 16px 12px;
  margin-top: 15px;
}

.export-pending-final-view-modal .detail-item {
  min-width: 0;
}

.export-pending-final-view-modal .detail-item.full-width {
  grid-column: 1 / -1;
}

@media (max-width: 992px) {
  .export-pending-final-view-modal .dispatch-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .export-pending-final-view-modal .dispatch-details-grid {
    grid-template-columns: 1fr;
  }
}

.export-pending-final-pi-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.export-pending-final-pi-btn:hover:not(:disabled) {
  background: #0d9488;
}

.export-pending-final-pi-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Export Sample Pending Approve — view modal dispatch info (6 equal columns) */
.export-sample-pending-approve-view-modal .dispatch-details-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 16px 12px;
  gap: 16px 12px;
  margin-top: 15px;
}

.export-sample-pending-approve-view-modal .detail-item {
  min-width: 0;
}

.export-sample-pending-approve-view-modal .detail-item.full-width {
  grid-column: 1 / -1;
}

@media (max-width: 992px) {
  .export-sample-pending-approve-view-modal .dispatch-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .export-sample-pending-approve-view-modal .dispatch-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Scoped table action buttons — overrides global .edit-btn / .view-btn from other pages */
.pending-sample-dispatch .action-buttons .view-btn,
.pending-sample-dispatch .action-buttons .edit-btn,
.pending-sample-dispatch .action-buttons .finalize-btn,
.pending-sample-dispatch .action-buttons .dispatch-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  box-sizing: border-box;
}

.pending-sample-dispatch .action-buttons .view-btn {
  background-color: #667eea;
  color: #ffffff;
}

.pending-sample-dispatch .action-buttons .view-btn:hover:not(:disabled) {
  background-color: #5568d3;
  transform: translateY(-1px);
}

.pending-sample-dispatch .action-buttons .edit-btn {
  background-color: #f59e0b;
  color: #ffffff;
}

.pending-sample-dispatch .action-buttons .edit-btn:hover:not(:disabled) {
  background-color: #d97706;
  transform: translateY(-1px);
}

.pending-sample-dispatch .action-buttons .edit-btn:disabled {
  background-color: #9ca3af;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.65;
}

.pending-sample-dispatch .action-buttons .finalize-btn {
  background-color: #10b981;
  color: #ffffff;
}

.pending-sample-dispatch .action-buttons .finalize-btn:hover:not(:disabled) {
  background-color: #059669;
  transform: translateY(-1px);
}

.pending-sample-dispatch .action-buttons .finalize-btn:disabled,
.pending-sample-dispatch .action-buttons .finalize-btn.finalized {
  background-color: #6b7280;
  color: #ffffff;
  cursor: default;
  opacity: 1;
}

.pending-sample-dispatch .action-buttons .dispatch-btn {
  background-color: #3b82f6;
  color: #ffffff;
}

.pending-sample-dispatch .action-buttons .dispatch-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.pending-sample-dispatch .action-buttons .view-btn i,
.pending-sample-dispatch .action-buttons .edit-btn i,
.pending-sample-dispatch .action-buttons .finalize-btn i,
.pending-sample-dispatch .action-buttons .dispatch-btn i {
  color: inherit;
  margin: 0;
}

.sample-dispatch-coa-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.sample-dispatch-coa-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.sample-dispatch-coa-batch {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.sample-dispatch-coa-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #3b82f6;
  background-color: #ffffff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sample-dispatch-coa-download-btn:hover:not(:disabled) {
  background-color: #eff6ff;
}

.sample-dispatch-coa-download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sample-dispatch-coa-loading,
.sample-dispatch-coa-empty {
  font-size: 12px;
  color: #6b7280;
}


.price-list-container {
  padding: 24px;
  background: #f5f7fa;
  min-height: calc(100vh - 200px);
}

.price-list-error,
.price-list-success {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease-out;
}

.price-list-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.price-list-error div {
  flex: 1 1;
}

.price-list-error strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.price-list-error p {
  margin: 4px 0;
  line-height: 1.5;
}

.price-list-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
  color: #065f46;
}

.price-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.price-list-table-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.price-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 1400px;
}

.price-list-table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.price-list-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-list-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
}

.price-list-table tbody tr {
  transition: all 0.2s ease;
}

.price-list-table tbody tr:hover {
  background-color: #f8fafc;
}

.price-list-table tbody tr:last-child td {
  border-bottom: none;
}

.price-input {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: white;
  text-align: center;
  min-width: 80px;
}

.price-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.edit-price-btn,
.save-price-btn,
.cancel-price-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

.edit-price-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.edit-price-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.save-price-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.save-price-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.save-price-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cancel-price-btn {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.3);
}

.cancel-price-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.4);
}

.cancel-price-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.no-data {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-style: italic;
}

@media (max-width: 768px) {
  .price-list-container {
    padding: 16px;
  }

  .price-list-table-container {
    padding: 16px;
  }

  .price-list-table {
    font-size: 0.85rem;
  }

  .price-list-table th,
  .price-list-table td {
    padding: 10px 8px;
  }
}


/* Stay within marketing main column; wide tables scroll inside inner wrapper */
.marketing-main-content > .sample-dispatch-register {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sample-dispatch-register {
  padding: 16px 20px 24px;
  min-height: auto;
  background-color: #f5f5f5;
  overflow-x: clip;
}

.sample-dispatch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sample-dispatch-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.add-consignee-link {
  color: white;
  text-decoration: underline;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.add-consignee-link:hover {
  opacity: 0.8;
}

.sample-dispatch-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.sample-dispatch-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample-dispatch-success {
  background-color: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample-dispatch-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 16px 20px;
  gap: 16px 20px;
  margin-bottom: 8px;
  grid-auto-flow: row;
  width: 100%;
  min-width: 0;
  grid-auto-rows: auto;
  box-sizing: border-box;
}

.form-grid .form-group {
  min-width: 0; /* Prevents flex items from overflowing */
  max-width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.form-control {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

/* Preserve typed letter casing; other app styles may apply text-transform: uppercase to inputs. */
.sample-dispatch-register .sample-dispatch-form input.form-control,
.sample-dispatch-register .sample-dispatch-form textarea.form-control {
  text-transform: none;
}

.form-control.sample-dispatch-country-readonly {
  background-color: #f5f5f5;
  cursor: default;
  color: #374151;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.product-entry-section {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.product-entry-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  color: #333;
  font-weight: 600;
}

.product-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-gap: 16px 20px;
  gap: 16px 20px;
  margin-bottom: 16px;
}

.party-detail-banner {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
}

.party-detail-banner__label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.8rem;
  display: block;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.party-detail-banner__text {
  display: block;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #334155;
  font-weight: 400;
  background-color: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.edit-buyer-logistic-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #5b21b6;
  border: 1px solid #a78bfa;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.edit-buyer-logistic-btn:hover {
  background: #f5f3ff;
  border-color: #7c3aed;
  color: #4c1d95;
}

.buyer-logistic-field-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.buyer-logistic-field-header label {
  margin-bottom: 0;
}

.product-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.add-product-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  width: -webkit-fit-content;
  width: fit-content;
}

.add-product-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.product-list-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e9ecef;
  min-width: 0;
}

.product-list-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.product-list-section-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
}

.product-list-scroll-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}

.product-list-table-wrap {
  overflow: visible;
  max-width: 100%;
  min-width: 0;
}

.product-list-table-inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.product-list-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background-color: white;
}

.product-list-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.product-list-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: middle;
}

.product-list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e9ecef;
  color: #334155;
  font-size: 0.85rem;
  vertical-align: middle;
}

.product-list-table .col-product-name {
  min-width: 140px;
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
}

.product-list-table .col-remark,
.product-list-table .col-logistic-remark {
  min-width: 100px;
  max-width: 160px;
  white-space: normal;
  word-break: break-word;
}

.product-list-table .col-actions {
  white-space: nowrap;
  position: -webkit-sticky;
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -4px 0 8px rgba(15, 23, 42, 0.06);
}

.product-list-table thead .col-actions {
  background: #6d5ce6;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.12);
}

.product-list-table tbody tr:hover .col-actions {
  background: #f8f9fa;
}

.product-list-table a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.product-list-table a:hover {
  text-decoration: underline;
}

.product-list-table tbody tr:hover {
  background-color: #f8f9fa;
}

.product-list-table tbody tr:last-child td {
  border-bottom: none;
}

.product-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.edit-product-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.edit-product-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.edit-product-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-product-btn {
  background-color: #dc2626;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.delete-product-btn:hover:not(:disabled) {
  background-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.delete-product-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cancel-edit-btn {
  padding: 10px 20px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cancel-edit-btn:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.product-id-badge {
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 5px;
}

.remarks-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  clear: both;
}

.save-details-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.save-details-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.save-details-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sample-dispatch-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.sample-dispatch-footer p {
  margin: 0;
}

@media (min-width: 1200px) {
  .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sample-dispatch-register {
    padding: 12px 12px 20px;
  }

  .sample-dispatch-content {
    padding: 16px;
  }

  .form-grid,
  .product-form-grid {
    grid-template-columns: 1fr;
  }

  .sample-dispatch-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .form-actions {
    justify-content: stretch;
  }

  .save-details-btn {
    width: 100%;
    justify-content: center;
  }

  .product-list-table th,
  .product-list-table td {
    padding: 8px 10px;
  }
}


.team-details-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Match Exhibition list table design - override min-width for team tables */
.team-details-container .marketing-final-table {
  min-width: 800px;
}

.team-details-container .marketing-final-table-container {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.team-details-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.date-range-selector {
  display: flex;
  gap: 15px;
  align-items: center;
}

.date-range-selector label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: #666;
}

.date-range-selector input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.date-range-selector input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.today-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.summary-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.summary-icon.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.summary-icon.bg-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.summary-icon.bg-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.summary-icon.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.summary-info {
  flex: 1 1;
  display: flex;
  flex-direction: column;
}

.summary-info h3 {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.summary-value {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #333;
  text-align: right;
  align-self: flex-end;
}

.team-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.team-tabs button {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.team-tabs button:hover {
  color: #3b82f6;
  background: #f3f4f6;
}

.team-tabs button.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.tab-content {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}

.team-overview h3,
.sales-orders-tab h3,
.samples-tab h3,
.work-tab h3,
.exhibitions-tab h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
}

.team-hint {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 14px;
}

.member-context {
  margin-bottom: 15px;
  padding: 10px 15px;
  background: #f0f9ff;
  border-radius: 6px;
  font-size: 14px;
}

.member-context .badge-india {
  margin-left: 10px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 12px;
}

.member-context .count-badge {
  margin-left: 10px;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 12px;
}

.sales-status-breakdown {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sales-status-breakdown .status-card {
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
  align-items: flex-end;
  text-align: right;
}

.sales-status-breakdown .status-card span {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
}

.sales-status-breakdown .status-card strong {
  font-size: 24px;
  text-align: right;
}

.sales-status-breakdown .status-card.pending {
  background: #fef3c7;
  color: #92400e;
}

.sales-status-breakdown .status-card.approved {
  background: #d1fae5;
  color: #065f46;
}

.sales-status-breakdown .status-card.processed {
  background: #dbeafe;
  color: #1e40af;
}

.india-filter-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.india-filter-label input[type="checkbox"] {
  cursor: pointer;
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.team-member-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.team-member-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.team-member-card.selected {
  border-color: #3b82f6;
  background: #eff6ff;
}

.member-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.member-info h4 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 16px;
}

.member-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.member-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
  flex-direction: column;
}

.stat-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #3b82f6;
  text-align: right;
  min-width: 2ch;
}

.data-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  margin-top: 10px;
}

.data-table thead {
  background: #f3f4f6;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
  border-bottom: 2px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  white-space: nowrap;
  min-width: 110px;
  box-sizing: border-box;
}

.data-table th:last-child {
  border-right: none;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  color: #666;
  font-size: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.data-table td:last-child {
  border-right: none;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.status-approved,
.status-badge.status-dispatched {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.status-final,
.status-badge.status-complete {
  background: #dbeafe;
  color: #1e40af;
}

.loading,
.no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.access-denied {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.access-denied h2 {
  color: #d32f2f;
  margin-bottom: 10px;
}

.access-denied p {
  color: #666;
  font-size: 16px;
}

.btn-view-products {
  padding: 6px 14px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-view-products:hover {
  background: #5a6fd6;
}

.team-details-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.team-details-modal {
  background: white;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.team-details-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-details-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.team-details-modal-subtitle {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #666;
}

.team-details-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.team-details-modal-close:hover {
  color: #333;
}

.team-details-modal-body {
  padding: 20px;
  overflow: auto;
}

.team-details-modal-empty {
  margin: 0;
  color: #666;
  font-size: 14px;
}

@media (max-width: 768px) {
  .team-details-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-range-selector {
    width: 100%;
    flex-direction: column;
  }

  .date-range-selector label {
    width: 100%;
  }

  .today-summary-cards {
    grid-template-columns: 1fr;
  }

  .team-members-grid {
    grid-template-columns: 1fr;
  }

  .team-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .data-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 800px;
  }

  .data-table th {
    min-width: 90px;
  }
}


.view-price-list-container {
  padding: 20px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  background: #f5f5f5;
  min-height: 100vh;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-selector-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.selector-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.selector-row-second {
  margin-top: 16px;
  align-items: flex-end;
}

.selector-row-second .view-price-sort-group {
  flex: 0 0 auto;
}

.country-selector-section .form-group {
  flex: 0 0 auto;
  min-width: 250px;
}

.country-selector-section .search-group {
  flex: 1 1;
  min-width: 300px;
  max-width: 500px;
}

/* USA-only currency badge — top row next to country */
.country-selector-section .view-price-currency-group {
  flex: 0 0 auto;
  min-width: auto;
}

.country-selector-section .view-price-currency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background-color: #f0f7ff;
  border: 1px solid #b3d9ff;
  border-radius: 6px;
  font-size: 14px;
  color: #1976d2;
  font-weight: 500;
  white-space: nowrap;
}

.country-selector-section .view-price-currency-symbol {
  font-size: 16px;
  font-weight: 600;
}

/* Wider product selector (marketing_user) — second row can use full width */
.country-selector-section .search-group.view-price-product-select {
  flex: 1 1 520px;
  min-width: min(100%, 440px);
  max-width: none;
}

@media (min-width: 900px) {
  .country-selector-section .search-group.view-price-product-select {
    min-width: 560px;
  }
}

@media (min-width: 1200px) {
  .country-selector-section .search-group.view-price-product-select {
    min-width: 640px;
  }
}

.view-price-product-select .view-price-product-trigger {
  white-space: normal;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.view-price-product-select .view-price-product-trigger-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.35;
}

.country-selector-section .form-label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
}

.country-selector-section .form-label .required {
  color: #dc3545;
}

.country-selector-section .country-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: white;
}

.country-selector-section .country-select:focus {
  outline: none;
  border-color: #007bff;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-input {
  padding-right: 40px;
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s;
}

.clear-search-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.clear-search-btn:focus {
  outline: none;
  background: #f0f0f0;
}

.excel-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1200px;
}

.excel-table thead {
  background-color: #4472c4;
  color: white;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.excel-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #d0d0d0;
  white-space: nowrap;
  font-size: 12px;
}

.excel-table tbody tr {
  background-color: white;
  transition: background-color 0.2s;
}

.excel-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.excel-table tbody tr:hover {
  background-color: #e8f4f8;
}

.excel-table td {
  padding: 8px;
  border: 1px solid #d0d0d0;
  vertical-align: middle;
}

.excel-table .serial-no {
  text-align: center;
  width: 60px;
  font-weight: 600;
  color: #666;
}

.excel-table .product-name {
  min-width: 200px;
  font-weight: 500;
  color: #333;
}

.excel-table .readonly-cell {
  background-color: #f5f5f5;
  color: #333;
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

.excel-table .loading-cell,
.excel-table .no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 14px;
}

.excel-table .loading-cell i {
  margin-right: 10px;
}

.no-country-selected {
  background: white;
  padding: 60px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: #666;
}

.no-country-selected i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 15px;
}

.no-country-selected p {
  margin: 0;
  font-size: 16px;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: white;
  border-top: 1px solid #d0d0d0;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 5px;
  background: white;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #007bff;
  color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Scrollbar styling */
.table-wrapper::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@media (max-width: 768px) {
  .view-price-list-container {
    padding: 10px;
  }

  .excel-table {
    font-size: 11px;
  }

  .excel-table th,
  .excel-table td {
    padding: 6px 4px;
  }
}

.operation-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.operation-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.operation-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.operation-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.operation-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.operation-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d97706, transparent);
  background: linear-gradient(90deg, var(--metric-color, #d97706), transparent);
}

.operation-metric-card-1 { --metric-color: #d97706; }
.operation-metric-card-2 { --metric-color: #f59e0b; }
.operation-metric-card-3 { --metric-color: #10b981; }
.operation-metric-card-4 { --metric-color: #3b82f6; }
.operation-metric-card-5 { --metric-color: #14b8a6; }
.operation-metric-card-6 { --metric-color: #059669; }
.operation-metric-card-7 { --metric-color: #16a34a; }
.operation-metric-card-8 { --metric-color: #0ea5e9; }

.operation-dashboard .metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.operation-dashboard .metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.operation-dashboard .bg-primary {
  background: #3b82f6;
}

.operation-dashboard .bg-success {
  background: #10b981;
}

.operation-dashboard .metric-info {
  flex: 1 1;
  min-width: 0;
}

.operation-dashboard .metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.operation-dashboard .metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.operation-dashboard .metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.operation-dashboard .mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.operation-dashboard .mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.operation-dashboard .metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  text-decoration: none;
  display: block;
}

.operation-dashboard .metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.operation-dashboard .metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.operation-dashboard .metric-change:hover {
  color: #3b82f6;
}

/* Pending cards: blink like /marketing/export-dashboard */
@keyframes operation-dashboard-pending-trading-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(16, 185, 129, 0.35),
      0 0 12px rgba(16, 185, 129, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(16, 185, 129, 0.65),
      0 0 28px 6px rgba(16, 185, 129, 0.32),
      0 0 48px 10px rgba(52, 211, 153, 0.2);
  }
}

@keyframes operation-dashboard-pending-trading-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.operation-metric-card.operation-metric-card--blink-pending-trading {
  animation: operation-dashboard-pending-trading-blink 1s ease-in-out infinite;
}

.operation-metric-card.operation-metric-card--blink-pending-trading:hover {
  animation: operation-dashboard-pending-trading-blink 1s ease-in-out infinite;
}

.operation-metric-card.operation-metric-card--blink-pending-trading::before {
  height: 5px;
  background: linear-gradient(90deg, #059669, #10b981, #34d399, #6ee7b7);
  animation: operation-dashboard-pending-trading-topbar 1s ease-in-out infinite;
}

@keyframes operation-dashboard-indent-pending-blink {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.08),
      0 0 0 2px rgba(16, 185, 129, 0.35),
      0 0 12px rgba(16, 185, 129, 0.12);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.1),
      0 0 0 4px rgba(16, 185, 129, 0.65),
      0 0 28px 6px rgba(16, 185, 129, 0.32),
      0 0 48px 10px rgba(52, 211, 153, 0.2);
  }
}

@keyframes operation-dashboard-indent-pending-topbar {
  0%,
  100% {
    opacity: 0.92;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

.operation-metric-card.operation-metric-card--blink-indent-pending {
  animation: operation-dashboard-indent-pending-blink 1s ease-in-out infinite;
}

.operation-metric-card.operation-metric-card--blink-indent-pending:hover {
  animation: operation-dashboard-indent-pending-blink 1s ease-in-out infinite;
}

.operation-metric-card.operation-metric-card--blink-indent-pending::before {
  height: 5px;
  background: linear-gradient(90deg, #059669, #10b981, #34d399, #6ee7b7);
  animation: operation-dashboard-indent-pending-topbar 1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .operation-metric-card.operation-metric-card--blink-pending-trading,
  .operation-metric-card.operation-metric-card--blink-indent-pending {
    animation: none;
  }

  .operation-metric-card.operation-metric-card--blink-pending-trading::before,
  .operation-metric-card.operation-metric-card--blink-indent-pending::before {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

.operation-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #64748b;
}

.operation-loading p {
  font-size: 16px;
  margin: 0;
}

@media (max-width: 1100px) {
  .operation-metrics-row {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .operation-dashboard {
    padding: 15px;
  }

  .operation-metrics-row {
    grid-template-columns: 1fr;
  }
}

.all-tickets-page {
  padding: 20px 24px;
  max-width: 100%;
  background: #f8fafc;
  min-height: calc(100vh - 100px);
}

/* Packing Dashboard Styles - Matching Sales Dashboard Style */
.packing-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.packing-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.packing-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.packing-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.packing-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.packing-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.packing-metric-card-1 { --metric-color: #10b981; }
.packing-metric-card-2 { --metric-color: #f59e0b; }
.packing-metric-card-3 { --metric-color: #10b981; }
.packing-metric-card-4 { --metric-color: #3b82f6; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.packing-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.packing-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Packing Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / Order Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .packing-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .packing-dashboard {
    padding: 15px;
  }

  .packing-metrics-row {
    grid-template-columns: 1fr;
  }

  .packing-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


/* Packing Sales Order Styles */
.packing-sales-order {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.packing-sales-order-header {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.packing-sales-order-header h2 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.packing-sales-order-header p {
  margin: 0 0 15px 0;
  color: #64748b;
  font-size: 1rem;
}

.packing-sales-order-controls {
  display: flex;
  gap: 20px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #64748b;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.packing-sales-order-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.packing-sales-order-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.packing-orders-table-section,
.packing-products-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
}

.packing-billing-link {
  padding: 15px 20px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.packing-billing-link:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

.packing-billing-link i {
  font-size: 1.2rem;
}

.packing-table-container {
  overflow-x: auto;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}

.packing-orders-table,
.packing-products-table {
  width: 100%;
  border-collapse: collapse;
}

.packing-orders-table thead,
.packing-products-table thead {
  background-color: #f1f5f9;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.packing-orders-table th,
.packing-products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.packing-orders-table td,
.packing-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
}

.packing-orders-table tbody tr:hover,
.packing-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.packing-orders-table tbody tr.selected {
  background-color: #dbeafe;
  border-left: 3px solid #3b82f6;
}

.view-dispatch-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-dispatch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.view-dispatch-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.packing-date-input {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.875rem;
  width: 100%;
  min-width: 120px;
}

.packing-date-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.update-packing-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.update-packing-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.update-packing-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.batch-info {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
  font-style: italic;
}

.loading-cell {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e2e8f0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.no-data {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-style: italic;
}

.packing-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.packing-sales-order-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .packing-sales-order-container {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .packing-sales-order {
    padding: 15px;
  }

  .packing-table-container {
    max-height: 400px;
  }

  .view-dispatch-btn {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}


.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
/* Sales Order Billing Styles */
.sales-order-billing {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.sales-order-billing-header {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sales-order-billing-header h2 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.sales-order-billing-header p {
  margin: 0 0 15px 0;
  color: #64748b;
  font-size: 1rem;
}

.sales-order-billing-controls {
  display: flex;
  gap: 20px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #64748b;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sales-order-billing-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sales-order-billing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.sales-order-billing-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sales-order-billing-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.billing-orders-table-section,
.billing-products-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.billing-table-container {
  overflow-x: auto;
}

.billing-orders-table,
.billing-products-table {
  width: 100%;
  border-collapse: collapse;
}

.billing-orders-table thead,
.billing-products-table thead {
  background-color: #f1f5f9;
}

.billing-orders-table th,
.billing-products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  border-bottom: 2px solid #e2e8f0;
}

.billing-orders-table td,
.billing-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.875rem;
}

.billing-orders-table tbody tr:hover,
.billing-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.billing-orders-table tbody tr.selected {
  background-color: #dbeafe;
}

.view-dispatch-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.view-dispatch-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.view-dispatch-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.confirm-billing-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.confirm-billing-btn:hover:not(:disabled) {
  background-color: #059669;
}

.confirm-billing-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.confirm-billing-btn i.fa-check-circle {
  color: #10b981;
}

.loading-cell {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.batch-info {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

.billing-note {
  margin-top: 20px;
  padding: 16px;
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
}

.billing-note-text {
  margin: 0;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.6;
}

.billing-copyright {
  margin-top: 20px;
  padding: 16px;
  text-align: left;
  color: #64748b;
  font-size: 0.75rem;
}


.add-consignment {
  padding: 20px;
  background-color: var(--dashboard-bg);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.add-consignment .form-header {
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
  text-align: center;
}

.add-consignment .form-header h2 {
  color: var(--text-color-dark);
  font-size: 2rem;
  margin: 0 0 10px 0;
}

.add-consignment .form-header p {
  color: var(--text-color-light);
  font-size: 1.1rem;
  margin: 0;
}

.add-consignment-form {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 800px;
}

.add-consignment-form .form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.add-consignment-form .form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.add-consignment-form .form-section h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
}

.add-consignment-form .form-group {
  margin-bottom: 20px;
}

.add-consignment-form .form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color-dark);
  font-weight: 500;
  font-size: 1rem;
}

.add-consignment-form .form-label .required {
  color: var(--danger-color);
  margin-left: 4px;
}

.add-consignment-form .form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  color: var(--text-color-dark);
  background-color: var(--input-bg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.add-consignment-form .form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
  outline: none;
}

.add-consignment-form .form-input::placeholder {
  color: var(--text-color-light);
}

.add-consignment-form .error-message {
  background-color: var(--danger-light-color);
  color: var(--danger-dark-color);
  border: 1px solid var(--danger-color);
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-consignment-form .error-message i {
  font-size: 1.2rem;
}

.add-consignment-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.add-consignment-form .btn {
  padding: 12px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-consignment-form .btn-outline {
  background-color: transparent;
  color: var(--text-color-dark);
  border: 1px solid var(--border-color);
}

.add-consignment-form .btn-outline:hover:not(:disabled) {
  background-color: var(--hover-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.add-consignment-form .btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.add-consignment-form .btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark-color);
}

.add-consignment-form .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .add-consignment-form {
    padding: 20px;
  }

  .add-consignment-form .form-section h3 {
    font-size: 1.3rem;
  }

  .add-consignment-form .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .add-consignment-form .btn {
    width: 100%;
    justify-content: center;
  }
}


.add-subwarehouse {
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.add-subwarehouse .form-header {
  background: white;
  padding: 24px 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.add-subwarehouse .form-header h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 32px;
  font-weight: 600;
}

.add-subwarehouse .form-header p {
  color: #7f8c8d;
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.add-subwarehouse-form {
  background: white;
  padding: 28px 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: none;
  margin: 0;
}

.add-subwarehouse .form-section {
  margin-bottom: 24px;
}

.add-subwarehouse .form-section h3 {
  color: #2c3e50;
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8edf2;
}

.subwarehouse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.add-subwarehouse .form-group {
  margin-bottom: 0;
}

.add-subwarehouse .form-label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 14px;
}

.add-subwarehouse .required {
  color: #e74c3c;
}

.add-subwarehouse .form-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dfe6ee;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.add-subwarehouse .form-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

.add-subwarehouse .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  margin-top: 14px;
  border-top: 1px solid #e8edf2;
}

.add-subwarehouse .btn {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.add-subwarehouse .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.add-subwarehouse .btn-primary {
  background: #1f9cf0;
  color: #fff;
}

.add-subwarehouse .btn-secondary {
  background: #95a5a6;
  color: #fff;
}

.add-subwarehouse .error-message {
  background: #fdeaea;
  color: #8a1f1f;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid #f6c9c9;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1200px) {
  .subwarehouse-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .add-subwarehouse {
    padding: 12px;
  }

  .add-subwarehouse .form-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .add-subwarehouse .form-header p {
    white-space: normal;
  }

  .subwarehouse-grid {
    grid-template-columns: 1fr;
  }

  .add-subwarehouse .form-actions {
    flex-direction: column;
  }

  .add-subwarehouse .btn {
    width: 100%;
    justify-content: center;
  }
}


/* Add Warehouse Styles */
.add-warehouse {
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.form-header {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  text-align: center;
}

.form-header h2 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 600;
}

.form-header p {
  color: #7f8c8d;
  margin: 0;
  font-size: 16px;
}

.warehouse-form {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 40px;
}

.form-section h3 {
  color: #2c3e50;
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e1e8ed;
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 500;
  font-size: 14px;
}

.required {
  color: #e74c3c;
  margin-left: 3px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.form-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-top: 30px;
  border-top: 1px solid #e1e8ed;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 120px;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #7f8c8d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #f5c6cb;
}

.error-message i {
  font-size: 16px;
}

/* Loading State */
.btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .add-warehouse {
    padding: 10px;
  }
  
  .form-header {
    padding: 20px;
  }
  
  .form-header h2 {
    font-size: 24px;
  }
  
  .warehouse-form {
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-header h2 {
    font-size: 20px;
  }
  
  .form-header p {
    font-size: 14px;
  }
  
  .form-section h3 {
    font-size: 18px;
  }
}

.all-dwr-records-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.all-dwr-records-page .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.all-dwr-records-page .filter-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.all-dwr-records-page .filter-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.all-dwr-records-page .filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.all-dwr-records-page .filters-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.all-dwr-records-page .table-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.all-dwr-records-page .table-wrapper {
  overflow-x: auto;
}

.all-dwr-records-page .records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.all-dwr-records-page .records-table th,
.all-dwr-records-page .records-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}

.all-dwr-records-page .records-table th {
  background: #f7fafc;
  font-weight: 600;
  color: #2d3748;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

.all-dwr-records-page .records-table tbody tr:hover {
  background: #f8fafc;
}

.all-dwr-records-page .btn-edit {
  background: #edf2f7;
  color: #4a5568;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.all-dwr-records-page .btn-edit:hover {
  background: #e2e8f0;
  color: #2d3748;
}

.all-dwr-records-page .pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #edf2f7;
  flex-wrap: wrap;
  gap: 12px;
}

/* Edit modal — portaled to document.body; unique names avoid global .modal-* conflicts */
.dwr-admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  isolation: isolate;
}

.dwr-admin-modal-dialog {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.dwr-admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #edf2f7;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  flex-shrink: 0;
}

.dwr-admin-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.dwr-admin-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dwr-admin-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.dwr-admin-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}

.dwr-admin-modal-body .edit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 14px;
  gap: 14px;
}

.dwr-admin-modal-body .edit-form-group.full-width {
  grid-column: 1 / -1;
}

.dwr-admin-modal-body .edit-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.dwr-admin-modal-body .edit-form-group input,
.dwr-admin-modal-body .edit-form-group select,
.dwr-admin-modal-body .edit-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.dwr-admin-modal-footer {
  padding: 16px 22px;
  border-top: 1px solid #edf2f7;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: #f8fafc;
}

.all-dwr-records-page .empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #718096;
}

.all-dwr-records-page .action-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ebf4ff;
  color: #2b6cb0;
  font-size: 12px;
}

.all-dwr-records-page .complete-dwr-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.all-dwr-records-page .complete-dwr-badge.is-true {
  background: #d1fae5;
  color: #065f46;
}

.all-dwr-records-page .complete-dwr-badge.is-false {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 768px) {
  .dwr-admin-modal-body .edit-form-grid {
    grid-template-columns: 1fr;
  }

  .dwr-admin-modal-dialog {
    max-height: 95vh;
  }
}

.all-return-goods {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.list-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-shrink: 0;
}

.export-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}

.export-btn:hover {
  background-color: #0056b3;
}

.export-btn i {
  font-size: 16px;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state i {
  font-size: 64px;
  color: #ccc;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.entries-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.entries-select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
  min-width: 200px;
  max-width: 100%;
}

.search-container label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  width: 100%;
  min-width: 200px;
  max-width: 100%;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.table-container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.orders-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  box-sizing: border-box;
}

.orders-table thead {
  background-color: #f8f9fa;
}

.orders-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.orders-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #555;
}

.orders-table tbody tr:hover {
  background-color: #f8f9fa;
}

.expand-cell {
  width: 50px;
  text-align: center;
}

.expand-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 14px;
}

.expand-btn:hover {
  background-color: #e7f3ff;
  color: #0056b3;
}

.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px !important;
  background-color: #f8f9fa;
}

.products-table-wrapper {
  margin-top: 10px;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.products-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 900px;
  box-sizing: border-box;
}

.products-table thead {
  background-color: #e9ecef;
}

.products-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 13px;
  border-bottom: 2px solid #dee2e6;
}

.products-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 13px;
  color: #555;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 15px;
}

.products-loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-products {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: white;
  color: #333;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #666;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

.copyright {
  text-align: center;
  padding: 20px 0;
  color: #94a3b8;
  font-size: 14px;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .all-return-goods {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .list-header h1 {
    font-size: 1.5rem;
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .export-btn {
    width: 100%;
    justify-content: center;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .entries-info {
    width: 100%;
  }

  .search-container {
    width: 100%;
    min-width: 100%;
  }

  .search-input {
    width: 100%;
    min-width: 100%;
  }

  .table-container {
    padding: 15px;
    overflow-x: auto;
    width: 100%;
  }

  .orders-table {
    font-size: 12px;
    min-width: 1000px;
  }

  .orders-table th,
  .orders-table td {
    padding: 8px;
    font-size: 0.85rem;
  }

  .products-table {
    min-width: 900px;
    font-size: 0.85rem;
  }

  .products-table th,
  .products-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .pagination-info {
    text-align: center;
    width: 100%;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .all-return-goods {
    padding: 10px;
  }

  .list-header h1 {
    font-size: 1.3rem;
  }

  .table-container {
    padding: 10px;
  }

  .orders-table {
    min-width: 800px;
    font-size: 0.75rem;
  }

  .orders-table th,
  .orders-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .products-table {
    min-width: 800px;
    font-size: 0.75rem;
  }

  .products-table th,
  .products-table td {
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: 36px;
  }
}


.all-stock-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

/* Loading State */
.all-stock-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.all-stock-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3182ce;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header */
.all-stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 16px;
  flex-wrap: wrap;
}

.header-content h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #1a202c;
}

.header-content p {
  margin: 0;
  color: #718096;
  font-size: 14px;
}

.all-stock-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 14px;
  color: #4a5568;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.entries-select:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 14px;
  color: #4a5568;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  min-width: 250px;
}

.search-input:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Error Message */
.all-stock-error {
  background-color: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.all-stock-error i {
  font-size: 18px;
}

/* Table Container */
.all-stock-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 24px;
  max-height: 500px;
  overflow-y: auto;
}

.all-stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.all-stock-table thead {
  background-color: #f7fafc;
  border-bottom: 2px solid #e2e8f0;
}

.all-stock-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #2d3748;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.all-stock-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: #4a5568;
}

.all-stock-table tbody tr:hover {
  background-color: #f7fafc;
}

.all-stock-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge.status-approved {
  background-color: #c6f6d5;
  color: #22543d;
}

.status-badge.status-rejected {
  background-color: #fed7d7;
  color: #742a2a;
}

.status-badge.status-pending {
  background-color: #feebc8;
  color: #7c2d12;
}

.status-badge.status-available {
  background-color: #bee3f8;
  color: #2c5282;
}

.status-badge.status-unavailable {
  background-color: #e2e8f0;
  color: #4a5568;
}

/* Pagination */
.all-stock-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  font-size: 14px;
  color: #718096;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background: white;
  color: #4a5568;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #edf2f7;
  border-color: #a0aec0;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #3182ce;
  color: white;
  border-color: #3182ce;
}

.page-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #718096;
}

/* Empty State */
.all-stock-empty {
  background: white;
  padding: 60px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.all-stock-empty p {
  font-size: 16px;
  color: #718096;
  margin: 0;
}

/* Report Modal */
.report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.report-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f7fafc;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1a202c;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #718096;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background-color: #e2e8f0;
  color: #2d3748;
}

.report-modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px;
}

.report-modal-info {
  background-color: #f7fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.report-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.report-info-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-info-field label {
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-info-field span {
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
}

.report-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background-color: #f7fafc;
  display: flex;
  justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
  .all-stock-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .all-stock-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
    min-width: auto;
  }

  .all-stock-pagination {
    flex-direction: column;
    align-items: center;
  }

  .report-modal-content {
    width: 100%;
    max-height: 95vh;
  }

  .report-info-row {
    grid-template-columns: 1fr;
  }
}


@media (max-width:400px){
  div.search-box{
    min-width: 250px;
  }
}
.all-tickets-page {
  padding: 20px 24px;
  max-width: 100%;
  background: #f8fafc;
  min-height: calc(100vh - 100px);
}

.all-tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.all-tickets-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.all-tickets-create-btn {
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.all-tickets-create-btn:hover {
  background: #1d4ed8;
  color: #fff;
}

/* Tabs */
.all-tickets-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.all-tickets-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.all-tickets-tab:hover {
  color: #334155;
}

.all-tickets-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

.all-tickets-tab i {
  font-size: 13px;
}

.all-tickets-tab-content {
  min-height: 200px;
}

.all-tickets-error {
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  font-size: 14px;
}

.all-tickets-empty {
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
  font-size: 15px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.all-tickets-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.all-tickets-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: all-tickets-spin 0.7s linear infinite;
  margin-bottom: 12px;
}

@keyframes all-tickets-spin {
  to {
    transform: rotate(360deg);
  }
}

.all-tickets-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.all-tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.all-tickets-table th,
.all-tickets-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.all-tickets-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.all-tickets-th-sno,
.all-tickets-td-sno {
  width: 56px;
  min-width: 56px;
  text-align: center;
  white-space: nowrap;
}

.all-tickets-table tbody tr:hover {
  background: #f8fafc;
}

.all-tickets-table tbody tr:last-child td {
  border-bottom: none;
}

.all-tickets-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.all-tickets-status-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.all-tickets-status-open {
  background: #dbeafe;
  color: #1d4ed8;
}

.all-tickets-status-in_progress,
.all-tickets-status-inprogress {
  background: #fef3c7;
  color: #b45309;
}

.all-tickets-status-resolved,
.all-tickets-status-closed {
  background: #dcfce7;
  color: #15803d;
}

.all-tickets-status-on_hold {
  background: #f3e8ff;
  color: #7c3aed;
}

.all-tickets-status-cancelled,
.all-tickets-status-rejected {
  background: #fee2e2;
  color: #dc2626;
}

.all-tickets-status-reopened {
  background: #fef3c7;
  color: #b45309;
}

/* Actions column */
.all-tickets-th-actions,
.all-tickets-td-actions {
  width: 80px;
  text-align: center;
}

.all-tickets-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.all-tickets-view-btn:hover {
  background: #0ea5e9;
  color: #fff;
}

.all-tickets-view-btn i {
  font-size: 14px;
}

/* Ticket detail modal */
.all-tickets-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.all-tickets-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.all-tickets-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.all-tickets-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.all-tickets-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.all-tickets-modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.all-tickets-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.all-tickets-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px 24px;
  gap: 12px 24px;
}

.all-tickets-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.all-tickets-detail-row-full {
  grid-column-start: 1; grid-column-end: -1;
}

.all-tickets-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.all-tickets-detail-value {
  font-size: 14px;
  color: #1e293b;
}

.all-tickets-detail-description {
  white-space: pre-wrap;
  line-height: 1.5;
}

.all-tickets-detail-overdue {
  color: #dc2626;
  font-weight: 500;
}

.all-tickets-detail-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #1e293b;
}

.all-user-list-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 16px;
}

.page-header .btn {
  white-space: nowrap;
  min-width: 120px;
}

.header-content h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #1a202c;
}

.header-content p {
  margin: 0;
  color: #718096;
  font-size: 14px;
}

.page-header .btn {
  white-space: nowrap;
  min-width: 120px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-header .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.page-header .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.page-header .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-container i {
  font-size: 48px;
  color: #4299e1;
  margin-bottom: 16px;
}

.loading-container p {
  color: #718096;
  font-size: 16px;
}

/* Error Message */
.error-message {
  background-color: #fed7d7;
  color: #c53030;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-message i {
  font-size: 20px;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 24px;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.card-icon.purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-icon.pink {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-icon.blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-icon.green {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.card-content {
  flex: 1 1;
}

.card-number {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 4px;
}

.card-label {
  font-size: 14px;
  color: #718096;
  font-weight: 500;
}

/* Search Section */
.search-section {
  margin-bottom: 24px;
}

.search-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.search-filters-row .search-box {
  flex: 1 1;
  min-width: 240px;
}

.filter-select {
  min-width: 180px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  color: #1a202c;
  cursor: pointer;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-icon {
  color: #a0aec0;
  margin-right: 12px;
  font-size: 18px;
}

.search-input {
  flex: 1 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #1a202c;
}

.search-input::placeholder {
  color: #a0aec0;
}

.clear-search-btn {
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.clear-search-btn:hover {
  color: #718096;
}

/* Table Container */
div.table-container {
  background: white;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  overflow-x: auto;
}

table.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.users-table th {
  padding: 16px 5px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.users-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.users-table tbody tr:hover {
  background-color: #f7fafc;
}

.users-table tbody tr:last-child {
  border-bottom: none;
}

.users-table td {
  padding: 16px 5px;
  font-size: 14px;
  color: #4a5568;
  vertical-align: top;
}

.no-data {
  text-align: center;
  padding: 60px 20px !important;
  color: #a0aec0;
}

.no-data i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.no-data p {
  margin: 0;
  font-size: 16px;
}

/* User ID Cell */
.user-id-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-id-main {
  font-weight: 600;
  color: #1a202c;
  font-size: 13px;
  word-break: break-all;
}

.user-id-alt {
  font-size: 11px;
  color: #718096;
  word-break: break-all;
}

/* User Name Cell */
.user-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-name-main {
  font-weight: 600;
  color: #1a202c;
}

.user-name-alt {
  font-size: 12px;
  color: #718096;
}

/* Array Cell */
.array-cell {
  max-width: 200px;
  word-break: break-word;
  font-size: 13px;
}

/* Signature Cell */
.signature-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.signature-thumb {
  max-width: 48px;
  max-height: 36px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  display: block;
}

.signature-thumb:hover {
  opacity: 0.85;
}

.signature-upload-label {
  cursor: pointer;
  color: #667eea;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.signature-upload-label:hover {
  background: #edf2f7;
  color: #5a67d8;
}

.signature-upload-label input:disabled {
  cursor: not-allowed;
}

.signature-upload-label input:disabled + *,
.signature-upload-label:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

/* User Status Toggle */
.user-status-cell {
  min-width: 120px;
}

.user-status-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-status-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.user-status-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.user-status-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e0;
  border-radius: 24px;
  transition: background-color 0.2s;
}

.user-status-toggle-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.user-status-toggle input:checked + .user-status-toggle-slider {
  background-color: #48bb78;
}

.user-status-toggle input:checked + .user-status-toggle-slider:before {
  transform: translateX(20px);
}

.user-status-toggle input:disabled + .user-status-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-status-label {
  font-size: 13px;
  font-weight: 600;
  min-width: 56px;
}

.user-status-label.active {
  color: #38a169;
}

.user-status-label.inactive {
  color: #e53e3e;
}

/* Session ID Cell */
.session-id-cell {
  max-width: 150px;
  word-break: break-all;
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #4a5568;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: #c6f6d5;
  color: #22543d;
}

.badge-warning {
  background-color: #feebc8;
  color: #7c2d12;
}

.badge-info {
  background-color: #bee3f8;
  color: #2c5282;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  color: #718096;
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4a5568;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f7fafc;
  border-color: #cbd5e0;
  color: #2d3748;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

.pagination-btn.active:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #a0aec0;
  font-weight: 600;
}

/* Actions Column */
.actions-cell {
  width: 100px;
  text-align: center;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn.edit-btn {
  background: #fff3e0;
  color: #f57c00;
}

.action-btn.edit-btn:hover:not(:disabled) {
  background: #ffe0b2;
  color: #e65100;
}

.action-btn.permission-btn {
  background: #e8f5e9;
  color: #388e3c;
}

.action-btn.permission-btn:hover:not(:disabled) {
  background: #c8e6c9;
  color: #2e7d32;
}

.action-btn.delete-btn {
  background: #ffebee;
  color: #d32f2f;
}

.action-btn.delete-btn:hover:not(:disabled) {
  background: #ffcdd2;
  color: #c62828;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Edit Roles Modal Styles */
.edit-roles-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.edit-roles-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.edit-roles-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.edit-roles-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.edit-roles-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.edit-roles-modal-close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.edit-roles-modal-close:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.edit-roles-modal-body {
  padding: 24px;
  flex: 1 1;
  overflow-y: auto;
}

.user-info-section {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.user-info-section p {
  margin: 8px 0;
  color: #4a5568;
  font-size: 14px;
}

.user-info-section strong {
  color: #2d3748;
  min-width: 120px;
  display: inline-block;
}

.edit-roles-error {
  background: #fed7d7;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roles-section {
  margin-top: 24px;
}

.roles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.roles-header h3 {
  margin: 0;
  color: #2d3748;
  font-size: 18px;
  font-weight: 600;
}

.select-all-btn {
  padding: 6px 12px;
  background: #e2e8f0;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.select-all-btn:hover {
  background: #cbd5e0;
  color: #2d3748;
}

.roles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 24px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
}

.role-checkbox-label {
  display: flex;
  align-items: center;
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.role-checkbox-label:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.role-checkbox-label.selected {
  border-color: #667eea;
  background: #eef2ff;
}

.role-checkbox-label input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.role-name {
  flex: 1 1;
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
}

.role-check-icon {
  color: #667eea;
  font-size: 16px;
  margin-left: 8px;
}

.selected-roles-summary {
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.selected-roles-summary strong {
  display: block;
  margin-bottom: 12px;
  color: #4338ca;
  font-size: 14px;
}

.selected-roles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-tag {
  background: #667eea;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-tag::before {
  content: '✓';
  font-weight: bold;
}

.edit-roles-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  background: #f7fafc;
  border-radius: 0 0 12px 12px;
}

.edit-roles-modal-footer .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.edit-roles-modal-footer .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.edit-roles-modal-footer .btn-secondary:hover:not(:disabled) {
  background: #cbd5e0;
  color: #2d3748;
}

.edit-roles-modal-footer .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.edit-roles-modal-footer .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.edit-roles-modal-footer .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .all-user-list-page {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: center;
  }

  .table-container {
    overflow-x: scroll;
  }
}

/* Buyers Page Styles - Matching Supplier Management Design */
.buyers-page {
  min-height: 100vh;
  background: #f8f9fa;
  padding: 20px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
  color: #2c3e50;
  margin: 0 0 5px 0;
  font-size: 28px;
  font-weight: 700;
}

.header-content p {
  color: #6c757d;
  margin: 0;
  font-size: 16px;
}

.add-btn {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.error-message i {
  font-size: 16px;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.card-icon.purple {
  background: #667eea;
}

.card-icon.pink {
  background: #e91e63;
}

.card-icon.blue {
  background: #2196f3;
}

.card-icon.green {
  background: #4caf50;
}

.card-content {
  flex: 1 1;
}

.card-number {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.card-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

/* Search Section */
.search-section {
  margin-bottom: 20px;
}

.buyer-search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.buyer-location-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.buyer-location-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.buyer-location-filter-select {
  padding: 11px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #2c3e50;
  min-width: 160px;
  cursor: pointer;
}

.buyer-location-filter-select:focus {
  outline: none;
  border-color: #667eea;
}

.buyer-status-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.buyer-status-filter-btn {
  padding: 9px 18px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  background: #fff;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buyer-status-filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.buyer-status-filter-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}

.buyer-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.buyer-status-pill.occupied {
  background: #dbeafe;
  color: #1d4ed8;
}

.buyer-status-pill.free {
  background: #dcfce7;
  color: #15803d;
}

.buyer-company-under-cell {
  max-width: 200px;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: top;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
  color: #6c757d;
}

/* Table Container */
div.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  max-height: 500px;
}

/* Buyers Table */
.buyers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.buyers-table thead {
  background: #f8f9fa;
}

.buyers-table th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.buyers-table th.sortable-header {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.buyers-table th.sortable-header:hover {
  background-color: #e9ecef;
}

.buyers-table th.sortable-header span {
  margin-right: 8px;
}

.buyers-table th.sortable-header i {
  font-size: 12px;
  color: #667eea;
  margin-left: 4px;
}

.buyers-table th.sortable-header i.sort-inactive {
  color: #adb5bd;
  opacity: 0.5;
}

.buyers-table th.sortable-header:hover i.sort-inactive {
  opacity: 1;
  color: #667eea;
}

.buyers-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
}

.buyers-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.buyers-table tbody tr:hover {
  background: #f8f9fa;
}

/* Table Column Styles */
.sno {
  width: 60px;
  text-align: center;
  font-weight: 600;
  color: #6c757d;
}

.company {
  min-width: 200px;
}

.company-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.gstin {
  font-size: 12px;
  color: #6c757d;
}

.contact {
  min-width: 180px;
}

.contact-name {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 4px;
}

.contact-email {
  font-size: 12px;
  color: #6c757d;
}

.location {
  min-width: 200px;
  color: #2c3e50;
}

.status {
  min-width: 100px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.inactive {
  background: #f8d7da;
  color: #721c24;
}

.created {
  min-width: 120px;
  color: #6c757d;
  font-size: 13px;
}

.actions {
  width: 120px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.view-btn {
  background: #e3f2fd;
  color: #1976d2;
}

.view-btn:hover {
  background: #bbdefb;
}

.edit-btn {
  background: #fff3e0;
  color: #f57c00;
}

.edit-btn:hover {
  background: #ffe0b2;
}

.delete-btn {
  background: #ffebee;
  color: #d32f2f;
}

.delete-btn:hover:not(:disabled) {
  background: #ffcdd2;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-content {
  color: #6c757d;
}

.empty-content i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #dee2e6;
}

.empty-content h3 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 600;
}

.empty-content p {
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.5;
}

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #6c757d;
}

.loading-container i {
  font-size: 32px;
  margin-bottom: 15px;
}

.loading-container p {
  font-size: 16px;
  margin: 0;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.page-info {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e9ecef;
  background: white;
  color: #2c3e50;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination-btn.active:hover {
  background: #5a6fd8;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

/* Report Modal Styles (matching AllStock.js) */
.report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.report-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f7fafc;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1a202c;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #718096;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background-color: #e2e8f0;
  color: #2d3748;
}

.report-modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px;
}

.report-modal-info {
  background-color: #f7fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.report-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.report-info-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-info-field label {
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-info-field span {
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
}

.report-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background-color: #f7fafc;
  display: flex;
  justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
  .buyers-page {
    padding: 10px;
  }
  
  .page-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .header-content {
    text-align: center;
  }
  
  .header-content h1 {
    font-size: 24px;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .search-box {
    max-width: none;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .buyers-table {
    min-width: 800px;
  }
  
  .buyers-table th,
  .buyers-table td {
    padding: 10px 8px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 4px;
  }
  
  .action-btn {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .pagination-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 20px;
  }
  
  .summary-card {
    padding: 15px;
  }
  
  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .card-number {
    font-size: 20px;
  }
  
  .buyers-table th,
  .buyers-table td {
    padding: 8px 6px;
    font-size: 12px;
  }
  
  .company-name,
  .contact-name {
    font-size: 13px;
  }
  
  .gstin,
  .contact-email {
    font-size: 11px;
  }
}

@media(min-width: 1367px){
  .buyers-table{
    min-width: 0;
    min-width: initial;
  }
}
.coa-letterhead-page {
    padding: 20px;
  }
  
  .coa-letterhead-header {
    margin-bottom: 16px;
  }
  
  .coa-letterhead-header h2 {
    margin: 0;
    font-size: 28px;
    color: #1f2937;
  }
  
  .coa-letterhead-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
  }
  
  .coa-letterhead-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .coa-letterhead-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    grid-gap: 14px;
    gap: 14px;
    align-items: end;
  }
  
  .coa-letterhead-form-row {
    display: grid;
    grid-gap: 6px;
    gap: 6px;
  }
  
  .coa-letterhead-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
  }
  
  .coa-letterhead-input,
  .coa-letterhead-file {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 10px;
    font-size: 14px;
  }
  
  .coa-letterhead-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }
  
  .coa-letterhead-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  .coa-letterhead-btn {
    border: none;
    border-radius: 6px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
  }
  
  .coa-letterhead-btn.primary {
    background: #2563eb;
    color: #ffffff;
  }
  
  .coa-letterhead-btn.primary:hover {
    background: #1d4ed8;
  }
  
  .coa-letterhead-btn.secondary {
    background: #e5e7eb;
    color: #1f2937;
  }
  
  .coa-letterhead-btn.secondary:hover {
    background: #d1d5db;
  }
  
  .coa-letterhead-table-wrap {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
  }
  
  .coa-letterhead-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .coa-letterhead-table thead {
    background: #f8fafc;
  }
  
  .coa-letterhead-table th,
  .coa-letterhead-table td {
    padding: 10px 9px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
  }
  
  .coa-letterhead-table th {
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
  }
  
  .coa-letterhead-table td {
    color: #4b5563;
  }
  
  .coa-letterhead-table tbody tr:hover {
    background: #f9fafb;
  }
  
  .coa-letterhead-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
  }
  
  .coa-letterhead-link:hover {
    text-decoration: underline;
  }
  
  .coa-letterhead-view-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  
  .coa-letterhead-view-btn:hover {
    background: #1d4ed8;
  }
  
  .coa-letterhead-edit-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    background: #0f766e;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  
  .coa-letterhead-edit-btn:hover {
    background: #0d9488;
  }
  
  @media (max-width: 980px) {
    .coa-letterhead-form {
      grid-template-columns: 1fr;
    }
  }
  
  
.complete-payment-details {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
  width: 100%;
  box-sizing: border-box;
}

.payment-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.back-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}

.back-btn:hover {
  background-color: #5a6268;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-details-section,
.products-section,
.discount-section,
.other-details-section {
  background: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.payment-details-section h2,
.products-section h2,
.discount-section h2,
.other-details-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 22px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.payment-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-weight: 600;
  color: #666;
  font-size: 14px;
}

.detail-item input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
}

.detail-item input[readOnly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.freight-amount-item .freight-amount-input {
  background-color: #fff;
  cursor: text;
  max-width: 140px;
}

.freight-amount-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.save-freight-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.save-freight-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.save-freight-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

.products-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.products-search-input {
  flex: 1 1;
  min-width: 220px;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.products-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.products-search-count {
  font-size: 13px;
  color: #666;
}

.products-table-container {
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.products-table thead {
  background-color: #f8f9fa;
}

.products-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.products-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #555;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tfoot {
  background-color: #f8f9fa;
  font-weight: 600;
}

.products-table tfoot td {
  border-top: 2px solid #dee2e6;
  padding: 15px 12px;
}

.invoice-input,
.amount-received-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  width: 100%;
  max-width: 150px;
}

.invoice-input:focus,
.amount-received-input:focus {
  outline: none;
  border-color: #007bff;
}

.receive-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #007bff;
}

.discount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.discount-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discount-item label {
  font-weight: 600;
  color: #666;
  font-size: 14px;
}

.discount-select,
.discount-input,
.total-received-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
  width: 100%;
  box-sizing: border-box;
}

.discount-select:focus,
.discount-input:focus {
  outline: none;
  border-color: #007bff;
}

.total-received-input {
  background-color: #f5f5f5;
  cursor: not-allowed;
  font-weight: 600;
  color: #333;
}

.remarks-container {
  margin-bottom: 20px;
}

.remarks-container label {
  display: block;
  font-weight: 600;
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.remarks-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.remarks-textarea:focus {
  outline: none;
  border-color: #007bff;
}

.payment-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.receive-full-payment-btn {
  padding: 12px 30px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s;
}

.receive-full-payment-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.receive-full-payment-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.copyright {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 12px;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  .complete-payment-details {
    padding: 15px;
    width: 100%;
  }

  .payment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
  }

  .payment-details-section,
  .products-section,
  .discount-section,
  .other-details-section {
    width: 100%;
    padding: 15px;
  }

  .discount-grid {
    grid-template-columns: 1fr;
  }

  .payment-details-grid {
    grid-template-columns: 1fr;
  }

  .products-table {
    font-size: 12px;
    width: 100%;
  }

  .products-table th,
  .products-table td {
    padding: 8px;
  }

  .products-table-container {
    width: 100%;
    overflow-x: auto;
  }

  .invoice-input,
  .amount-received-input {
    max-width: 100px;
  }
}


.complete-payment-list {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.list-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.complete-payment-region-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.complete-payment-region-tab {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #2c3e50;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.complete-payment-region-tab:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.complete-payment-region-tab.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 1 1;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.year-filter-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-filter-container label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.year-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background-color: white;
  color: #333;
  cursor: pointer;
  min-width: 120px;
  transition: border-color 0.3s;
}

.year-select:focus {
  outline: none;
  border-color: #007bff;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 250px;
  max-width: 300px;
}

.search-container i {
  position: absolute;
  left: 10px;
  color: #666;
  font-size: 12px;
}

.search-input {
  padding: 6px 12px 6px 32px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  width: 100%;
  min-width: 250px;
  max-width: 300px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state i {
  font-size: 64px;
  color: #ccc;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

.empty-state-subtitle {
  font-size: 14px;
  color: #999;
  margin-top: 10px;
}

.table-container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entries-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}

.table-container-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.orders-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  box-sizing: border-box;
}

.orders-table thead {
  background-color: #f8f9fa;
}

.orders-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.orders-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #555;
}

.orders-table tbody tr:hover {
  background-color: #f8f9fa;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status-proceeded {
  background-color: #d4edda;
  color: #155724;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
}

.products-count {
  font-weight: 500;
  color: #007bff;
}

.view-btn {
  padding: 6px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.3s;
}

.view-btn:hover {
  background-color: #0056b3;
}

.view-btn i {
  font-size: 12px;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.view-modal-header .close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.view-modal-header .close-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.view-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.view-modal-loading .loading-spinner {
  margin-bottom: 15px;
}

.order-info-section {
  margin-bottom: 30px;
}

.order-info-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.products-section {
  margin-top: 30px;
}

.products-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 15px;
}

.products-table thead {
  background-color: #f1f5f9;
}

.products-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

.products-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.products-table tfoot {
  background-color: #f1f5f9;
  font-weight: 600;
}

.products-table tfoot td {
  padding: 12px 8px;
  color: #1e293b;
}

.no-products {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-style: italic;
}

.view-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: #0056b3;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: white;
  color: #333;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #666;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .complete-payment-list {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .list-header h1 {
    font-size: 1.5rem;
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
  }

  .year-filter-container {
    width: 100%;
  }

  .year-select {
    width: 100%;
  }

  .table-container-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .search-input {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .table-container {
    padding: 15px;
    overflow-x: auto;
    width: 100%;
  }

  .orders-table {
    font-size: 12px;
    min-width: 1000px;
  }

  .orders-table th,
  .orders-table td {
    padding: 8px;
    font-size: 0.85rem;
  }

  .view-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .pagination-info {
    text-align: center;
    width: 100%;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .complete-payment-list {
    padding: 10px;
  }

  .list-header h1 {
    font-size: 1.3rem;
  }

  .table-container {
    padding: 10px;
  }

  .orders-table {
    min-width: 800px;
    font-size: 0.75rem;
  }

  .orders-table th,
  .orders-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .view-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .view-btn i {
    font-size: 0.7rem;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: 36px;
  }
}


.consignment-container {
  padding: 20px;
  background-color: var(--dashboard-bg);
  min-height: calc(100vh - 60px);
}

.consignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.consignment-title h2 {
  color: var(--text-color-dark);
  font-size: 1.8rem;
  margin: 0 0 5px 0;
}

.consignment-title p {
  color: var(--text-color-light);
  margin: 0;
}

.btn-add-consignment {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-add-consignment::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-add-consignment:hover::before {
  left: 100%;
}

.btn-add-consignment:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4), 0 4px 6px -2px rgba(37, 99, 235, 0.3);
}

.btn-add-consignment:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
}

.btn-add-consignment i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.btn-add-consignment:hover i {
  transform: rotate(90deg);
}

.consignment-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  color: var(--text-color-dark);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.stat-card p {
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0;
}

.consignment-search {
  margin-bottom: 20px;
}

.consignment-search .form-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  color: var(--text-color-dark);
  background-color: var(--input-bg);
}

.consignment-search .form-input::placeholder {
  color: var(--text-color-light);
}

.consignment-list {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

.no-consignments {
  text-align: center;
  color: var(--text-color-light);
  font-size: 1.1rem;
  padding: 40px 0;
}

.no-consignments .btn-link {
  color: var(--primary-color);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
}

.table-responsive {
  overflow-x: auto;
}

.consignment-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.consignment-table th,
.consignment-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e8ed;
  color: var(--text-color-dark);
}

.consignment-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.consignment-table tbody tr:hover {
  background-color: var(--table-hover-bg);
}

.consignment-table .sno-cell {
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
}

.consignment-table .consignment-number-cell {
  font-weight: 600;
  color: var(--text-color-dark);
}

.action-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.action-buttons .icon-btn {
  background: transparent;
  color: var(--text-color-light);
  border: 1px solid transparent;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-buttons .icon-btn:hover {
  background: var(--table-hover-bg);
  color: var(--text-color-dark);
}

.action-buttons .icon-btn.danger {
  background: var(--danger-color);
  color: #fff;
}

.action-buttons .icon-btn.danger:hover {
  background: var(--danger-dark-color);
}

.consignment-table .btn-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.consignment-table .btn-info {
  background-color: var(--info-color);
  color: white;
}

.consignment-table .btn-info:hover {
  background-color: var(--info-dark-color);
}

.consignment-table .btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.consignment-table .btn-warning:hover {
  background-color: var(--warning-dark-color);
}

.consignment-table .btn-success {
  background-color: var(--success-color);
  color: white;
}

.consignment-table .btn-success:hover {
  background-color: var(--success-dark-color);
}

.consignment-table .btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.consignment-table .btn-primary:hover {
  background-color: var(--primary-dark-color);
}

.consignment-table .btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.consignment-table .btn-danger:hover {
  background-color: var(--danger-dark-color);
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-under-consignment {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-forwarded-qc {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-forwarded-logistic {
  background-color: #e8f5e8;
  color: #388e3c;
}

.status-completed {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.status-cancelled {
  background-color: #ffebee;
  color: #d32f2f;
}

.status-default {
  background-color: #f5f5f5;
  color: #757575;
}

/* Dispatch badges */
.dispatch-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dispatch-air {
  background-color: #e3f2fd;
  color: #1976d2;
}

.dispatch-sea {
  background-color: #e8f5e8;
  color: #388e3c;
}

.dispatch-default {
  background-color: #f5f5f5;
  color: #757575;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.no-data i {
  font-size: 4rem;
  color: var(--text-color-light);
  margin-bottom: 20px;
}

.no-data h3 {
  color: var(--text-color-dark);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.no-data p {
  color: var(--text-color-light);
  font-size: 1.1rem;
}

.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 1rem;
}

.alert-danger {
  background-color: var(--danger-light-color);
  color: var(--danger-dark-color);
  border: 1px solid var(--danger-color);
}

/*========= stat card style ===========*/

.stat-card:nth-child(5) .stat-icon {
    background: linear-gradient(135deg, #fe4f63, #fe00be);
}

.stat-card:nth-child(6) .stat-icon {
    background: linear-gradient(135deg, #43a1e9, #38f9d7);
}


div.stat-card.c{
  display: flex;
  flex-direction: row;
  text-align: center;
  background: #fff;
}

div.stat-card h3{
  font-size: 24px;
}

div.stat-icon{
  height: 50px;
  width: 50px;
}

.consignment-stats{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
}

div.consignment-search .form-input{
  padding: 15px 30px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .consignment-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .consignment-title {
    margin-bottom: 15px;
  }

  .consignment-stats {
    grid-template-columns: 1fr;
  }

  .consignment-table th,
  .consignment-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .consignment-table .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 3px;
  }

}

@media(min-width: 1367px){
  div.consignment-stats{
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
}
}

@media(min-width: 1500px){
  div.consignment-stats{
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
}
}

@media (min-width: 1700px){
  div.consignment-stats{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
}
}

/* Consignment Report pages - shared styles */

.consignment-report-page {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.consignment-report-header {
  margin-bottom: 24px;
}

.consignment-report-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.consignment-report-header p {
  font-size: 0.95rem;
  color: #666;
}

.consignment-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 16px;
}

.consignment-report-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: consignment-report-spin 0.8s linear infinite;
}

@keyframes consignment-report-spin {
  to { transform: rotate(360deg); }
}

.consignment-report-error {
  padding: 16px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.consignment-report-empty {
  padding: 32px;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 8px;
}

.consignment-report-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.consignment-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.consignment-report-table th,
.consignment-report-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.consignment-report-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

.consignment-report-table tbody tr:hover {
  background: #f9fafb;
}

.consignment-report-table tbody tr:last-child td {
  border-bottom: none;
}

.consignment-status-history-page {
  padding: 0 0 24px;
}

.csh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.csh-filters .csh-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.csh-filters label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.csh-filters input,
.csh-filters select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

.csh-filters .csh-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.csh-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.csh-btn-primary {
  background: #5b21b6;
  color: #fff;
}

.csh-btn-primary:hover:not(:disabled) {
  background: #4c1d95;
}

.csh-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.csh-btn-danger {
  background: #dc2626;
  color: #fff;
}

.csh-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.csh-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.csh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.csh-table th {
  text-align: left;
  padding: 12px 10px;
  background: #5b21b6;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.csh-table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  max-width: 220px;
  word-break: break-word;
}

.csh-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.csh-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.csh-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.csh-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 16px;
}

.csh-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.csh-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.csh-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.csh-modal-close {
  border: none;
  background: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748b;
}

.csh-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.csh-modal-body label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.csh-modal-body input,
.csh-modal-body textarea,
.csh-modal-body select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.csh-modal-body textarea {
  min-height: 72px;
  resize: vertical;
}

.csh-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.csh-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
}

.csh-loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

/* Consignment Status Management Styles */

.consignment-status-management {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #f5f5f5;
  min-height: calc(100vh - 60px);
}

.consignment-status-header {
  margin-bottom: 30px;
}

.consignment-status-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.consignment-status-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.consignment-status-back-btn:hover {
  background-color: #4b5563;
}

.consignment-status-back-btn:active {
  transform: translateY(1px);
}

.consignment-status-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.consignment-status-header p {
  font-size: 1rem;
  color: #666;
}

/* Loading State */
.consignment-status-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 400px;
}

.consignment-status-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.consignment-status-loading p {
  color: #666;
  font-size: 1rem;
}

/* Messages */
.consignment-status-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.consignment-status-error i {
  font-size: 1.2rem;
}

.consignment-status-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.consignment-status-success i {
  font-size: 1.2rem;
}

/* Selector Section */
.consignment-status-selector {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  align-items: flex-end;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-locked-notice {
  width: 100%;
  margin: 0 0 12px 0;
  padding: 10px 14px;
  background-color: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  color: #4338ca;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-locked-notice i {
  flex-shrink: 0;
}

.status-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 300px;
  flex: 1 1;
}

.status-selector-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.status-warehouse-select,
.status-consignment-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.status-warehouse-select:hover,
.status-consignment-select:hover {
  border-color: #667eea;
}

.status-warehouse-select:focus,
.status-consignment-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.status-warehouse-select:disabled,
.status-consignment-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.status-no-consignments {
  color: #666;
  font-size: 0.9rem;
  margin-top: 5px;
  font-style: italic;
}

/* Consignment Details Section */
.consignment-details-section {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.consignment-details-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.status-history-table-container {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.status-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.status-history-table thead {
  background-color: #f8f9fa;
}

.status-history-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
  font-size: 0.95rem;
}

.status-history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #555;
}

.status-history-table tbody tr:hover {
  background-color: #f8f9fa;
}

.status-history-table tbody tr:last-child td {
  border-bottom: none;
}

.status-history-empty {
  text-align: center;
  color: #999;
  padding: 40px 20px;
  font-style: italic;
}

/* Status Update Section */
.consignment-status-update-section {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.consignment-status-update-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.status-update-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.status-select-input,
.status-remark-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  transition: all 0.3s ease;
}

.status-select-input:focus,
.status-remark-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.status-remark-input {
  width: 100%;
  max-width: 500px;
}

.status-update-btn {
  padding: 12px 24px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: -webkit-fit-content;
  width: fit-content;
}

.status-update-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.status-update-btn:active:not(:disabled) {
  transform: translateY(0);
}

.status-update-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

.status-update-btn i {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .consignment-status-management {
    padding: 15px;
  }

  .consignment-status-header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .consignment-status-back-btn {
    align-self: flex-start;
  }

  .consignment-status-selector {
    flex-direction: column;
  }

  .status-selector-group {
    min-width: 100%;
  }

  .status-history-table-container {
    font-size: 0.9rem;
  }

  .status-history-table th,
  .status-history-table td {
    padding: 10px 12px;
  }

  .status-remark-input {
    max-width: 100%;
  }
}


.country-list-page {
  padding: 20px;
}

.country-list-header h2 {
  margin: 0 0 6px;
}

.country-list-header p {
  margin: 0 0 16px;
  color: #666;
}

.country-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.country-alert-error {
  background: #fdecec;
  color: #b91c1c;
  border: 1px solid #f5c2c7;
}

.country-alert-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.country-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.country-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.country-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.country-form-group label {
  font-size: 13px;
  font-weight: 600;
}

.country-form-group input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.country-form-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.country-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.country-btn.primary {
  background: #4f46e5;
  color: #fff;
}

.country-btn.secondary {
  background: #6b7280;
  color: #fff;
}

.country-btn.edit {
  background: #0ea5e9;
  color: #fff;
}

.country-btn.danger {
  background: #dc2626;
  color: #fff;
}

.country-table-controls {
  margin-bottom: 10px;
}

.country-table-controls input {
  width: 100%;
  max-width: 340px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.country-loading {
  padding: 18px 0;
}

.country-table-wrapper {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.country-table {
  width: 100%;
  border-collapse: collapse;
}

.country-table th,
.country-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.country-table th {
  background: #f8fafc;
  font-weight: 600;
}

.country-url-cell {
  max-width: 240px;
  word-break: break-word;
}

.country-empty {
  text-align: center !important;
  color: #64748b;
  padding: 20px !important;
}

.country-row-actions {
  display: flex;
  gap: 6px;
}

@media (max-width: 900px) {
  .country-form-grid {
    grid-template-columns: 1fr;
  }
}

.create-exhibition-page {
  width: 100%;
}

.create-exhibition-card {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.create-exhibition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.create-exhibition-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.create-exhibition-form {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.form-row {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.form-row label {
  font-size: 13px;
  color: #444;
  font-weight: 600;
}

.form-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}

.form-row input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  grid-column-start: 1; grid-column-end: -1;
}

.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary {
  background: #1976d2;
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.btn-secondary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}

.form-alert-error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #b71c1c;
}

.form-alert-success {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #1b5e20;
}

@media (max-width: 1100px) {
  .create-exhibition-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .create-exhibition-form {
    grid-template-columns: 1fr;
  }
}


.create-indent-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.create-indent-header {
  margin-bottom: 30px;
}

.create-indent-header h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 8px;
}

.create-indent-header p {
  color: #666;
  font-size: 14px;
}

.create-indent-form {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 40px;
}

.form-section h2 {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  margin-bottom: 0;
  border-bottom: none;
}

.add-item-btn {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.add-item-btn:hover:not(:disabled) {
  background-color: #1565c0;
}

.add-item-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.required {
  color: #d32f2f;
}

.form-group input,
.form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1976d2;
}

.form-group input:disabled,
.form-group select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.form-group input[readonly] {
  background-color: #f5f5f5;
  cursor: default;
}

.indent-detail-card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.detail-header h3 {
  font-size: 18px;
  color: #333;
  margin: 0;
}

.remove-item-btn {
  background-color: #d32f2f;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.remove-item-btn:hover {
  background-color: #c62828;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

.submit-btn {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.submit-btn:hover:not(:disabled) {
  background-color: #1565c0;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-message {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .create-indent-container {
    padding: 15px;
  }

  .create-indent-form {
    padding: 20px;
  }
}

/* asign_and_due-date */
.asign_and_due-date{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.ct-main {
  padding: 20px 24px;
  background: #fff;
  box-sizing: border-box;
  overflow-y: auto;
  height: 100vh;
}

.ct-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  z-index: 999;
}

/* Labels */
.ct-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-top: 14px;
  margin-bottom: 6px;
}

.ct-required {
  color: #dc2626;
}

.due-date-div{
  width: 100%;
}

.asign-to-div{
  width: 100%;
}

.ct-card > .ct-label:first-child {
  margin-top: 0;
}

/* Text inputs */
.ct-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 13px;
  background: #fff;
  color: #1e293b;
  outline: none;
}

.ct-input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.ct-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Textarea */
.ct-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 13px;
  background: #fff;
  color: #1e293b;
  resize: vertical;
  min-height: 90px;
  outline: none;
  font-family: inherit;
}

.ct-textarea::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.ct-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Branch / Priority toggle buttons */
.ct-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ct-btn {
  padding: 6px 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: #475569;
  transition: all 0.15s;
}

.ct-btn:hover:not(.active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ct-btn.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #3b82f6;
  font-weight: 500;
}

/* Hint text */
.ct-hint {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 5px 0 0;
}

/* Feedback messages */
.ct-error {
  font-size: 12px;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 7px 12px;
  margin-top: 12px;
}

.ct-success {
  font-size: 12px;
  color: #16a34a;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 7px 12px;
  margin-top: 12px;
}

/* Actions row */
.ct-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 20px;
}

.ct-cancel {
  background: #fff;
  padding: 7px 18px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  cursor: pointer;
  color: #475569;
}

.ct-cancel:hover:not(:disabled) {
  background: #f1f5f9;
}

.ct-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ct-create {
  background: #2563eb;
  color: #fff;
  padding: 7px 20px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}

.ct-create:hover:not(:disabled) {
  background: #1d4ed8;
}

.ct-create:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success popup modal */
.ct-success-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.ct-success-modal {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow:
    0 20px 25px -5px rgba(15, 23, 42, 0.18),
    0 8px 10px -6px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.ct-success-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #ecfdf3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
}

.ct-success-modal-icon i {
  font-size: 24px;
}

.ct-success-modal-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.ct-success-modal-text {
  margin: 0 0 16px;
  font-size: 14px;
  color: #4b5563;
}

.ct-success-modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ct-success-modal-button:hover {
  background: #1d4ed8;
}

@media (max-width: 375px){
  .asign_and_due-date{
    display: flex;
    flex-direction: column;
  }
}
.delete-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.delete-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.delete-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.delete-modal-header h3 {
  margin: 0;
  color: #dc3545;
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover:not(:disabled) {
  background: #e9ecef;
  color: #495057;
}

.close-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-modal-body {
  padding: 25px;
}

.warning-message {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 25px;
}

.warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.warning-message p {
  margin: 0;
  color: #856404;
  font-weight: 500;
  line-height: 1.4;
}

.product-details h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 16px;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.detail-item label {
  font-weight: 600;
  color: #6c757d;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  color: #495057;
  font-size: 14px;
  word-wrap: break-word;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: -webkit-fit-content;
  width: fit-content;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-approved {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-in_progress {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #f5c6cb;
  font-size: 14px;
}

.delete-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px 25px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.cancel-btn,
.delete-btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.cancel-btn {
  background: #6c757d;
  color: white;
}

.cancel-btn:hover:not(:disabled) {
  background: #5a6268;
}

.delete-btn {
  background: #dc3545;
  color: white;
}

.delete-btn:hover:not(:disabled) {
  background: #c82333;
}

.cancel-btn:disabled,
.delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .delete-modal-overlay {
    padding: 10px;
  }
  
  .delete-modal {
    max-height: 95vh;
  }
  
  .delete-modal-header {
    padding: 15px 20px;
  }
  
  .delete-modal-header h3 {
    font-size: 16px;
  }
  
  .delete-modal-body {
    padding: 20px;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .delete-modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }
  
  .cancel-btn,
  .delete-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .warning-message {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .warning-icon {
    font-size: 20px;
  }
  
  .delete-modal-header h3 {
    font-size: 14px;
  }
  
  .detail-item label {
    font-size: 12px;
  }
  
  .detail-item span {
    font-size: 13px;
  }
}

.district-list-page {
  padding: 20px;
}

.district-list-header h2 {
  margin: 0 0 6px;
}

.district-list-header p {
  margin: 0 0 16px;
  color: #666;
}

.district-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.district-alert-error {
  background: #fdecec;
  color: #b91c1c;
  border: 1px solid #f5c2c7;
}

.district-alert-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.district-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.district-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.district-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.district-form-group label {
  font-size: 13px;
  font-weight: 600;
}

.district-form-group input,
.district-form-group select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.district-form-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.district-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.district-btn.primary {
  background: #4f46e5;
  color: #fff;
}

.district-btn.secondary {
  background: #6b7280;
  color: #fff;
}

.district-btn.edit {
  background: #0ea5e9;
  color: #fff;
}

.district-btn.danger {
  background: #dc2626;
  color: #fff;
}

.district-search-row {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.district-search-row input {
  width: 100%;
  max-width: 360px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.district-loading {
  padding: 18px 0;
}

.district-table-wrapper {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.district-table {
  width: 100%;
  border-collapse: collapse;
}

.district-table th,
.district-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.district-table th {
  background: #f8fafc;
  font-weight: 600;
}

.district-empty {
  text-align: center !important;
  color: #64748b;
  padding: 20px !important;
}

.district-row-actions {
  display: flex;
  gap: 6px;
}

@media (max-width: 900px) {
  .district-form-grid {
    grid-template-columns: 1fr;
  }

  .district-search-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 425px) {
  .district-form-group {
  display: flex;
  flex-direction: column;
  width: calc(100% - 100px);
  gap: 6px;
}
}

/* Marketing Create Order Styles */

.marketing-create-order {
    padding: 24px 32px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    background-color: #f8fafc;
    min-height: calc(100vh - 100px);
    box-sizing: border-box;
  }
  
  .marketing-order-header {
    margin-bottom: 30px;
  }
  
  .marketing-order-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
  }
  
  .marketing-order-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .marketing-order-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .marketing-order-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
  }
  
  .form-section:last-of-type {
    border-bottom: none;
  }
  
  .form-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(16.666% - 17px);
    min-width: 200px;
    display: flex;
    flex-direction: column;
  }
  
  .form-group.full-width {
    flex: 1 1 100%;
  }
  
  .form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
  }
  
  .form-group input[type="text"],
  .form-group input[type="date"],
  .form-group input[type="number"],
  .form-group select,
  .form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
  }
  
  .form-group input[type="text"]:not(.readonly-input):not([readonly]),
  .form-group textarea {
    text-transform: uppercase;
  }
  
  .form-group input[type="text"].readonly-input,
  .form-group input[type="number"].readonly-input,
  .form-group input[type="text"][readonly],
  .form-group input[type="number"][readonly],
  .form-group input[type="date"],
  .form-group input[type="number"],
  .form-group select {
    text-transform: none;
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .form-group input.readonly-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
  }
  
  .form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
  }
  
  .form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 20px;
  }
  
  .form-actions.save-section {
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
  }
  
  .add-btn {
    padding: 12px 30px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
  }
  
  .add-btn:hover:not(:disabled) {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
  }
  
  .cancel-btn {
    padding: 12px 30px;
    background-color: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
  }
  
  .cancel-btn:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
  }
  
  .save-btn {
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
  }
  
  .save-btn:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .save-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
  }
  
  /* Products Table */
  .products-table-container {
    overflow-x: auto;
    margin-top: 20px;
  }
  
  .products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
    background: white;
  }
  
  .products-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
  }
  
  .products-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
  
  .products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
  }
  
  .products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .products-table td {
    padding: 12px 16px;
    color: #555;
    font-size: 0.95rem;
    vertical-align: middle;
  }
  
  .products-table tfoot {
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
    font-weight: 600;
  }
  
  .products-table tfoot td {
    padding: 12px 16px;
    color: #1e293b;
  }
  
  .edit-btn,
  .delete-btn {
    padding: 6px 12px;
    margin: 0 4px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .edit-btn {
    background-color: #3b82f6;
    color: white;
  }
  
  .edit-btn:hover {
    background-color: #2563eb;
  }
  
  .delete-btn {
    background-color: #ef4444;
    color: white;
  }
  
  .delete-btn:hover {
    background-color: #dc2626;
  }
  
  /* Responsive Design */
  @media (max-width: 1200px) {
    .form-group {
      flex-grow: 1;
      flex-shrink: 1;
      flex-basis: calc(25% - 15px);
    }
  }
  
  @media (max-width: 768px) {
    .marketing-create-order {
      padding: 15px;
    }
  
    .marketing-order-form {
      padding: 20px;
    }
  
    .form-group {
      flex-grow: 1;
      flex-shrink: 1;
      flex-basis: calc(50% - 10px);
    }
  
    .products-table {
      font-size: 0.85rem;
    }
  
    .products-table th,
    .products-table td {
      padding: 8px 12px;
    }
  }
  
  @media (max-width: 480px) {
    .form-group {
      flex: 1 1 100%;
    }
  
    .save-btn,
    .add-btn {
      width: 100%;
    }
  
    .form-actions {
      flex-direction: column;
    }
  }
  
  .released-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  }

  /* Edit-page document upload: existing/new document chips with a View button and a
     remove ("x") badge, used by the "Upload Document" field. */
  .po-upload-view-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .po-doc-view-btn {
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 6px;
    cursor: pointer;
  }

  .po-doc-view-btn:hover {
    background: #f1f5f9;
  }

  .po-upload-remove-cross {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 14px;
    line-height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
  }

  .po-upload-remove-cross:hover {
    filter: brightness(0.95);
  }
  
/* Exhibition Dashboard Styles */
.exhibition-dashboard .title-box {
  margin-bottom: 24px;
}

.exhibition-dashboard .title-box h2 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 8px 0;
}

.exhibition-dashboard .title-box h3 {
  font-size: 20px;
  font-weight: 600;
  color: #4a5568;
  margin: 0;
}

.exhibition-dashboard .search-filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 16px;
}

.exhibition-dashboard .search-section {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1 1;
  min-width: 300px;
}

.exhibition-dashboard .exhibition-select {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.exhibition-dashboard .search-input-wrapper {
  position: relative;
  flex: 1 1;
}

.exhibition-dashboard .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 14px;
  z-index: 1;
}

.exhibition-dashboard .search-input {
  padding: 10px 12px 10px 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.exhibition-dashboard .search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.exhibition-dashboard .pagination-controls-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.exhibition-dashboard .per-page-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.exhibition-dashboard .container-box-inner {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.exhibition-dashboard .table-wrapper {
  overflow-x: auto;
}

.exhibition-dashboard .table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}

.exhibition-dashboard .table thead {
  background-color: #f7fafc;
  border-bottom: 2px solid #e2e8f0;
}

.exhibition-dashboard .table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
  border-bottom: 2px solid #e2e8f0;
}

.exhibition-dashboard .table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
}

.exhibition-dashboard .table tbody tr:hover {
  background-color: #f7fafc;
}

.exhibition-dashboard .table .even-row {
  background-color: #ffffff;
}

.exhibition-dashboard .table .odd-row {
  background-color: #f9fafb;
}

.exhibition-dashboard .table .no-data {
  text-align: center;
  padding: 40px 20px;
  color: #a0aec0;
}

.exhibition-dashboard .table .no-data i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.exhibition-dashboard .table .no-data p {
  margin: 0;
  font-size: 16px;
}

.exhibition-dashboard .assign-to-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.exhibition-dashboard .assign-select {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  min-width: 120px;
}

.exhibition-dashboard .assign-btn {
  padding: 6px 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.exhibition-dashboard .assign-btn:hover {
  background: #5a67d8;
}

.exhibition-dashboard .actions-cell {
  text-align: center;
}

.exhibition-dashboard .action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.exhibition-dashboard .action-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exhibition-dashboard .action-btn.assign-btn-action {
  background: #667eea;
  color: white;
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exhibition-dashboard .action-btn.assign-btn-action:hover {
  background: #5a67d8;
}

.exhibition-dashboard .btn-action {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
}

.exhibition-dashboard .btn-action.btn-edit {
  background: #1976d2;
  color: white;
}

.exhibition-dashboard .btn-action.btn-edit:hover {
  background: #1565c0;
}

.exhibition-dashboard .pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
}

.exhibition-dashboard .pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #4a5568;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.exhibition-dashboard .pagination-btn:hover:not(:disabled) {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.exhibition-dashboard .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.exhibition-dashboard .page-info {
  font-size: 14px;
  color: #4a5568;
}

.exhibition-dashboard .loading-container {
  text-align: center;
  padding: 40px 20px;
  color: #a0aec0;
}

.exhibition-dashboard .loading-container i {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.exhibition-dashboard .error-message {
  padding: 12px 16px;
  background: #fed7d7;
  color: #c53030;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exhibition-dashboard .search-results-info {
  padding: 10px 15px;
  margin-bottom: 15px;
  background-color: #e3f2fd;
  border-radius: 4px;
  border: 1px solid #90caf9;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .exhibition-dashboard .search-filter-bar {
    flex-direction: column;
    height: auto;
    height: initial;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .exhibition-dashboard .search-section {
    flex-direction: column;
    margin-bottom: 5px;
  }

  .exhibition-dashboard .table-wrapper {
    overflow-x: scroll;
  }

  .exhibition-dashboard .table {
    min-width: 1200px;
  }

  .exhibition-dashboard .pagination-controls-top{
    margin-bottom: 10px;
  }

}


/* Page layout */
.exhibition-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    background-color: #f5f6fa;
    padding: 24px 16px 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
      Arial, sans-serif;
  }
  
  /* Header */
  .exhibition-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
  }
  
  .exhibition-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
  }
  
  .exhibition-app-icon-symbol {
    font-size: 24px;
  }
  
  .exhibition-header-text {
    flex: 1 1;
    margin-left: 12px;
  }
  
  .exhibition-app-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
  }
  
  .exhibition-app-subtitle {
    font-size: 13px;
    color: #6b7280;
  }
  
  .exhibition-profile-button {
    border: none;
    background: #eef2ff;
    color: #4f46e5;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .exhibition-profile-icon {
    font-size: 20px;
  }
  
  .exhibition-refresh-button {
    border: none;
    background: #eef2ff;
    color: #4f46e5;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.15s ease, transform 0.05s ease;
  }
  
  .exhibition-refresh-button:hover {
    background: #e0e7ff;
  }
  
  .exhibition-refresh-button:active {
    transform: translateY(1px);
  }
  
  /* Content */
  .exhibition-content {
    flex: 1 1;
  }
  
  .exhibition-section-title {
    font-size: 22px;
    margin: 0 0 4px;
    color: #111827;
  }
  
  .exhibition-section-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    color: #9ca3af;
  }
  
  /* Cards row */
  .exhibition-cards-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
  }
  
  .exhibition-card {
    position: relative;
    flex: 1 1;
    min-height: 160px;
    border-radius: 24px;
    background: #e5e7eb;
    border: 2px dashed rgba(156, 163, 175, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.1s ease,
      border-color 0.2s ease;
  }
  
  .exhibition-card:hover {
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
    border-color: #4f46e5;
  }
  
  .exhibition-card-disabled {
    background: #f3f4f6;
  }
  
  .exhibition-card-placeholder {
    text-align: center;
    color: #6b7280;
  }
  
  .exhibition-card-placeholder-disabled {
    opacity: 0.5;
  }
  
  .exhibition-card-camera-icon {
    font-size: 26px;
    margin-bottom: 6px;
  }
  
  .exhibition-card-label {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
  }
  
  .exhibition-card-cta {
    font-size: 12px;
    color: #4f46e5;
  }
  
  .exhibition-card-cta-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
    flex-wrap: wrap;
  }
  
  .exhibition-card-cta-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  
  .exhibition-card-cta-btn:hover {
    background: #4f46e5;
    color: #fff;
  }
  
  .exhibition-card-cta-btn:active {
    transform: translateY(1px);
  }
  
  .exhibition-card-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  }
  
  .exhibition-card-action-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
  }
  
  .exhibition-card-action-btn:hover {
    background: #fff;
  }
  
  .exhibition-card-action-btn:active {
    transform: translateY(1px);
  }
  
  .exhibition-file-input {
    display: none;
  }
  
  .exhibition-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .exhibition-card-has-image {
    border-style: solid;
    border-color: #4f46e5;
  }
  
  /* Extract button */
  .exhibition-extract-button {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 14px 16px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
    transition: background 0.15s ease, box-shadow 0.15s ease,
      transform 0.05s ease;
  }
  
  .exhibition-extract-button:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
  }
  
  .exhibition-extract-button:not(:disabled):hover {
    background: #4338ca;
  }
  
  .exhibition-extract-button:not(:disabled):active {
    transform: translateY(1px);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.4);
  }
  
  .exhibition-status-area {
    margin-top: 16px;
  }
  
  .exhibition-status-text {
    padding: 10px 14px;
    border-radius: 16px;
    background: #e5e7eb;
    font-size: 13px;
    color: #4b5563;
  }
  
  .exhibition-error-text {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    background: #fee2e2;
    font-size: 13px;
    color: #b91c1c;
  }
  
  .exhibition-result-card {
    margin-top: 20px;
    padding: 16px 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  }
  
  .exhibition-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  
  .exhibition-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
  }
  
  .exhibition-result-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .exhibition-result-row:last-of-type {
    border-bottom: none;
  }
  
  .exhibition-result-label {
    color: #6b7280;
  }
  
  .exhibition-result-value {
    color: #111827;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
  }
  
  .exhibition-data-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #f9fafb;
    margin-top: 8px;
  }
  
  .exhibition-data-chip-clickable {
    cursor: pointer;
  }
  
  .exhibition-data-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    font-size: 16px;
  }
  
  .exhibition-data-main {
    flex: 1 1;
    min-width: 0;
  }
  
  .exhibition-data-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
  }
  
  .exhibition-data-value {
    font-size: 13px;
    color: #111827;
  }
  
  .exhibition-data-subtitle {
    font-size: 12px;
    color: #9ca3af;
  }
  
  .exhibition-data-chevron {
    font-size: 10px;
    color: #9ca3af;
  }
  
  .exhibition-data-list {
    margin-top: 4px;
    padding-left: 44px;
  }
  
  .exhibition-data-list-item {
    font-size: 13px;
    color: #111827;
    padding: 3px 0;
  }
  
  .exhibition-data-input,
  .exhibition-data-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 13px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease;
  }
  
  .exhibition-data-input:focus,
  .exhibition-data-textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  }
  
  .exhibition-data-textarea {
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
  }
  
  .exhibition-save-lead-card {
    margin-top: 20px;
    padding: 16px 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  }
  
  .exhibition-save-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #111827;
  }
  
  .exhibition-form-group {
    margin-bottom: 12px;
  }
  
  .exhibition-form-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
  }
  
  .exhibition-select,
  .exhibition-input,
  .exhibition-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
    background: #f9fafb;
  }
  
  .exhibition-select:focus,
  .exhibition-input:focus,
  .exhibition-textarea:focus {
    border-color: #4f46e5;
    background: #ffffff;
  }
  
  .exhibition-textarea {
    resize: vertical;
  }
  
  .exhibition-input-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .exhibition-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  .exhibition-input-row .exhibition-input {
    flex: 1 1;
    min-width: 0;
  }
  
  .exhibition-slot-remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
  }
  
  .exhibition-slot-remove:hover {
    background: #fecaca;
  }
  
  .exhibition-add-slot {
    margin-top: 4px;
    padding: 6px 10px;
    border: 1px dashed #4f46e5;
    border-radius: 8px;
    background: transparent;
    color: #4f46e5;
    font-size: 13px;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.15s ease, color 0.15s ease;
  }
  
  .exhibition-add-slot:hover {
    background: #eef2ff;
  }
  
  .exhibition-save-button {
    margin-top: 4px;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, opacity 0.15s ease;
  }
  
  .exhibition-save-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .exhibition-save-button:not(:disabled):hover {
    background: #020617;
  }
  
  .exhibition-save-success {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    text-align: center;
  }
  
  .exhibition-save-summary {
    margin-top: 16px;
  }
  
  .exhibition-save-badge {
    text-align: center;
    font-size: 13px;
    color: #1f2937;
    margin-bottom: 10px;
  }
  
  .exhibition-save-card {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 24px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.18);
  }
  
  .exhibition-save-check {
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: #22c55e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
  }
  
  .exhibition-save-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 4px;
  }
  
  .exhibition-save-card-subtitle {
    font-size: 13px;
    color: #166534;
    margin-bottom: 12px;
  }
  
  .exhibition-save-added-by {
    font-size: 13px;
    color: #374151;
    margin-bottom: 12px;
  }
  
  .exhibition-save-added-by strong {
    color: #111827;
  }
  
  .exhibition-save-note {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    color: #1f2937;
    margin-bottom: 14px;
  }
  
  .exhibition-save-actions {
    display: flex;
    gap: 10px;
  }
  
  .exhibition-action-button {
    flex: 1 1;
    border: none;
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.05s ease, opacity 0.15s ease, background 0.15s ease;
  }
  
  .exhibition-action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .exhibition-action-button:not(:disabled):active {
    transform: translateY(1px);
  }
  
  .exhibition-action-primary {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
  }
  
  .exhibition-action-primary:not(:disabled):hover {
    background: #4338ca;
  }
  
  .exhibition-action-secondary {
    background: #111827;
    color: #ffffff;
  }
  
  .exhibition-action-secondary:not(:disabled):hover {
    background: #020617;
  }
  
  .exhibition-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 50;
  }
  
  .exhibition-modal-card {
    width: min(360px, 100%);
    background: #ffffff;
    border-radius: 24px;
    padding: 20px 18px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }
  
  .exhibition-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: #22c55e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
  }
  
  .exhibition-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
  }
  
  .exhibition-modal-button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
    transition: background 0.15s ease, transform 0.05s ease;
  }
  
  .exhibition-modal-button:hover {
    background: #4338ca;
  }
  
  .exhibition-modal-button:active {
    transform: translateY(1px);
  }
  
  @media (min-width: 768px) {
    .exhibition-page {
      max-width: 480px;
      margin: 0 auto;
    }
  }
  
.pending-export-sales-order {
    padding: 20px 30px;
    max-width: 100%;
    background-color: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .pending-export-sales-order-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
  }

  .pending-export-sales-order-region-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
  }

  .pending-export-sales-order-region-tab {
    border: 1px solid #d0d7de;
    background: #fff;
    color: #2c3e50;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .pending-export-sales-order-region-tab:hover {
    border-color: #7c3aed;
    color: #7c3aed;
  }

  .pending-export-sales-order-region-tab.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
  }
  
  .pending-export-sales-order-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .pending-export-sales-order-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .pending-export-sales-order-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .pending-export-sales-order-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .entries-control {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .entries-control label {
    font-weight: 500;
    color: #555;
  }
  
  .entries-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
  }
  
  .search-control {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .search-control label {
    font-weight: 500;
    color: #555;
  }
  
  .search-input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 200px;
  }
  
  .search-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  }
  
  .pending-export-sales-order-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 20px;
  }
  
  .pending-export-sales-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
  }
  
  .pending-export-sales-order-table thead {
    background-color: #f1f5f9;
  }
  
  .pending-export-sales-order-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
  }
  
  .pending-export-sales-order-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
  }
  
  .pending-export-sales-order-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .pending-export-sales-order-table .no-data {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-style: italic;
  }
  
  .action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: #475569;
  }
  
  .action-btn:hover {
    background-color: #f1f5f9;
  }
  
  .action-btn.print-btn:hover {
    color: #2563eb;
  }
  
  .action-btn.edit-btn:hover {
    color: #7c3aed;
  }
  
  .action-btn.pi-btn:hover {
    color: #059669;
  }
  
  .action-btn.proceed-btn {
    color: #059669;
  }
  
  .action-btn.proceed-btn:hover {
    background-color: #d1fae5;
    color: #047857;
  }
  
  .action-btn.reject-btn {
    color: #dc2626;
  }
  
  .action-btn.reject-btn:hover {
    background-color: #fee2e2;
    color: #b91c1c;
  }
  
  .action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .action-btn.view-btn {
    color: #7c3aed;
    font-weight: 500;
  }
  
  .action-btn.view-btn:hover {
    background-color: #ede9fe;
    color: #6d28d9;
  }
  
  .action-btn i {
    margin-right: 4px;
  }
  
  .pending-export-sales-order-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .pagination-info {
    color: #64748b;
    font-size: 0.9rem;
  }
  
  .pagination-controls {
    display: flex;
    gap: 5px;
  }
  
  .pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #7c3aed;
    color: #7c3aed;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background-color: #7c3aed;
    color: white;
    border-color: #7c3aed;
  }
  
  .copyright {
    text-align: left;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
  }
  
  /* View Modal Styles */
  .view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
  }
  
  .view-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    width: 1000px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
  
  .view-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .view-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1e293b;
  }
  
  .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
  }
  
  .close-btn:hover {
    background-color: #f1f5f9;
    color: #1e293b;
  }
  
  .view-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .view-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
  }
  
  .order-info-section {
    margin-bottom: 30px;
  }
  
  .order-info-section h3 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
  }
  
  .info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 15px;
    gap: 15px;
  }
  
  .info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .info-item.full-width {
    grid-column-start: 1; grid-column-end: -1;
  }
  
  .info-item label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.85rem;
  }
  
  .info-item span {
    color: #1e293b;
    font-size: 0.95rem;
  }
  
  .products-section {
    margin-top: 30px;
  }
  
  .products-section h3 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
  }
  
  .products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 15px;
  }
  
  .products-table thead {
    background-color: #f1f5f9;
  }
  
  .products-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
  }
  
  .products-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
  }
  
  .products-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .products-table tfoot {
    background-color: #f1f5f9;
    font-weight: 600;
  }
  
  .products-table tfoot td {
    padding: 12px 8px;
    color: #1e293b;
  }
  
  .no-products {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-style: italic;
  }
  
  .view-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
  }
  
  .close-modal-btn {
    padding: 10px 20px;
    background-color: #7c3aed;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .close-modal-btn:hover {
    background-color: #6d28d9;
  }
  
  /* Reject Modal Styles */
  .reject-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
  }
  
  .reject-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
  
  .reject-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .reject-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #1e293b;
    flex: 1 1;
  }
  
  .reject-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
  }
  
  .reject-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .reject-order-info {
    margin-bottom: 20px;
  }
  
  .reject-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
  }
  
  .reject-info-item label {
    font-weight: 600;
    color: #64748b;
    min-width: 150px;
    font-size: 0.9rem;
  }
  
  .reject-info-item span {
    color: #1e293b;
    font-size: 0.95rem;
  }
  
  .reject-readonly-input {
    flex: 1 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.9rem;
  }
  
  .reject-products-section {
    margin: 20px 0;
    overflow-x: auto;
  }
  
  .reject-products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
  }
  
  .reject-products-table thead {
    background-color: #f1f5f9;
  }
  
  .reject-products-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
  }
  
  .reject-products-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
  }
  
  .reject-products-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .reject-remark-section {
    margin-top: 20px;
  }
  
  .reject-remark-section label {
    display: block;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.9rem;
  }
  
  .reject-remark-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
  }
  
  .reject-remark-textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  }
  
  .reject-modal-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
  }
  
  .reject-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  
  .cancel-reject-btn {
    padding: 10px 20px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .cancel-reject-btn:hover:not(:disabled) {
    background-color: #e2e8f0;
    color: #1e293b;
  }
  
  .cancel-reject-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .confirm-reject-btn {
    padding: 10px 20px;
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .confirm-reject-btn:hover:not(:disabled) {
    background-color: #b91c1c;
  }
  
  .confirm-reject-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #dc2626;
  }
  
  @media (max-width: 768px) {
    .info-grid {
      grid-template-columns: 1fr;
    }
    
    .pending-export-sales-order-table-container {
      overflow-x: scroll;
    }
    
    .view-modal-content {
      max-width: 95%;
      max-height: 95vh;
    }
    
    .reject-modal-content {
      max-width: 95%;
      max-height: 95vh;
    }
    
    .reject-info-item {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .reject-info-item label {
      min-width: auto;
    }
  }
  
  
.export-stock-report-manage-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.export-stock-report-manage-page .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.export-stock-report-manage-page .filter-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.export-stock-report-manage-page .filter-group input,
.export-stock-report-manage-page .filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.export-stock-report-manage-page .filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.export-stock-report-manage-page .filters-card,
.export-stock-report-manage-page .table-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.export-stock-report-manage-page .table-wrapper {
  overflow-x: auto;
}

.export-stock-report-manage-page .records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.export-stock-report-manage-page .records-table th,
.export-stock-report-manage-page .records-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}

.export-stock-report-manage-page .records-table th {
  background: #f7fafc;
  font-weight: 600;
}

.export-stock-report-manage-page .records-table tbody tr:hover {
  background: #f8fafc;
}

.export-stock-report-manage-page .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.export-stock-report-manage-page .status-added {
  background: #dbeafe;
  color: #1e40af;
}

.export-stock-report-manage-page .status-released {
  background: #fef3c7;
  color: #92400e;
}

.export-stock-report-manage-page .status-returned,
.export-stock-report-manage-page .status-return {
  background: #fee2e2;
  color: #991b1b;
}

.export-stock-report-manage-page .action-buttons {
  display: flex;
  gap: 8px;
}

.export-stock-report-manage-page .btn-edit,
.export-stock-report-manage-page .btn-delete {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.export-stock-report-manage-page .btn-edit {
  background: #edf2f7;
  color: #4a5568;
}

.export-stock-report-manage-page .btn-delete {
  background: #fee2e2;
  color: #b91c1c;
}

.export-stock-report-manage-page .pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

.export-stock-report-manage-page .header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tsr-admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tsr-admin-modal-dialog {
  background: #fff;
  border-radius: 12px;
  width: min(920px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.tsr-admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #edf2f7;
}

.tsr-admin-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.tsr-admin-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #718096;
}

.tsr-admin-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.tsr-admin-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #edf2f7;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tsr-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.tsr-admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tsr-admin-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.tsr-admin-form-group input,
.tsr-admin-form-group select,
.tsr-admin-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.tsr-admin-form-group textarea {
  min-height: 72px;
  resize: vertical;
}

.tsr-admin-form-group.full-width {
  grid-column: 1 / -1;
}

.tsr-stock-lookup-hint {
  margin: 0;
  font-size: 12px;
  color: #718096;
}

.tsr-stock-lookup-status,
.tsr-stock-lookup-empty {
  margin: 0;
  font-size: 13px;
  color: #4a5568;
}

.tsr-stock-suggestions {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.tsr-stock-suggestion-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: #2d3748;
}

.tsr-stock-suggestion-btn:hover {
  background: #ebf8ff;
}

.tsr-stock-suggestions li:last-child .tsr-stock-suggestion-btn {
  border-bottom: none;
}

.tsr-stock-suggestion-btn strong {
  color: #2b6cb0;
  font-size: 14px;
}

/* ============================================
   3D LOGIN PAGE STYLES
   Unique 3D design with sharp logo display
   ============================================ */

.home-3d-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  perspective: 1200px;
  overflow: hidden;
  padding: 40px 20px;
}

.home-3d-footer {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Animated 3D Background */
.home-3d-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Orbs */
.home-3d-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.home-3d-orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.4));
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.home-3d-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(240, 147, 251, 0.8), rgba(118, 75, 162, 0.4));
  bottom: -200px;
  right: -200px;
  animation-delay: 5s;
}

.home-3d-orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.6), rgba(240, 147, 251, 0.3));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Grid Pattern */
.home-3d-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Main 3D Card */
.home-3d-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  border-radius: 30px;
  padding: 60px 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 100px rgba(102, 126, 234, 0.2);
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  max-width: 550px;
  width: 100%;
  overflow: hidden;
}

.home-3d-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Logo Container with 3D Effects */
.home-3d-logo-container {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  height: 120px;
}

.home-3d-logo-glow {
  position: absolute;
  width: 280px;
  height: 140px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.4), transparent 70%);
  border-radius: 50%;
  filter: blur(30px);
  animation: pulse 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.home-3d-logo-wrapper {
  position: relative;
  z-index: 3;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.home-3d-logo {
  max-width: 250px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  filter: brightness(1.1) contrast(1.1);
  transition: transform 0.3s ease;
}

.home-3d-logo:hover {
  transform: scale(1.05);
}

.home-3d-logo-shadow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(-50px);
  width: 200px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.4), transparent 70%);
  filter: blur(20px);
  z-index: 0;
  opacity: 0.6;
}

/* Content Styles */
.home-3d-content {
  position: relative;
  z-index: 2;
}

.home-3d-title {
  color: white;
  margin-bottom: 20px;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
  transform: translateZ(20px);
}

.home-3d-subtitle {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px;
  font-size: 1.1rem;
  line-height: 1.6;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transform: translateZ(10px);
}

/* 3D Sign In Button */
.home-3d-signin-btn,
.home-3d-dashboard-btn {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff8c42 100%);
  color: white;
  border: none;
  padding: 18px 50px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  box-shadow: 
    0 10px 30px rgba(255, 107, 107, 0.4),
    0 0 0 0 rgba(255, 107, 107, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateZ(30px);
}

.home-3d-signin-btn:hover,
.home-3d-dashboard-btn:hover {
  transform: translateZ(50px) translateY(-3px);
  box-shadow: 
    0 15px 40px rgba(255, 107, 107, 0.6),
    0 0 20px rgba(255, 107, 107, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.home-3d-signin-btn:active,
.home-3d-dashboard-btn:active {
  transform: translateZ(20px) translateY(-1px);
}

.home-3d-btn-text {
  position: relative;
  z-index: 2;
  display: block;
}

.home-3d-btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
  z-index: 1;
}

.home-3d-signin-btn:hover .home-3d-btn-shine,
.home-3d-dashboard-btn:hover .home-3d-btn-shine {
  left: 100%;
}

/* Decorative 3D Elements */
.home-3d-decoration {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.home-3d-decoration-1 {
  width: 100px;
  height: 100px;
  top: -50px;
  right: -50px;
  box-shadow: 
    0 0 30px rgba(102, 126, 234, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  animation: floatDecoration 6s ease-in-out infinite;
}

.home-3d-decoration-2 {
  width: 60px;
  height: 60px;
  bottom: -30px;
  left: -30px;
  box-shadow: 
    0 0 20px rgba(240, 147, 251, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
  animation: floatDecoration 8s ease-in-out infinite;
  animation-delay: 2s;
}

.home-3d-decoration-3 {
  width: 80px;
  height: 80px;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  box-shadow: 
    0 0 25px rgba(118, 75, 162, 0.3),
    inset 0 0 18px rgba(255, 255, 255, 0.1);
  animation: floatDecoration 7s ease-in-out infinite;
  animation-delay: 4s;
}

@keyframes floatDecoration {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(10px, -10px) rotate(180deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .home-3d-container {
    padding: 20px 15px;
    min-height: 50vh;
  }

  .home-3d-card {
    padding: 40px 30px;
    border-radius: 25px;
  }

  .home-3d-logo {
    max-width: 200px;
    max-height: 100px;
  }

  .home-3d-title {
    font-size: 2rem;
  }

  .home-3d-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .home-3d-signin-btn,
  .home-3d-dashboard-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
  }

  .home-3d-orb {
    filter: blur(40px);
  }

  .home-3d-orb-1,
  .home-3d-orb-2,
  .home-3d-orb-3 {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .home-3d-card {
    padding: 30px 20px;
  }

  .home-3d-logo {
    max-width: 180px;
    max-height: 90px;
  }

  .home-3d-title {
    font-size: 1.75rem;
  }

  .home-3d-signin-btn,
  .home-3d-dashboard-btn {
    padding: 12px 30px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }
}

/* Print Styles */
@media print {
  .home-3d-background,
  .home-3d-orb,
  .home-3d-grid,
  .home-3d-decoration {
    display: none;
  }

  .home-3d-card {
    background: white;
    color: black;
    box-shadow: none;
  }
}


.indent-list-page {
  padding: 20px 24px;
  max-width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.indent-list-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
  text-align: right;
}

.indent-list-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.indent-list-tab {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.2s;
}

.indent-list-tab:hover {
  color: #334155;
  background: #f1f5f9;
}

.indent-list-tab.active {
  color: #1e293b;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.indent-list-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  border-radius: 6px;
  font-size: 0.95rem;
}

.indent-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.indent-list-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: indent-list-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes indent-list-spin {
  to { transform: rotate(360deg); }
}

.indent-list-table-wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  border: 1px solid #e2e8f0;
}

.indent-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  font-size: 0.9rem;
}

.indent-list-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.indent-list-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.indent-list-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.indent-list-table tbody tr:hover {
  background: #f8fafc;
}

.indent-list-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}

.indent-list-table td.indent-list-empty {
  text-align: center;
  color: #94a3b8;
  padding: 40px;
}

.indent-list-check-link {
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 6px;
  padding: 0;
}

.indent-list-check-link:hover {
  color: #2563eb;
}

.indent-list-approved-input {
  width: 90px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
}

.indent-list-approved-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.indent-list-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  padding: 0 4px;
}

.indent-list-btn {
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.indent-list-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.indent-list-btn.reject {
  background: #dc2626;
  color: #fff;
}

.indent-list-btn.reject:hover:not(:disabled) {
  background: #b91c1c;
}

.indent-list-btn.approve {
  background: #2563eb;
  color: #fff;
}

.indent-list-btn.approve:hover:not(:disabled) {
  background: #1d4ed8;
}

.indent-list-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Check modal */
.indent-list-check-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.indent-list-check-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.indent-list-check-header {
  padding: 20px 24px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.indent-list-check-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.indent-list-check-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748b;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.indent-list-check-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.indent-list-check-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1;
}

.indent-list-check-footer {
  padding: 16px 24px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

.indent-list-check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.indent-list-check-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.indent-list-check-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.indent-list-check-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.indent-list-check-table tbody tr:hover {
  background: #f8fafc;
}

.indent-list-check-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .indent-list-page {
    padding: 16px;
  }

  .indent-list-title {
    font-size: 1.25rem;
    text-align: left;
  }

  .indent-list-tab {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .indent-list-table th,
  .indent-list-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .indent-list-actions {
    flex-direction: column;
  }

  .indent-list-btn {
    width: 100%;
  }

  .indent-list-check-modal {
    max-width: 95%;
    max-height: 95vh;
  }

  .indent-list-check-body {
    padding: 16px;
    overflow-x: auto;
  }

  .indent-list-check-table {
    min-width: 600px;
    font-size: 0.85rem;
  }

  .indent-list-check-table th,
  .indent-list-check-table td {
    padding: 8px 10px;
  }
}

/* Main Dashboard Styles - Matching Sales Dashboard Style */
.main-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
  background: #f8f9fa;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.main-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Master Links - Using same design as metric cards */
.main-dashboard .master-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.main-dashboard .master-link-item {
  cursor: pointer;
}

/* Error Message */
.main-dashboard .error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
  width: 100%;
  box-sizing: border-box;
}

.main-dashboard .error-message i {
  font-size: 16px;
}

/* Loading Container */
.main-dashboard .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #64748b;
}

.main-dashboard .loading-container i {
  font-size: 32px;
  margin-bottom: 15px;
}

.main-dashboard .loading-container p {
  font-size: 16px;
  margin: 0;
}

/* Metrics Row - Matching Sales Dashboard Style */
.main-dashboard .main-metrics-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 15px;
  gap: 15px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.main-dashboard .main-metric-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  cursor: pointer;
}

.main-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

@keyframes allTasksBlinkPulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35), 0 8px 18px rgba(59, 130, 246, 0.25);
  }
}

.main-dashboard .main-metric-card.main-metric-card-blink {
  animation: allTasksBlinkPulse 1s infinite ease-in-out;
}

.main-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.main-metric-card-1 { --metric-color: #3b82f6; }
.main-metric-card-2 { --metric-color: #10b981; }
.main-metric-card-3 { --metric-color: #f59e0b; }
.main-metric-card-4 { --metric-color: #8b5cf6; }
.main-metric-card-5 { --metric-color: #ec4899; }
.main-metric-card-6 { --metric-color: #06b6d4; }
.main-metric-card-pr { --metric-color: #f97316; }
.main-metric-card-po { --metric-color: #14b8a6; }
.main-metric-card-se { --metric-color: #6366f1; }
.main-metric-card-so { --metric-color: #3b82f6; }
.main-metric-card-eso { --metric-color: #8b5cf6; }
.main-metric-card-sd { --metric-color: #06b6d4; }
.main-metric-card-sdo { --metric-color: #10b981; }

.main-dashboard .metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.metric-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-orange {
  background: #f97316;
}

.bg-teal {
  background: #14b8a6;
}

.bg-indigo {
  background: #6366f1;
}

.bg-blue {
  background: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-change {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

.metric-chart {
  width: 60px;
  height: 32px;
  flex-shrink: 0;
  display: none; /* Hide chart on smaller cards to save space */
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

/* Charts Row */
.main-dashboard .main-charts-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 15px;
  gap: 15px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.main-dashboard .main-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.main-dashboard .forex-rates-card {
  grid-column: span 3;
}

.main-dashboard .forex-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.main-dashboard .forex-date {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 600;
}

.main-dashboard .forex-tab {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.main-dashboard .forex-tab.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

.main-dashboard .forex-updated {
  font-size: 0.8rem;
  color: #475569;
  margin-bottom: 12px;
  font-weight: 600;
}

.main-dashboard .forex-updated.warning {
  color: #b45309;
}

.main-dashboard .forex-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.main-dashboard .forex-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.main-dashboard .forex-pair {
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.main-dashboard .forex-eq {
  color: #94a3b8;
  font-weight: 800;
  margin: 0 4px;
}

.main-dashboard .forex-rate {
  font-weight: 800;
  color: #1e293b;
}

.main-dashboard .forex-badge {
  justify-self: end;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  border: 1px solid #e2e8f0;
  color: #475569;
  background: #ffffff;
  white-space: nowrap;
}

.main-dashboard .forex-badge.today {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.main-dashboard .forex-badge.outdated {
  border-color: #fed7aa;
  background: #ffedd5;
  color: #9a3412;
}

.main-dashboard .forex-state {
  padding: 12px;
  color: #64748b;
  font-weight: 600;
}

.main-dashboard .forex-error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.main-dashboard .chart-container {
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Revenue Growth Chart */
.main-dashboard .revenue-line-chart {
  position: relative;
  height: 162px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.main-dashboard .line-chart-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.main-dashboard .chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 4px;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.main-dashboard .bar-chart {
  position: relative;
  height: 200px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.main-dashboard .bar-chart-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

/* Campaigns */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.main-dashboard .donut-chart-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1920px) {
  .main-dashboard .main-metrics-row,
  .main-dashboard .main-charts-row {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1600px) {
  .main-dashboard .main-metrics-row,
  .main-dashboard .main-charts-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .main-dashboard .main-metrics-row,
  .main-dashboard .main-charts-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .main-dashboard .main-metrics-row,
  .main-dashboard .main-charts-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-dashboard {
    padding: 15px;
  }

  .main-dashboard .master-links {
    grid-template-columns: 1fr;
  }

  .main-dashboard .main-metrics-row,
  .main-dashboard .main-charts-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .main-dashboard .main-metric-card {
    padding: 14px;
  }

  .main-dashboard .metric-card-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .main-dashboard .metric-icon-wrapper {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .main-dashboard .metric-value {
    font-size: 1.125rem;
  }

  .main-dashboard .metric-label {
    font-size: 0.7rem;
  }

  .main-dashboard .metric-change {
    font-size: 0.7rem;
  }

  .main-dashboard .main-charts-row {
    grid-template-columns: 1fr;
  }

  .main-dashboard .forex-rates-card {
    grid-column: span 1;
  }

  .main-dashboard .forex-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .main-dashboard .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-dashboard .chart-value {
    text-align: left;
  }

  .main-dashboard .earning-summary {
    flex-direction: column;
  }

  .main-dashboard .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-dashboard .donut-chart {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 480px) {
  .main-dashboard {
    padding: 10px;
  }

  .main-dashboard .main-metrics-row,
  .main-dashboard .main-charts-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .main-dashboard .main-metric-card {
    padding: 14px;
  }

  .main-dashboard .metric-card-header {
    gap: 10px;
  }

  .main-dashboard .metric-icon-wrapper {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .main-dashboard .metric-value {
    font-size: 1.125rem;
  }

  .main-dashboard .main-chart-card {
    padding: 16px;
  }

  .main-dashboard .revenue-line-chart {
    height: 120px;
  }

  .main-dashboard .bar-chart {
    height: 150px;
  }
}

.payment-sales-order-details {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
  width: 100%;
  box-sizing: border-box;
}

.payment-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.back-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}

.back-btn:hover {
  background-color: #5a6268;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-details-section,
.products-section,
.summary-section {
  background: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.order-details-section h2,
.products-section h2,
.summary-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 22px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-weight: 600;
  color: #666;
  font-size: 14px;
}

.detail-item span {
  color: #333;
  font-size: 15px;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status-proceeded {
  background-color: #d4edda;
  color: #155724;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.products-table-container {
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.products-table thead {
  background-color: #f8f9fa;
}

.products-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.products-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #555;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tfoot {
  background-color: #f8f9fa;
  font-weight: 600;
}

.products-table tfoot td {
  border-top: 2px solid #dee2e6;
  padding: 15px 12px;
}

.released-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background-color: #d4edda;
  color: #155724;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.not-released-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background-color: #f8d7da;
  color: #721c24;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-top: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border-left: 4px solid #007bff;
}

.summary-item label {
  font-weight: 600;
  color: #666;
  font-size: 14px;
}

.summary-item span {
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.grand-total {
  color: #007bff !important;
  font-size: 20px !important;
}

.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.copyright {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 12px;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  .payment-sales-order-details {
    padding: 15px;
    width: 100%;
  }

  .payment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
  }

  .order-details-section,
  .products-section,
  .summary-section {
    width: 100%;
    padding: 15px;
  }

  .order-details-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .products-table {
    font-size: 12px;
    width: 100%;
  }

  .products-table th,
  .products-table td {
    padding: 8px;
  }

  .products-table-container {
    width: 100%;
    overflow-x: auto;
  }
}


.payment-sales-order-list {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.list-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.payment-sales-order-region-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-sales-order-region-tab {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #2c3e50;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-sales-order-region-tab:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.payment-sales-order-region-tab.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 1 1;
  min-width: 0;
  justify-content: flex-end;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 200px;
  max-width: 100%;
}

.search-container i {
  position: absolute;
  left: 12px;
  color: #666;
}

.search-input {
  padding: 10px 15px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  width: 100%;
  min-width: 200px;
  max-width: 100%;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state i {
  font-size: 64px;
  color: #ccc;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

.table-container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entries-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}

.entries-select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.orders-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  box-sizing: border-box;
}

.orders-table thead {
  background-color: #f8f9fa;
}

.orders-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.orders-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #555;
}

.orders-table tbody tr:hover {
  background-color: #f8f9fa;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status-proceeded {
  background-color: #d4edda;
  color: #155724;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.view-btn {
  padding: 6px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.3s;
  margin-right: 5px;
}

.view-btn:hover {
  background-color: #0056b3;
}

.view-btn i {
  font-size: 12px;
}

.complete-btn {
  padding: 6px 12px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.3s;
}

.complete-btn:hover {
  background-color: #218838;
}

.complete-btn i {
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: white;
  color: #333;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #666;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .payment-sales-order-list {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .list-header h1 {
    font-size: 1.5rem;
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .search-container {
    width: 100%;
    min-width: 100%;
  }

  .search-container i {
    position: absolute;
    left: 12px;
    color: #666;
    top: 15px;
  }

  .search-input {
    width: 100%;
    min-width: 100%;
  }

  .table-container {
    padding: 15px;
    overflow-x: auto;
    width: 100%;
  }

  .orders-table {
    font-size: 12px;
    min-width: 1000px;
  }

  .orders-table th,
  .orders-table td {
    padding: 8px;
    font-size: 0.85rem;
  }

  .view-btn,
  .complete-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .pagination-info {
    text-align: center;
    width: 100%;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .payment-sales-order-list {
    padding: 10px;
  }

  .list-header h1 {
    font-size: 1.3rem;
  }

  .table-container {
    padding: 10px;
  }

  .orders-table {
    min-width: 800px;
    font-size: 0.75rem;
  }

  .orders-table th,
  .orders-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .view-btn,
  .complete-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .view-btn i,
  .complete-btn i {
    font-size: 0.7rem;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: 36px;
  }
}
.permission-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

/* Header */
.permission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #1a202c;
}

.header-content p {
  margin: 0;
  color: #718096;
  font-size: 14px;
}

.permission-header .btn {
  white-space: nowrap;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Filters */
.permission-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
}

.role-filter-select {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.2s;
}

.role-filter-select:hover {
  border-color: #cbd5e0;
}

.role-filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .fa-search {
  position: absolute;
  left: 12px;
  color: #a0aec0;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-search {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.clear-search:hover {
  color: #718096;
}

/* Permissions Container */
.permissions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.permission-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.section-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.section-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.permissions-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
  transition: all 0.2s;
}

.permission-item:hover {
  border-color: #cbd5e0;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.permission-info {
  flex: 1 1;
  min-width: 0;
}

.permission-name h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
}

.permission-route {
  font-size: 12px;
  color: #718096;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  word-break: break-all;
}

.permission-roles {
  flex: 1 1;
  min-width: 300px;
}

.roles-label {
  font-size: 12px;
  font-weight: 500;
  color: #718096;
  margin-bottom: 8px;
}

.roles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.role-tag.all-roles {
  background: #718096 !important;
}

.no-roles {
  color: #a0aec0;
  font-style: italic;
  font-size: 13px;
}

.permission-actions {
  display: flex;
  gap: 8px;
}

.btn-edit-permission {
  padding: 8px 16px;
  background: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffe0b2;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-edit-permission:hover {
  background: #ffe0b2;
  color: #e65100;
  transform: translateY(-1px);
}

.no-permissions {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-permissions i {
  font-size: 48px;
  color: #a0aec0;
  margin-bottom: 16px;
}

.no-permissions p {
  color: #718096;
  font-size: 16px;
  margin: 0;
}

/* Edit Permission Modal */
.edit-permission-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.edit-permission-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.edit-permission-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.edit-permission-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.modal-close-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-close-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.edit-permission-modal-body {
  padding: 24px;
  flex: 1 1;
  overflow-y: auto;
}

.permission-info-box {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.permission-info-box p {
  margin: 8px 0;
  color: #4a5568;
  font-size: 14px;
}

.permission-info-box strong {
  color: #2d3748;
  min-width: 80px;
  display: inline-block;
}

.roles-selection-section {
  margin-top: 24px;
}

.roles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.roles-header h3 {
  margin: 0;
  color: #2d3748;
  font-size: 18px;
  font-weight: 600;
}

.select-all-roles-btn {
  padding: 6px 12px;
  background: #e2e8f0;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.select-all-roles-btn:hover:not(:disabled) {
  background: #cbd5e0;
  color: #2d3748;
}

.select-all-roles-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.roles-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 24px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
}

.role-checkbox-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.role-checkbox-item:hover:not(:has(input:disabled)) {
  border-color: #667eea;
  background: #f0f4ff;
}

.role-checkbox-item.selected {
  border-color: #667eea;
  background: #eef2ff;
}

.role-checkbox-item input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.role-checkbox-item input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.role-checkbox-name {
  flex: 1 1;
  font-size: 14px;
  font-weight: 500;
}

.role-check-icon {
  color: #667eea;
  font-size: 16px;
  margin-left: 8px;
}

.selected-roles-preview {
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.selected-roles-preview strong {
  display: block;
  margin-bottom: 12px;
  color: #4338ca;
  font-size: 14px;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-tag {
  background: #667eea;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview-tag::before {
  content: '✓';
  font-weight: bold;
}

.no-selection {
  color: #a0aec0;
  font-style: italic;
  font-size: 13px;
}

.edit-permission-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  background: #f7fafc;
  border-radius: 0 0 12px 12px;
}

.edit-permission-modal-footer .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.edit-permission-modal-footer .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.edit-permission-modal-footer .btn-secondary:hover:not(:disabled) {
  background: #cbd5e0;
  color: #2d3748;
}

.edit-permission-modal-footer .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.edit-permission-modal-footer .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.edit-permission-modal-footer .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .permission-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .permission-filters {
    flex-direction: column;
  }

  .permission-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .permission-roles {
    width: 100%;
    min-width: auto;
  }

  .roles-checkbox-list {
    grid-template-columns: 1fr;
  }
}


.planning-consignment-page {
  padding: 20px;
  background: #f8f9fa;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 700;
}

.page-header p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.error-banner {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  font-weight: 500;
}

.consignment-selector {
  display: flex;
  gap: 20px;
  align-items: end;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.selector-group label {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.consignment-select,
.dispatch-select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.consignment-select:focus,
.dispatch-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.consignment-select:disabled,
.dispatch-select:disabled {
  background: #e9ecef;
  cursor: not-allowed;
}

.refresh-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  height: -webkit-fit-content;
  height: fit-content;
  white-space: nowrap;
}

.refresh-btn:hover:not(:disabled) {
  background: #218838;
}

.refresh-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.add-product-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  height: -webkit-fit-content;
  height: fit-content;
  white-space: nowrap;
}

.add-product-btn:hover:not(:disabled) {
  background: #0056b3;
}

.add-product-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.no-consignment-selected {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.empty-state {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 500px;
}

.empty-state h3 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 20px;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 10px 0;
  color: #6c757d;
  line-height: 1.5;
}

.empty-state p:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .planning-consignment-page {
    padding: 15px;
  }
  
  .page-header {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .page-header h1 {
    font-size: 24px;
  }
  
  .page-header p {
    font-size: 14px;
  }
  
  .consignment-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .selector-group {
    min-width: auto;
  }
  
  .refresh-btn,
  .add-product-btn {
    width: 100%;
    padding: 12px;
  }
  
  .empty-state {
    padding: 30px 20px;
  }
  
  .empty-state h3 {
    font-size: 18px;
  }

  div.action-section{
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .planning-consignment-page {
    padding: 10px;
  }
  
  .page-header {
    padding: 15px 10px;
  }
  
  .page-header h1 {
    font-size: 20px;
  }
  
  .consignment-selector {
    padding: 15px;
  }
  
  .empty-state {
    padding: 20px 15px;
  }
  
  .empty-state h3 {
    font-size: 16px;
  }
  
  .empty-state p {
    font-size: 14px;
  }

}

.price-list-container {
  padding: 20px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  background: #f5f5f5;
  min-height: 100vh;
}

.price-list-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.price-list-header h1 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 28px;
}

.price-list-header p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-selector-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.selector-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.country-selector-section .form-group {
  flex: 0 0 auto;
  min-width: 250px;
}

.country-selector-section .search-group {
  flex: 1 1;
  min-width: 300px;
  max-width: 500px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-input {
  padding-right: 40px;
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s;
}

.clear-search-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.clear-search-btn:focus {
  outline: none;
  background: #f0f0f0;
}

.country-selector-section .form-label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
}

.country-selector-section .form-label .required {
  color: #dc3545;
}

.country-selector-section .country-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: white;
}

.country-selector-section .country-select:focus {
  outline: none;
  border-color: #007bff;
}

.excel-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1400px;
}

.excel-table thead {
  background-color: #4472c4;
  color: white;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.excel-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #d0d0d0;
  white-space: nowrap;
  font-size: 12px;
}

.excel-table tbody tr {
  background-color: white;
  transition: background-color 0.2s;
}

.excel-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.excel-table tbody tr:hover {
  background-color: #e8f4f8;
}

.excel-table tbody tr.row-saved {
  background-color: #d4edda;
}

.excel-table tbody tr.row-saved:hover {
  background-color: #c3e6cb;
}

.excel-table td {
  padding: 8px;
  border: 1px solid #d0d0d0;
  vertical-align: middle;
}

.excel-table .action-col {
  width: 80px;
  text-align: center;
  position: -webkit-sticky;
  position: sticky;
  right: 0;
  background-color: white;
  z-index: 5;
}

.excel-table thead .action-col {
  background-color: #4472c4;
  position: -webkit-sticky;
  position: sticky;
  right: 0;
  z-index: 11;
}

.excel-table tbody tr:nth-child(even) .action-col {
  background-color: #f9f9f9;
}

.excel-table tbody tr:hover .action-col {
  background-color: #e8f4f8;
}

.excel-table tbody tr.row-saved .action-col {
  background-color: #d4edda;
}

.excel-table tbody tr.row-saved:hover .action-col {
  background-color: #c3e6cb;
}

.excel-table .action-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.excel-table .serial-no {
  text-align: center;
  width: 60px;
  font-weight: 600;
  color: #666;
}

.excel-table .product-id {
  text-align: center;
  width: 80px;
  font-weight: 600;
  color: #333;
}

.excel-table .product-name {
  min-width: 200px;
  font-weight: 500;
  color: #333;
}

.excel-table .editable-cell {
  padding: 4px;
}

.excel-table .table-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  font-size: 12px;
  background: white;
  box-sizing: border-box;
}

.excel-table .table-input:focus {
  outline: none;
  border-color: #007bff;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.excel-table .table-input.text-input {
  min-width: 150px;
}

.excel-table .readonly-cell {
  background-color: #f5f5f5;
  color: #666;
  font-size: 12px;
  text-align: center;
}

.excel-table .loading-cell,
.excel-table .no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 14px;
}

.excel-table .loading-cell i {
  margin-right: 10px;
}

.no-country-selected {
  background: white;
  padding: 60px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: #666;
}

.no-country-selected i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 15px;
}

.no-country-selected p {
  margin: 0;
  font-size: 16px;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: white;
  border-top: 1px solid #d0d0d0;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 5px;
  background: white;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #007bff;
  color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Scrollbar styling */
.table-wrapper::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@media (max-width: 768px) {
  .price-list-container {
    padding: 10px;
  }

  .excel-table {
    font-size: 11px;
  }

  .excel-table th,
  .excel-table td {
    padding: 6px 4px;
  }

  .table-input {
    font-size: 11px;
    padding: 4px 6px;
  }
}

.proceed-export-sales-order {
  padding: 24px 32px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  min-height: calc(100vh - 100px);
  box-sizing: border-box;
}

.proceed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 20px 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.proceed-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.back-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message,
.success-message {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease-out;
}

.warnings-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.warnings-popup-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.warnings-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 2px solid #fee2e2;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-radius: 12px 12px 0 0;
}

.warnings-popup-header i {
  font-size: 1.5rem;
  color: #ef4444;
}

.warnings-popup-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #991b1b;
}

.warnings-popup-body {
  padding: 20px 24px;
}

.warning-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.warning-item:last-child {
  border-bottom: none;
}

.warning-item i {
  color: #ef4444;
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.warning-item span {
  color: #991b1b;
  font-size: 0.95rem;
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.success-message {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
  color: #065f46;
}

.order-details-section,
.products-section,
.batch-details-section,
.sales-products-section,
.partial-release-section {
  background: white;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #10b981;
}

.partial-release-info {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 16px 0;
  padding: 12px 16px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.partial-release-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-top: 16px;
}

.partial-release-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
}

.partial-release-table thead {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.partial-release-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

.partial-release-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
}

.partial-release-table tbody tr:hover {
  background-color: #f8fafc;
}

.selected-batches-section {
  background: white;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.quantity-limit-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.quantity-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1;
  min-width: 180px;
}

.quantity-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quantity-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}

.quantity-value.quantity-warning {
  color: #f59e0b;
}

.quantity-value.quantity-error {
  color: #ef4444;
}

.quantity-error-message {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  border-radius: 6px;
  color: #991b1b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  animation: slideIn 0.3s ease-out;
}

.quantity-warning-message {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  animation: slideIn 0.3s ease-out;
}

.order-details-section:hover,
.products-section:hover,
.batch-details-section:hover,
.sales-products-section:hover,
.selected-batches-section:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.order-details-section h2,
.products-section h2,
.batch-details-section h2,
.sales-products-section h2,
.selected-batches-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #7c3aed;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-details-section h2::before,
.products-section h2::before,
.batch-details-section h2::before,
.sales-products-section h2::before,
.selected-batches-section h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.order-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.detail-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.detail-item input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #f8fafc;
  color: #64748b;
}

.products-table-container,
.batch-table-container,
.sales-products-table-container,
.selected-batches-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-top: 16px;
}

.products-table,
.batch-table,
.sales-products-table,
.selected-batches-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
}

.products-table thead,
.batch-table thead,
.sales-products-table thead,
.selected-batches-table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.products-table th,
.batch-table th,
.sales-products-table th,
.selected-batches-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.products-table td,
.batch-table td,
.sales-products-table td,
.selected-batches-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
}

.products-table .product-stock-type-select {
  min-width: 130px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  color: #334155;
  cursor: pointer;
}

.products-table .product-stock-type-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.products-table .stock-type-saving-hint {
  margin-left: 6px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.products-table tbody tr,
.batch-table tbody tr,
.sales-products-table tbody tr,
.selected-batches-table tbody tr {
  transition: all 0.2s ease;
}

.products-table tbody tr:hover,
.batch-table tbody tr:hover,
.sales-products-table tbody tr:hover,
.selected-batches-table tbody tr:hover {
  background-color: #f8fafc;
  transform: scale(1.01);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.products-table tbody tr.released {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
}

.products-table tbody tr.selective {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
}

.batch-table tbody tr.selected-batch {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-left: 4px solid #6366f1;
}

.batch-table a {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-block;
}

.batch-table a:hover,
.batch-table a.selected-link {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.selected-batches-table input[type="number"] {
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  width: 120px;
  transition: all 0.3s ease;
  background: white;
  text-align: center;
}

.selected-batches-table input[type="number"]:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.select-product-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

.select-product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.4);
  background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}

.break-row-btn {
  padding: 8px 12px;
  background: white;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.break-row-btn:hover:not(:disabled) {
  background: #f5f3ff;
  border-color: #7c3aed;
}

.break-row-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.break-row-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.break-row-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 440px;
}

.break-row-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.break-row-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #1e293b;
}

.break-row-modal-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.break-row-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.break-row-product-name {
  margin: 0;
  font-weight: 600;
  color: #334155;
}

.break-row-current-qty {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.break-row-modal-body label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
}

.break-row-qty-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.break-row-qty-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.break-row-hint {
  color: #64748b;
  line-height: 1.4;
}

.break-row-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
}

.break-row-cancel-btn,
.break-row-save-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.break-row-cancel-btn {
  background: #f1f5f9;
  color: #475569;
}

.break-row-save-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
}

.break-row-cancel-btn:disabled,
.break-row-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.proceed-select-col {
  width: 42px;
  text-align: center;
  vertical-align: middle;
}

.proceed-select-col input[type='checkbox'] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.proceed-select-col input[type='checkbox']:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.proceeded-line-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

tr.proceeded-line td {
  opacity: 0.92;
}

.released-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.selective-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.loading-batches {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.no-batches {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-style: italic;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px dashed #cbd5e1;
}

.release-quantity-section {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8fafc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.release-quantity-section label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
}

.release-quantity-section input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 150px;
}

.release-quantity-section input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.available-qty {
  color: #64748b;
  font-size: 0.85rem;
}

.batch-release-actions {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.invoice-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1;
  min-width: 250px;
}

.invoice-input-group label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.invoice-input-group label::after {
  content: '*';
  color: #ef4444;
  font-weight: 700;
}

.invoice-input-group input {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  width: 100%;
  box-sizing: border-box;
}

.invoice-input-group input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.release-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
  height: -webkit-fit-content;
  height: fit-content;
  display: flex;
  align-items: center;
  gap: 8px;
}

.release-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.release-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.sales-products-info {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 8px;
  border-left: 4px solid #6366f1;
}

.sales-products-info p {
  font-weight: 700;
  color: #1e293b;
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sales-products-info p::before {
  content: '📦';
  font-size: 1.2rem;
}

.release-all-btn {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.release-all-btn:hover {
  background-color: #047857;
}

.proceed-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid #e2e8f0;
}

.final-proceed-btn {
  padding: 14px 48px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.final-proceed-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}

.final-proceed-btn:active:not(:disabled) {
  transform: translateY(-1px);
}

.final-proceed-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.proceed-warning {
  color: #dc2626;
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fee2e2;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
}

.proceed-warning::before {
  content: '⚠️';
  font-size: 1.2rem;
}

.proceed-info {
  color: #0369a1;
  font-size: 0.95rem;
  margin: 12px 0 0 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #e0f2fe;
  border-radius: 8px;
  border-left: 4px solid #0284c7;
}

.proceed-info i {
  flex-shrink: 0;
}

.copyright {
  text-align: left;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  .proceed-export-sales-order {
    padding: 16px 20px;
  }

  .proceed-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .proceed-header h1 {
    font-size: 1.5rem;
  }

  .order-details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .batch-release-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .invoice-input-group {
    min-width: 100%;
  }

  .release-btn {
    width: 100%;
  }

  .products-table-container,
  .batch-table-container,
  .sales-products-table-container,
  .selected-batches-table-container {
    overflow-x: scroll;
  }

  .products-table,
  .batch-table,
  .sales-products-table,
  .selected-batches-table {
    min-width: 800px;
  }

  .final-proceed-btn {
    width: 100%;
    padding: 14px 24px;
  }
}


.processing-planning-consignment-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
  box-sizing: border-box;
}

.processing-planning-consignment-header {
  margin-bottom: 20px;
}

.processing-planning-consignment-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 600;
}

.consignment-selector-section {
  margin-bottom: 20px;
}

.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.products-in-process-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.products-in-process-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table-container {
  overflow-x: auto;
  width: 100%;
}

.products-in-process-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 600px;
}

.products-in-process-table thead {
  background-color: #f8fafc;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-in-process-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  background-color: #f8fafc;
}

.products-in-process-table th:first-child {
  min-width: 250px;
}

.products-in-process-table th:nth-child(2) {
  min-width: 150px;
}

.products-in-process-table th:last-child {
  text-align: right;
  font-weight: 700;
  background-color: #e0e7ff;
  color: #3730a3;
}

.products-in-process-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  white-space: nowrap;
}

.products-in-process-table tbody tr:hover {
  background-color: #f8fafc;
}

.products-in-process-table tbody tr:last-child td {
  border-bottom: none;
}

.no-data-cell {
  text-align: center;
  padding: 40px 20px;
}

.no-data-message {
  color: #64748b;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-in-process-table {
    font-size: 0.8rem;
  }

  .products-in-process-table th,
  .products-in-process-table td {
    padding: 8px;
  }
}


.pa-hero-subtitle {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.pa-product-picker-card {
  margin-bottom: 20px;
}

.pa-product-name-selector {
  max-width: 640px;
}

.pa-product-name-selector-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
}

.pa-product-name-dropdown {
  position: relative;
  width: 100%;
}

.pa-product-name-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 40px 10px 12px;
  font-size: 14px;
  text-align: left;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
  color: #0f172a;
  position: relative;
}

.pa-product-name-dropdown-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.pa-product-name-dropdown-trigger.is-placeholder .pa-product-name-dropdown-trigger-text {
  color: #94a3b8;
  font-weight: 400;
}

.pa-product-name-dropdown-trigger-text {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-product-name-dropdown-trigger i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #64748b;
  pointer-events: none;
}

.pa-product-name-dropdown-clear {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  z-index: 2;
}

.pa-product-name-dropdown-clear:hover {
  color: #0f172a;
}

.pa-product-name-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 320px;
  display: flex;
  flex-direction: column;
}

.pa-product-name-dropdown-search-wrap {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.pa-product-name-dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background: #f8fafc;
}

.pa-product-name-dropdown-search:focus {
  outline: none;
  border-color: #4338ca;
}

.pa-product-name-dropdown-options {
  overflow-y: auto;
  max-height: 260px;
}

.pa-product-name-dropdown-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s;
}

.pa-product-name-dropdown-option:hover {
  background-color: #f8fafc;
}

.pa-product-name-dropdown-option.selected {
  background-color: #eef2ff;
}

.pa-product-name-dropdown-option-body {
  flex: 1 1;
  min-width: 0;
}

.pa-product-name-dropdown-option-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.35;
}

.pa-product-name-dropdown-option-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pa-product-name-dropdown-option i.fa-check {
  color: #4338ca;
  flex-shrink: 0;
}

.pa-product-name-dropdown-empty,
.pa-product-name-dropdown-hint {
  padding: 14px 16px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

.pa-product-name-dropdown-hint {
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  background: #f8fafc;
}

.pa-product-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.pa-product-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}

.pa-product-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.pa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 22px;
}

.pa-kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pa-kpi-card .label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.pa-kpi-card .value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.pa-kpi-card .sub {
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.pa-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pa-section-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.pa-section-tab.active {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}

.pa-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 22px;
}

.pa-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

.pa-chart-card h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #0f172a;
}

.pa-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.pa-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pa-detail-table th,
.pa-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  white-space: nowrap;
}

.pa-detail-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.pa-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}

.pa-empty-state i {
  font-size: 42px;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.pa-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  font-size: 13px;
  color: #64748b;
}

.pa-price-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pa-price-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

/* Modern Product Dashboard Styles - Full Width */
.modern-product-dashboard {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.modern-product-dashboard .right_col {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.modern-product-dashboard .title-box {
  margin-bottom: 24px;
  width: 100%;
}

.modern-product-dashboard .title-box h2 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 8px 0;
}

.modern-product-dashboard .title-box p {
  font-size: 16px;
  color: #718096;
  margin: 0;
}

.modern-product-dashboard .search-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

div.search-filter-bar{
  height: 75px;
}

.modern-product-dashboard .search-section {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1 1;
  min-width: 0;
  flex-wrap: wrap;
}

.modern-product-dashboard .search-input-wrapper {
  position: relative;
  flex: 1 1;
  min-width: 200px;
  max-width: 100%;
}

.modern-product-dashboard .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 14px;
}

.modern-product-dashboard .search-input {
  padding: 10px 12px 10px 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
  min-width: 200px;
  max-width: 100%;
  background: white;
  box-sizing: border-box;
}

.modern-product-dashboard .search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-product-dashboard .filter-dropdown {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  min-width: 120px;
}

.modern-product-dashboard .add-product-btn {
  background: #667eea;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.modern-product-dashboard .add-product-btn:hover {
  background: #5a67d8;
  color: white;
}

.modern-product-dashboard .container-box-inner {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 500px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.modern-product-dashboard .table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0;
  box-sizing: border-box;
}

.modern-product-dashboard .table thead th {
  background: #f7fafc;
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.modern-product-dashboard .table thead th:first-child {
  text-align: center;
  width: 80px;
}

.modern-product-dashboard .table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.modern-product-dashboard .table tbody tr.even-row {
  background: white;
}

.modern-product-dashboard .table tbody tr.odd-row {
  background: #f8fafc;
}

.modern-product-dashboard .table tbody tr:hover {
  background: #f1f5f9;
}

.modern-product-dashboard .table tbody td {
  padding: 16px 12px;
  color: #2d3748;
  font-size: 14px;
}

.modern-product-dashboard .sno-cell {
  text-align: center;
  font-weight: 500;
  color: #4a5568;
}

.modern-product-dashboard .type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid #e2e8f0; /* fallback when inline border not provided */
  background: #edf2f7;       /* fallback when inline bg not provided */
  color: #2d3748;            /* fallback when inline fg not provided */
}

.modern-product-dashboard .type-badge.type-extract {
  background: #667eea;
  color: white;
}

.modern-product-dashboard .type-badge.type-powder {
  background: #ed8936;
  color: white;
}

.modern-product-dashboard .type-badge.type-oil {
  background: #38b2ac;
  color: white;
}

.modern-product-dashboard .type-badge.type-liquid {
  background: #4299e1;
  color: white;
}

.modern-product-dashboard .category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid #e2e8f0; /* fallback when inline border not provided */
  background: #edf2f7;       /* fallback when inline bg not provided */
  color: #2d3748;            /* fallback when inline fg not provided */
}

.modern-product-dashboard .category-badge.category-herbal-extract {
  background: #48bb78;
  color: white;
}

.modern-product-dashboard .category-badge.category-herbal-powder {
  background: #ed8936;
  color: white;
}

.modern-product-dashboard .category-badge.category-honey {
  background: #d69e2e;
  color: white;
}

/* Status Badge Styles */
.modern-product-dashboard .status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: capitalize;
}

.modern-product-dashboard .status-badge.received {
  background: #48bb78;
  color: white;
}

.modern-product-dashboard .status-badge.not-received {
  background: #f56565;
  color: white;
}

.modern-product-dashboard .status-badge.status-approved {
  background: #48bb78;
  color: white;
}

.modern-product-dashboard .status-badge.status-pending {
  background: #ed8936;
  color: white;
}

.modern-product-dashboard .status-badge.status-rejected {
  background: #f56565;
  color: white;
}

.modern-product-dashboard .sample-received-cell,
.modern-product-dashboard .approved-status-cell,
.modern-product-dashboard .qc-approval-date-cell,
.modern-product-dashboard .approved-by-cell {
  font-size: 13px;
  white-space: nowrap;
}

.modern-product-dashboard .actions-cell {
  white-space: nowrap;
  width: auto;
  min-width: 120px;
  padding: 8px 12px !important;
}

.modern-product-dashboard .action-buttons {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.modern-product-dashboard .action-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  padding: 0;
}

.modern-product-dashboard .view-btn {
  background: #4299e1;
  color: white;
}

.modern-product-dashboard .view-btn:hover {
  background: #3182ce;
}

.modern-product-dashboard .edit-btn {
  background: #48bb78;
  color: white;
}

.modern-product-dashboard .edit-btn:hover {
  background: #38a169;
}

.modern-product-dashboard .copy-btn {
  background: #17a2b8;
  color: white;
}

.modern-product-dashboard .copy-btn:hover {
  background: #138496;
}

.modern-product-dashboard .delete-btn {
  background: #f56565;
  color: white;
}

.modern-product-dashboard .delete-btn:hover {
  background: #e53e3e;
}

.modern-product-dashboard .pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.modern-product-dashboard .pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4a5568;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.modern-product-dashboard .pagination-btn:hover:not(:disabled) {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.modern-product-dashboard .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modern-product-dashboard .page-info {
  font-size: 14px;
  color: #4a5568;
  font-weight: 500;
}

/* Modal Styles - Global for react-modal */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  padding: 20px !important;
}

.modal-content {
  background: white !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  max-width: 800px !important;
  width: 90% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  position: relative !important;
  outline: none !important;
}

/* Fallback for modern-product-dashboard scoped styles */
.modern-product-dashboard .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modern-product-dashboard .modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* ViewProduct Component Styles */
.view-product-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Ensure modal appears above everything */
.ReactModal__Overlay {
  z-index: 9999 !important;
}

.ReactModal__Content {
  z-index: 10000 !important;
}

.view-product-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.view-product-modal .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

.view-product-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.view-product-modal .modal-close:hover {
  background: #f7fafc;
  color: #4a5568;
}

.view-product-modal .modal-body {
  padding: 0 24px;
}

.view-product-modal .product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 24px;
  gap: 24px;
  margin-bottom: 24px;
}

.view-product-modal .detail-group h3 {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.view-product-modal .detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.view-product-modal .detail-item:last-child {
  border-bottom: none;
}

.view-product-modal .detail-item label {
  font-weight: 500;
  color: #4a5568;
  font-size: 14px;
  min-width: 120px;
}

.view-product-modal .detail-item span {
  color: #2d3748;
  font-size: 14px;
  text-align: right;
  flex: 1 1;
  margin-left: 16px;
}

.view-product-modal .modal-footer {
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.view-product-modal .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.view-product-modal .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.view-product-modal .btn-secondary:hover {
  background: #cbd5e0;
  color: #2d3748;
}

.view-product-modal .type-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.view-product-modal .type-badge.type-extract {
  background: #667eea;
  color: white;
}

.view-product-modal .type-badge.type-powder {
  background: #ed8936;
  color: white;
}

.view-product-modal .type-badge.type-oil {
  background: #38b2ac;
  color: white;
}

.view-product-modal .type-badge.type-liquid {
  background: #4299e1;
  color: white;
}

.modern-product-dashboard .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.modern-product-dashboard .modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

.modern-product-dashboard .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modern-product-dashboard .modal-close:hover {
  background: #f7fafc;
  color: #4a5568;
}

.modern-product-dashboard .modal-body {
  padding: 0 24px;
}

.modern-product-dashboard .product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 24px;
  gap: 24px;
  margin-bottom: 24px;
}

.modern-product-dashboard .detail-group h3 {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.modern-product-dashboard .detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.modern-product-dashboard .detail-item:last-child {
  border-bottom: none;
}

.modern-product-dashboard .detail-item label {
  font-weight: 500;
  color: #4a5568;
  font-size: 14px;
  min-width: 120px;
}

.modern-product-dashboard .detail-item span {
  color: #2d3748;
  font-size: 14px;
  text-align: right;
  flex: 1 1;
  margin-left: 16px;
}

.modern-product-dashboard .modal-footer {
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.modern-product-dashboard .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.modern-product-dashboard .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.modern-product-dashboard .btn-secondary:hover {
  background: #cbd5e0;
  color: #2d3748;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .modern-product-dashboard .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .modern-product-dashboard .search-section {
    width: 100%;
    flex-direction: column;
  }

  .modern-product-dashboard .search-input-wrapper {
    width: 100%;
    min-width: 100%;
  }

  .modern-product-dashboard .search-input {
    width: 100%;
  }

  .modern-product-dashboard .filter-dropdown {
    width: 100%;
  }

  .modern-product-dashboard .action-section {
    margin-left: 0;
  }

  .modern-product-dashboard .add-product-btn {
    width: 100%;
    justify-content: center;
  }

  .modern-product-dashboard .container-box-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modern-product-dashboard .table {
    min-width: 1000px;
  }

  .modern-product-dashboard .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modern-product-dashboard .product-details-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .modern-product-dashboard .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .modern-product-dashboard .detail-item span {
    text-align: left;
    margin-left: 0;
  }
}

/* Loading and Error States */
.modern-product-dashboard .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #6c757d;
}

.modern-product-dashboard .loading-container i {
  font-size: 32px;
  margin-bottom: 16px;
  color: #007bff;
}

.modern-product-dashboard .loading-container p {
  font-size: 16px;
  margin: 0;
}

.modern-product-dashboard .error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-product-dashboard .error-message i {
  font-size: 16px;
}

.modern-product-dashboard .no-data {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.modern-product-dashboard .no-data i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #dee2e6;
}

.modern-product-dashboard .no-data p {
  font-size: 16px;
  margin: 0;
}

@media(max-width: 480px){
  .modern-product-dashboard .action-section {
    margin-left: 0;
    width: 100%;
  }
}

/*========= stat card style ===========*/

div.stat-card{
  display: flex;
  flex-direction: row;
  background: #fff;
}

div.stat-card h3{
  font-size: 24px;
}

div.stat-icon{
  height: 50px;
  width: 50px;
}

div.stats-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
}
/* Purchase Order Analytics — extends SalesOrderAnalytics.css */

.poa-kpi-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

@media (max-width: 1400px) {
  .poa-kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

.poa-kpi-grid .soa-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 88px;
}

.poa-kpi-grid .soa-kpi-label {
  line-height: 1.35;
  min-height: 2.5em;
}

.poa-kpi-grid .soa-kpi-value {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 1.5rem;
  word-break: break-word;
}

.poa-bar-chart-card {
  min-height: 0;
  overflow: visible;
}

.poa-bar-chart-card .recharts-wrapper {
  margin: 0 auto;
}

/* Received Consignment Management Styles - Full Width */

.received-consignment-management {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.received-consignment-header {
  margin-bottom: 30px;
  width: 100%;
}

.received-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

.received-consignment-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.received-consignment-header p {
  font-size: 1rem;
  color: #666;
}

.received-region-banner {
  margin: -10px 0 20px;
  padding: 10px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #1e3a5f;
}

.consignment-status-btn {
  padding: 12px 24px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  white-space: nowrap;
}

.consignment-status-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.consignment-status-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.consignment-status-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.consignment-status-btn i {
  font-size: 1rem;
}

/* Loading State */
.received-consignment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 400px;
}

.received-consignment-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.received-consignment-loading p {
  color: #666;
  font-size: 1rem;
}

/* Selector Section */
.received-consignment-selector {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  align-items: flex-end;
  width: 100%;
}

.received-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 250px;
  flex: 1 1;
  max-width: 100%;
}

.received-selector-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.received-warehouse-select,
.received-consignment-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.received-warehouse-select:hover,
.received-consignment-select:hover {
  border-color: #667eea;
}

.received-warehouse-select:focus,
.received-consignment-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.received-warehouse-select:disabled,
.received-consignment-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.received-warehouse-fixed-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

.received-location-hint {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 8px 0 16px 0;
}

.received-location-hint i {
  margin-right: 6px;
}

/* Messages */
.received-consignment-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.received-consignment-error i {
  font-size: 1.2rem;
}

.received-consignment-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.received-consignment-success i {
  font-size: 1.2rem;
}

/* Empty State */
.received-consignment-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

/* Products Section */
.received-consignment-products {
  margin-top: 30px;
  width: 100%;
}

.received-consignment-products h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.received-products-table-container {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.received-products-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  box-sizing: border-box;
}

.received-products-table thead {
  background-color: #f8f9fa;
}

.received-products-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
  font-size: 0.95rem;
}

.received-products-table th:first-child {
  text-align: center;
  width: 60px;
}

.received-products-table td:first-child {
  text-align: center;
  font-weight: 500;
  color: #666;
}

.received-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #555;
}

.received-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.received-products-table tbody tr:last-child td {
  border-bottom: none;
}

/* Received Quantity Input */
.received-qty-input {
  width: 120px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  text-align: right;
  transition: all 0.3s ease;
}

.received-qty-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.received-qty-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Balance Quantity Input - same styling as Received Qty */
.balance-qty-input {
  width: 120px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  text-align: right;
  transition: all 0.3s ease;
}

.balance-qty-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.balance-qty-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Balance Quantity - read-only (auto-calculated) */
.balance-qty-readonly {
  display: inline-block;
  min-width: 80px;
  padding: 8px 10px;
  font-size: 0.95rem;
  text-align: right;
  color: #374151;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: default;
}

/* Receive Status Button (Blue) */
.receive-status-btn {
  padding: 8px 16px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.receive-status-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.receive-status-btn:active:not(:disabled) {
  transform: translateY(0);
}

.receive-status-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

.receive-status-btn.received {
  background-color: #10b981;
}

.receive-status-btn.received:hover:not(:disabled) {
  background-color: #059669;
}

.receive-status-btn i {
  font-size: 0.9rem;
}

/* Received Status Badge */
.received-status-badge {
  padding: 8px 16px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.received-status-badge i {
  font-size: 0.9rem;
}

/* Receive Button (for quantity update) */
.received-receive-btn {
  padding: 8px 16px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.received-receive-btn:hover:not(:disabled) {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.received-receive-btn:active:not(:disabled) {
  transform: translateY(0);
}

.received-receive-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.received-receive-btn i {
  font-size: 0.9rem;
}

/* Actions Section */
.received-consignment-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.receive-all-btn {
  padding: 12px 24px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  text-align: left;
}

.receive-all-btn:hover:not(:disabled) {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.receive-all-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.receive-all-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.receive-all-btn i {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .received-consignment-management {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .received-consignment-header h2 {
    font-size: 1.5rem;
  }

  .received-header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .consignment-status-btn {
    width: 100%;
    justify-content: center;
  }

  .received-consignment-selector {
    flex-direction: column;
    width: 100%;
  }

  .received-selector-group {
    min-width: 100%;
    width: 100%;
  }

  .received-warehouse-select,
  .received-consignment-select {
    width: 100%;
  }

  .received-products-table-container {
    font-size: 0.9rem;
    width: 100%;
    overflow-x: auto;
  }

  .received-products-table {
    min-width: 1000px;
  }

  .received-products-table th,
  .received-products-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .received-qty-input {
    width: 100%;
    max-width: 120px;
  }

  .received-consignment-actions {
    justify-content: stretch;
  }

  .receive-all-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .received-consignment-management {
    padding: 10px;
  }

  .received-consignment-header h2 {
    font-size: 1.3rem;
  }

  .received-consignment-header p {
    font-size: 0.9rem;
  }

  .received-products-table {
    min-width: 800px;
    font-size: 0.8rem;
  }

  .received-products-table th,
  .received-products-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .receive-status-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}


.received-product-container {
  padding: 30px;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.received-product-content {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.received-product-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.received-product-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.received-product-header p {
  color: #64748b;
  margin: 0;
  font-size: 0.95rem;
}

.received-product-error {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.received-product-error i {
  font-size: 1.2rem;
}

.received-product-success {
  background-color: #d1fae5;
  color: #059669;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.received-product-success i {
  font-size: 1.2rem;
}

.received-product-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column-start: 1; grid-column-end: -1;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-submit {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.btn-submit:hover:not(:disabled) {
  background-color: #2563eb;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-reset {
  background-color: #6b7280;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.btn-reset:hover:not(:disabled) {
  background-color: #4b5563;
}

.btn-reset:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .received-product-container {
    padding: 15px;
  }
  
  .received-product-content {
    padding: 20px;
  }
}


.rejected-export-sales-order {
  padding: 20px 30px;
  max-width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.rejected-export-sales-order-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  text-align: center;
}

.rejected-export-sales-order-region-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.rejected-export-sales-order-region-tab {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #2c3e50;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rejected-export-sales-order-region-tab:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.rejected-export-sales-order-region-tab.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.rejected-export-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.rejected-export-sales-order-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #dc2626;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.rejected-export-sales-order-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rejected-export-sales-order-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-control label {
  font-weight: 500;
  color: #555;
}

.entries-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-control label {
  font-weight: 500;
  color: #555;
}

.search-input {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.rejected-export-sales-order-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.rejected-export-sales-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rejected-export-sales-order-table thead {
  background-color: #f1f5f9;
}

.rejected-export-sales-order-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.rejected-export-sales-order-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.rejected-export-sales-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.rejected-export-sales-order-table .no-data {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-style: italic;
}

.expand-icon-cell {
  width: 40px;
  text-align: center;
}

.expand-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  color: #64748b;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-radius: 4px;
}

.expand-icon:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.expanded-row {
  background-color: #f8fafc;
}

.expanded-content {
  padding: 20px;
}

.expanded-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section {
  background: white;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.detail-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.detail-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.detail-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.rejected {
  background-color: #fee2e2;
  color: #dc2626;
}

.rejected-export-sales-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
}

.pagination-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  color: #475569;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #dc2626;
  color: #dc2626;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #dc2626;
  color: white;
  border-color: #dc2626;
}

.pagination-ellipsis {
  padding: 6px 8px;
  color: #64748b;
  font-size: 0.9rem;
}

.copyright {
  text-align: left;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

/* Action Button Styles */
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: #475569;
}

.action-btn:hover {
  background-color: #f1f5f9;
}

.action-btn.view-btn {
  color: #7c3aed;
  font-weight: 500;
}

.action-btn.view-btn:hover {
  background-color: #ede9fe;
  color: #6d28d9;
}

.action-btn i {
  margin-right: 4px;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.view-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.order-info-section {
  margin-bottom: 30px;
}

.order-info-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.products-section {
  margin-top: 30px;
}

.products-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 15px;
}

.products-table thead {
  background-color: #f1f5f9;
}

.products-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

.products-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.products-table tfoot {
  background-color: #f1f5f9;
  font-weight: 600;
}

.products-table tfoot td {
  padding: 12px 8px;
  color: #1e293b;
}

.no-products {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-style: italic;
}

.view-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 20px;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: #6d28d9;
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .rejected-export-sales-order-table-container {
    overflow-x: scroll;
  }
  
  .rejected-export-sales-order-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }
}


.return-request-sales-order {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.list-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 1 1;
  min-width: 0;
  justify-content: flex-end;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 200px;
  max-width: 100%;
}

.search-container i {
  position: absolute;
  left: 12px;
  color: #666;
}

.search-input {
  padding: 10px 15px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  width: 100%;
  min-width: 200px;
  max-width: 100%;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state i {
  font-size: 64px;
  color: #ccc;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

/* Product Name Selector */
.product-name-selector {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.product-name-selector select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Submit Return Section */
.submit-return-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.submit-return-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Batch Record Section */
.batch-record-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.table-container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entries-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}

.entries-select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.orders-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  box-sizing: border-box;
}

.orders-table thead {
  background-color: #f8f9fa;
}

.orders-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.orders-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #555;
}

.orders-table tbody tr:hover {
  background-color: #f8f9fa;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status-proceeded {
  background-color: #d4edda;
  color: #155724;
}

.status-dispatched {
  background-color: #cfe2ff;
  color: #084298;
}

.status-completed {
  background-color: #d1e7dd;
  color: #0f5132;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.view-btn {
  padding: 6px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.3s;
}

.view-btn:hover {
  background-color: #0056b3;
}

.view-btn i {
  font-size: 12px;
}

.view-product-btn {
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 16px;
}

.view-product-btn:hover {
  background-color: #eff6ff;
  color: #2563eb;
}

.view-product-btn i {
  font-size: 16px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: white;
  color: #333;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #666;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.close-btn:hover {
  background-color: #f8f9fa;
  color: #333;
}

.modal-body {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.close-modal-btn:hover {
  background-color: #5a6268;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.view-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.view-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

/* Batch Number Selector */
.batch-number-selector {
  margin-bottom: 20px;
}

.batch-number-selector label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.batch-number-select {
  padding: 10px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #334155;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 400px;
}

.batch-number-select:hover {
  border-color: #7c3aed;
}

.batch-number-select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Batch Record Section */
.batch-record-section {
  margin-bottom: 30px;
}

.batch-record-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.batch-record-table-container {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.batch-record-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  min-width: 800px;
  box-sizing: border-box;
}

.batch-record-table thead {
  background-color: #f1f5f9;
}

.batch-record-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  border-bottom: 2px solid #e2e8f0;
}

.batch-record-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 14px;
}

.batch-record-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Batch Details Section */
.batch-details-section {
  margin-top: 30px;
}

.batch-details-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.batch-details-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.batch-details-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  min-width: 1000px;
  box-sizing: border-box;
}

.batch-details-table thead {
  background-color: #f1f5f9;
}

.batch-details-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  font-size: 13px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.batch-details-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  white-space: nowrap;
}

.batch-details-table tbody tr:hover {
  background-color: #f8fafc;
}

.receive-icon {
  color: #10b981;
  font-size: 1.2rem;
}

.no-batch-details {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-style: italic;
}

/* Receive Form */
.receive-form-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

.receive-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.receive-form-row {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.receive-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1;
  min-width: 200px;
}

.receive-form-group label {
  font-weight: 600;
  color: #334155;
  font-size: 14px;
}

.receive-form-group input {
  padding: 10px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #334155;
  transition: all 0.2s;
}

.receive-form-group input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.receive-button-group {
  flex: 0 0 auto;
  min-width: auto;
}

.receive-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.receive-btn:hover {
  background-color: #2563eb;
}

.receive-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

/* Copyright */
.copyright {
  text-align: center;
  padding: 20px 0;
  color: #94a3b8;
  font-size: 14px;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .return-request-sales-order {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .list-header h1 {
    font-size: 1.5rem;
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .search-container {
    width: 100%;
    min-width: 100%;
  }

  .search-input {
    width: 100%;
    min-width: 100%;
  }

  .product-name-selector {
    width: 100%;
  }

  .table-container {
    padding: 15px;
    overflow-x: auto;
    width: 100%;
  }

  .orders-table {
    font-size: 12px;
    min-width: 1000px;
  }

  .orders-table th,
  .orders-table td {
    padding: 8px;
    font-size: 0.85rem;
  }

  .view-product-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .pagination-info {
    text-align: center;
    width: 100%;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    width: 100%;
  }

  .batch-record-table {
    min-width: 800px;
    font-size: 0.85rem;
  }

  .batch-details-table {
    min-width: 900px;
    font-size: 0.8rem;
  }

  .receive-form-row {
    flex-direction: column;
  }

  .receive-button-group {
    width: 100%;
  }

  .receive-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .return-request-sales-order {
    padding: 10px;
  }

  .list-header h1 {
    font-size: 1.3rem;
  }

  .table-container {
    padding: 10px;
  }

  .orders-table {
    min-width: 800px;
    font-size: 0.75rem;
  }

  .orders-table th,
  .orders-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .view-product-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: 36px;
  }

  .batch-record-table {
    min-width: 700px;
    font-size: 0.75rem;
  }

  .batch-details-table {
    min-width: 800px;
    font-size: 0.7rem;
  }

  .batch-details-table th,
  .batch-details-table td {
    padding: 8px 6px;
    font-size: 0.7rem;
  }
}

.return-context-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 12px 20px;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f0f4ff;
  border: 1px solid #c5d4f7;
  border-radius: 8px;
}

.return-context-summary .context-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5a6b8c;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.return-context-summary .context-item span {
  font-size: 15px;
  font-weight: 600;
  color: #1a2b4a;
}

.return-context-summary .stock-type-trading span {
  color: #0d6efd;
}

.return-context-summary .stock-type-in-house span {
  color: #198754;
}

/* Searchable product name dropdown (Return Request page) */
.product-name-selector {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.product-name-selector-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.product-name-dropdown {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.product-name-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 36px 10px 12px;
  font-size: 14px;
  text-align: left;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  color: #333;
  position: relative;
}

.product-name-dropdown-trigger.is-placeholder .product-name-dropdown-trigger-text {
  color: #999;
  font-weight: 400;
}

.product-name-dropdown-trigger-text {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-name-dropdown-trigger i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  pointer-events: none;
}

.product-name-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  margin-top: 4px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  display: flex;
  flex-direction: column;
}

.product-name-dropdown-search-wrap {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.product-name-dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.product-name-dropdown-search:focus {
  outline: none;
  border-color: #007bff;
}

.product-name-dropdown-options {
  overflow-y: auto;
  max-height: 240px;
}

.product-name-dropdown-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  background: white;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.15s;
}

.product-name-dropdown-option:hover {
  background-color: #f5f5f5;
}

.product-name-dropdown-option.selected {
  background-color: #e3f2fd;
}

.product-name-dropdown-option-title {
  flex: 1 1;
  font-weight: 500;
  line-height: 1.35;
}

.product-name-dropdown-option i.fa-check {
  color: #3b82f6;
  flex-shrink: 0;
}

.product-name-dropdown-empty {
  padding: 16px;
  color: #999;
  text-align: center;
  font-size: 14px;
  font-style: italic;
}

.soa-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  .soa-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    color: #fff;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 40px rgba(49, 46, 129, 0.25);
  }
  
  .soa-hero h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  .soa-hero p {
    margin: 0;
    opacity: 0.88;
    font-size: 0.92rem;
  }

  .soa-main-tabs,
  .soa-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .soa-main-tab,
  .soa-sub-tab {
    border: 1px solid #c7d2fe;
    background: #fff;
    color: #3730a3;
    border-radius: 10px;
    padding: 0.55rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
  }

  .soa-main-tab.active,
  .soa-sub-tab.active {
    background: linear-gradient(135deg, #312e81, #4338ca);
    color: #fff;
    border-color: #4338ca;
    box-shadow: 0 4px 14px rgba(67, 56, 202, 0.25);
  }

  .soa-sub-tabs {
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
  }

  .soa-segment-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-right: 0.5rem;
  }
  
  .soa-filters {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
  }
  
  .soa-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-gap: 0.75rem;
    gap: 0.75rem;
    align-items: end;
  }
  
  .soa-filters label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
  }
  
  .soa-filters input,
  .soa-filters select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
  }

  .soa-product-combobox {
    position: relative;
  }

  .soa-product-combobox-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }

  .soa-product-combobox-input {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
  }

  .soa-product-combobox-clear,
  .soa-product-combobox-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    line-height: 1;
  }

  .soa-product-combobox-clear {
    right: 1.6rem;
    font-size: 1.1rem;
  }

  .soa-product-combobox-toggle {
    right: 0.35rem;
    font-size: 0.75rem;
  }

  .soa-product-combobox-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  .soa-product-combobox-option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: none;
    background: #fff;
    color: #0f172a;
    text-align: left;
    font-size: 0.82rem;
    cursor: pointer;
  }

  .soa-product-combobox-option:hover,
  .soa-product-combobox-option.selected {
    background: #eef2ff;
    color: #312e81;
  }

  .soa-product-combobox-empty {
    padding: 0.75rem;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
  }
  
  .soa-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    align-items: center;
  }
  
  .soa-period-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .soa-pill {
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
  }
  
  .soa-pill.active,
  .soa-pill:hover {
    background: #4338ca;
    color: #fff;
    border-color: #4338ca;
  }
  
  .soa-btn {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  
  .soa-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }
  
  .soa-btn-primary {
    background: #4338ca;
    color: #fff;
  }
  
  .soa-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
  }
  
  .soa-btn-export {
    background: #059669;
    color: #fff;
  }
  
  .soa-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-gap: 1rem;
    gap: 1rem;
    margin-bottom: 1.25rem;
    width: 100%;
    align-items: stretch;
  }
  
  .soa-kpi-card {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: visible;
    min-width: 0;
  }
  
  .soa-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
    background: var(--soa-accent, #6366f1);
  }
  
  .soa-kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  
  .soa-kpi-value {
    font-size: clamp(0.95rem, 0.85rem + 0.45vw, 1.65rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0.35rem 0 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }
  
  .soa-kpi-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
  }
  
  .soa-period-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-gap: 0.75rem;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  
  .soa-period-card {
    background: linear-gradient(145deg, #f8fafc, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    text-align: center;
  }
  
  .soa-period-card strong {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
  }
  
  .soa-period-card span {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
  }
  
  .soa-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 1rem;
    gap: 1rem;
    margin-bottom: 1.25rem;
    width: 100%;
  }
  
  .soa-chart-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    min-height: 280px;
  }
  
  .soa-chart-card.full-width {
    grid-column: 1 / -1;
  }
  
  .soa-chart-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
  }
  
  .soa-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
  }
  
  .soa-tab {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
  }
  
  .soa-tab.active {
    background: #4338ca;
    color: #fff;
    border-color: #4338ca;
  }
  
  .soa-table-wrap {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    margin-bottom: 1.25rem;
  }
  
  .soa-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
    justify-content: space-between;
  }
  
  .soa-table-scroll {
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
  }
  
  .soa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
  }
  
  .soa-table thead {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
  }
  
  .soa-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    border-bottom: 2px solid #e2e8f0;
    cursor: pointer;
    -webkit-user-select: none;
            user-select: none;
  }
  
  .soa-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
  }
  
  .soa-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .soa-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
  }
  
.soa-badge-domestic { background: #dbeafe; color: #1d4ed8; }
.soa-badge-export { background: #fef3c7; color: #b45309; }
.soa-badge-export_usa { background: #fef3c7; color: #b45309; }
.soa-badge-export_eu { background: #ede9fe; color: #6d28d9; }
  
  .soa-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.82rem;
  }
  
  .soa-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
  }
  
  .soa-loading {
    text-align: center;
    padding: 2rem;
    color: #64748b;
  }
  
  .soa-export-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  @media (max-width: 1024px) {
    .soa-charts-grid {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 640px) {
    .soa-kpi-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .soa-hero h1 {
      font-size: 1.25rem;
    }
  }

  .soa-btn-view {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
    cursor: pointer;
    font-weight: 600;
  }

  .soa-btn-view:hover {
    background: #e0e7ff;
  }

  .soa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
  }

  .soa-modal {
    background: #fff;
    border-radius: 12px;
    width: min(960px, 100%);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  }

  .soa-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .soa-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
  }

  .soa-modal-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
  }

  .soa-modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
  }

  .soa-modal-close:hover {
    color: #0f172a;
  }

  .soa-modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.82rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
  }

  .soa-modal-meta-note {
    color: #64748b;
    font-size: 0.75rem;
  }

  .soa-modal-table-scroll {
    overflow: auto;
    padding: 0 1.25rem 1.25rem;
  }

  .soa-modal-table {
    margin-top: 0.75rem;
  }

  .soa-modal-table th {
    cursor: default;
  }
  
.search-by-batch-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
}

.search-by-batch-header {
  margin-bottom: 30px;
}

.search-by-batch-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.batch-selector-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.batch-select-button {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: border-color 0.2s;
}

.batch-select-button:hover {
  border-color: #3b82f6;
}

.batch-select-button i {
  color: #666;
  font-size: 12px;
}

.batch-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.batch-search-input-wrapper {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.batch-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.batch-search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.batch-dropdown-list {
  overflow-y: auto;
  max-height: 250px;
}

.batch-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.batch-dropdown-item:hover {
  background-color: #f3f4f6;
}

.batch-dropdown-item.selected {
  background-color: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

.batch-dropdown-item.no-results {
  color: #666;
  cursor: default;
  font-style: italic;
}

.error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.batch-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .top-details-row {
    grid-template-columns: 1fr;
  }
}

.product-details-section,
.document-details-section,
.product-record-section,
.msds-section,
.export-sales-orders-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-details-section {
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.document-details-section .document-table-container {
  flex: 1 1;
  overflow-y: auto;
}

.no-documents-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
}

.no-documents-message i {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 10px;
}

.product-details-section h3,
.document-details-section h3,
.product-record-section h3,
.msds-section h3,
.export-sales-orders-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.yes-badge {
  color: #059669;
  font-weight: 600;
}

.no-badge {
  color: #dc2626;
  font-weight: 600;
}

.document-table-container,
.product-record-table-container {
  overflow-x: auto;
}

.document-table,
.product-record-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.product-record-table tbody tr.expanded-details-row {
  background-color: #f9fafb;
}

.product-record-table tbody tr.expanded-details-row td {
  padding: 0;
  border-top: none;
}

.expanded-details-container {
  padding: 20px;
  background-color: #f9fafb;
}

.expanded-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.expanded-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.expanded-detail-item label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expanded-detail-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.document-table thead,
.product-record-table thead {
  background: #f3f4f6;
}

.document-table th,
.product-record-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  border-bottom: 2px solid #e5e7eb;
}

.document-table td,
.product-record-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #666;
  font-size: 14px;
}

.document-table tbody tr:hover,
.product-record-table tbody tr:hover {
  background: #f9fafb;
}

.view-document-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-document-btn:hover {
  background: #2563eb;
}

.section-hint {
  margin: -10px 0 15px 0;
  color: #666;
  font-size: 13px;
  font-style: italic;
}

.no-data-message {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #666;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .product-details-grid {
    grid-template-columns: 1fr;
  }

  .document-table-container,
  .product-record-table-container {
    overflow-x: scroll;
  }
}


.search-by-consignment-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
  box-sizing: border-box;
}

.search-by-consignment-header {
  margin-bottom: 20px;
}

.search-by-consignment-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 600;
}

.consignment-selector-section {
  margin-bottom: 20px;
}

.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.consignment-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Consignment Info Section */
.consignment-info-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-info-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.consignment-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-complete {
  background-color: #d1fae5;
  color: #065f46;
}

.status-under-processing,
.status-under-process {
  background-color: #fef3c7;
  color: #92400e;
}

.status-in-transit {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-forwarded-to-qc,
.status-forwarded-to-logistic {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* Document List Section */
.consignment-documents-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-documents-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.document-table-container {
  overflow-x: auto;
}

.document-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.document-table thead {
  background-color: #f8fafc;
}

.document-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.document-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.document-table tbody tr:hover {
  background-color: #f8fafc;
}

.download-document-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
}

.download-document-btn:hover {
  background-color: #2563eb;
}

/* Status History Section */
.consignment-status-history-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-status-history-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.status-history-table-container {
  overflow-x: auto;
}

.status-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.status-history-table thead {
  background-color: #f8fafc;
}

.status-history-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.status-history-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.status-history-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Products Section */
.consignment-products-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignment-products-section h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.products-table-container {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.products-table thead {
  background-color: #f8fafc;
}

.products-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.products-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.products-table tbody tr:hover {
  background-color: #f8fafc;
}

.no-data-message {
  background-color: #f1f5f9;
  color: #64748b;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .consignment-info-grid {
    grid-template-columns: 1fr;
  }

  .document-table,
  .status-history-table,
  .products-table {
    font-size: 0.8rem;
  }

  .document-table th,
  .document-table td,
  .status-history-table th,
  .status-history-table td,
  .products-table th,
  .products-table td {
    padding: 8px;
  }
}


.search-by-product-container {
  padding: 20px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
}

.search-by-product-header {
  margin-bottom: 30px;
}

.search-by-product-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.product-selector-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.product-select-button {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: border-color 0.2s;
}

.product-select-button:hover {
  border-color: #3b82f6;
}

.product-select-button i {
  color: #666;
  font-size: 12px;
}

.product-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-search-input-wrapper {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.product-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.product-search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.product-dropdown-list {
  overflow-y: auto;
  max-height: 250px;
}

.product-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.product-dropdown-item:hover {
  background-color: #f3f4f6;
}

.product-dropdown-item.selected {
  background-color: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

.product-dropdown-item.no-results {
  color: #666;
  cursor: default;
  font-style: italic;
}

.error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.product-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-records-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-records-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.product-records-table-container {
  overflow-x: auto;
}

.product-records-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.product-records-table thead {
  background: #f3f4f6;
}

.product-records-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.product-records-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #666;
  font-size: 14px;
}

.product-records-table tbody tr:hover {
  background: #f9fafb;
}

.view-details-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-details-btn:hover {
  background: #2563eb;
}

.no-data-cell {
  text-align: center;
  padding: 40px 20px;
}

.no-data-message {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #666;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.batch-number-link {
  color: #3b82f6;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.batch-number-link:hover {
  color: #2563eb;
  text-decoration: none;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background-color: #f3f4f6;
  color: #333;
}

.modal-body {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-detail-item label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-detail-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  word-break: break-word;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.modal-close-button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.modal-close-button:hover {
  background: #2563eb;
}

/* View Modal Styles - Matching ExportPendingSalesOrder */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.view-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.order-info-section {
  margin-bottom: 30px;
}

.order-info-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.info-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
}

.info-item span {
  color: #1e293b;
  font-size: 0.95rem;
}

.view-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 20px;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: #6d28d9;
}

@media (max-width: 768px) {
  .product-records-table-container {
    overflow-x: scroll;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
    width: 95%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}


.state-list-page {
  padding: 20px;
}

.state-list-header h2 {
  margin: 0 0 6px;
}

.state-list-header p {
  margin: 0 0 16px;
  color: #666;
}

.state-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.state-alert-error {
  background: #fdecec;
  color: #b91c1c;
  border: 1px solid #f5c2c7;
}

.state-alert-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.state-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.state-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.state-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.state-form-group label {
  font-size: 13px;
  font-weight: 600;
}

.state-form-group input,
.state-form-group select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.state-form-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.state-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.state-btn.primary {
  background: #4f46e5;
  color: #fff;
}

.state-btn.secondary {
  background: #6b7280;
  color: #fff;
}

.state-btn.edit {
  background: #0ea5e9;
  color: #fff;
}

.state-btn.danger {
  background: #dc2626;
  color: #fff;
}

.state-search-row {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.state-search-row input {
  width: 100%;
  max-width: 360px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.state-loading {
  padding: 18px 0;
}

.state-table-wrapper {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.state-table {
  width: 100%;
  border-collapse: collapse;
}

.state-table th,
.state-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.state-table th {
  background: #f8fafc;
  font-weight: 600;
}

.state-empty {
  text-align: center !important;
  color: #64748b;
  padding: 20px !important;
}

.state-row-actions {
  display: flex;
  gap: 6px;
}

@media (max-width: 900px) {
  .state-form-grid {
    grid-template-columns: 1fr;
  }

  .state-search-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Stock Management Styles */

.stock-management {
  padding: 20px 30px;
  width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.stock-management-header {
  margin-bottom: 30px;
}

.stock-management-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Loading State */
.stock-management-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 400px;
}

.stock-management-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.stock-management-loading p {
  color: #666;
  font-size: 1rem;
}

/* Selector Section */
.stock-management-selector {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 250px;
}

.stock-selector-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.stock-warehouse-select,
.stock-consignment-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.stock-warehouse-select:hover,
.stock-consignment-select:hover {
  border-color: #667eea;
}

.stock-warehouse-select:focus,
.stock-consignment-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.stock-warehouse-select:disabled,
.stock-consignment-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Error Message */
.stock-management-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-management-error i {
  font-size: 1.2rem;
}

/* Empty State */
.stock-management-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Content Section */
.stock-management-content {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header Controls */
.stock-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.stock-controls-left {
  display: flex;
  align-items: center;
}

.stock-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
}

.stock-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.stock-controls-center {
  display: flex;
  align-items: center;
}

.stock-total-display {
  background-color: #ffeb3b;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-controls-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.stock-export-btn,
.stock-print-btn {
  padding: 10px 20px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.stock-export-btn:hover:not(:disabled),
.stock-print-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.stock-export-btn:disabled,
.stock-print-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

.stock-search-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-search-container label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.stock-search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  min-width: 200px;
  transition: all 0.3s ease;
}

.stock-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Table Wrapper */
.stock-table-wrapper {
  margin-top: 20px;
}

.stock-entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #333;
}

.stock-entries-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  background-color: white;
  cursor: pointer;
}

.stock-entries-select:focus {
  outline: none;
  border-color: #667eea;
}

/* Table Container */
.stock-table-container {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  background: white;
}

.stock-table thead {
  background-color: #f8f9fa;
}

.stock-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
  font-size: 0.95rem;
}

.stock-table th:first-child {
  width: 50px;
  text-align: center;
}

.stock-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #555;
}

.stock-table tbody tr:hover {
  background-color: #f8f9fa;
}

.stock-table tbody tr:last-child td {
  border-bottom: none;
}

.stock-expand-icon {
  text-align: center;
  color: #667eea;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.stock-expand-icon:hover {
  color: #764ba2;
  transform: scale(1.1);
}

.stock-product-row {
  background-color: white;
}

.stock-product-row:hover {
  background-color: #f8f9fa;
}

.stock-batch-header-row {
  background-color: #f8f9fa;
}

.stock-batch-header-row td {
  padding: 0 !important;
  border: none !important;
}

.stock-batch-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  margin: 0;
}

.stock-batch-table thead {
  background-color: #e9ecef;
}

.stock-batch-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
}

.stock-batch-table th:first-child {
  text-align: left;
  white-space: nowrap;
}

.stock-batch-table td {
  padding: 10px 12px !important;
  border-bottom: 1px solid #eee;
  color: #555;
  font-size: 0.9rem;
  text-align: left;
}

/*.stock-batch-table td:first-child {
  padding-left: 40px;
}*/

.stock-batch-row {
  background-color: white;
}

.stock-batch-row:hover {
  background-color: #f1f3f5;
}

.stock-batch-row:last-child td {
  border-bottom: 1px solid #ddd;
}

.stock-ledger-detail-row {
  background-color: #fff;
}

.stock-ledger-detail-row > td {
  padding: 0 0 8px 28px !important;
  border-bottom: 1px solid #ddd;
}

.stock-ledger-nested-table {
  margin: 4px 0 8px;
  border: 1px solid #e5e7eb;
}

.stock-ledger-nested-table thead {
  background-color: #f3f4f6;
}

.stock-ledger-loading,
.stock-ledger-empty,
.stock-ledger-error {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #555;
}

.stock-ledger-error {
  color: #b91c1c;
}

.stock-batch-actions {
  white-space: nowrap;
}

.stock-batch-actions .stock-ledger-report-btn,
.stock-batch-actions .stock-trading-documents-view-btn {
  vertical-align: middle;
}

.stock-batch-actions .stock-trading-documents-view-btn {
  margin-left: 8px;
}

.stock-trading-documents-view-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #2563eb;
  font-size: 1.1rem;
  line-height: 1;
}

.stock-trading-documents-view-btn:hover {
  color: #1d4ed8;
}

.stock-trading-documents-modal-table {
  width: 100%;
}

.stock-trading-documents-modal-table th,
.stock-trading-documents-modal-table td {
  padding: 8px 10px;
  text-align: left;
}

.stock-ledger-report-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #6c5ce7;
  font-size: 1.1rem;
  line-height: 1;
}

.stock-ledger-report-btn:hover {
  color: #5a4fcf;
}

.stock-ledger-modal {
  max-width: min(1100px, 96vw);
  width: 100%;
}

.stock-ledger-modal-table {
  width: 100%;
}

.stock-ledger-modal-table th,
.stock-ledger-modal-table td {
  white-space: nowrap;
}

.stock-ledger-modal-table .stock-ledger-table-footer td {
  border-top: 2px solid #dee2e6;
  background: #f8f9fa;
  font-weight: 600;
}

.ledger-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.ledger-status-added {
  background: #e8f4fd;
  color: #0d6efd;
}

.ledger-status-released {
  background: #fff3cd;
  color: #856404;
}

.ledger-status-returned {
  background: #d4edda;
  color: #155724;
}

.ledger-status-default {
  background: #f0f0f0;
  color: #333;
}

/* Pagination */
.stock-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 15px;
}

.stock-pagination-info {
  font-size: 0.95rem;
  color: #666;
}

.stock-pagination-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  min-width: 40px;
}

.stock-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #667eea;
}

.stock-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stock-pagination-btn.active {
  background-color: #667eea;
  color: white;
  border-color: #667eea;
}

.stock-pagination-btn.active:hover {
  background-color: #5568d3;
}

.stock-pagination-ellipsis {
  padding: 8px 4px;
  color: #666;
  font-size: 0.9rem;
}

/* table down icon color */
.down-icon{
  color: #764ba2;
  font-size: 20px;
}

.up-icon{
  color: #5b21b6;
  font-size: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .stock-controls-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stock-controls-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .stock-management {
    padding: 15px;
  }

  .stock-management-header h1 {
    font-size: 2rem;
  }

  .stock-management-selector {
    flex-direction: column;
  }

  .stock-selector-group {
    min-width: 100%;
  }

  .stock-controls-header {
    flex-direction: column;
    align-items: stretch;
  }

  .stock-controls-right {
    flex-direction: column;
    width: 100%;
  }

  .stock-export-btn,
  .stock-print-btn {
    width: 100%;
  }

  .stock-search-container {
    width: 100%;
  }

  .stock-search-input {
    flex: 1 1;
    min-width: auto;
  }

  .stock-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .stock-pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .stock-table-container {
    font-size: 0.9rem;
  }

  .stock-table th,
  .stock-table td {
    padding: 10px 12px;
  }

  #warehouse-select{
    width: 260px;
  }
}

@media (max-width: 480px) {
  .stock-management-header h1 {
    font-size: 1.5rem;
  }

  .stock-total-display {
    font-size: 1rem;
    padding: 10px 15px;
  }

  .stock-export-btn,
  .stock-print-btn {
    font-size: 0.85rem;
    padding: 8px 15px;
  }

}

/* Consignment History Modal */
.stock-batch-row-clickable {
  cursor: pointer;
}
.stock-batch-row-clickable:hover {
  background-color: #f0f4ff !important;
}

.stock-history-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.stock-history-modal {
  background: white;
  border-radius: 8px;
  max-width: 95%;
  width: 900px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.stock-history-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.stock-history-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}
.stock-history-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
}
.stock-history-modal-close:hover {
  color: #1e293b;
}
.stock-history-modal-subtitle {
  padding: 10px 20px;
  font-size: 0.9rem;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.stock-ledger-modal-search {
  padding: 12px 20px;
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
  justify-content: flex-end;
}
.stock-history-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}
.stock-history-loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}
.stock-history-empty {
  text-align: center;
  padding: 40px;
  color: #64748b;
}
.stock-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.stock-history-table th,
.stock-history-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.stock-history-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}
.stock-history-table tbody tr:hover {
  background: #f8fafc;
}

.stock-history-table .swsr-remark-col {
  min-width: 320px;
  max-width: 480px;
  width: 36%;
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
  line-height: 1.4;
}
.stock-history-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}
.stock-history-status-pending { background: #fef3c7; color: #92400e; }
.stock-history-status-proceeded { background: #d1fae5; color: #065f46; }
.stock-history-status-returned { background: #fee2e2; color: #991b1b; }

.stock-report-container {
  width: 100%;
  padding: 0;
}

.stock-report-table-container {
  width: 100%;
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
}

.stock-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background-color: white;
}

.stock-report-table thead {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #f3f4f6;
}

.stock-report-table th {
  background-color: #059669;
  color: white;
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #ddd;
  white-space: nowrap;
  font-size: 0.8rem;
}

.stock-report-table td {
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.stock-report-table tbody tr {
  transition: background-color 0.2s;
}

.stock-report-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.stock-report-table tbody tr:hover {
  background-color: #f3f4f6;
}

.stock-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
}

.stock-report-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.stock-report-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
  border-radius: 6px;
  margin: 20px;
}

.stock-report-error i {
  font-size: 1.2rem;
}

.stock-report-empty {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 1rem;
}

/* Subwarehouse Stock Management — page-specific UI (does not affect other modules) */

.sws-page .success-message {
  background-color: #c6f6d5;
  color: #22543d;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sws-page .success-message i {
  font-size: 20px;
}

.sws-page .filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px 20px;
  gap: 16px 20px;
}

.sws-page .filters-card-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sws-page .filters-card-title i {
  color: #667eea;
}

.sws-page .filter-group {
  min-width: 0;
}

.sws-page .filter-group input,
.sws-page .filter-group select {
  width: 100%;
  box-sizing: border-box;
}

.sws-page .filter-group input::placeholder {
  color: #a0aec0;
}

.sws-page .table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.sws-page .table-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
}

.sws-page .table-card-header .record-count {
  font-size: 13px;
  color: #718096;
}

/* Table layout — prevent column crush and vertical text stacking */
.sws-page .table-wrapper {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.sws-page .records-table {
  width: 100%;
  table-layout: auto;
}

.sws-page.sws-report-page .records-table {
  min-width: 1200px;
}

.sws-page.sws-stock-page .records-table {
  min-width: 1050px;
}

.sws-page .records-table th,
.sws-page .records-table td {
  vertical-align: middle;
  padding: 10px 12px;
}

.sws-page .records-table .col-id {
  min-width: 52px;
}

.sws-page .records-table .col-stock-id {
  min-width: 76px;
}

.sws-page .records-table .col-date {
  min-width: 96px;
}

.sws-page .records-table .col-type,
.sws-page .records-table .col-txn {
  min-width: 88px;
}

.sws-page .records-table .col-arn {
  min-width: 130px;
}

.sws-page .records-table .col-product {
  min-width: 180px;
  max-width: 280px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.45;
  -webkit-hyphens: auto;
          hyphens: auto;
}

.sws-page .records-table th.col-product {
  white-space: normal;
}

.sws-page .records-table .col-remark {
  min-width: 120px;
  max-width: 200px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.45;
}

.sws-page .records-table th.col-remark {
  white-space: normal;
}

.sws-page .records-table .col-qty {
  min-width: 80px;
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sws-page .records-table th.col-qty {
  text-align: right;
  white-space: nowrap;
}

.sws-page .records-table .col-actions {
  min-width: 148px;
  width: auto;
  white-space: nowrap;
}

.sws-page .records-table .col-batch,
.sws-page .records-table .col-warehouse,
.sws-page .records-table .col-subwarehouse,
.sws-page .records-table .col-country {
  min-width: 100px;
  max-width: 160px;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.sws-page .records-table .action-buttons {
  flex-wrap: nowrap;
}

.sws-page .records-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.sws-page .records-table tbody tr:hover {
  background: #f1f5f9;
}

.sws-page .stock-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sws-page .stock-type-inhouse {
  background: #dbeafe;
  color: #1e40af;
}

.sws-page .stock-type-trading {
  background: #d1fae5;
  color: #065f46;
}

.sws-page .txn-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.sws-page .txn-inward {
  background: #dcfce7;
  color: #166534;
}

.sws-page .txn-outward {
  background: #fee2e2;
  color: #991b1b;
}

.sws-page .empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #718096;
}

.sws-page .empty-state i {
  font-size: 36px;
  margin-bottom: 12px;
  color: #cbd5e0;
}

.sws-page .empty-state p {
  margin: 0;
  font-size: 14px;
}

.sws-page .pagination-bar {
  margin-top: 4px;
}

.sws-page .pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sws-page .pagination-bar select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

/* Modal — 4-column form layout */
.sws-modal-dialog {
  width: min(1180px, 96vw);
  max-height: 92vh;
}

.sws-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 18px 20px;
  gap: 18px 20px;
  align-items: start;
}

.sws-form-grid .tsr-admin-form-group {
  min-width: 0;
  width: 100%;
}

.sws-form-grid .tsr-admin-form-group input,
.sws-form-grid .tsr-admin-form-group select,
.sws-form-grid .tsr-admin-form-group textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
}

.sws-form-grid .tsr-admin-form-group.full-width {
  grid-column: 1 / -1;
}

.sws-form-grid .tsr-admin-form-group label .required {
  color: #e53e3e;
  margin-left: 2px;
}

.sws-form-grid .tsr-admin-form-group input:read-only,
.sws-form-grid .tsr-admin-form-group input[readonly] {
  background: #f7fafc;
  color: #718096;
  cursor: not-allowed;
}

.sws-form-grid .tsr-admin-form-group select:disabled {
  background: #f7fafc;
  color: #a0aec0;
  cursor: not-allowed;
}

/* Searchable product dropdown */
.sws-product-dropdown-field {
  position: relative;
}

.sws-product-dropdown-field.is-open {
  z-index: 30;
}

.sws-product-dropdown {
  position: relative;
  width: 100%;
}

.sws-product-dropdown-btn {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  text-align: left;
  padding: 10px 36px 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #718096;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sws-product-dropdown-btn.has-value {
  color: #1a202c;
}

.sws-product-dropdown-btn:hover,
.sws-product-dropdown-btn:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.sws-product-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1;
}

.sws-product-dropdown-btn i {
  font-size: 11px;
  color: #718096;
  flex-shrink: 0;
}

.sws-product-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  z-index: 40;
  max-height: 280px;
  display: flex;
  flex-direction: column;
}

.sws-product-dropdown-search-wrap {
  position: relative;
  padding: 10px;
  border-bottom: 1px solid #edf2f7;
}

.sws-product-dropdown-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 12px;
  pointer-events: none;
}

.sws-product-dropdown-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 32px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.sws-product-dropdown-search:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.sws-product-dropdown-list {
  overflow-y: auto;
  max-height: 220px;
}

.sws-product-dropdown-item {
  width: 100%;
  padding: 10px 14px;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid #f7fafc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #2d3748;
  text-align: left;
  transition: background-color 0.15s;
}

.sws-product-dropdown-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sws-product-dropdown-item:hover {
  background-color: #f7fafc;
}

.sws-product-dropdown-item.selected {
  background-color: #ebf4ff;
  color: #2b6cb0;
  font-weight: 600;
}

.sws-product-dropdown-item.selected i {
  color: #2b6cb0;
  flex-shrink: 0;
}

.sws-product-dropdown-empty {
  padding: 16px;
  color: #a0aec0;
  text-align: center;
  font-size: 13px;
  font-style: italic;
}

.sws-modal-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sws-modal-alert.error {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #feb2b2;
}

.sws-modal-header h2,
.sws-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
}

.sws-modal-footer .btn-primary i,
.sws-modal-footer .btn-secondary i {
  margin-right: 6px;
}

@media (max-width: 1100px) {
  .sws-page .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sws-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sws-page .filters-grid,
  .sws-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sws-page .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .sws-page .pagination-controls {
    justify-content: center;
  }
}

/* Supplier Dashboard Styles */
.supplier-dashboard {
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-box h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
}

.add-supplier-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.add-supplier-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

/* Stats Container */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
/*
.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) .stat-icon {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}*/

.stat-content h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
}

.stat-content p {
  margin: 4px 0 0 0;
  color: #7f8c8d;
  font-size: 14px;
  font-weight: 500;
}

/* Search Section (aligned with Buyers page) */
.search-section {
  margin-bottom: 20px;
}

.supplier-search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.supplier-location-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.supplier-location-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.supplier-location-filter-select {
  padding: 11px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #2c3e50;
  min-width: 160px;
  cursor: pointer;
}

.supplier-location-filter-select:focus {
  outline: none;
  border-color: #667eea;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 14px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
  color: #6c757d;
}

/* Container Box */
.container-box-inner {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* Table Wrapper for Horizontal Scroll */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Table Styles */
div.table {
  border-collapse: collapse;
  margin: 0;
}

.table th:first-child{
  max-width: 1%;
}
.table th {
  background: #f8f9fa;
  padding: 16px 5px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e9ecef;
  font-size: 14px;
  width: 1% !important;
  white-space: nowrap;
}

.table th.sortable-header {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.table th.sortable-header:hover {
  background-color: #e9ecef;
}

.table th.sortable-header span {
  margin-right: 8px;
}

.table th.sortable-header i {
  font-size: 12px;
  color: #667eea;
  margin-left: 4px;
}

.table th.sortable-header i.sort-inactive {
  color: #adb5bd;
  opacity: 0.5;
}

.table th.sortable-header:hover i.sort-inactive {
  opacity: 1;
  color: #667eea;
}

.table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.table td:last-child {
  white-space: nowrap;
  width: 1%;
  display: flex;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Company Info */
.company-info strong {
  display: block;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 4px;
}

.company-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* Contact Info */
.contact-info strong {
  display: block;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* Location Info */
.location-info {
  display: flex;
  flex-direction: column;
}

.location-info span {
  color: #2c3e50;
  font-weight: 500;
}

.location-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-badge.cancelled {
  background: #e2e3e5;
  color: #383d41;
}

/* Action Buttons — scoped to override global App.css .action-btn */
.supplier-dashboard .action-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-width: -webkit-fit-content;
  min-width: fit-content;
}

.supplier-dashboard .action-buttons .action-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  max-width: 32px;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #f3f4f6;
  color: inherit;
  padding: 0;
  box-shadow: none;
  transform: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.supplier-dashboard .action-buttons .action-btn:hover {
  background: #e5e7eb;
  border-color: #94a3b8;
  color: inherit;
  box-shadow: none;
  transform: none;
}

.supplier-dashboard .action-buttons .action-btn:active {
  transform: none;
}

.supplier-dashboard .action-buttons .action-btn .fa-eye {
  color: #22c55e;
}

.supplier-dashboard .action-buttons .action-btn .fa-file-invoice-dollar {
  color: #0d9488;
}

.supplier-dashboard .action-buttons .action-btn .fa-edit {
  color: #2563eb;
}

.supplier-dashboard .action-buttons .action-btn .fa-trash {
  color: #ef4444;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.page-info {
  color: #7f8c8d;
  font-size: 14px;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  background: white;
  color: #2c3e50;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

/* Loading and Error States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 8px;
  margin: 20px;
  border: 1px solid #f5c6cb;
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #7f8c8d;
}

.no-data i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-data p {
  font-size: 16px;
  margin: 0;
}

/* Modal Overlay Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000 !important;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  margin-right: -50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  border: none;
  border-radius: 8px;
  padding: 0;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Mobile Phones (< 481px) */
@media (max-width: 480px) {
  .supplier-dashboard {
    padding: 10px;
    min-height: calc(100vh - 80px);
  }
  
  .title-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .title-box h2 {
    font-size: 1.5rem;
    width: 100%;
  }
  
  .add-supplier-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    padding: 15px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .stat-content h3 {
    font-size: 1.8rem;
  }
  
  .stat-content p {
    font-size: 0.85rem;
  }
  
  .search-filter-bar {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .search-input-wrapper {
    max-width: 100%;
    width: 100%;
  }
  
  .search-input {
    padding: 10px 14px 10px 46px; /* keep extra space for icon on mobile */
    font-size: 0.9rem;
  }
  
  .container-box-inner {
    border-radius: 8px;
    overflow: hidden;
  }
  
  .table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }
  
  .table {
    min-width: 700px;
    font-size: 0.75rem;
  }
  
  .table th {
    padding: 10px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }
  
  .table th.sortable-header {
    padding-right: 20px;
  }
  
  .table th.sortable-header i {
    font-size: 10px;
  }
  
  .table td {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  
  .company-info strong,
  .contact-info strong {
    font-size: 0.85rem;
  }
  
  .company-info small,
  .contact-info small,
  .location-info small {
    font-size: 0.7rem;
  }
  
  .supplier-dashboard .action-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: auto;
  }
  
  .supplier-dashboard .action-buttons .action-btn {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    align-items: center;
  }
  
  .page-info {
    font-size: 0.85rem;
    text-align: center;
  }
  
  .pagination-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }
  
  .pagination-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
    min-width: 36px;
    min-height: 36px;
  }
  
  .page-numbers {
    gap: 3px;
  }
  
  .loading-container,
  .no-data {
    padding: 40px 15px;
  }
  
  .loading-spinner {
    width: 35px;
    height: 35px;
  }
  
  .no-data i {
    font-size: 40px;
  }
  
  .error-message {
    padding: 15px;
    margin: 15px;
    font-size: 0.9rem;
  }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .supplier-dashboard {
    padding: 15px;
  }
  
  .title-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    margin-bottom: 25px;
  }
  
  .title-box h2 {
    font-size: 1.75rem;
  }
  
  .add-supplier-btn {
    width: auto;
    padding: 12px 20px;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 25px;
  }
  
  .stat-card {
    padding: 20px;
    flex-direction: row;
    text-align: left;
  }
  
  .stat-content h3 {
    font-size: 2.2rem;
  }
  
  .search-filter-bar {
    flex-direction: row;
    padding: 18px;
    margin-bottom: 20px;
  }
  
  .search-input-wrapper {
    max-width: 350px;
  }
  
  .table {
    min-width: 800px;
    font-size: 0.85rem;
  }
  
  .table th {
    padding: 12px 10px;
    font-size: 0.8rem;
  }
  
  .table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
  
  .supplier-dashboard .action-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
  }
  
  .supplier-dashboard .action-buttons .action-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
  }
  
  .pagination-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 18px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .supplier-dashboard {
    padding: 20px;
  }
  
  .title-box {
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .title-box h2 {
    font-size: 2rem;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
  }
  
  .stat-card {
    padding: 22px;
  }
  
  .stat-content h3 {
    font-size: 2.5rem;
  }
  
  .search-filter-bar {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .search-input-wrapper {
    max-width: 400px;
  }
  
  .table {
    min-width: 1000px;
    font-size: 0.9rem;
  }
  
  .table th {
    padding: 14px 12px;
    font-size: 0.85rem;
  }
  
  .table td {
    padding: 14px 12px;
    font-size: 0.9rem;
  }
  
  .pagination-container {
    padding: 20px;
  }
}

/* Laptops (1025px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
  .supplier-dashboard {
    padding: 25px;
  }
  
  .stats-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  
  .stat-content h3 {
    font-size: 2.8rem;
  }
  
  .table {
    min-width: 1200px;
  }
}

/* Large Screens (1367px+) */
@media (min-width: 1367px) {
  .supplier-dashboard {
    padding: 30px;
    max-width: 100%;
  }
  
  .stats-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
  }
  
  .stat-card {
    padding: 24px;
  }
  
  .stat-content h3 {
    font-size: 32px;
  }
  
  .table {
    min-width: 0;
    min-width: initial;
  }
  
  .table th,
  .table td {
    padding: 16px 12px;
  }
}

/* Landscape Orientation for Mobile */
@media (orientation: landscape) and (max-height: 600px) {
  .supplier-dashboard {
    padding: 10px;
  }
  
  .title-box {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .title-box h2 {
    font-size: 1.3rem;
  }
  
  .stats-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-content h3 {
    font-size: 1.5rem;
  }
  
  .search-filter-bar {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .table th,
  .table td {
    padding: 8px 6px;
  }
  
  .pagination-container {
    padding: 12px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .supplier-dashboard .action-buttons .action-btn,
  .pagination-btn,
  .add-supplier-btn {
    min-height: 32px;
    min-width: 32px;
  }
  
  .table th.sortable-header {
    padding: 12px 8px;
    min-height: 44px;
  }
  
  .search-input {
    min-height: 44px;
  }
}

/* Print Styles */
@media print {
  .supplier-dashboard {
    padding: 0;
  }
  
  .title-box,
  .search-filter-bar,
  .pagination-container,
  .add-supplier-btn {
    display: none;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    page-break-inside: avoid;
  }
  
  .table {
    min-width: 100%;
    font-size: 0.75rem;
  }
  
  .table th,
  .table td {
    padding: 8px;
    font-size: 0.7rem;
  }
  
  .action-buttons {
    display: none;
  }
}
.trading-stock-report-manage-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.trading-stock-report-manage-page .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.trading-stock-report-manage-page .filter-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.trading-stock-report-manage-page .filter-group input,
.trading-stock-report-manage-page .filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.trading-stock-report-manage-page .filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trading-stock-report-manage-page .filters-card,
.trading-stock-report-manage-page .table-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.trading-stock-report-manage-page .table-wrapper {
  overflow-x: auto;
}

.trading-stock-report-manage-page .records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.trading-stock-report-manage-page .records-table th,
.trading-stock-report-manage-page .records-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}

.trading-stock-report-manage-page .records-table th {
  background: #f7fafc;
  font-weight: 600;
}

.trading-stock-report-manage-page .records-table tbody tr:hover {
  background: #f8fafc;
}

.trading-stock-report-manage-page .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.trading-stock-report-manage-page .status-added {
  background: #dbeafe;
  color: #1e40af;
}

.trading-stock-report-manage-page .status-released {
  background: #fef3c7;
  color: #92400e;
}

.trading-stock-report-manage-page .status-returned {
  background: #fee2e2;
  color: #991b1b;
}

.trading-stock-report-manage-page .action-buttons {
  display: flex;
  gap: 8px;
}

.trading-stock-report-manage-page .btn-edit,
.trading-stock-report-manage-page .btn-delete {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trading-stock-report-manage-page .btn-edit {
  background: #edf2f7;
  color: #4a5568;
}

.trading-stock-report-manage-page .btn-delete {
  background: #fee2e2;
  color: #b91c1c;
}

.trading-stock-report-manage-page .pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

.trading-stock-report-manage-page .header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tsr-admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tsr-admin-modal-dialog {
  background: #fff;
  border-radius: 12px;
  width: min(920px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.tsr-admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #edf2f7;
}

.tsr-admin-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.tsr-admin-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #718096;
}

.tsr-admin-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.tsr-admin-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #edf2f7;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tsr-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.tsr-admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tsr-admin-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.tsr-admin-form-group input,
.tsr-admin-form-group select,
.tsr-admin-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.tsr-admin-form-group textarea {
  min-height: 72px;
  resize: vertical;
}

.tsr-admin-form-group.full-width {
  grid-column: 1 / -1;
}

.tsr-stock-lookup-hint {
  margin: 0;
  font-size: 12px;
  color: #718096;
}

.tsr-stock-lookup-status,
.tsr-stock-lookup-empty {
  margin: 0;
  font-size: 13px;
  color: #4a5568;
}

.tsr-stock-suggestions {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.tsr-stock-suggestion-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: #2d3748;
}

.tsr-stock-suggestion-btn:hover {
  background: #ebf8ff;
}

.tsr-stock-suggestions li:last-child .tsr-stock-suggestion-btn {
  border-bottom: none;
}

.tsr-stock-suggestion-btn strong {
  color: #2b6cb0;
  font-size: 14px;
}

.unigoods-category-container {
    padding: 30px;
    background-color: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .unigoods-category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
  }
  
  .unigoods-category-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .error-message {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .error-message i {
    font-size: 1.2rem;
  }
  
  .success-message {
    background-color: #d1fae5;
    color: #059669;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .success-message i {
    font-size: 1.2rem;
  }
  
  .add-category-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
  }
  
  .add-category-section h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 600;
  }
  
  .category-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
  }
  
  .form-group {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    max-width: 400px;
    width: 100%;
  }
  
  .form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
  }
  
  .form-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
  }
  
  .form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .btn-add {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    height: -webkit-fit-content;
    height: fit-content;
  }
  
  .btn-add:hover {
    background-color: #2563eb;
  }
  
  .btn-add i {
    font-size: 0.9rem;
  }
  
  .categories-list-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .categories-list-section h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 600;
  }
  
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
  }
  
  .loading-spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
  }
  
  .no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
  }
  
  .no-data p {
    font-size: 1rem;
    margin: 0;
  }
  
  .categories-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
  }
  
  .categories-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
  }
  
  .categories-table thead {
    background-color: #f1f5f9;
  }
  
  .categories-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    border-bottom: 2px solid #e2e8f0;
  }
  
  table.categories-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
  }
  
  .categories-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .categories-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .edit-input {
    padding: 8px 10px;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 300px;
  }
  
  .edit-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .btn-edit,
  .btn-save,
  .btn-cancel {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 5px;
  }
  
  .btn-edit {
    color: #3b82f6;
  }
  
  .btn-edit:hover {
    background-color: #eff6ff;
  }
  
  .btn-save {
    color: #059669;
  }
  
  .btn-save:hover {
    background-color: #d1fae5;
  }
  
  .btn-cancel {
    color: #dc2626;
  }
  
  .btn-cancel:hover {
    background-color: #fee2e2;
  }
  
  .btn-edit i,
  .btn-save i,
  .btn-cancel i {
    font-size: 1rem;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .unigoods-category-container {
      padding: 20px;
    }
  
    .category-form {
      flex-direction: column;
      align-items: stretch;
    }
  
    .btn-add {
      width: 100%;
      justify-content: center;
    }
  
    .categories-table-wrapper {
      overflow-x: scroll;
    }
  
    .categories-table {
      font-size: 0.85rem;
    }
  
    .categories-table th,
    .categories-table td {
      padding: 8px 10px;
    }
  }
  
.update-product-container {
  padding: 30px;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.update-product-content {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.update-product-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.update-product-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.update-product-header p {
  color: #64748b;
  margin: 0;
  font-size: 0.95rem;
}

.update-product-error {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-product-error i {
  font-size: 1.2rem;
}

.update-product-success {
  background-color: #d1fae5;
  color: #059669;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-product-success i {
  font-size: 1.2rem;
}

.product-search-section {
  margin-bottom: 30px;
}

.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 45px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.product-list-section {
  margin-bottom: 30px;
}

.product-list-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.product-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.product-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.product-card.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.product-card-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.batch-badge {
  background-color: #3b82f6;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-card-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  font-weight: 500;
  color: #64748b;
  font-size: 0.9rem;
}

.detail-value {
  color: #1e293b;
  font-size: 0.9rem;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-active {
  background-color: #d1fae5;
  color: #059669;
}

.status-inactive {
  background-color: #f3f4f6;
  color: #6b7280;
}

.status-damaged {
  background-color: #fee2e2;
  color: #dc2626;
}

.status-sold {
  background-color: #dbeafe;
  color: #2563eb;
}

.update-product-form {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e2e8f0;
}

.selected-product-info {
  margin-bottom: 20px;
  padding: 12px;
  background-color: #eff6ff;
  border-radius: 6px;
}

.selected-product-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e40af;
  margin: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-submit {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.btn-submit:hover:not(:disabled) {
  background-color: #2563eb;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-cancel {
  background-color: #6b7280;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.btn-cancel:hover:not(:disabled) {
  background-color: #4b5563;
}

.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.no-products {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-products i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #cbd5e1;
}

.no-products p {
  font-size: 1.1rem;
  margin: 0;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .product-list {
    grid-template-columns: 1fr;
  }
  
  .update-product-container {
    padding: 15px;
  }
  
  .update-product-content {
    padding: 20px;
  }
}


.view-planning-consignment {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.consignment-header {
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
}

.consignment-header h3 {
  margin: 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6c757d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

.products-table-container {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.products-table thead {
  background: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-size: 13px;
}

.products-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
  font-size: 13px;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.product-name-cell {
  max-width: 200px;
  word-wrap: break-word;
  line-height: 1.4;
}

.quantity-cell {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

.remark-cell {
  max-width: 150px;
  word-wrap: break-word;
}

.entered-by-cell {
  text-align: center;
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-approved {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-in_progress {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
  margin: 0 auto;
}

.remove-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.remove-btn:active {
  transform: scale(0.95);
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  margin: 15px;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .products-table {
    font-size: 12px;
  }
  
  .products-table th,
  .products-table td {
    padding: 8px 6px;
  }
  
  .product-name-cell {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .products-table-container {
    font-size: 11px;
  }
  
  .products-table th,
  .products-table td {
    padding: 6px 4px;
  }
  
  .product-name-cell {
    max-width: 120px;
  }
  
  .remark-cell {
    max-width: 100px;
  }
  
  .status-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .remove-btn {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .consignment-header {
    padding: 10px 15px;
  }
  
  .consignment-header h3 {
    font-size: 16px;
  }
  
  .products-table th,
  .products-table td {
    padding: 4px 2px;
  }
  
  .product-name-cell {
    max-width: 80px;
  }
  
  .quantity-cell {
    font-size: 10px;
  }
}

/* Warehouse Management Styles */
.warehouse-container {
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.warehouse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.warehouse-title h1 {
  color: #2c3e50;
  margin: 0 0 5px 0;
  font-size: 28px;
  font-weight: 600;
}

.warehouse-title p {
  color: #7f8c8d;
  margin: 0;
  font-size: 14px;
}

/* Statistics Cards */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}
/*
.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 24px;
  color: white;
}

.stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
*/
.stat-content h3 {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 5px 0;
}

.stat-content p {
  color: #7f8c8d;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

/* Search and Filters */
.warehouse-filters {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-input-group {
  flex: 1 1;
  position: relative;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 25px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background: #2980b9;
}

.clear-search-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s ease;
}

.clear-search-btn:hover {
  background: #c0392b;
}

/* Table Styles */
.warehouse-table-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
}

.warehouse-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.warehouse-table th {
  background: #f8f9fa;
  color: #2c3e50;
  font-weight: 600;
  padding: 15px 12px;
  text-align: left;
  border-bottom: 2px solid #e1e8ed;
  white-space: nowrap;
}

.warehouse-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #e1e8ed;
  vertical-align: top;
}

.warehouse-table tbody tr:hover {
  background-color: #f8f9fa;
}

.warehouse-name strong {
  color: #2c3e50;
  font-size: 15px;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5e8;
  color: #27ae60;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.address-text {
  max-width: 200px;
  word-wrap: break-word;
  color: #7f8c8d;
  line-height: 1.4;
}

.sub-warehouse-name {
  color: #3498db;
  font-weight: 500;
}

.sub-location {
  color: #7f8c8d;
  font-size: 13px;
}

.no-data-text {
  color: #bdc3c7;
  font-style: italic;
}

.created-by {
  color: #7f8c8d;
  font-size: 13px;
}

.created-date {
  color: #7f8c8d;
  font-size: 12px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 5px;
}

.btn-action {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.3s ease;
}

.btn-view {
  background: #3498db;
  color: white;
}

.btn-view:hover {
  background: #2980b9;
  transform: scale(1.1);
}

.btn-edit {
  background: #f39c12;
  color: white;
}

.btn-edit:hover {
  background: #e67e22;
  transform: scale(1.1);
}

.btn-delete {
  background: #e74c3c;
  color: white;
}

.btn-delete:hover {
  background: #c0392b;
  transform: scale(1.1);
}

/* No Data State */
.no-data {
  text-align: center;
  padding: 60px 20px;
  color: #7f8c8d;
}

.no-data i {
  font-size: 48px;
  color: #bdc3c7;
  margin-bottom: 20px;
}

.no-data h3 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 20px;
}

.no-data p {
  margin: 0 0 20px 0;
  font-size: 14px;
}

/* Loading State */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #7f8c8d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .warehouse-container {
    padding: 10px;
  }
  
  .warehouse-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .warehouse-table {
    font-size: 12px;
  }
  
  .warehouse-table th,
  .warehouse-table td {
    padding: 10px 8px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 3px;
  }
  
  .btn-action {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
}
/* PPIC Account Sales Report Styles */
.ppic-account-sales-report {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.ppic-account-sales-report-header {
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-account-sales-report-header h2 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.ppic-account-sales-report-header p {
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 1rem;
}

.ppic-account-sales-report-controls {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.ppic-account-sales-report-entries {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppic-account-sales-report-entries label {
  color: #64748b;
  font-size: 0.9rem;
}

.ppic-account-sales-report-entries select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.ppic-account-sales-report-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppic-account-sales-report-search label {
  color: #64748b;
  font-size: 0.9rem;
}

.ppic-account-sales-report-search input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 250px;
}

.ppic-account-sales-report-search input:focus {
  outline: none;
  border-color: #059669;
}

.ppic-account-sales-report-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
}

.ppic-account-sales-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.ppic-account-sales-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ppic-account-sales-report-table th,
.ppic-account-sales-report-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.ppic-account-sales-report-table th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #475569;
}

.ppic-account-sales-report-table tbody tr:hover {
  background-color: #f8fafc;
}

.ppic-account-sales-report-empty {
  padding: 48px;
  text-align: center;
  color: #64748b;
}

.ppic-account-sales-report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
}

.ppic-account-sales-report-pagination-info {
  color: #64748b;
  font-size: 0.875rem;
}

.ppic-account-sales-report-pagination-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ppic-account-sales-report-pagination-buttons button {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
}

.ppic-account-sales-report-pagination-buttons button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ppic-account-sales-report-pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ppic-account-sales-report-pagination-buttons button.active {
  background: #059669;
  color: white;
  border-color: #059669;
}

.ppic-account-sales-report-page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: #64748b;
}

.ppic-account-sales-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-account-sales-report-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: ppic-account-report-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes ppic-account-report-spin {
  to {
    transform: rotate(360deg);
  }
}

.add-consignment {
    padding: 20px;
    background-color: var(--dashboard-bg);
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }
  
  .add-consignment .form-header {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    text-align: left;
  }
  
  .add-consignment .form-header h2 {
    color: var(--text-color-dark);
    font-size: 2rem;
    margin: 0 0 10px 0;
  }
  
  .add-consignment .form-header p {
    color: var(--text-color-light);
    font-size: 1.1rem;
    margin: 0;
  }
  
  .add-consignment-form {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 100%;
  }
  
  .add-consignment-form .form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    gap: 20px;
  }
  
  .add-consignment-form .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  
  .add-consignment-form .form-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    grid-column-start: 1; grid-column-end: -1;
  }
  
  .add-consignment-form .form-group {
    margin-bottom: 0;
  }
  
  .add-consignment-form .form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color-dark);
    font-weight: 500;
    font-size: 1rem;
  }
  
  .add-consignment-form .form-label .required {
    color: var(--danger-color);
    margin-left: 4px;
  }
  
  .add-consignment-form .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    color: var(--text-color-dark);
    background-color: var(--input-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  .add-consignment-form .form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
    outline: none;
  }
  
  .add-consignment-form .form-input::placeholder {
    color: var(--text-color-light);
  }
  
  .add-consignment-form .error-message {
    background-color: var(--danger-light-color);
    color: var(--danger-dark-color);
    border: 1px solid var(--danger-color);
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .add-consignment-form .error-message i {
    font-size: 1.2rem;
  }
  
  .add-consignment-form .form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
  }
  
  .add-consignment-form .btn {
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
  }
  
  .add-consignment-form .btn-outline {
    background-color: transparent;
    color: var(--text-color-dark);
    border: 1px solid var(--border-color);
  }
  
  .add-consignment-form .btn-outline:hover:not(:disabled) {
    background-color: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
  }
  
  .add-consignment-form .btn-cancel {
    background-color: #dc3545;
    color: white;
  }
  
  .add-consignment-form .btn-cancel:hover:not(:disabled) {
    background-color: #c82333;
  }
  
  .add-consignment-form .btn-create {
    background-color: #007bff;
    color: white;
  }
  
  .add-consignment-form .btn-create:hover:not(:disabled) {
    background-color: #0056b3;
  }
  
  .add-consignment-form .btn-primary {
    background-color: var(--primary-color);
    color: white;
  }
  
  .add-consignment-form .btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark-color);
  }
  
  .add-consignment-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .add-consignment-form {
      padding: 20px;
    }
  
    .add-consignment-form .form-section {
      grid-template-columns: 1fr;
    }
  
    .add-consignment-form .form-section h3 {
      font-size: 1.3rem;
    }
  
    .add-consignment-form .form-actions {
      flex-direction: column;
      gap: 10px;
    }
  
    .add-consignment-form .btn {
      width: 100%;
      justify-content: center;
    }
  }
  
.add-planning-consignment {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.company-name {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

.dispatch-info {
  font-size: 16px;
  color: #6c757d;
  margin: 0;
  font-weight: 500;
}

.planning-form {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  font-size: 14px;
}

.form-input,
.form-select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-input[readonly] {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.remark-group {
  grid-column: span 2;
}

.remark-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.remark-input {
  flex: 1 1;
  padding-right: 60px;
}

.remark-icons {
  position: absolute;
  right: 10px;
  display: flex;
  gap: 8px;
}

.remark-icon {
  width: 24px;
  height: 24px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.remark-icon:hover {
  background: #218838;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-start;
}

.save-product-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-product-btn:hover:not(:disabled) {
  background: #0056b3;
}

.save-product-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #f5c6cb;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .remark-group {
    grid-column: span 1;
  }
  
  .header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .company-name {
    font-size: 20px;
  }
  
  .dispatch-info {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .add-planning-consignment {
    padding: 15px;
  }
  
  .planning-form {
    padding: 20px 15px;
  }
  
  .form-row {
    gap: 15px;
  }
  
  .save-product-btn {
    width: 100%;
    padding: 15px;
  }
}

/* Products List Section */
.consignment-products-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  overflow: hidden;
}

.consignment-products-header {
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
}

.consignment-products-header h3 {
  margin: 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6c757d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

.products-table-container {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.products-table thead {
  background: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-size: 13px;
}

.products-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
  font-size: 13px;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.product-name-cell {
  max-width: 200px;
  word-wrap: break-word;
  line-height: 1.4;
}

.quantity-cell {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

.remark-cell {
  max-width: 150px;
  word-wrap: break-word;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-approved {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-in_progress {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Action Column Styles */
.action-cell {
  text-align: center;
  white-space: nowrap;
  min-width: 100px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.edit-btn,
.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

.edit-btn {
  background-color: #e3f2fd;
  color: #1976d2;
}

.edit-btn:hover:not(:disabled) {
  background-color: #bbdefb;
  transform: scale(1.1);
}

.edit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-btn {
  background-color: #ffebee;
  color: #d32f2f;
}

.delete-btn:hover:not(:disabled) {
  background-color: #ffcdd2;
  transform: scale(1.1);
}

.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Edit Mode Styles */
.edit-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.save-edit-btn,
.cancel-edit-btn {
  background: none;
  border: 1px solid #ced4da;
  cursor: pointer;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 600;
  min-width: 40px;
  min-height: 32px;
}

.save-edit-btn {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}

.save-edit-btn:hover:not(:disabled) {
  background-color: #218838;
  border-color: #1e7e34;
  transform: scale(1.05);
}

.save-edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cancel-edit-btn {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}

.cancel-edit-btn:hover:not(:disabled) {
  background-color: #c82333;
  border-color: #bd2130;
  transform: scale(1.05);
}

.cancel-edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.edit-qty-input {
  width: 80px;
  padding: 4px 8px;
  border: 2px solid #007bff;
  border-radius: 4px;
  font-size: 13px;
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

.edit-qty-input:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments for products table */
@media (max-width: 1200px) {
  .products-table {
    font-size: 12px;
  }
  
  .products-table th,
  .products-table td {
    padding: 8px 6px;
  }
  
  .product-name-cell {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .products-table-container {
    font-size: 11px;
  }
  
  .products-table th,
  .products-table td {
    padding: 6px 4px;
  }
  
  .product-name-cell {
    max-width: 120px;
  }
  
  .remark-cell {
    max-width: 100px;
  }
  
  .status-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .consignment-products-header h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .consignment-products-header {
    padding: 10px 15px;
  }
  
  .consignment-products-header h3 {
    font-size: 14px;
  }
  
  .products-table th,
  .products-table td {
    padding: 4px 2px;
  }
  
  .product-name-cell {
    max-width: 80px;
  }
  
  .quantity-cell {
    font-size: 10px;
  }
  
  .action-buttons,
  .edit-actions {
    gap: 4px;
  }
  
  .edit-btn,
  .delete-btn,
  .save-edit-btn,
  .cancel-edit-btn {
    min-width: 28px;
    min-height: 28px;
    font-size: 14px;
    padding: 2px 4px;
  }
  
  .edit-qty-input {
    width: 60px;
    font-size: 11px;
    padding: 2px 4px;
  }
}

/* Status Action Buttons */
.consignment-status-actions {
  display: flex;
  gap: 15px;
  padding: 20px;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.status-action-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.forward-to-qc-btn {
  background-color: #007bff;
  color: white;
}

.forward-to-qc-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.forward-to-qc-btn.forwarded {
  background-color: #28a745;
  color: white;
}

.forward-to-qc-btn.forwarded:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.forward-to-logistic-btn {
  background-color: #007bff;
  color: white;
}

.forward-to-logistic-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.forward-to-logistic-btn.forwarded {
  background-color: #28a745;
  color: white;
}

.forward-to-logistic-btn.forwarded:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.status-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.status-action-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Responsive adjustments for status buttons */
@media (max-width: 768px) {
  .consignment-status-actions {
    flex-direction: column;
    gap: 10px;
  }

  .status-action-btn {
    width: 100%;
    min-width: auto;
    padding: 14px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .status-action-btn {
    padding: 12px 15px;
    font-size: 13px;
  }
}

/* Confirmation Modal Styles */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirm-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 450px;
  width: 100%;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirm-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.confirm-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.confirm-modal-header h3::before {
  content: '⚠️';
  font-size: 24px;
}

.confirm-modal-body {
  padding: 30px 24px;
  text-align: center;
}

.confirm-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.confirm-icon i {
  font-size: 36px;
  color: #856404;
}

.confirm-message {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 15px 0;
  line-height: 1.5;
}

.confirm-details {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.confirm-details strong {
  color: #007bff;
  font-weight: 600;
}

.confirm-modal-footer {
  padding: 20px 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8f9fa;
}

.confirm-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cancel-btn {
  background: #6c757d;
  color: white;
}

.cancel-btn:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.confirm-action-btn {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.confirm-action-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Responsive adjustments for modal */
@media (max-width: 480px) {
  .confirm-modal-content {
    max-width: 100%;
    margin: 10px;
  }

  .confirm-modal-header h3 {
    font-size: 18px;
  }

  .confirm-message {
    font-size: 16px;
  }

  .confirm-modal-footer {
    flex-direction: column-reverse;
  }

  .confirm-btn {
    width: 100%;
  }
}

/* Billing Confirmation Sales Order Styles */
.billing-confirmation-sales-order {
    padding: 20px;
    background-color: #f8fafc;
    min-height: calc(100vh - 200px);
  }
  
  .billing-confirmation-header {
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .billing-confirmation-header h2 {
    margin: 0 0 5px 0;
    color: #1e293b;
    font-size: 1.5rem;
  }
  
  .billing-confirmation-header p {
    margin: 0 0 15px 0;
    color: #64748b;
    font-size: 1rem;
  }
  
  .billing-confirmation-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .entries-selector {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .entries-selector label {
    color: #64748b;
    font-size: 0.9rem;
  }
  
  .entries-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
  }
  
  .billing-confirmation-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .pagination-info {
    color: #64748b;
    font-size: 0.875rem;
  }
  
  .pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .pagination-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    color: #475569;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
  }
  
  .pagination-ellipsis {
    padding: 0 4px;
    color: #64748b;
    font-size: 0.875rem;
  }
  
  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .search-box label {
    color: #64748b;
    font-size: 0.9rem;
  }
  
  .search-input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 200px;
  }
  
  .search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .billing-confirmation-error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .billing-confirmation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
  }
  
  .billing-confirmation-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .billing-confirmation-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .billing-orders-table-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }
  
  .billing-table-container {
    overflow-x: auto;
  }
  
  .billing-orders-table,
  .billing-products-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .billing-orders-table thead,
  .billing-products-table thead {
    background-color: #f1f5f9;
  }
  
  .billing-orders-table th,
  .billing-products-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
    border-bottom: 2px solid #e2e8f0;
  }
  
  .billing-orders-table td,
  .billing-products-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.875rem;
  }
  
  .billing-orders-table tbody tr:hover,
  .billing-products-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .billing-orders-table tbody tr.selected {
    background-color: #dbeafe;
  }
  
  .view-billing-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
  }
  
  .view-billing-btn:hover:not(:disabled) {
    background-color: #2563eb;
  }
  
  .view-billing-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
  }
  
  .confirm-billing-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .confirm-billing-btn:hover:not(:disabled) {
    background-color: #059669;
  }
  
  .confirm-billing-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
  }

  .billing-product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .confirm-batch-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .confirm-batch-btn:hover:not(:disabled) {
    background-color: #2563eb;
  }

  .confirm-batch-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
  }

  .billing-remark-textarea {
    width: 100%;
    min-width: 180px;
    max-width: 300px;
    min-height: 52px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
  }

  .billing-remark-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
  }

  .billing-remark-readonly {
    display: block;
    max-width: 300px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8125rem;
    color: #334155;
    line-height: 1.4;
  }
  
  .confirm-billing-btn i.fa-check-circle {
    color: #10b981;
  }
  
  .loading-cell {
    text-align: center;
    padding: 40px;
  }
  
  .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
  }
  
  .no-data {
    text-align: center;
    padding: 40px;
    color: #64748b;
  }
  
  .batch-info {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
  }
  
  .billing-note {
    margin-top: 20px;
    padding: 16px;
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
  }
  
  .billing-note-text {
    margin: 0;
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.6;
  }
  
  .billing-copyright {
    margin-top: 20px;
    padding: 16px;
    text-align: left;
    color: #64748b;
    font-size: 0.75rem;
  }
  
  .billing-confirmed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .billing-confirmed-badge i {
    color: #10b981;
  }
  
  .billing-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .billing-pending-badge i {
    color: #f59e0b;
  }

  .batch-confirmed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .batch-confirmed-badge i {
    color: #3b82f6;
  }

  .batch-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .batch-pending-badge i {
    color: #94a3b8;
  }
  
  /* View Modal Styles */
  .billing-view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
  }
  
  .billing-view-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 95%;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .billing-view-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
  }
  
  .billing-view-modal-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
  }
  
  .billing-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
  }
  
  .billing-modal-close-btn:hover {
    background-color: #e2e8f0;
    color: #1e293b;
  }
  
  .billing-view-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .billing-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
  }
  
  .billing-order-info {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 6px;
    flex-wrap: wrap;
  }
  
  .billing-order-info-item {
    display: flex;
    gap: 8px;
    color: #475569;
    font-size: 0.9rem;
  }
  
  .billing-order-info-item strong {
    color: #1e293b;
    font-weight: 600;
  }
  
  .billing-view-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    justify-content: flex-end;
  }
  
  .billing-modal-close-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .billing-modal-close-button:hover {
    background-color: #2563eb;
  }
  
  /* Responsive adjustments for modal */
  @media (max-width: 768px) {
    .billing-view-modal-content {
      max-width: 100%;
      max-height: 100vh;
      border-radius: 0;
    }
  
    .billing-view-modal-overlay {
      padding: 0;
    }
  
    .billing-order-info {
      flex-direction: column;
      gap: 12px;
    }
  }
  
  
.consignment-container {
  padding: 20px;
  background-color: var(--dashboard-bg);
  min-height: calc(100vh - 60px);
}

.consignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.consignment-title h2 {
  color: var(--text-color-dark);
  font-size: 1.8rem;
  margin: 0 0 5px 0;
}

.consignment-title p {
  color: var(--text-color-light);
  margin: 0;
}

.btn-add-consignment {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-add-consignment::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-add-consignment:hover::before {
  left: 100%;
}

.btn-add-consignment:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4), 0 4px 6px -2px rgba(37, 99, 235, 0.3);
}

.btn-add-consignment:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
}

.btn-add-consignment i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.btn-add-consignment:hover i {
  transform: rotate(90deg);
}

.consignment-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  color: var(--text-color-dark);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.stat-card p {
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0;
}

.consignment-search {
  margin-bottom: 20px;
}

.consignment-search .form-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  color: var(--text-color-dark);
  background-color: var(--input-bg);
}

.consignment-search .form-input::placeholder {
  color: var(--text-color-light);
}

.consignment-list {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

.no-consignments {
  text-align: center;
  color: var(--text-color-light);
  font-size: 1.1rem;
  padding: 40px 0;
}

.no-consignments .btn-link {
  color: var(--primary-color);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
}

.table-responsive {
  overflow-x: auto;
}

.consignment-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.consignment-table th,
.consignment-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e8ed;
  color: var(--text-color-dark);
}

.consignment-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.consignment-table tbody tr:hover {
  background-color: var(--table-hover-bg);
}

.consignment-table .sno-cell {
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
}

.consignment-table .consignment-number-cell {
  font-weight: 600;
  color: var(--text-color-dark);
}

.action-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.action-buttons .icon-btn {
  background: transparent;
  color: var(--text-color-light);
  border: 1px solid transparent;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-buttons .icon-btn:hover {
  background: var(--table-hover-bg);
  color: var(--text-color-dark);
}

.action-buttons .icon-btn.danger {
  background: var(--danger-color);
  color: #fff;
}

.action-buttons .icon-btn.danger:hover {
  background: var(--danger-dark-color);
}

.consignment-table .btn-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.consignment-table .btn-info {
  background-color: var(--info-color);
  color: white;
}

.consignment-table .btn-info:hover {
  background-color: var(--info-dark-color);
}

.consignment-table .btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.consignment-table .btn-warning:hover {
  background-color: var(--warning-dark-color);
}

.consignment-table .btn-success {
  background-color: var(--success-color);
  color: white;
}

.consignment-table .btn-success:hover {
  background-color: var(--success-dark-color);
}

.consignment-table .btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.consignment-table .btn-primary:hover {
  background-color: var(--primary-dark-color);
}

.consignment-table .btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.consignment-table .btn-danger:hover {
  background-color: var(--danger-dark-color);
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-under-consignment {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-forwarded-qc {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-forwarded-logistic {
  background-color: #e8f5e8;
  color: #388e3c;
}

.status-completed {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.status-cancelled {
  background-color: #ffebee;
  color: #d32f2f;
}

.status-default {
  background-color: #f5f5f5;
  color: #757575;
}

/* Dispatch badges */
.dispatch-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dispatch-air {
  background-color: #e3f2fd;
  color: #1976d2;
}

.dispatch-sea {
  background-color: #e8f5e8;
  color: #388e3c;
}

.dispatch-default {
  background-color: #f5f5f5;
  color: #757575;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.no-data i {
  font-size: 4rem;
  color: var(--text-color-light);
  margin-bottom: 20px;
}

.no-data h3 {
  color: var(--text-color-dark);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.no-data p {
  color: var(--text-color-light);
  font-size: 1.1rem;
}

.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 1rem;
}

.alert-danger {
  background-color: var(--danger-light-color);
  color: var(--danger-dark-color);
  border: 1px solid var(--danger-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .consignment-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .consignment-title {
    margin-bottom: 15px;
  }

  .consignment-stats {
    grid-template-columns: 1fr;
  }

  .consignment-table th,
  .consignment-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .consignment-table .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 3px;
  }
}
/* PPIC Dashboard Styles - Scoped with ppic- prefix */
.ppic-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.ppic-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.ppic-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.ppic-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ppic-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ppic-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.ppic-metric-card-sales-received { --metric-color: #3b82f6; }
.ppic-metric-card-sales-pending { --metric-color: #f59e0b; }
.ppic-metric-card-1 { --metric-color: #3b82f6; }
.ppic-metric-card-2 { --metric-color: #10b981; }
.ppic-metric-card-3 { --metric-color: #f59e0b; }
.ppic-metric-card-4 { --metric-color: #06b6d4; }
.ppic-metric-card-qc-rejected { --metric-color: #ef4444; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-info {
  background: #06b6d4;
}

.bg-danger {
  background: #ef4444;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  text-decoration: none;
  display: block;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change:hover {
  color: #3b82f6;
}

/* Quick Actions Section */
.ppic-quick-actions-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ppic-quick-actions-section h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
}

.ppic-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.ppic-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.ppic-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.ppic-btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.ppic-btn-secondary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.ppic-btn-secondary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.ppic-btn-tertiary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.ppic-btn-tertiary:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* Loading */
.ppic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #64748b;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ppic-loading p {
  font-size: 16px;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ppic-dashboard {
    padding: 15px;
  }

  .ppic-metrics-row {
    grid-template-columns: 1fr;
  }

  .ppic-action-buttons {
    flex-direction: column;
  }

  .ppic-action-btn {
    width: 100%;
    justify-content: center;
  }
}


.sales-order-final {
    padding: 20px;
    max-width: 100%;
    overflow-x: auto;
  }
  
  .sales-order-final-header {
    margin-bottom: 30px;
  }
  
  .sales-order-final-header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .sales-order-final-header-row .location-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .sales-order-final-controls {
    margin-left: auto;
  }
  
  .sales-order-final-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
  }
  
  .location-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .location-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .location-tab:hover {
    border-color: #007bff;
    color: #007bff;
  }
  
  .location-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
  }
  
  .sales-order-final-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .entries-selector {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .entries-selector label {
    font-size: 0.9rem;
    color: #555;
  }
  
  .entries-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background: white;
    cursor: pointer;
  }
  
  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .search-box label {
    font-size: 0.9rem;
    color: #555;
  }
  
  .search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    min-width: 200px;
  }
  
  .search-input:focus {
    outline: none;
    border-color: #007bff;
  }
  
  /* Messages */
  .sales-order-final-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
  }
  
  .sales-order-final-error i {
    font-size: 1.1rem;
  }
  
  /* Loading State */
  .sales-order-final-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .sales-order-final-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Table Container */
  .sales-order-final-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 20px;
  }
  
  .sales-order-final-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 2000px;
  }
  
  .sales-order-final-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
  }
  
  .sales-order-final-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
  }
  
  .sales-order-final-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
  }
  
  .sales-order-final-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .sales-order-final-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .sales-order-final-table tbody tr.final-row {
    background-color: #e7f3ff;
  }
  
  .sales-order-final-table td {
    padding: 14px 16px;
    color: #555;
    font-size: 0.95rem;
    vertical-align: middle;
  }
  
  /* Action Buttons Group */
  .action-buttons-group {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  .action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  
  .view-btn {
    background-color: #007bff;
    color: white;
  }
  
  .view-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  .view-btn i {
    font-size: 0.8rem;
  }
  
  /* Status Badge */
  .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .status-badge.status-pending {
    background-color: #ffc107;
    color: #856404;
  }
  
  .status-badge.status-verified {
    background-color: #28a745;
    color: white;
  }
  
  .status-badge.status-final {
    background-color: #007bff;
    color: white;
  }
  
  .status-badge.status-rejected {
    background-color: #dc3545;
    color: white;
  }
  
  /* ACC Status */
  .acc-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .acc-status.approved {
    background-color: #28a745;
    color: white;
  }
  
  .acc-status.pending {
    background-color: #ffc107;
    color: #856404;
  }

  .acc-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .acc-approved-date {
    font-size: 0.75rem;
    color: #495057;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
  }
  
  /* Proceed Button */
  .action-btn.proceed-btn {
    background-color: #28a745;
    color: white;
  }
  
  .action-btn.proceed-btn:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .action-btn.proceed-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  .action-btn.proceed-btn i {
    font-size: 0.8rem;
  }
  
  .action-btn.proceed-btn i.fa-spinner {
    animation: spin 1s linear infinite;
  }
  
  /* Expanded Row */
  .expanded-row {
    background-color: #f8f9fa;
  }
  
  .expanded-cell {
    padding: 20px;
  }
  
  /* Products Table */
  .products-table-wrapper {
    margin-top: 10px;
  }
  
  .products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
  }
  
  .products-table thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .products-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .products-table td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }
  
  .products-table tfoot {
    background-color: #e9ecef;
    border-top: 2px solid #dee2e6;
  }
  
  .products-table tfoot td {
    font-weight: 600;
    color: #333;
  }
  
  /* Products Loading */
  .products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
  }
  
  .products-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
  }
  
  .products-loading p {
    color: #666;
    font-size: 0.9rem;
  }
  
  .no-products {
    text-align: center;
    padding: 40px 20px;
    color: #999;
  }
  
  /* Pagination */
  .sales-order-final-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .pagination-info {
    font-size: 0.9rem;
    color: #555;
  }
  
  .pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
  }
  
  .page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .pagination-ellipsis {
    padding: 0 8px;
    color: #999;
  }
  
  /* Empty State */
  .sales-order-final-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .sales-order-final-empty p {
    color: #999;
    font-size: 1.1rem;
  }
  
  /* Proceed Modal */
  .proceed-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }
  
  .proceed-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .proceed-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
  }
  
  .proceed-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }
  
  .proceed-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .proceed-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .proceed-modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  .proceed-modal-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
  }
  
  /* Order Details Section */
  .proceed-order-details {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
  }
  
  .proceed-detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
  }
  
  .proceed-detail-field {
    display: flex;
    flex-direction: column;
  }
  
  .proceed-detail-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
  }
  
  .proceed-detail-field span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
  }
  
  /* Products Table */
  .proceed-products-section {
    margin-bottom: 30px;
    overflow-x: auto;
  }
  
  .proceed-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1200px;
  }
  
  .proceed-products-table thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .proceed-products-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .proceed-products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .proceed-products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .proceed-products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .proceed-products-table td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }

  .proceed-products-table td.ppic-proceed-cell-factory-name,
  .proceed-products-table td.ppic-proceed-cell-product-name {
  max-width: 280px;
  min-width: 180px;
  width: 280px;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
    white-space: normal;
  overflow: hidden;
}

.proceed-products-table th:nth-child(10) {
  max-width: 280px;
  width: 280px;
  }

  .proceed-products-table td.ppic-proceed-permanent-move-cell {
    vertical-align: middle;
    white-space: nowrap;
  }

.proceed-products-table td.ppic-proceed-cell-method {
  max-width: 320px;
  min-width: 220px;
  width: 320px;
  vertical-align: top;
}

.proceed-products-table td.ppic-proceed-cell-method .ppic-method-display-text {
  display: block;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.proceed-products-table td.ppic-proceed-cell-method .proceed-input {
  max-width: 100%;
  box-sizing: border-box;
}

  .ppic-proceed-permanent-move-cell .ppic-move-to-order-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .ppic-move-to-order-btn--saved:disabled {
    background: #047857 !important;
    opacity: 1 !important;
    cursor: default;
  }
  
  .proceed-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background: white;
    transition: border-color 0.3s ease;
  }
  
  .proceed-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .update-product-btn {
    padding: 6px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .update-product-btn:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  }
  
  .update-product-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  .update-product-btn i {
    font-size: 0.8rem;
  }
  
  /* Important Note */
  .proceed-note {
    margin-bottom: 20px;
    padding: 15px 20px;
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    border-radius: 4px;
  }
  
  .proceed-note-text {
    margin: 0;
    color: #155724;
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .proceed-note-text strong {
    font-weight: 600;
  }
  
  /* Copyright */
  .proceed-copyright {
    text-align: left;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
  }
  
  .proceed-copyright p {
    margin: 0;
    color: #999;
    font-size: 0.85rem;
  }
  
  /* Modal Footer */
  .proceed-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
  }
  
  .save-all-btn {
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  
  .save-all-btn:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .save-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  .save-all-btn i {
    font-size: 0.9rem;
  }
  
  .proceed-modal-footer .cancel-btn {
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .proceed-modal-footer .cancel-btn:hover:not(:disabled) {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }
  
  .proceed-modal-footer .cancel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  /* View Modal */
  .view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }
  
  .view-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .view-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
  }
  
  .view-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }
  
  .view-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .view-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .view-modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  .view-modal-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
  }
  
  /* View Order Details Section */
  .view-order-details {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
  }
  
  .view-detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
  }
  
  .view-detail-field {
    display: flex;
    flex-direction: column;
  }
  
  .view-detail-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
  }
  
  .view-detail-field span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
  }
  
  /* View Products Table */
  .view-products-section {
    margin-bottom: 30px;
    overflow-x: auto;
  }
  
  .view-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1000px;
  }
  
  .view-products-table thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .view-products-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .view-products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .view-products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .view-products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .view-products-table td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }
  
  .view-products-table tfoot {
    background-color: #e9ecef;
    border-top: 2px solid #dee2e6;
  }
  
  .view-products-table tfoot td {
    font-weight: 600;
    color: #333;
  }
  
  /* View Modal Footer */
  .view-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
  }
  
  .view-modal-footer .close-btn {
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .view-modal-footer .close-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }
  
  /* Inline Stock Section */
  .inline-stock-section {
    width: 100%;
  }
  
  .inline-stock-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
  }
  
  /* Request Form Section */
  .request-form-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .request-form-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
  }
  
  .request-form-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 15px;
    gap: 15px;
    align-items: end;
  }
  
  .request-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .request-form-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
  }
  
  .request-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background: white;
    transition: border-color 0.3s;
  }
  
  .request-input:focus {
    outline: none;
    border-color: #007bff;
  }
  
  .request-input.readonly {
    background-color: #f8f9fa;
    cursor: not-allowed;
    color: #666;
  }
  
  .request-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    height: -webkit-fit-content;
    height: fit-content;
  }
  
  .request-btn:hover:not(:disabled) {
    background-color: #0056b3;
  }
  
  .request-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }
  
  .stock-table-container {
    overflow-x: auto;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
  }
  
  .stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
  }
  
  .stock-table th,
  .stock-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .stock-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
  }
  
  .stock-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .stock-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }
  
  .stock-modal-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
  }
  
  .apply-stock-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    font-size: 0.9rem;
  }
  
  .apply-stock-btn:hover:not(:disabled) {
    background-color: #218838;
  }
  
  .apply-stock-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .sales-order-final {
      padding: 15px;
    }
  
    .sales-order-final-header h2 {
      font-size: 1.5rem;
    }
  
    .sales-order-final-controls {
      flex-direction: column;
      align-items: stretch;
    }
  
    .sales-order-final-table {
      font-size: 0.85rem;
    }
  
    .sales-order-final-table th,
    .sales-order-final-table td {
      padding: 10px 12px;
    }
  
    .sales-order-final-pagination {
      flex-direction: column;
      align-items: stretch;
    }
  
    .pagination-buttons {
      justify-content: center;
      flex-wrap: wrap;
    }
  }
  
  /* Success Popup */
  .success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  .success-popup-content {
    background: white;
    border-radius: 12px;
    padding: 40px 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 350px;
    max-width: 500px;
    animation: slideUp 0.3s ease;
  }
  
  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .success-popup-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
    animation: scaleIn 0.3s ease 0.1s both;
  }
  
  @keyframes scaleIn {
    from {
      transform: scale(0);
    }
    to {
      transform: scale(1);
    }
  }
  
  .success-popup-icon i {
    display: block;
  }
  
  .success-popup-title {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 30px 0;
    font-weight: 600;
  }
  
  .success-popup-ok-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    min-width: 120px;
  }
  
  .success-popup-ok-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
  }
  
  .success-popup-ok-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  }

/* PPIC Update Method – ARN dropdown */
.ppic-update-method-arn-select {
  display: block;
  max-width: 100%;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-size: 0.9rem;
  line-height: 1.35;
  box-sizing: border-box;
}

.ppic-update-method-arn-select:disabled {
  cursor: not-allowed;
  opacity: 0.9;
  background: #f1f5f9;
}

/* Make a Request — full page (former Proceed modal) */
.sales-order-final.ppic-make-request-page {
  padding-bottom: 24px;
}

.ppic-make-request-content.proceed-modal-content {
  position: relative;
  max-height: none;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.ppic-make-request-page .proceed-products-section {
  width: 100%;
}

.ppic-make-request-page .proceed-products-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

.ppic-make-request-page .proceed-modal-body {
  overflow-y: visible;
  max-height: none;
}

.ppic-make-request-page .inline-stock-section .stock-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ppic-make-request-page .inline-stock-section .stock-table {
  width: 100%;
  min-width: 560px;
}

.ppic-make-request-page .inline-stock-section .stock-table th:nth-child(1),
.ppic-make-request-page .inline-stock-section .stock-table td:nth-child(1) {
  width: 56px;
  text-align: center;
  white-space: nowrap;
}

.ppic-make-request-page .inline-stock-section .stock-table th:nth-child(2),
.ppic-make-request-page .inline-stock-section .stock-table td:nth-child(2) {
  min-width: 140px;
}

.ppic-make-request-page-header.proceed-modal-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  grid-gap: 0;
  gap: 0;
  min-height: 48px;
  padding-left: 56px; /* keep title clear of fixed back button */
}

.ppic-make-request-page-header .ppic-make-request-back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  margin: 0;
}

.ppic-make-request-page-header h2 {
  justify-self: center;
  margin: 0;
  grid-column: 1;
}

.ppic-make-request-header-spacer {
  grid-column: 1;
  min-width: 44px;
  visibility: hidden;
}

.ppic-make-request-page-loading {
  min-height: 240px;
}

.ppic-make-request-page-error {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 16px;
}

.ppic-make-request-back-link {
  margin-top: 16px;
  padding: 10px 18px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #059669;
  color: #fff;
  display: inline-flex;
  align-items: center;
}

.ppic-make-request-back-link:hover {
  background: #047857;
}

.ppic-move-to-order-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #059669;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.ppic-move-to-order-btn:hover:not(:disabled) {
  background: #047857;
}

.ppic-move-to-order-btn:disabled:not(.ppic-move-to-order-btn--saved) {
  cursor: not-allowed;
  opacity: 0.85;
  background: #6b7280;
}

/* Full-page lock while BLR/GUJ location conversion popups and network work run */
.ppic-location-process-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  cursor: wait;
  pointer-events: all;
  -webkit-user-select: none;
          user-select: none;
}

.ppic-location-process-lock-panel {
  background: #fff;
  border-radius: 10px;
  padding: 28px 36px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  max-width: 360px;
}

.ppic-location-process-lock-panel .sales-order-final-loading-spinner {
  margin: 0 auto 14px;
}

.ppic-location-process-lock-panel p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.planning-consignment-page {
  padding: 20px;
  background: #f8f9fa;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 700;
}

.page-header p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.error-banner {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  font-weight: 500;
}

.consignment-selector {
  display: flex;
  gap: 20px;
  align-items: end;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.selector-group label {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.consignment-select,
.dispatch-select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.consignment-select:focus,
.dispatch-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.consignment-select:disabled,
.dispatch-select:disabled {
  background: #e9ecef;
  cursor: not-allowed;
}

.refresh-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  height: -webkit-fit-content;
  height: fit-content;
  white-space: nowrap;
}

.refresh-btn:hover:not(:disabled) {
  background: #218838;
}

.refresh-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.add-product-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  height: -webkit-fit-content;
  height: fit-content;
  white-space: nowrap;
}

.add-product-btn:hover:not(:disabled) {
  background: #0056b3;
}

.add-product-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.action-section {
  display: flex;
  gap: 10px;
  align-items: center;
  height: -webkit-fit-content;
  height: fit-content;
}

.no-consignment-selected {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.empty-state {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 500px;
}

.empty-state h3 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 20px;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 10px 0;
  color: #6c757d;
  line-height: 1.5;
}

.empty-state p:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .planning-consignment-page {
    padding: 15px;
  }
  
  .page-header {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .page-header h1 {
    font-size: 24px;
  }
  
  .page-header p {
    font-size: 14px;
  }
  
  .consignment-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .selector-group {
    min-width: auto;
  }
  
  .action-section {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .refresh-btn,
  .add-product-btn {
    flex: 1 1;
    padding: 12px;
  }
  
  .empty-state {
    padding: 30px 20px;
  }
  
  .empty-state h3 {
    font-size: 18px;
  }
}

/* max width 480px style */

@media (max-width: 480px) {
  .planning-consignment-page {
    padding: 10px;
  }
  
  .page-header {
    padding: 15px 10px;
  }
  
  .page-header h1 {
    font-size: 20px;
  }
  
  .consignment-selector {
    padding: 15px;
  }
  
  .empty-state {
    padding: 20px 15px;
  }
  
  .empty-state h3 {
    font-size: 16px;
  }
  
  .empty-state p {
    font-size: 14px;
  }
}

.purchase-request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
  }
  
  .purchase-request-modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
  }
  
  .purchase-request-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
  }
  
  .purchase-request-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
  }
  
  .purchase-request-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
  }
  
  .purchase-request-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
  }
  
  .purchase-request-modal-body {
    padding: 20px;
    flex: 1 1;
    overflow-y: auto;
  }
  
  .purchase-request-form-section {
    margin-bottom: 20px;
  }
  
  .purchase-request-form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid #059669;
    padding-bottom: 10px;
  }
  
  .purchase-request-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 15px;
    gap: 15px;
    margin-bottom: 15px;
  }
  
  .purchase-request-form-group {
    display: flex;
    flex-direction: column;
  }
  
  .purchase-request-form-group-full {
    grid-column-start: 1; grid-column-end: -1;
  }
  
  .purchase-request-form-group label {
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
  }
  
  .purchase-request-input,
  .purchase-request-input-disabled {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
  }
  
  .purchase-request-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1);
  }
  
  .purchase-request-input-disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
  }
  
  .purchase-request-form-group textarea {
    resize: vertical;
    min-height: 80px;
  }
  
  .purchase-request-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
  }
  
  .purchase-request-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
  }
  
  .purchase-request-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .purchase-request-btn-primary {
    background-color: #059669;
    color: white;
  }
  
  .purchase-request-btn-primary:hover:not(:disabled) {
    background-color: #047857;
  }
  
  .purchase-request-btn-secondary {
    background-color: #6b7280;
    color: white;
  }
  
  .purchase-request-btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
  }
  
  /* Responsive design */
  @media (max-width: 768px) {
    .purchase-request-modal-content {
      max-width: 95%;
      max-height: 95vh;
    }
  
    .purchase-request-form-row {
      grid-template-columns: 1fr;
    }
  
    .purchase-request-form-group-full {
      grid-column: 1;
    }
  }
  
  
/* Received Consignment Management Styles - Full Width */

.received-consignment-management {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.received-consignment-header {
  margin-bottom: 30px;
  width: 100%;
}

.received-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

.received-consignment-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.received-consignment-header p {
  font-size: 1rem;
  color: #666;
}

.consignment-status-btn {
  padding: 12px 24px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  white-space: nowrap;
}

.consignment-status-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.consignment-status-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.consignment-status-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.consignment-status-btn i {
  font-size: 1rem;
}

/* Loading State */
.received-consignment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 400px;
}

.received-consignment-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.received-consignment-loading p {
  color: #666;
  font-size: 1rem;
}

/* Selector Section */
.received-consignment-selector {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  align-items: flex-end;
  width: 100%;
}

.received-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 250px;
  flex: 1 1;
  max-width: 100%;
}

.received-selector-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.received-warehouse-select,
.received-consignment-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.received-warehouse-select:hover,
.received-consignment-select:hover {
  border-color: #667eea;
}

.received-warehouse-select:focus,
.received-consignment-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.received-warehouse-select:disabled,
.received-consignment-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Messages */
.received-consignment-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.received-consignment-error i {
  font-size: 1.2rem;
}

.received-consignment-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.received-consignment-success i {
  font-size: 1.2rem;
}

/* Empty State */
.received-consignment-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

/* Products Section */
.received-consignment-products {
  margin-top: 30px;
  width: 100%;
}

.received-consignment-products h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.received-products-table-container {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.received-products-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  box-sizing: border-box;
}

.received-products-table thead {
  background-color: #f8f9fa;
}

.received-products-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
  font-size: 0.95rem;
}

.received-products-table th:first-child {
  text-align: center;
  width: 60px;
}

.received-products-table td:first-child {
  text-align: center;
  font-weight: 500;
  color: #666;
}

.received-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #555;
}

.received-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.received-products-table tbody tr:last-child td {
  border-bottom: none;
}

/* Received Quantity Input */
.received-qty-input {
  width: 120px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  text-align: right;
  transition: all 0.3s ease;
}

.received-qty-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.received-qty-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Receive Status Button (Blue) */
.receive-status-btn {
  padding: 8px 16px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.receive-status-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.receive-status-btn:active:not(:disabled) {
  transform: translateY(0);
}

.receive-status-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

.receive-status-btn.received {
  background-color: #10b981;
}

.receive-status-btn.received:hover:not(:disabled) {
  background-color: #059669;
}

.receive-status-btn i {
  font-size: 0.9rem;
}

/* Receive Button (for quantity update) */
.received-receive-btn {
  padding: 8px 16px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.received-receive-btn:hover:not(:disabled) {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.received-receive-btn:active:not(:disabled) {
  transform: translateY(0);
}

.received-receive-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.received-receive-btn i {
  font-size: 0.9rem;
}

/* Actions Section */
.received-consignment-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.receive-all-btn {
  padding: 12px 24px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  text-align: left;
}

.receive-all-btn:hover:not(:disabled) {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.receive-all-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.receive-all-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.receive-all-btn i {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .received-consignment-management {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .received-consignment-header h2 {
    font-size: 1.5rem;
  }

  .received-header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .consignment-status-btn {
    width: 100%;
    justify-content: center;
  }

  .received-consignment-selector {
    flex-direction: column;
    width: 100%;
  }

  .received-selector-group {
    min-width: 100%;
    width: 100%;
  }

  .received-warehouse-select,
  .received-consignment-select {
    width: 100%;
  }

  .received-products-table-container {
    font-size: 0.9rem;
    width: 100%;
    overflow-x: auto;
  }

  .received-products-table {
    min-width: 1000px;
  }

  .received-products-table th,
  .received-products-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .received-qty-input {
    width: 100%;
    max-width: 120px;
  }

  .received-consignment-actions {
    justify-content: stretch;
  }

  .receive-all-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .received-consignment-management {
    padding: 10px;
  }

  .received-consignment-header h2 {
    font-size: 1.3rem;
  }

  .received-consignment-header p {
    font-size: 0.9rem;
  }

  .received-products-table {
    min-width: 800px;
    font-size: 0.8rem;
  }

  .received-products-table th,
  .received-products-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .receive-status-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}


/* PPIC Reject Order Styles */
.ppic-reject-order {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.ppic-reject-order-header {
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-reject-order-header h2 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.ppic-reject-order-header p {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.ppic-reject-order-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
}

.ppic-reject-order-error i {
  font-size: 1.2rem;
}

.ppic-reject-order-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #16a34a;
}

.ppic-reject-order-success i {
  font-size: 1.2rem;
}

.ppic-reject-order-select-section {
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-reject-order-select-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

.ppic-reject-order-dropdown-wrapper {
  position: relative;
  max-width: 500px;
}

.ppic-reject-order-select {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  padding-right: 36px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  text-align: left;
  color: #374151;
}

.ppic-reject-order-select:hover:not(:disabled) {
  border-color: #9ca3af;
}

.ppic-reject-order-select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.ppic-reject-order-select:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
  color: #9ca3af;
}

.ppic-reject-order-select-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppic-reject-order-select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6b7280;
  pointer-events: none;
}

.ppic-reject-order-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  display: flex;
  flex-direction: column;
}

.ppic-reject-order-dropdown-search {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.ppic-reject-order-dropdown-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.ppic-reject-order-dropdown-search input:focus {
  border-color: #059669;
}

.ppic-reject-order-dropdown-list {
  overflow-y: auto;
  max-height: 240px;
}

.ppic-reject-order-dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
  font-size: 14px;
  color: #333;
}

.ppic-reject-order-dropdown-option:hover {
  background-color: #f5f5f5;
}

.ppic-reject-order-dropdown-option.selected {
  background-color: #e3f2fd;
}

.ppic-reject-order-dropdown-empty {
  padding: 16px;
  color: #999;
  text-align: center;
  font-size: 14px;
}

.ppic-reject-order-details {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-reject-order-details-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #64748b;
}

.ppic-reject-order-card {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
}

.ppic-reject-order-card:last-of-type {
  margin-bottom: 0;
}

.ppic-reject-order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ppic-reject-order-card h3 {
  margin: 0 0 16px 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.ppic-reject-order-card-header h3 {
  margin: 0;
}

.ppic-reject-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.ppic-reject-order-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ppic-reject-order-detail-item label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.ppic-reject-order-detail-item span {
  font-size: 0.95rem;
  color: #1e293b;
}

.ppic-reject-order-detail-item-full {
  grid-column: 1 / -1;
}

.ppic-reject-order-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.ppic-reject-order-status-badge.pending {
  background-color: #fef3c7;
  color: #b45309;
}

.ppic-reject-order-status-badge.verified,
.ppic-reject-order-status-badge.final,
.ppic-reject-order-status-badge.approved {
  background-color: #d1fae5;
  color: #059669;
}

.ppic-reject-order-status-badge.rejected {
  background-color: #fee2e2;
  color: #dc2626;
}

.ppic-reject-order-status-badge.cancelled {
  background-color: #e2e8f0;
  color: #475569;
}

.ppic-reject-order-rejection-info {
  background-color: #fef2f2;
  border-color: #fecaca;
}

.ppic-reject-order-products-table-container {
  overflow-x: auto;
  margin-top: 12px;
}

.ppic-reject-order-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ppic-reject-order-products-table th,
.ppic-reject-order-products-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.ppic-reject-order-products-table th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #475569;
}

.ppic-reject-order-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.ppic-reject-order-products-table tfoot tr {
  background-color: #f1f5f9;
  font-weight: 600;
}

.ppic-reject-order-no-products {
  margin: 0;
  padding: 16px;
  color: #64748b;
  text-align: center;
}

.ppic-reject-order-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.ppic-reject-order-reject-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: #dc2626;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ppic-reject-order-reject-btn:hover:not(:disabled) {
  background-color: #b91c1c;
}

.ppic-reject-order-reject-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ppic-reject-order-loading,
.ppic-reject-order-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-reject-order-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: ppic-reject-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes ppic-reject-spin {
  to {
    transform: rotate(360deg);
  }
}

.ppic-reject-order-empty p {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.ppic-cancel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.ppic-cancel-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  max-width: 480px;
  width: 100%;
  padding: 24px;
}

.ppic-cancel-modal h3 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 1.2rem;
}

.ppic-cancel-modal-hint {
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ppic-cancel-modal-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.ppic-cancel-required {
  color: #dc2626;
}

.ppic-cancel-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 20px;
}

.ppic-cancel-modal-textarea:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.ppic-cancel-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ppic-cancel-modal-btn-secondary {
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
}

.ppic-cancel-modal-btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.ppic-cancel-modal-btn-primary {
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  background: #dc2626;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ppic-cancel-modal-btn-primary:hover:not(:disabled) {
  background: #b91c1c;
}

.ppic-cancel-modal-btn-primary:disabled,
.ppic-cancel-modal-btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* PPIC Rejected Order Report Styles */
.ppic-rejected-order-report {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.ppic-rejected-order-report-header {
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-rejected-order-report-header h2 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.ppic-rejected-order-report-header p {
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 1rem;
}

.ppic-rejected-order-report-controls {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.ppic-rejected-order-report-entries,
.ppic-rejected-order-report-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppic-rejected-order-report-entries label,
.ppic-rejected-order-report-search label {
  color: #64748b;
  font-size: 0.9rem;
}

.ppic-rejected-order-report-entries select,
.ppic-rejected-order-report-search input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
}

.ppic-rejected-order-report-search input {
  min-width: 200px;
}

.ppic-rejected-order-report-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
}

.ppic-rejected-order-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.ppic-rejected-order-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ppic-rejected-order-report-table th,
.ppic-rejected-order-report-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.ppic-rejected-order-report-table th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #475569;
}

.ppic-rejected-order-report-table tbody tr:hover {
  background-color: #f8fafc;
}

.ppic-rejected-order-report-company-under {
  color: #64748b;
  font-size: 0.9em;
}

.ppic-rejected-order-report-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
}

.ppic-rejected-order-report-view-btn:hover:not(:disabled) {
  background: #047857;
}

.ppic-rejected-order-report-view-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ppic-rejected-order-report-empty {
  padding: 48px;
  text-align: center;
  color: #64748b;
}

.ppic-rejected-order-report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
}

.ppic-rejected-order-report-pagination-info {
  color: #64748b;
  font-size: 0.875rem;
}

.ppic-rejected-order-report-pagination-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ppic-rejected-order-report-pagination-buttons button {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
}

.ppic-rejected-order-report-pagination-buttons button:hover:not(:disabled) {
  background: #f1f5f9;
}

.ppic-rejected-order-report-pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ppic-rejected-order-report-pagination-buttons button.active {
  background: #059669;
  color: white;
  border-color: #059669;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: #64748b;
}

.ppic-rejected-order-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppic-rejected-order-report-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: ppic-rejected-report-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes ppic-rejected-report-spin {
  to { transform: rotate(360deg); }
}

.status-badge.rejected,
.status-badge.cancelled {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #fee2e2;
  color: #dc2626;
}

/* Modal */
.ppic-rejected-order-report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ppic-rejected-order-report-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ppic-rejected-order-report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ppic-rejected-order-report-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.ppic-rejected-order-report-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748b;
}

.ppic-rejected-order-report-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1;
}

.ppic-rejected-order-report-modal-section {
  margin-bottom: 24px;
}

.ppic-rejected-order-report-modal-section h3 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: #1e293b;
}

.ppic-rejected-order-report-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}

.ppic-rejected-order-report-detail-grid label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 2px;
}

.ppic-rejected-order-report-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ppic-rejected-order-report-products-table th,
.ppic-rejected-order-report-products-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.ppic-rejected-order-report-products-table th {
  background: #f1f5f9;
}

.ppic-rejected-order-report-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  text-align: right;
}

.ppic-rejected-order-report-modal-footer button {
  padding: 8px 24px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.ppic-rejected-order-report-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px;
}

.sales-order-approved {
    padding: 20px;
    max-width: 100%;
    overflow-x: auto;
  }
  
  .sales-order-approved-header {
    margin-bottom: 30px;
  }
  
  .sales-order-approved-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
  }
  
  .sales-order-approved-header-row .location-tabs,
  .location-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .location-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .location-tab:hover {
    border-color: #007bff;
    color: #007bff;
  }
  
  .location-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
  }
  
  .sales-order-approved-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .sales-order-approved-header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .sales-order-approved-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-left: auto;
  }
  
  .entries-selector {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .entries-selector label {
    font-size: 0.9rem;
    color: #555;
  }
  
  .entries-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background: white;
    cursor: pointer;
  }
  
  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .search-box label {
    font-size: 0.9rem;
    color: #555;
  }
  
  .search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    min-width: 200px;
  }
  
  .search-input:focus {
    outline: none;
    border-color: #007bff;
  }
  
  /* Messages */
  .sales-order-approved-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
  }
  
  .sales-order-approved-error i {
    font-size: 1.1rem;
  }
  
  /* Loading State */
  .sales-order-approved-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .sales-order-approved-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Table Container */
  .sales-order-approved-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 20px;
  }
  
  .sales-order-approved-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 2000px;
  }
  
  .sales-order-approved-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
  }
  
  .sales-order-approved-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
  }
  
  .sales-order-approved-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
  }
  
  .sales-order-approved-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .sales-order-approved-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .sales-order-approved-table td {
    padding: 14px 16px;
    color: #555;
    font-size: 0.95rem;
    vertical-align: middle;
  }
  
  /* Action Buttons */
  .action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  
  .view-btn {
    background-color: #007bff;
    color: white;
  }
  
  .view-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  }
  
  .view-btn:active {
    transform: translateY(0);
  }
  
  /* Status Badges */
  .status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
  }
  
  .status-pending {
    background-color: #fff3cd;
    color: #856404;
  }
  
  .status-verified {
    background-color: #d4edda;
    color: #155724;
  }
  
  .status-rejected {
    background-color: #f8d7da;
    color: #721c24;
  }
  
  .status-final {
    background-color: #cce5ff;
    color: #004085;
  }
  
  .acc-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
  }
  
  .acc-status.approved {
    background-color: #d4edda;
    color: #155724;
  }
  
  /* Pagination */
  .sales-order-approved-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .pagination-info {
    font-size: 0.9rem;
    color: #666;
  }
  
  .pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
  }
  
  .page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .pagination-ellipsis {
    padding: 8px 4px;
    color: #666;
  }
  
  /* Empty State */
  .sales-order-approved-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
  }
  
  /* View Modal */
  .view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }
  
  .view-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .view-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
  }
  
  .view-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }
  
  .modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
  }
  
  .modal-close-btn:hover {
    background-color: #e9ecef;
    color: #333;
  }
  
  .view-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .view-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .view-modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  .view-modal-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
  }
  
  /* View Order Details Section */
  .view-order-details {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
  }
  
  .view-detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
  }
  
  .view-detail-field {
    display: flex;
    flex-direction: column;
  }
  
  .view-detail-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
  }
  
  .view-detail-field span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
  }
  
  /* View Products Table */
  .view-products-section {
    margin-bottom: 30px;
    overflow-x: auto;
  }
  
  .view-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1000px;
  }
  
  .view-products-table thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .view-products-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .view-products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .view-products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .view-products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .view-products-table td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }
  
  .view-products-table tfoot {
    background-color: #e9ecef;
    border-top: 2px solid #dee2e6;
  }
  
  .view-products-table tfoot td {
    font-weight: 600;
    color: #333;
  }
  
  .no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
  }
  
  /* View Modal Footer */
  .view-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
  }
  
  .view-modal-footer .close-btn {
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .view-modal-footer .close-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .sales-order-approved {
      padding: 15px;
    }
  
    .sales-order-approved-header h2 {
      font-size: 1.5rem;
    }
  
    .sales-order-approved-controls {
      flex-direction: column;
      align-items: stretch;
    }
  
    .sales-order-approved-pagination {
      flex-direction: column;
      align-items: stretch;
    }
  
    .pagination-buttons {
      justify-content: center;
    }
  
    .view-modal-content {
      max-width: 95%;
      max-height: 95vh;
    }
  
    .view-detail-row {
      grid-template-columns: 1fr;
    }
  }
  
  
.pending-sales-order {
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f5f5;
  }
  
  .pending-sales-order-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .pending-sales-order-header .location-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .pending-sales-order-header .location-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .pending-sales-order-header .location-tab:hover {
    border-color: #059669;
    color: #059669;
  }
  
  .pending-sales-order-header .location-tab.active {
    background: #059669;
    border-color: #059669;
    color: white;
  }
  
  .pending-sales-order-header-left {
    display: flex;
    align-items: center;
  }
  
  .vhc-label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
  }
  
  .pending-sales-order-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
  }
  
  .pending-sales-order-header-right span {
    color: #666;
    font-size: 0.9rem;
  }
  
  .pending-sales-order-header-right .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .pending-sales-order-header-right .search-box label {
    font-size: 0.9rem;
    color: #555;
  }
  
  .pending-sales-order-header-right .search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 220px;
  }
  
  .pending-sales-order-header-right .search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
  }
  
  .detail-print-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
  }
  
  .detail-print-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  }
  
  .pending-sales-order-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
  }
  
  .pending-sales-order-error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .pending-sales-order-table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 20px;
  }
  
  .pending-sales-order-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
  }
  
  .pending-sales-order-table thead {
    background-color: #f1f5f9;
  }
  
  .pending-sales-order-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.875rem;
    white-space: nowrap;
  }
  
  .pending-sales-order-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
  }
  
  .pending-sales-order-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .pending-sales-order-table td {
    padding: 12px 16px;
    text-align: left;
    color: #64748b;
    font-size: 0.875rem;
    vertical-align: middle;
  }
  
  .view-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  
  .view-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  }
  
  .view-btn i {
    font-size: 0.875rem;
  }
  
  /* View Modal */
  .view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }
  
  .view-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .view-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
  }
  
  .view-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }
  
  .modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
  }
  
  .modal-close-btn:hover {
    background-color: #e9ecef;
    color: #333;
  }
  
  .view-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1;
  }
  
  .view-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .view-modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  .view-modal-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
  }
  
  .view-modal-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 1.1rem;
  }
  
  /* View Order Info */
  .view-order-info {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
  }
  
  .view-order-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
  }
  
  .view-order-info-field {
    display: flex;
    flex-direction: column;
  }
  
  .view-order-info-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
  }
  
  .view-order-info-field span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
  }
  
  /* View Products Table */
  .view-products-section {
    margin-bottom: 30px;
    overflow-x: auto;
  }
  
  .view-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1000px;
  }
  
  .view-products-table thead {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
  }
  
  .view-products-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .view-products-table tbody tr {
    border-bottom: 1px solid #e9ecef;
  }
  
  .view-products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .view-products-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .view-products-table td {
    padding: 12px 14px;
    color: #555;
    font-size: 0.9rem;
    vertical-align: middle;
  }
  
  /* View Note Section */
  .view-note-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
  }
  
  .view-note-section label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: block;
  }
  
  .view-note-content {
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  
  /* View Modal Footer */
  .view-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
  }
  
  .modal-close-button {
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .modal-close-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  }
  
  .status-complete {
    display: inline-block;
    padding: 4px 8px;
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .pending-sales-order-note {
    padding: 15px 20px;
    background-color: #fef3c7;
    border-top: 2px solid #e2e8f0;
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  .pending-sales-order-note strong {
    font-weight: 600;
  }
  
  .pending-sales-order-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    font-size: 1.1rem;
  }
  
  .no-data {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px !important;
  }
  
  .pending-sales-order-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
  }
  
  .pending-sales-order-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* View Section Styles */
  .view-section {
    margin-bottom: 30px;
  }
  
  .view-section:last-child {
    margin-bottom: 0;
  }
  
  .view-section h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
  }
  
  .view-detail-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
  }
  
  .view-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 15px;
    gap: 15px;
  }
  
  .view-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1;
    min-width: 150px;
  }
  
  .view-detail-item.full-width {
    grid-column-start: 1; grid-column-end: -1;
  }
  
  .view-detail-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .view-detail-item span {
    font-size: 0.95rem;
    color: #333;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    min-height: 38px;
    display: flex;
    align-items: center;
  }
  
  .view-products-table-container {
    overflow-x: auto;
    margin-top: 15px;
  }
  
  .view-products-table tfoot {
    background-color: #f8f9fa;
  }
  
  .view-products-table tfoot tr {
    border-top: 2px solid #dee2e6;
  }
  
  .view-products-table tfoot td {
    font-weight: 600;
    padding: 12px 14px;
  }
  
  /* Pagination Styles */
  .pending-sales-order-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .pagination-info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
  }
  
  .pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .pagination-btn {
    padding: 8px 16px;
    background-color: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
  }
  
  .pagination-btn.active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
  }
  
  .pagination-ellipsis {
    padding: 8px 4px;
    color: #64748b;
    font-size: 0.875rem;
    -webkit-user-select: none;
            user-select: none;
  }
  
  @media (max-width: 768px) {
    .pending-sales-order-pagination {
      flex-direction: column;
      align-items: stretch;
    }
  
    .pagination-info {
      text-align: center;
      margin-bottom: 10px;
    }
  
    .pagination-controls {
      justify-content: center;
    }
  }
  
  
  
.stock-report-management {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* Header Section */
.stock-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-report-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.stock-report-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.stock-report-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.stock-report-date-range label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.stock-report-date-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
}

.stock-report-date-input:hover {
  border-color: #007bff;
}

.stock-report-date-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-report-date-separator {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.stock-report-clear-date-btn {
  padding: 8px 12px;
  border: 1px solid #dc3545;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  background: white;
  color: #dc3545;
}

.stock-report-clear-date-btn:hover {
  background-color: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.stock-report-product-select {
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  color: #333;
  min-width: 200px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.stock-report-product-select:hover {
  border-color: #007bff;
}

.stock-report-product-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-report-export-btn,
.stock-report-print-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.stock-report-export-btn {
  background-color: #007bff;
  color: white;
}

.stock-report-export-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.stock-report-print-btn {
  background-color: #28a745;
  color: white;
}

.stock-report-print-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Product Section */
.stock-report-product-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.stock-report-product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-report-product-info label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-report-product-name {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.stock-report-check-btn {
  padding: 10px 24px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.stock-report-check-btn:hover {
  background-color: #138496;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.stock-report-back-btn {
  padding: 10px 24px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  margin-left: 12px;
}

.stock-report-back-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.stock-report-product-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stock-report-product-balance-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-report-hold-badge,
.stock-report-hold-badge-inline {
  padding: 8px 16px;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Error Message */
.stock-report-date-info {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #004085;
  font-size: 0.95rem;
}

.stock-report-date-info i {
  color: #0066cc;
}

.stock-report-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-report-error i {
  font-size: 1.1rem;
}

/* Loading State */
.stock-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.stock-report-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.stock-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.stock-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.stock-report-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.stock-report-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stock-report-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.stock-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.stock-report-table tbody tr:last-child {
  border-bottom: none;
}

.stock-report-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.stock-report-table td:first-child {
  font-weight: 600;
  color: #007bff;
}

/* Type Badge */
.stock-report-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.stock-report-type-badge.type-return {
  background-color: #ffc107;
  color: #856404;
}

.stock-report-type-badge.type-original {
  background-color: #17a2b8;
  color: #fff;
}

.stock-report-type-badge.type-ready {
  background-color: #28a745;
  color: #fff;
}

/* View Button */
.stock-report-view-btn {
  padding: 8px 12px;
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.stock-report-view-btn:hover {
  background-color: #dee2e6;
  border-color: #adb5bd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-report-view-btn i {
  font-size: 0.9rem;
}

.stock-report-edit-btn {
  padding: 8px 12px;
  background-color: #f0ad4e;
  color: white;
  border: 1px solid #eea236;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stock-report-edit-btn:hover {
  background-color: #ec971f;
  border-color: #d58512;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(240, 173, 78, 0.3);
}

.stock-report-edit-btn i {
  font-size: 0.9rem;
}

.stock-report-action-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.stock-report-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.stock-report-status-badge.status-approved {
  background-color: #28a745;
  color: #fff;
}

.stock-report-status-badge.status-rejected {
  background-color: #dc3545;
  color: #fff;
}

.stock-report-status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

/* Products List */
.stock-report-products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stock-report-products-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
}

.stock-report-products-header-spacer {
  width: 36px;
  flex-shrink: 0;
}

.stock-report-products-header-label {
  flex: 1 1;
  display: flex;
  align-items: center;
}

.stock-report-products-header-label span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-report-products-header-actions {
  min-width: 140px;
  flex-shrink: 0;
}

.stock-report-product-row {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.stock-report-product-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.stock-report-product-header .stock-report-product-balance-badges {
  margin-left: auto;
}

.stock-report-expand-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  flex-shrink: 0;
}

.stock-report-expand-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.stock-report-product-info-inline {
  flex: 1 1;
  display: flex;
  align-items: center;
}

.stock-report-product-name-inline {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.stock-report-check-btn-inline {
  padding: 8px 20px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.stock-report-check-btn-inline:hover {
  background-color: #138496;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.stock-report-product-items {
  padding: 20px;
  background: white;
}

/* Stock Modal */
.stock-report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.stock-report-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.stock-report-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.stock-report-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.stock-report-modal-body {
  padding: 24px;
  flex: 1 1;
}

.stock-report-categories {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stock-report-category-header {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  grid-gap: 16px;
  gap: 16px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-report-category-label-header {
  font-weight: 600;
}

.stock-report-category-value-header {
  text-align: right;
  font-weight: 600;
}

.stock-report-category-item {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  grid-gap: 16px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.stock-report-category-item:hover {
  background-color: #f8f9fa;
}

.stock-report-category-item:last-child {
  border-bottom: none;
}

.stock-report-category-label {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

.stock-report-category-value {
  font-size: 1rem;
  color: #495057;
  font-weight: 600;
  text-align: right;
}

.stock-report-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
}

.stock-report-modal-close-btn {
  padding: 10px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.stock-report-modal-close-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* View Details Modal */
.stock-report-view-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.stock-report-view-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.stock-report-view-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.stock-report-view-modal-body {
  padding: 24px;
  flex: 1 1;
}

.stock-report-view-table-container {
  overflow-x: auto;
}

.stock-report-view-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.stock-report-view-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.stock-report-view-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stock-report-view-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.stock-report-view-table tbody tr:hover {
  background-color: #f8f9fa;
}

.stock-report-view-table tbody tr:last-child {
  border-bottom: none;
}

.stock-report-view-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.stock-report-view-table td:first-child,
.stock-report-view-table td:nth-child(2) {
  text-align: right;
  font-weight: 500;
}

.stock-report-ledger-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.stock-report-ledger-type.type-outward {
  background: #ffebee;
  color: #c62828;
}

.stock-report-ledger-type.type-return,
.stock-report-ledger-type.type-inward {
  background: #e8f5e9;
  color: #2e7d32;
}

.stock-report-ledger-type.type-movement {
  background: #e3f2fd;
  color: #1565c0;
}

.stock-report-view-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
}

/* Empty State */
.stock-report-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stock-report-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Print Styles */
@media print {
  .stock-report-management {
    background-color: white;
    padding: 0;
  }

  .stock-report-header,
  .stock-report-product-section,
  .stock-report-filters button,
  .stock-report-check-btn,
  .stock-report-check-btn-inline,
  .stock-report-expand-btn,
  .stock-report-view-btn {
    display: none;
  }

  .stock-report-table-container {
    box-shadow: none;
  }

  .stock-report-table {
    min-width: 100%;
  }

  .stock-report-table thead {
    background-color: #f8f9fa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .stock-report-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .stock-report-filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .stock-report-product-select {
    flex: 1 1;
    min-width: 150px;
  }

  .stock-report-product-section {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .stock-report-table {
    font-size: 0.85rem;
  }

  .stock-report-table th,
  .stock-report-table td {
    padding: 10px 12px;
  }
}


.store-sample-report {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.store-sample-report-header {
  margin-bottom: 30px;
}

.store-sample-report-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.store-sample-report-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Messages */
.store-sample-report-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.store-sample-report-error i {
  font-size: 1.1rem;
}

/* Loading State */
.store-sample-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.store-sample-report-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.store-sample-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.store-sample-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1300px;
}

.store-sample-report-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.store-sample-report-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.store-sample-report-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.store-sample-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.store-sample-report-table tbody tr.sent-to-qc-row {
  background-color: #f0f8ff;
}

.store-sample-report-table tbody tr.sent-to-qc-row:hover {
  background-color: #e6f3ff;
}

.store-sample-report-table tbody tr.qc-approved-row {
  background-color: #f0fff4;
}

.store-sample-report-table tbody tr.qc-approved-row:hover {
  background-color: #e6ffe6;
}

.store-sample-report-table tbody tr:last-child {
  border-bottom: none;
}

.store-sample-report-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.store-sample-report-table td:first-child {
  font-weight: 600;
  color: #007bff;
  position: relative;
}

.approved-badge {
  margin-left: 8px;
  color: #28a745;
  font-size: 0.85rem;
  vertical-align: middle;
}

.sent-badge {
  margin-left: 8px;
  color: #007bff;
  font-size: 0.85rem;
  vertical-align: middle;
}

.approved-badge i,
.sent-badge i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Sent Date/Time Column */
.sent-date-cell {
  color: #007bff;
  font-weight: 500;
}

.sent-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #007bff;
  font-size: 0.9rem;
}

.sent-date-time i {
  font-size: 0.8rem;
  color: #007bff;
}

.not-sent {
  color: #999;
  font-style: italic;
}

/* QC Approved Status Column */
.qc-approved-cell {
  color: #28a745;
  font-weight: 500;
}

.qc-pending-cell {
  color: #ffc107;
  font-weight: 500;
}

.approved-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 600;
}

.approved-status i {
  font-size: 0.85rem;
  color: #28a745;
}

.pending-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffc107;
  font-size: 0.9rem;
  font-weight: 600;
}

.pending-status i {
  font-size: 0.85rem;
  color: #ffc107;
}

/* QC Approved Date/Time Column */
.qc-approved-date-cell {
  color: #28a745;
  font-weight: 500;
}

.approved-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
}

.approved-date-time i {
  font-size: 0.8rem;
  color: #28a745;
}

.not-approved {
  color: #999;
  font-style: italic;
}

/* Empty State */
.store-sample-report-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.store-sample-report-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* View Button */
.view-details-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-details-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.view-details-btn:active {
  transform: translateY(0);
}

.view-details-btn i {
  font-size: 0.85rem;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-modal-error i {
  font-size: 1.1rem;
}

/* View Section Styles */
.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item p {
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

/* View Details Table */
.view-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-details-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-details-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-details-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.view-details-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.view-details-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-details-table tbody tr:last-child {
  border-bottom: none;
}

.view-details-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-sample-report {
    padding: 15px;
  }

  .store-sample-report-header h2 {
    font-size: 1.5rem;
  }

  .store-sample-report-table {
    font-size: 0.85rem;
  }

  .store-sample-report-table th,
  .store-sample-report-table td {
    padding: 10px 12px;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-detail-grid {
    grid-template-columns: 1fr;
  }

  .view-details-table {
    font-size: 0.85rem;
  }

  .view-details-table th,
  .view-details-table td {
    padding: 8px 12px;
  }
}


.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
.drying-container {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.drying-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.drying-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.drying-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drying-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Drying Form Section */
.drying-form-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.drying-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 20px;
}

.drying-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drying-form-group label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.drying-form-group input,
.drying-form-group select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
  background-color: white;
  transition: border-color 0.2s;
}

.drying-form-group input:focus,
.drying-form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.drying-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
}

.drying-save-btn {
  padding: 12px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.drying-save-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.drying-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Drying Table Section */
.drying-table-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.drying-table-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.drying-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drying-search label {
  font-weight: 600;
  color: #555;
}

.drying-search input {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 250px;
}

.drying-search input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.drying-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.drying-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.drying-table thead {
  background-color: #f8f9fa;
}

.drying-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.drying-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.drying-table tbody tr:hover {
  background-color: #f8f9fa;
}

.drying-table td {
  padding: 10px 8px;
  color: #555;
}

.drying-empty {
  text-align: center;
  padding: 40px;
  color: #999;
}

.drying-edit-btn,
.drying-delete-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.drying-edit-btn {
  background-color: #007bff;
  color: white;
}

.drying-edit-btn:hover {
  background-color: #0056b3;
}

.drying-delete-btn {
  background-color: #dc3545;
  color: white;
}

.drying-delete-btn:hover:not(:disabled) {
  background-color: #c82333;
}

.drying-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Pagination */
.drying-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.drying-pagination-info {
  color: #666;
  font-size: 0.9rem;
}

.drying-pagination-controls {
  display: flex;
  gap: 8px;
}

.drying-pagination-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background-color: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.drying-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.drying-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.drying-pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* Modal Styles */
.drying-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.drying-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drying-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drying-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.drying-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.drying-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.drying-modal-content {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.drying-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.drying-modal-cancel-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.drying-modal-cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.drying-modal-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.drying-modal-save-btn {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.drying-modal-save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.drying-modal-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .drying-form-grid {
    grid-template-columns: 1fr;
  }

  .drying-table {
    font-size: 0.8rem;
  }

  .drying-table th,
  .drying-table td {
    padding: 8px 4px;
  }

  .drying-pagination {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .drying-table-section{
    overflow-x: auto;
  }

  .drying-form-group{
    max-width: 65%;
  }
}


.oil-container {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.oil-header {
  margin-bottom: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.oil-header h2 {
  color: #333;
  margin-bottom: 5px;
  font-size: 1.8rem;
  font-weight: bold;
}

.oil-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oil-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oil-form-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.oil-form-section h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.oil-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.oil-form-group {
  display: flex;
  flex-direction: column;
}

.oil-form-group label {
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.oil-form-group input,
.oil-form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.oil-form-group input:focus,
.oil-form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.oil-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.oil-save-btn {
  padding: 10px 30px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.oil-save-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.oil-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.oil-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.oil-table-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.oil-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.oil-search label {
  font-weight: 500;
  color: #333;
}

.oil-search input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 300px;
  max-width: 100%;
  box-sizing: border-box;
}

.oil-search input:focus {
  outline: none;
  border-color: #007bff;
}

.oil-entries-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
}

.oil-entries-per-page label {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.oil-entries-per-page select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.oil-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.oil-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
  margin-bottom: 20px;
  table-layout: auto;
}

/* Table Wrapper for Horizontal Scroll */
.oil-table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.oil-table thead {
  background-color: #f8f9fa;
}

.oil-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
}

.oil-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
  font-size: 0.9rem;
}

.oil-table tbody tr:hover {
  background-color: #f8f9fa;
}

.oil-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.oil-edit-btn,
.oil-delete-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.oil-edit-btn {
  background-color: #ffc107;
  color: #333;
  margin-right: 5px;
}

.oil-edit-btn:hover {
  background-color: #e0a800;
  transform: translateY(-1px);
}

.oil-delete-btn {
  background-color: #dc3545;
  color: white;
}

.oil-delete-btn:hover:not(:disabled) {
  background-color: #c82333;
  transform: translateY(-1px);
}

.oil-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.oil-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

.oil-pagination-info {
  color: #666;
  font-size: 0.9rem;
}

.oil-pagination-controls {
  display: flex;
  gap: 8px;
}

.oil-pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.oil-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.oil-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.oil-pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* Modal Styles */
.oil-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.oil-modal {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.oil-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.oil-modal-header h3 {
  margin: 0;
  color: #333;
}

.oil-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.oil-modal-close:hover {
  background-color: #f8f9fa;
}

.oil-modal-content {
  padding: 20px;
}

.oil-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #dee2e6;
}

.oil-modal-cancel-btn,
.oil-modal-save-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.oil-modal-cancel-btn {
  background-color: #6c757d;
  color: white;
}

.oil-modal-cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
}

.oil-modal-save-btn {
  background-color: #007bff;
  color: white;
}

.oil-modal-save-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.oil-modal-cancel-btn:disabled,
.oil-modal-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .oil-container {
    padding: 12px;
    width: 100%;
    max-width: 100%;
  }

  .oil-header {
    width: 100%;
    max-width: 100%;
  }

  .oil-form-section {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .oil-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .oil-table-section {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .oil-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .oil-search {
    width: 100%;
  }

  .oil-search input {
    min-width: 0;
    width: 100%;
  }


  div.oil-form-group{
    min-width: 0;
  }

  .oil-table-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .oil-table {
    font-size: 0.75rem;
    min-width: 900px;
  }

  .oil-table th {
    padding: 10px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .oil-table td {
    padding: 10px 8px;
    font-size: 0.75rem;
  }

  .oil-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .oil-pagination-info {
    text-align: center;
    font-size: 0.85rem;
  }

  .oil-pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .oil-pagination-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 0.8rem;
  }

  .oil-modal {
    width: 95%;
    margin: 10px;
    max-width: 95vw;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .oil-container {
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .oil-form-section,
  .oil-table-section {
    padding: 20px;
  }

  .oil-table {
    min-width: 950px;
    font-size: 0.85rem;
  }

  .oil-table th {
    padding: 12px 10px;
    font-size: 0.8rem;
  }

  .oil-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
}

/* Small Laptop Styles */
@media (min-width: 1025px) and (max-width: 1366px) {
  .oil-container {
    padding: 25px;
    width: 100%;
    max-width: 100%;
  }

  .oil-form-section,
  .oil-table-section {
    padding: 25px;
  }

  .oil-table {
    min-width: 1000px;
  }
}

/* Large Screen Styles */
@media (min-width: 1367px) {
  .oil-container {
    padding: 30px;
    width: 100%;
    max-width: 100%;
  }

  .oil-form-section,
  .oil-table-section {
    padding: 30px;
  }

  .oil-table {
    min-width: 1200px;
  }
}


.paste-container {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background-color: #f5f5f5;
  min-height: 100vh;
  box-sizing: border-box;
}

.paste-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.paste-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.paste-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.paste-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Paste Form Section */
.paste-form-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.paste-form-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin: 0 0 20px 0;
  font-weight: 600;
}

.paste-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 20px;
}

.paste-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paste-form-group label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.paste-form-group input,
.paste-form-group select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
  background-color: white;
  transition: border-color 0.2s;
}

.paste-form-group input:focus,
.paste-form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.paste-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
}

.paste-save-btn {
  padding: 12px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.paste-save-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.paste-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Paste Table Section */
.paste-table-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.paste-table-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.paste-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.paste-search label {
  font-weight: 600;
  color: #555;
}

.paste-search input {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 250px;
  max-width: 100%;
  box-sizing: border-box;
}

.paste-search input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.paste-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.paste-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: auto;
}

/* Table Wrapper for Horizontal Scroll */
.paste-table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.paste-table thead {
  background-color: #f8f9fa;
}

.paste-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.paste-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.paste-table tbody tr:hover {
  background-color: #f8f9fa;
}

.paste-table td {
  padding: 10px 8px;
  color: #555;
}

.paste-empty {
  text-align: center;
  padding: 40px;
  color: #999;
}

.paste-edit-btn,
.paste-complete-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.paste-edit-btn {
  background-color: #007bff;
  color: white;
}

.paste-edit-btn:hover {
  background-color: #0056b3;
}

.paste-complete-btn {
  background-color: #28a745;
  color: white;
}

.paste-complete-btn:hover {
  background-color: #218838;
}

.paste-delete-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  background-color: #dc3545;
  color: white;
}

.paste-delete-btn:hover:not(:disabled) {
  background-color: #c82333;
}

.paste-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Modal Styles */
.paste-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.paste-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.paste-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.paste-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.paste-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.paste-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.paste-modal-content {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.paste-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.paste-modal-cancel-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.paste-modal-cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.paste-modal-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.paste-modal-save-btn {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.paste-modal-save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.paste-modal-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Pagination */
.paste-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.paste-pagination-info {
  color: #666;
  font-size: 0.9rem;
}

.paste-pagination-controls {
  display: flex;
  gap: 8px;
}

.paste-pagination-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background-color: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.paste-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.paste-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.paste-pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Mobile Phones (< 481px) */
@media (max-width: 480px) {
  .paste-container {
    padding: 10px;
    width: 100%;
    max-width: 100%;
  }

  .paste-header {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .paste-header h2 {
    font-size: 1.5rem;
  }

  .paste-form-section {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .paste-form-section h3 {
    font-size: 1.1rem;
  }

  .paste-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .paste-form-group label {
    font-size: 0.85rem;
  }

  .paste-form-group input,
  .paste-form-group select {
    padding: 10px;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .paste-form-actions {
    justify-content: stretch;
  }

  .paste-save-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .paste-table-section {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .paste-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .paste-search {
    width: 100%;
  }

  .paste-search input {
    min-width: 100%;
    width: 100%;
  }

  .paste-form-group input, .paste-form-group select{
    min-width: 0;
    min-width: initial;
  }

  .paste-table-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .paste-table {
    font-size: 0.7rem;
    min-width: 1300px;
  }

  .paste-table th {
    padding: 8px 6px;
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .paste-table td {
    padding: 8px 6px;
    font-size: 0.7rem;
  }

  .paste-edit-btn,
  .paste-complete-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
    min-width: 36px;
    min-height: 36px;
  }

  .paste-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .paste-pagination-info {
    text-align: center;
    font-size: 0.85rem;
  }

  .paste-pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .paste-pagination-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .paste-modal {
    width: 95%;
    max-width: 95vw;
    margin: 10px;
  }

  .paste-modal-header {
    padding: 15px;
  }

  .paste-modal-header h3 {
    font-size: 1.2rem;
  }

  .paste-modal-content {
    padding: 15px;
  }

  .paste-modal-footer {
    padding: 12px 15px;
    flex-direction: column;
    gap: 10px;
  }

  .paste-modal-cancel-btn,
  .paste-modal-save-btn {
    width: 100%;
    min-height: 44px;
  }
}

@media(max-width: 365px){
  .paste-form-group{
    min-width: 0;
    min-width: initial;
    max-width: 280px;
  }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .paste-container {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .paste-header {
    padding: 18px;
  }

  .paste-form-section {
    padding: 18px;
  }

  .paste-form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .paste-table-section {
    padding: 18px;
  }

  .paste-table-header {
    flex-direction: row;
    justify-content: space-between;
  }

  .paste-table-wrapper {
    overflow-x: auto;
    width: 100%;
  }

  .paste-table {
    font-size: 0.8rem;
    min-width: 1400px;
  }

  .paste-table th {
    padding: 10px 8px;
    font-size: 0.75rem;
  }

  .paste-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .paste-pagination {
    flex-direction: row;
    justify-content: space-between;
  }

  .paste-modal {
    width: 90%;
    max-width: 90vw;
  }
}

/* Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .paste-container {
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .paste-form-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .paste-table {
    min-width: 1500px;
    font-size: 0.85rem;
  }

  .paste-table th {
    padding: 12px 8px;
    font-size: 0.8rem;
  }

  .paste-table td {
    padding: 12px 8px;
    font-size: 0.85rem;
  }
}

/* Laptops (1025px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
  .paste-container {
    padding: 25px;
    width: 100%;
    max-width: 100%;
  }

  .paste-form-section,
  .paste-table-section {
    padding: 25px;
  }

  .paste-form-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .paste-table {
    min-width: 1600px;
  }
}

/* Large Screens (1367px+) */
@media (min-width: 1367px) {
  .paste-container {
    padding: 30px;
    width: 100%;
    max-width: 100%;
  }

  .paste-form-section,
  .paste-table-section {
    padding: 30px;
  }

  .paste-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }

  .paste-table {
    min-width: 1800px;
  }
}

/* Landscape Orientation for Mobile */
@media (orientation: landscape) and (max-height: 600px) {
  .paste-container {
    padding: 10px;
  }

  .paste-header {
    padding: 12px;
    margin-bottom: 15px;
  }

  .paste-form-section,
  .paste-table-section {
    padding: 12px;
    margin-bottom: 15px;
  }

  .paste-form-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .paste-table th,
  .paste-table td {
    padding: 8px 6px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .paste-save-btn,
  .paste-edit-btn,
  .paste-complete-btn,
  .paste-pagination-btn,
  .paste-modal-cancel-btn,
  .paste-modal-save-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .paste-form-group input,
  .paste-form-group select {
    min-height: 44px;
  }
}

/* Print Styles */
@media print {
  .paste-container {
    padding: 0;
  }

  .paste-header,
  .paste-form-section,
  .paste-table-header,
  .paste-pagination,
  .paste-save-btn,
  .paste-edit-btn,
  .paste-complete-btn {
    display: none;
  }

  .paste-table {
    min-width: 100%;
    font-size: 0.75rem;
  }

  .paste-table th,
  .paste-table td {
    padding: 8px;
    font-size: 0.7rem;
  }
}


.process-plant-list {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.process-plant-list-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.process-plant-list-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.process-plant-list-header p {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* Tabs */
.process-plant-list-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.process-plant-list-tab {
  padding: 10px 18px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: white;
  color: #555;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.process-plant-list-tab:hover {
  border-color: #007bff;
  color: #007bff;
}

.process-plant-list-tab.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

/* Filters */
.process-plant-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.process-plant-list-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.process-plant-list-filter-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
}

.process-plant-list-filter-field select {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.85rem;
  background: white;
}

.process-plant-list-clear-filters {
  padding: 8px 14px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #f8f9fa;
  color: #555;
  font-size: 0.85rem;
  cursor: pointer;
  height: 36px;
}

.process-plant-list-clear-filters:hover {
  background: #e9ecef;
}

.process-plant-list-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e9ecef;
}

.process-plant-list-section-title h3 {
  margin: 0;
  font-size: 1rem;
  color: #333;
}

.process-plant-list-section-title span {
  font-size: 0.85rem;
  color: #666;
}

.process-plant-list-cell-product {
  max-width: 220px;
  word-break: break-word;
}

.process-plant-list-equipment-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.process-plant-list-equipment-cell small {
  color: #888;
  font-size: 0.75rem;
}

.process-plant-list-datetime-cell {
  white-space: nowrap;
  font-size: 0.85rem;
}

.process-plant-list-action-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.process-plant-list-action-badge.action-load {
  background-color: #cfe2ff;
  color: #084298;
}

.process-plant-list-action-badge.action-complete {
  background-color: #d1e7dd;
  color: #0f5132;
}

.process-plant-list-table-summary th:nth-child(3),
.process-plant-list-table-summary th:nth-child(4),
.process-plant-list-table-summary td:nth-child(3),
.process-plant-list-table-summary td:nth-child(4) {
  text-align: right;
}

.process-plant-list-qty-output {
  color: #0f5132;
  font-weight: 600;
  text-align: right;
}

.process-plant-list-qty-remaining {
  color: #084298;
  font-weight: 600;
  text-align: right;
}

.process-plant-list-summary-total-row {
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.process-plant-list-summary-total-row td {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Error Message */
.process-plant-list-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.process-plant-list-error i {
  font-size: 1.1rem;
}

/* Loading State */
.process-plant-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.process-plant-list-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.process-plant-list-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.process-plant-list-table {
  width: 100%;
  border-collapse: collapse;
}

.process-plant-list-table thead {
  background-color: #f8f9fa;
}

.process-plant-list-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  white-space: nowrap;
}

.process-plant-list-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.process-plant-list-table tbody tr:hover {
  background-color: #f8f9fa;
}

.process-plant-list-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.9rem;
}

/* View Button */
.process-plant-list-view-btn {
  padding: 8px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.process-plant-list-view-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.process-plant-list-view-btn i {
  font-size: 0.9rem;
}

/* Status Badges */
.process-plant-list-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.process-plant-list-status-badge.status-complete {
  background-color: #d4edda;
  color: #155724;
}

.process-plant-list-status-badge.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.process-plant-list-status-badge.status-loaded {
  background-color: #d1ecf1;
  color: #0c5460;
}

.process-plant-list-status-badge.status-default {
  background-color: #e2e3e5;
  color: #383d41;
}

/* Products Count */
.process-plant-list-products-count {
  font-weight: 500;
  color: #007bff;
}

/* Categories */
.process-plant-list-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.process-plant-list-category-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  background-color: #e3f2fd;
  color: #1976d2;
  white-space: nowrap;
}

/* Empty State */
.process-plant-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.process-plant-list-empty i {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 16px;
}

.process-plant-list-empty p {
  color: #666;
  font-size: 1rem;
}

/* Modal Styles */
.process-plant-list-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.process-plant-list-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.process-plant-list-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.process-plant-list-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.process-plant-list-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.process-plant-list-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.process-plant-list-modal-content {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.process-plant-list-modal-section {
  margin-bottom: 24px;
}

.process-plant-list-modal-section:last-child {
  margin-bottom: 0;
}

.process-plant-list-modal-section h4 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.process-plant-list-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 16px;
  gap: 16px;
}

.process-plant-list-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.process-plant-list-modal-field label {
  font-weight: 600;
  color: #666;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.process-plant-list-modal-field span {
  color: #333;
  font-size: 0.95rem;
}

.process-plant-list-modal-field-full {
  grid-column-start: 1; grid-column-end: -1;
}

/* Product Details popup — wider layout with 4 columns per row */
.process-plant-list-details-modal {
  max-width: 1200px;
}

.process-plant-list-details-modal .process-plant-list-modal-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 24px;
}

.process-plant-list-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
}

.process-plant-list-modal-close-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.process-plant-list-modal-close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Form Inputs */
.process-plant-list-input,
.process-plant-list-select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
  background-color: white;
  transition: border-color 0.2s;
  width: 100%;
}

.process-plant-list-input:focus,
.process-plant-list-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.process-plant-list-remaining-qty {
  color: #333;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

/* Modal Footer Buttons */
.process-plant-list-modal-cancel-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 10px;
}

.process-plant-list-modal-cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.process-plant-list-modal-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.process-plant-list-modal-save-btn {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.process-plant-list-modal-save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.process-plant-list-modal-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .process-plant-list {
    padding: 15px;
  }

  .process-plant-list-table {
    font-size: 0.85rem;
  }

  .process-plant-list-table th,
  .process-plant-list-table td {
    padding: 8px 12px;
  }

  .process-plant-list-details-modal {
    max-width: 100%;
  }

  .process-plant-list-details-modal .process-plant-list-modal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


.process-start {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background-color: #f5f5f5;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Header */
.process-start-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.process-start-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.process-start-header p {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* Messages */
.process-start-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.process-start-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form */
.process-start-form {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row-6-columns {
  grid-template-columns: repeat(6, 1fr);
}

.form-row-3-columns {
  grid-template-columns: repeat(3, 1fr);
}

.form-row-5-columns {
  grid-template-columns: repeat(5, 1fr);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input:disabled,
.form-group select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.form-group input.read-only-field {
  background-color: #f8f9fa;
  color: #495057;
  cursor: default;
  font-weight: 500;
}

/* Category Checkboxes */
.category-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.category-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-checkbox:hover {
  background-color: #e9ecef;
  border-color: #007bff;
}

.category-checkbox input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.category-checkbox input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: #007bff;
}

.category-checkbox input[type="checkbox"]:checked ~ span {
  color: #007bff;
}

/* Form Actions */
.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.form-actions-submit {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
}

.btn-add-product,
.btn-submit {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-add-product {
  background-color: #28a745;
  color: white;
}

.btn-add-product:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-submit {
  background-color: #007bff;
  color: white;
  min-width: 180px;
  justify-content: center;
}

.btn-submit:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-submit:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Products Table */
.products-table-container {
  overflow-x: auto;
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.products-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  background: white;
  table-layout: auto;
}

.products-table thead {
  background-color: #f8f9fa;
}

.products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  white-space: nowrap;
}

.products-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.9rem;
  border-bottom: 1px solid #e9ecef;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.loaded-equipment-products-section {
  margin: 20px 0 24px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.loaded-equipment-products-section h4 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.loaded-equipment-hint {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 0.9rem;
}

.loaded-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}

.process-start-inline-input {
  width: 100%;
  min-width: 110px;
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
}

.process-start-readonly-input {
  background-color: #f8f9fa;
  color: #333;
  cursor: not-allowed;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.status-loaded {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge.status-in-progress {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.status-complete {
  background-color: #d4edda;
  color: #155724;
}

/* Action Buttons */
.btn-update,
.btn-delete {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-right: 6px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-update {
  background-color: #ffc107;
  color: #000;
}

.btn-update:hover {
  background-color: #e0a800;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .process-start {
    padding: 12px;
    width: 100%;
    max-width: 100%;
  }

  .process-start-header {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .process-start-form {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-row-6-columns {
    grid-template-columns: 1fr;
  }

  .form-row-3-columns {
    grid-template-columns: 1fr;
  }

  .form-row-5-columns {
    grid-template-columns: 1fr;
  }

  .category-checkboxes {
    flex-direction: column;
  }

  .products-table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .products-table {
    font-size: 0.85rem;
    min-width: 700px;
  }

  .products-table th,
  .products-table td {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .form-actions-submit {
    justify-content: stretch;
    width: 100%;
  }

  .btn-submit {
    width: 100%;
    min-height: 44px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .process-start {
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .form-row-6-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row-5-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .products-table {
    min-width: 900px;
  }
}

/* Small Laptop Styles */
@media (min-width: 1025px) and (max-width: 1366px) {
  .process-start {
    padding: 25px;
    width: 100%;
    max-width: 100%;
  }

  .form-row-6-columns {
    grid-template-columns: repeat(6, 1fr);
  }

  .form-row-5-columns {
    grid-template-columns: repeat(5, 1fr);
  }

  .products-table {
    min-width: 1000px;
  }
}

/* Large Screen Styles */
@media (min-width: 1367px) {
  .process-start {
    padding: 30px;
    width: 100%;
    max-width: 100%;
  }

  .products-table {
    min-width: 1200px;
  }
}


.production-complete-container {
  padding: 24px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background-color: #f5f7fa;
  min-height: 100vh;
  box-sizing: border-box;
}

.production-complete-header {
  margin-bottom: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.production-complete-header h2 {
  color: #333;
  margin-bottom: 5px;
  font-size: 1.8rem;
}

.production-complete-header p {
  color: #666;
  font-size: 0.95rem;
}

.production-complete-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-complete-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-complete-table-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.production-complete-table-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.production-complete-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.production-complete-search label {
  font-weight: 500;
  color: #333;
}

.production-complete-search input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 300px;
  max-width: 100%;
  box-sizing: border-box;
}

.production-complete-search input:focus {
  outline: none;
  border-color: #007bff;
}

.production-complete-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.production-complete-table {
  width: 100%;
  min-width: 1400px;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 20px;
  font-size: 0.9rem;
  table-layout: auto;
}

.production-complete-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.production-complete-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.production-complete-table th:first-child {
  border-top-left-radius: 8px;
}

.production-complete-table th:last-child {
  border-top-right-radius: 8px;
}

.production-complete-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e9ecef;
  color: #495057;
  background-color: white;
  transition: background-color 0.2s ease;
}

.production-complete-table tbody tr {
  transition: all 0.2s ease;
}

.production-complete-table tbody tr:hover {
  background-color: #f8f9ff;
  transform: scale(1.001);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.production-complete-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.production-complete-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.production-complete-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.production-complete-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

.production-complete-pagination-info {
  color: #666;
  font-size: 0.9rem;
}

.production-complete-pagination-controls {
  display: flex;
  gap: 8px;
}

.production-complete-pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.production-complete-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.production-complete-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.production-complete-pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* Modal Styles */
.production-complete-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.production-complete-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.production-complete-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 2px solid #e9ecef;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.production-complete-modal-header h3 {
  margin: 0;
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
}

.production-complete-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 1.3rem;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.production-complete-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.production-complete-modal-content {
  padding: 28px;
  background: linear-gradient(to bottom, #ffffff 0%, #f8f9ff 100%);
}

.production-complete-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.production-complete-form-group {
  display: flex;
  flex-direction: column;
}

.production-complete-form-group label {
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.production-complete-form-group span {
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  color: #495057;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #dee2e6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.production-complete-form-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.production-complete-form-group input:focus {
  outline: none;
  border-color: #007bff;
}

.production-complete-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 2px solid #e9ecef;
  background-color: #f8f9fa;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.production-complete-modal-cancel-btn,
.production-complete-modal-save-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.production-complete-modal-cancel-btn {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  padding: 12px 24px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.production-complete-modal-cancel-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.production-complete-modal-save-btn {
  background-color: #007bff;
  color: white;
}

.production-complete-modal-save-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.production-complete-modal-cancel-btn:disabled,
.production-complete-modal-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.production-complete-release-btn {
  transition: all 0.2s;
}

.production-complete-release-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Store Release Buttons */
.store-release-btn {
  position: relative;
  overflow: hidden;
}

.store-release-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.store-release-btn:hover::before {
  width: 300px;
  height: 300px;
}

.store-release-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Improved badge styling */
.production-complete-table td span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Batch number input improvements */
.production-complete-table td input[type="text"] {
  transition: all 0.2s ease;
}

.production-complete-table td input[type="text"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

/* Action button improvements */
.production-complete-release-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.production-complete-release-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Table Wrapper for Horizontal Scroll */
.production-complete-table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .production-complete-container {
    padding: 12px;
    width: 100%;
    max-width: 100%;
  }

  .production-complete-header {
    width: 100%;
    max-width: 100%;
  }

  .production-complete-table-section {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .production-complete-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .production-complete-search input {
    min-width: 100%;
    width: 100%;
  }

  .production-complete-table-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .production-complete-table {
    font-size: 0.75rem;
    min-width: 1200px;
  }

  .production-complete-table th {
    padding: 10px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .production-complete-table td {
    padding: 10px 8px;
    font-size: 0.75rem;
  }

  .production-complete-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .production-complete-pagination-info {
    text-align: center;
    font-size: 0.85rem;
  }

  .production-complete-pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .production-complete-pagination-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 0.8rem;
  }

  .production-complete-form-grid {
    grid-template-columns: 1fr;
  }

  .production-complete-modal {
    width: 95%;
    margin: 10px;
    max-width: 95vw;
  }

  .store-release-btn {
    min-width: 100%;
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .production-complete-container {
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .production-complete-table-section {
    padding: 20px;
  }

  .production-complete-table {
    min-width: 1300px;
    font-size: 0.85rem;
  }

  .production-complete-table th {
    padding: 12px 10px;
    font-size: 0.8rem;
  }

  .production-complete-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
}

/* Small Laptop Styles */
@media (min-width: 1025px) and (max-width: 1366px) {
  .production-complete-container {
    padding: 25px;
    width: 100%;
    max-width: 100%;
  }

  .production-complete-table-section {
    padding: 25px;
  }

  .production-complete-table {
    min-width: 1400px;
  }
}

/* Large Screen Styles */
@media (min-width: 1367px) {
  .production-complete-container {
    padding: 30px;
    width: 100%;
    max-width: 100%;
  }

  .production-complete-table-section {
    padding: 30px;
  }

  .production-complete-table {
    min-width: 1600px;
  }
}


/* Production Dashboard Styles - Matching Sales Dashboard Style */
.production-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.production-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.production-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.production-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.production-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.production-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.production-metric-card-1 { --metric-color: #3b82f6; }
.production-metric-card-2 { --metric-color: #10b981; }
.production-metric-card-3 { --metric-color: #f59e0b; }
.production-metric-card-4 { --metric-color: #06b6d4; }
.production-metric-card-5 { --metric-color: #f59e0b; }
.production-metric-card-6 { --metric-color: #10b981; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.production-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.production-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Production Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / Production Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .production-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .production-dashboard {
    padding: 15px;
  }

  .production-metrics-row {
    grid-template-columns: 1fr;
  }

  .production-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


.production-report-container {
  padding: 24px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background-color: #f5f7fa;
  min-height: 100vh;
  box-sizing: border-box;
}

.production-report-header {
  margin-bottom: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.production-report-header h2 {
  color: #333;
  margin-bottom: 5px;
  font-size: 1.8rem;
  font-weight: bold;
}

.production-report-header p {
  color: #666;
  font-size: 0.95rem;
}

.production-report-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-report-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-report-table-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  padding: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.production-report-table-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.production-report-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.production-report-search label {
  font-weight: 500;
  color: #333;
}

.production-report-search input {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  min-width: 350px;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.production-report-search input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.production-report-loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1rem;
}

.production-report-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  margin-bottom: 20px;
  background: white;
  table-layout: auto;
}

/* Table Wrapper for Horizontal Scroll */
.production-report-table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.production-report-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.production-report-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.production-report-table td {
  padding: 12px;
  border-bottom: 1px solid #e9ecef;
  color: #555;
  font-size: 0.9rem;
}

.production-report-table tbody tr {
  transition: background-color 0.2s;
}

.production-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.production-report-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
  font-size: 1rem;
}

.production-report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
  flex-wrap: wrap;
  gap: 15px;
}

.production-report-pagination-info {
  color: #666;
  font-size: 0.9rem;
}

.production-report-pagination-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.production-report-pagination-btn {
  padding: 8px 14px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.production-report-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.production-report-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.production-report-pagination-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .production-report-container {
    padding: 12px;
    width: 100%;
    max-width: 100%;
  }

  .production-report-header {
    width: 100%;
    max-width: 100%;
  }

  .production-report-table-section {
    padding: 15px;
    width: 100%;
    max-width: 100%;
  }

  .production-report-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .production-report-search input {
    min-width: 100%;
    width: 100%;
  }

  .production-report-table-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .production-report-table {
    font-size: 0.75rem;
    min-width: 1000px;
  }

  .production-report-table th {
    padding: 10px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .production-report-table td {
    padding: 10px 8px;
    font-size: 0.75rem;
  }

  .production-report-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .production-report-pagination-info {
    text-align: center;
    font-size: 0.85rem;
  }

  .production-report-pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .production-report-pagination-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 0.8rem;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .production-report-container {
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .production-report-table-section {
    padding: 20px;
  }

  .production-report-table {
    min-width: 1100px;
    font-size: 0.85rem;
  }

  .production-report-table th {
    padding: 12px 10px;
    font-size: 0.8rem;
  }

  .production-report-table td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
}

/* Small Laptop Styles */
@media (min-width: 1025px) and (max-width: 1366px) {
  .production-report-container {
    padding: 25px;
    width: 100%;
    max-width: 100%;
  }

  .production-report-table-section {
    padding: 25px;
  }

  .production-report-table {
    min-width: 1200px;
  }
}

/* Large Screen Styles */
@media (min-width: 1367px) {
  .production-report-container {
    padding: 30px;
    width: 100%;
    max-width: 100%;
  }

  .production-report-table-section {
    padding: 30px;
  }

  .production-report-table {
    min-width: 1400px;
  }
}


.production-stock-page {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
  background-color: #f0f4f8;
  min-height: 100vh;
}

.production-stock-header {
  background: white;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

.production-stock-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.production-stock-header-top h2 {
  font-size: 1.75rem;
  color: #1e293b;
  margin: 0 0 6px 0;
  font-weight: 700;
}

.production-stock-header-top p {
  color: #64748b;
  margin: 0;
  font-size: 0.95rem;
}

.production-stock-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.production-stock-stat {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 120px;
}

.production-stock-stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1.2;
}

.production-stock-stat-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.production-stock-search-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
}

.production-stock-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.production-stock-search-wrap {
  position: relative;
  flex: 1 1;
  min-width: 280px;
}

.production-stock-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

.production-stock-search-input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e293b;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.production-stock-search-input:hover {
  border-color: #93c5fd;
}

.production-stock-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.production-stock-search-input::placeholder {
  color: #94a3b8;
}

.production-stock-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 0.7rem;
  transition: background-color 0.2s, color 0.2s;
}

.production-stock-search-clear:hover {
  background: #cbd5e1;
  color: #334155;
}

.production-stock-refresh-btn {
  padding: 11px 18px;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.production-stock-refresh-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #2563eb;
  background: #eff6ff;
}

.production-stock-refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.production-stock-filters-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
  overflow: visible;
  position: relative;
  z-index: 5;
}

.production-stock-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.production-stock-filters-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-stock-filters-header h3 i {
  color: #3b82f6;
}

.production-stock-clear-filters-btn {
  padding: 6px 14px;
  background: white;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.production-stock-clear-filters-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.production-stock-filters-body {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 18px 20px;
  flex-wrap: wrap;
  overflow: visible;
}

.production-stock-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  flex: 1 1;
  max-width: 260px;
}

.production-stock-filter-field--product {
  position: relative;
  z-index: 30;
}

.production-stock-filter-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.production-stock-filter-input,
.production-stock-filter-select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.production-stock-filter-input:hover,
.production-stock-filter-select:hover {
  border-color: #93c5fd;
}

.production-stock-filter-input:focus,
.production-stock-filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.production-stock-product-dropdown {
  position: relative;
  width: 100%;
}

.production-stock-product-dropdown-btn {
  width: 100%;
  text-align: left;
  padding: 10px 36px 10px 12px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #1e293b;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.2s;
}

.production-stock-product-dropdown-btn:hover {
  border-color: #93c5fd;
}

.production-stock-product-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1;
}

.production-stock-product-dropdown-btn i {
  font-size: 11px;
  color: #64748b;
  flex-shrink: 0;
}

.production-stock-product-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  z-index: 2000;
  max-height: 320px;
  display: flex;
  flex-direction: column;
}

.production-stock-product-dropdown-search-wrap {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.production-stock-product-dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.875rem;
  outline: none;
}

.production-stock-product-dropdown-search:focus {
  border-color: #3b82f6;
}

.production-stock-product-dropdown-list {
  overflow-y: auto;
  max-height: 220px;
}

.production-stock-product-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #334155;
  transition: background-color 0.15s;
}

.production-stock-product-dropdown-item:hover {
  background-color: #f1f5f9;
}

.production-stock-product-dropdown-item.selected {
  background-color: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.production-stock-product-dropdown-empty {
  padding: 16px;
  color: #94a3b8;
  text-align: center;
  font-size: 0.875rem;
  font-style: italic;
}

.production-stock-filter-count {
  margin-left: auto;
  padding: 8px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
}

.production-stock-info-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #1e40af;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.production-stock-info-banner i {
  font-size: 1rem;
}

.production-stock-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-stock-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.production-stock-product-row {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.production-stock-product-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.production-stock-expand-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.production-stock-expand-btn:hover {
  background: #2563eb;
  transform: scale(1.04);
}

.production-stock-product-name {
  flex: 1 1;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  word-break: break-word;
}

.production-stock-balance-badge {
  padding: 8px 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: default;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.production-stock-product-items {
  padding: 16px 20px 20px;
}

.production-stock-table-container {
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
}

.production-stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.production-stock-table thead {
  background: linear-gradient(90deg, #1e40af 0%, #2563eb 100%);
}

.production-stock-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: white;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.production-stock-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s;
}

.production-stock-table tbody tr:hover {
  background-color: #f8fafc;
}

.production-stock-table td {
  padding: 12px 14px;
  color: #475569;
  font-size: 0.9rem;
  vertical-align: middle;
}

.production-stock-table td.arn-cell {
  font-weight: 600;
  color: #2563eb;
}

.production-stock-table td.balance-cell {
  font-weight: 700;
  color: #059669;
}

.production-stock-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
}

.production-stock-view-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #2563eb;
  cursor: pointer;
  transition: all 0.2s;
}

.production-stock-view-btn:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.production-stock-loading,
.production-stock-empty {
  background: white;
  border-radius: 10px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.production-stock-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: production-stock-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes production-stock-spin {
  to {
    transform: rotate(360deg);
  }
}

.production-stock-empty i {
  font-size: 2.5rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.production-stock-empty p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

.production-stock-empty small {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .production-stock-header-top {
    flex-direction: column;
  }

  .production-stock-filter-count {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .production-stock-filter-field {
    max-width: 100%;
  }
}

.production-stock-release {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* Header Section */
.production-stock-release-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.production-stock-release-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.production-stock-release-header p {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* Error Message */
.production-stock-release-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-stock-release-error i {
  font-size: 1.1rem;
}

/* Success Message */
.production-stock-release-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-stock-release-success i {
  font-size: 1.1rem;
}

/* Product Selector */
.production-stock-release-selector {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.production-stock-release-selector-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.production-stock-release-selector-header label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  white-space: nowrap;
}

.production-stock-release-selector-header label i {
  color: #007bff;
  font-size: 1.1rem;
}

.production-stock-release-product-select {
  flex: 1 1;
  min-width: 300px;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.production-stock-release-product-select:hover {
  border-color: #007bff;
}

.production-stock-release-product-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Loading State */
.production-stock-release-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.production-stock-release-loading i {
  font-size: 2.5rem;
  color: #007bff;
  margin-bottom: 16px;
}

.production-stock-release-loading p {
  color: #666;
  font-size: 1rem;
}

/* No Data State */
.production-stock-release-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.production-stock-release-no-data i {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 16px;
}

.production-stock-release-no-data p {
  color: #666;
  font-size: 1rem;
}

/* Table Container */
.production-stock-release-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.production-stock-release-table {
  width: 100%;
  border-collapse: collapse;
}

.production-stock-release-table thead {
  background-color: #f8f9fa;
}

.production-stock-release-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  white-space: nowrap;
}

.production-stock-release-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.production-stock-release-table tbody tr:hover {
  background-color: #f8f9fa;
}

.production-stock-release-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.9rem;
}

/* Product Row */
.production-stock-release-product-row {
  cursor: pointer;
}

.production-stock-release-expand-icon {
  width: 40px;
  text-align: center;
  cursor: pointer;
  color: #007bff;
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.production-stock-release-expand-icon:hover {
  transform: scale(1.2);
}

.production-stock-release-expanded-content {
  padding: 0 !important;
  background-color: #f8f9fa;
}

.production-stock-release-entries-list {
  padding: 16px;
}

.production-stock-release-nested-table {
  width: 100%;
  border-collapse: collapse;
}

.production-stock-release-nested-table thead {
  background-color: #e9ecef;
}

.production-stock-release-nested-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.85rem;
}

.production-stock-release-nested-table td {
  padding: 10px 12px;
  color: #555;
  font-size: 0.85rem;
  border-bottom: 1px solid #e9ecef;
}

.production-stock-release-nested-table tbody tr:hover {
  background-color: #f1f3f5;
}

/* Action Buttons */
.production-stock-release-select-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.production-stock-release-select-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.production-stock-release-select-btn i {
  font-size: 0.8rem;
}

/* Type Badge */
.production-stock-release-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.production-stock-release-type-badge.type-original {
  background-color: #e3f2fd;
  color: #1976d2;
}

.production-stock-release-type-badge.type-adjustment {
  background-color: #fff3e0;
  color: #f57c00;
}

.production-stock-release-type-badge.type-transfer {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

/* No Selection State */
.production-stock-release-no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.production-stock-release-no-selection i {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 16px;
}

.production-stock-release-no-selection p {
  color: #666;
  font-size: 1rem;
  text-align: center;
}

.production-stock-release-my-requests {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 24px;
}

.production-stock-release-my-requests-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

.production-stock-release-my-requests-header h3 {
  font-size: 1.25rem;
  color: #333;
  margin: 0 0 6px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-stock-release-my-requests-header h3 i {
  color: #2563eb;
}

.production-stock-release-my-requests-header p {
  color: #666;
  margin: 0;
  font-size: 0.9rem;
}

/* Product Detail View */
.production-stock-release-product-detail {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 0;
}

.production-stock-release-product-detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e9ecef;
}

.production-stock-release-product-detail-header h3 {
  font-size: 1.5rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.production-stock-release-product-detail-header p {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* Request Sent to Store Button */
.production-stock-release-request-btn {
  padding: 8px 16px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.production-stock-release-request-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.production-stock-release-request-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.production-stock-release-request-btn i {
  font-size: 0.8rem;
}

/* Request Status Badges */
.production-stock-release-request-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #d4edda;
  color: #155724;
}

.production-stock-release-request-sent-badge i {
  font-size: 0.7rem;
}

.production-stock-release-request-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #fff3cd;
  color: #856404;
}

.production-stock-release-request-pending-badge i {
  font-size: 0.7rem;
}

/* Release Status Badges */
.production-stock-release-released-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #d4edda;
  color: #155724;
  white-space: nowrap;
}

.production-stock-release-released-badge i {
  font-size: 0.7rem;
  color: #28a745;
}

.production-stock-release-release-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #fff3cd;
  color: #856404;
}

.production-stock-release-release-pending-badge i {
  font-size: 0.7rem;
}

/* Action Success Message */
.production-stock-release-action-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #d4edda;
  color: #155724;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.production-stock-release-action-success i {
  font-size: 0.9rem;
  color: #28a745;
}

/* Quantity Modal */
.production-stock-release-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.production-stock-release-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.production-stock-release-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.production-stock-release-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.production-stock-release-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.production-stock-release-modal-close:hover {
  background-color: #f8f9fa;
  color: #333;
}

.production-stock-release-modal-content {
  padding: 20px;
  flex: 1 1;
}

.production-stock-release-modal-info {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #dee2e6;
}

.production-stock-release-modal-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.production-stock-release-modal-info-item:last-child {
  border-bottom: none;
}

.production-stock-release-modal-info-item label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.production-stock-release-modal-info-item span {
  color: #333;
  font-size: 0.9rem;
}

.production-stock-release-modal-info-item span strong {
  color: #007bff;
  font-size: 1rem;
}

.production-stock-release-modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.production-stock-release-modal-form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.production-stock-release-modal-form-group input {
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  color: #333;
  background-color: white;
  transition: all 0.2s;
}

.production-stock-release-modal-form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.production-stock-release-modal-form-group small {
  color: #666;
  font-size: 0.85rem;
  margin-top: 4px;
}

.production-stock-release-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.production-stock-release-modal-cancel-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.production-stock-release-modal-cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.production-stock-release-modal-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.production-stock-release-modal-submit-btn {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.production-stock-release-modal-submit-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.production-stock-release-modal-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.production-stock-release-modal-submit-btn i {
  font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .production-stock-release-selector-header {
    flex-direction: column;
    align-items: stretch;
  }

  .production-stock-release-selector-header label {
    margin-bottom: 8px;
  }

  .production-stock-release-product-select {
    min-width: 100%;
    width: 100%;
  }

  .production-stock-release-table {
    font-size: 0.85rem;
  }

  .production-stock-release-table th,
  .production-stock-release-table td {
    padding: 8px 12px;
  }

  .production-stock-release-modal {
    max-width: 100%;
    margin: 10px;
  }
}


.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
/* Form Container - Full Width */
.form-container {
  width: 100%;
  max-width: 100%;
  padding: 30px;
}

.product-form {
  width: 100%;
  max-width: 100%;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
}

/* Product Input Row */
.product-input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 20px;
  align-items: end;
}

.product-input-row .form-group {
  margin-bottom: 0;
}

/* Products Table */
.products-table-container {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.products-table thead {
  background-color: #f8f9fa;
}

.products-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 13px;
}

.products-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 13px;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tfoot {
  background-color: #f8f9fa;
  font-weight: bold;
}

.products-table tfoot td {
  border-top: 2px solid #dee2e6;
  padding: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .product-input-row {
    grid-template-columns: 1fr;
  }
  
  .products-table-container {
    overflow-x: scroll;
  }
  
  .products-table {
    min-width: 800px;
  }
}


.dwr-price-request {
  padding: 30px;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.dwr-price-request-header {
  margin-bottom: 30px;
}

.dwr-price-request-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.dwr-price-request-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.dwr-price-request-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  font-size: 16px;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

.dwr-price-request-success i {
  font-size: 20px;
  color: #10b981;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.dwr-price-request-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
  min-width: 300px;
}

.search-input {
  flex: 1 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.clear-search-btn {
  padding: 10px 15px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.clear-search-btn:hover {
  background-color: #5a6268;
}

.dwr-price-request-loading,
.dwr-price-request-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Flat product list (no company grouping) */
.dwr-products-flat-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Vendor Grouped Container (legacy; list now uses .dwr-products-flat-container) */
.vendor-grouped-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vendor-group {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.vendor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  cursor: pointer;
  transition: background-color 0.2s;
}

.vendor-header:hover {
  background-color: #e9ecef;
}

.vendor-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
}

.vendor-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.vendor-icon {
  color: #6c757d;
  font-size: 18px;
}

.vendor-name {
  font-weight: 600;
  font-size: 16px;
  color: #1e293b;
}

.vendor-indicator {
  width: 12px;
  height: 12px;
  background-color: #dc3545;
  border-radius: 2px;
  display: inline-block;
}

.vendor-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.vendor-summary {
  font-size: 14px;
  color: #666;
}

.vendor-total {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}

.vendor-toggle {
  color: #6c757d;
  font-size: 14px;
  transition: transform 0.2s;
}

.vendor-products {
  padding: 0;
}

.products-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.vendor-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vendor-products-table thead {
  background-color: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.vendor-products-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 12px;
  white-space: nowrap;
  background-color: #f8f9fa;
}

.vendor-products-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e9ecef;
  color: #555;
  font-size: 13px;
}

.vendor-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.vendor-products-table tbody tr.dwr-row-overdue {
  background-color: #fdeaea;
}

.vendor-products-table tbody tr.dwr-row-overdue:hover {
  background-color: #fbd9d9;
}

.product-id {
  margin-left: 8px;
  color: #6c757d;
  font-size: 12px;
}

.product-name-cell {
  max-width: 250px;
}

.product-name {
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 4px;
}

.product-spec {
  font-size: 11px;
  color: #6c757d;
}

.uom-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  background-color: white;
  cursor: pointer;
}

.price-input,
.quantity-input {
  width: 100px;
  padding: 6px 8px;
  border: 1px solid #007bff;
  border-radius: 4px;
  font-size: 12px;
}

.price-input:focus,
.quantity-input:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-edit,
.btn-save,
.btn-cancel {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-edit {
  background-color: #007bff;
  color: white;
}

.btn-edit:hover {
  background-color: #0056b3;
}

.btn-save {
  background-color: #28a745;
  color: white;
}

.btn-save:hover:not(:disabled) {
  background-color: #218838;
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-cancel {
  background-color: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background-color: #5a6268;
}

.btn-view {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  background-color: #17a2b8;
  color: white;
}

.btn-view:hover {
  background-color: #138496;
}

.btn-reject {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  background-color: #dc3545;
  color: white;
}

.btn-reject:hover:not(:disabled) {
  background-color: #c82333;
}

.btn-reject:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dwr-assign-cell {
  vertical-align: middle;
  min-width: 160px;
}

.dwr-pr-no-cell {
  vertical-align: middle;
  min-width: 120px;
  white-space: nowrap;
}

.dwr-assign-select {
  width: 100%;
  max-width: 220px;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
}

.btn-create-pr {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #2563eb;
  color: white;
  transition: background-color 0.2s;
}

.btn-create-pr:hover:not(:disabled) {
  background-color: #1d4ed8;
}

.btn-create-pr:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dwr-pr-exists-cell {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.dwr-pr-exists-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 1000px;
}

.view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
}

.view-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.view-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.view-modal-close:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-loading {
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

.view-modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.view-section {
  margin-bottom: 30px;
}

.view-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.view-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
  gap: 15px;
}

.view-info-item {
  display: flex;
  flex-direction: column;
}

.view-info-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-info-item label {
  font-weight: 600;
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
}

.view-info-item p {
  margin: 0;
  color: #333;
  font-size: 14px;
  word-wrap: break-word;
}

.action-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.view-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  background-color: #f8f9fa;
}

.btn-primary {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: #0056b3;
}

/* Responsive */
@media (max-width: 768px) {
  .dwr-price-request {
    padding: 15px;
  }

  .dwr-price-request-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .vendor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .vendor-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .products-table-wrapper {
    overflow-x: scroll;
  }

  .vendor-products-table {
    min-width: 1200px;
  }
}

/* Purchase Dashboard Styles - Matching Sales Dashboard Style */
.purchase-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.purchase-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.purchase-metrics-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 15px;
  gap: 15px;
  width: 100%;
  box-sizing: border-box;
}

.purchase-metric-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.purchase-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.purchase-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.purchase-metric-card-1 { --metric-color: #3b82f6; }
.purchase-metric-card-2 { --metric-color: #f59e0b; }
.purchase-metric-card-3 { --metric-color: #10b981; }
.purchase-metric-card-4 { --metric-color: #8b5cf6; }
.purchase-metric-card-qc-rejected { --metric-color: #ef4444; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-danger {
  background: #ef4444;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  display: none;
  width: 60px;
  height: 30px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.purchase-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.purchase-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Order Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / Purchase Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .purchase-metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .purchase-metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .purchase-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .purchase-metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .purchase-dashboard {
    padding: 15px;
  }

  .purchase-metrics-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .purchase-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


.purchase-indent-list-page {
  padding: 20px 24px;
  max-width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.purchase-indent-list-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
}

.purchase-indent-list-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.purchase-indent-list-label {
  font-weight: 500;
  color: #334155;
  margin-right: 8px;
}

.purchase-indent-list-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  min-width: 160px;
  background: #fff;
}

.purchase-indent-list-btn {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.purchase-indent-list-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.purchase-indent-list-btn.view {
  background: #2563eb;
  color: #fff;
}

.purchase-indent-list-btn.view:hover:not(:disabled) {
  background: #1d4ed8;
}

.purchase-indent-list-btn.started {
  background: #16a34a;
  color: #fff;
}

.purchase-indent-list-btn.started:hover:not(:disabled) {
  background: #15803d;
}

.purchase-indent-list-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  border-radius: 6px;
  font-size: 0.95rem;
}

.purchase-indent-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.purchase-indent-list-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: purchase-indent-list-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes purchase-indent-list-spin {
  to { transform: rotate(360deg); }
}

.purchase-indent-list-table-wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.purchase-indent-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 0.9rem;
}

.purchase-indent-list-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.purchase-indent-list-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.purchase-indent-list-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.purchase-indent-list-table tbody tr:hover {
  background: #f8fafc;
}

.purchase-indent-list-table tbody tr.selected {
  background: #fef3c7;
}

.purchase-indent-list-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}

.purchase-indent-list-table td.purchase-indent-list-empty {
  text-align: center;
  color: #94a3b8;
  padding: 40px;
}

.purchase-indent-list-action-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 8px;
  background: #2563eb;
  color: #fff;
  transition: background 0.2s;
}

.purchase-indent-list-action-btn:hover {
  background: #1d4ed8;
}

.purchase-indent-list-action-btn.print {
  background: #64748b;
}

.purchase-indent-list-action-btn.print:hover {
  background: #475569;
}

.purchase-indent-list-details {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 24px;
}

.purchase-indent-list-details-title {
  margin: 0;
  padding: 16px 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.purchase-indent-list-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.purchase-indent-list-details-table thead {
  background: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
}

.purchase-indent-list-details-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.purchase-indent-list-details-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.purchase-indent-list-details-table tbody tr:hover {
  background: #f8fafc;
}

.purchase-indent-list-details-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}

.purchase-indent-list-app-qty-input,
.purchase-indent-list-po-input {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 90px;
}

.purchase-indent-list-po-input {
  width: 140px;
}

.purchase-indent-list-app-qty-input:focus,
.purchase-indent-list-po-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Supplier column minimum width */
.purchase-indent-list-details-table td[style*="position: relative"] {
  min-width: 220px;
  max-width: 280px;
}

/* Ensure table doesn't clip the dropdown */
.purchase-indent-list-details {
  overflow: visible;
}

.purchase-indent-list-details-table {
  table-layout: auto;
  min-width: 1200px;
}

.purchase-indent-list-details-footer {
  padding: 16px 20px;
  border-top: 2px solid #f1f5f9;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

.purchase-indent-list-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .purchase-indent-list-page {
    padding: 16px;
  }

  .purchase-indent-list-title {
    font-size: 1.25rem;
  }

  .purchase-indent-list-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .purchase-indent-list-select {
    min-width: 100%;
  }

  .purchase-indent-list-table,
  .purchase-indent-list-details-table {
    min-width: 800px;
    font-size: 0.85rem;
  }

  .purchase-indent-list-table th,
  .purchase-indent-list-table td,
  .purchase-indent-list-details-table th,
  .purchase-indent-list-details-table td {
    padding: 8px 10px;
  }
}

.dashboard-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-header h1 {
  margin: 0;
  color: #333;
}

.dashboard-controls {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

.search-box input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background-color: #f8f9fa;
}

.data-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.no-data {
  text-align: center;
  padding: 40px !important;
  color: #666;
  font-style: italic;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  font-size: 12px;
  color: #495057;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* View Order Details Section */
.view-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

/* Rejected PO modal: exactly 5 columns per row, then full-width rejection reason */
.po-rejected-details-card {
  padding: 20px 22px;
  background: #f4f6f9;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
}

.po-detail-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 16px 18px;
  gap: 16px 18px;
  align-items: start;
}

@media (max-width: 1100px) {
  .po-detail-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .po-detail-grid-5 {
    grid-template-columns: 1fr;
  }
}

.po-rejected-reason-block {
  margin-top: 18px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  border-left: 4px solid #c0392b;
}

.po-rejected-reason-block label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5a5c69;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.po-rejected-reason-text {
  font-size: 0.95rem;
  color: #2d3748;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.po-rejected-note-block {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}

.po-rejected-note-block label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
  display: block;
}

/* PO view modal only — 5 columns per row; note & edit reasons shown below the grid */
.po-view-order-details .po-view-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 16px 18px;
  gap: 16px 18px;
  align-items: start;
}

@media (max-width: 1100px) {
  .po-view-order-details .po-view-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .po-view-order-details .po-view-detail-grid {
    grid-template-columns: 1fr;
  }
}

.po-view-supplementary-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.po-view-order-details .po-view-note-block,
.po-view-order-details .po-view-edit-reasons-block,
.po-view-supplementary-section .po-view-note-block,
.po-view-supplementary-section .po-view-edit-reasons-block {
  margin-top: 0;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.po-view-empty-text {
  margin: 0;
  font-size: 0.95rem;
  color: #6c757d;
  font-style: italic;
}

.po-view-order-details .po-view-note-block label,
.po-view-order-details .po-view-edit-reasons-block label,
.po-view-supplementary-section .po-view-note-block label,
.po-view-supplementary-section .po-view-edit-reasons-block label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.po-view-order-details .po-view-note-block span,
.po-view-supplementary-section .po-view-note-block span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
  white-space: pre-wrap;
  word-break: break-word;
}

.po-view-order-details .po-view-edit-reasons-list,
.po-view-supplementary-section .po-view-edit-reasons-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.po-view-order-details .po-view-edit-reasons-list li,
.po-view-supplementary-section .po-view-edit-reasons-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.po-view-order-details .po-view-edit-reasons-list li:last-child,
.po-view-supplementary-section .po-view-edit-reasons-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.po-view-order-details .po-view-edit-reasons-list li:first-child,
.po-view-supplementary-section .po-view-edit-reasons-list li:first-child {
  padding-top: 0;
}

.po-view-order-details .po-view-edit-reason-text,
.po-view-supplementary-section .po-view-edit-reason-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.po-view-order-details .po-view-edit-reason-meta,
.po-view-supplementary-section .po-view-edit-reason-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.po-view-order-details .po-view-detail-grid .view-detail-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.po-view-order-details .po-view-detail-grid .view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.po-view-order-details .po-view-detail-grid .view-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
  word-break: break-word;
}

.view-detail-field {
  display: flex;
  flex-direction: column;
}

.view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.view-modal-footer .close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-modal-footer .close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
  background-color: #28a745;
  color: white;
  border: none;
}

.btn-success:hover:not(:disabled) {
  background-color: #218838;
}

.btn-success:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Print modal: hide overlay/header when printing, show only document */
@media print {
  .view-modal-overlay {
    background: transparent !important;
    position: static !important;
  }
  .view-modal-content.print-modal-content {
    box-shadow: none !important;
    max-height: none !important;
  }
  .view-modal-header {
    display: none !important;
  }
  .view-modal-body {
    padding: 0 !important;
  }
}


@media print {
  footer {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-hide {
    display: none !important;
  }

  .letterhead-bg {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

.pdf-container {
  background: #f5f5f5;
  min-height: 100vh;
}

.pdf-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-download,
.btn-print,
.btn-back {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-download {
  background-color: #28a745;
  color: white;
}

.btn-download:hover {
  background-color: #218838;
}

.btn-print {
  background-color: #007bff;
  color: white;
}

.btn-print:hover {
  background-color: #0056b3;
}

.btn-back {
  background-color: #6c757d;
  color: white;
}

.btn-back:hover {
  background-color: #5a6268;
}

.loading,
.error {
  text-align: center;
  padding: 40px;
  font-size: 16px;
}

.error {
  color: #dc3545;
}

.purchase-order-document {
  background: white;
  max-width: 210mm;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  /* Room below letterhead header; avoid min-height 297mm â€” it stacks with content and spills past A4 */
  padding: 88px 18px 18px;
  color: #000;
  position: relative;
}

.purchase-order-content {
  position: relative;
  z-index: 1;
  padding-top: 35px;
}

.purchase-order-wrapper {
  border: 2px solid #999;
  position: relative;
  z-index: 2;
}

.heading{
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid #999;
}

.detail-1_div{
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #999;
}

.detail-1_div_left{
  padding-left: 10px;
  border-right: 2px solid #999;
  flex-basis: 50%;
}

.detail-1_div_right{
  flex-basis: 50%;
}

.invoice_no_and_date{
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  text-align: left;
  border-bottom: 2px solid #999;
}

.invoice_no{
  width: 50%;
  padding-left: 10px;
  border-right: 2px solid #999;
}

.invoice_date{
  padding-left: 10px;
  width: 50%;
}

.b_o_n{
  padding-left: 10px;
  border-bottom: 2px solid #999;
  font-size: 10px;
}

.b_o_n p{
  gap: 5px;
}

.Other_Reference{
  border-bottom: 2px solid #999;
  padding-left: 10px;
}

.more_detail{
  padding-left: 10px;
  font-size: 10px;
}

.detail-2_div{
  border-bottom: 2px solid #999;
  display: flex;
  justify-content: space-between;
}

.detail-2_div_left{
  flex-basis: 50%;
  padding-left: 10px;
  border-right: 2px solid #999;
}

.detail-2_div_right{
  flex-basis: 50%;
}

.Terms_Of_Delivery{
  padding-left: 10px;
}

.div_2_more_info{
  padding-left: 10px;
  font-size: 10px;
}

.Terms_Of_Delivery{
  padding-bottom: 15px;
  border-bottom: 2px solid #999;
}

/* Totals block sits directly under the line-items table */
.po-totals-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 11px;
}

.po-totals-table td {
  padding: 2px 6px;
  border: 1px solid #999;
}

.footer_div {
  display: flex;
  justify-content: space-between;
  margin-top: 0;
  padding-top: 0;
  border-bottom: 1px solid #999;
}

.footer_left{
  font-size: 10px;
  padding-left: 10px;
  flex-basis: 70%;
  border-right: 2px solid #999;
}

.footer_right{
  flex-basis: 30%;
  padding: 0 10px;
  text-align: center;
}

.term-and-condition-po{
  padding-left: 10px;
  font-size: 10px;
}
/*
 * Letterhead must stay within one A4 sheet: printable height â‰ˆ 297mm âˆ’ 20mm margins = 277mm.
 * A 292mm-tall layer was spilling past the first page in print / html2pdf and slicing the footer art.
 */
/* Use <img> (not CSS background) so html2canvas/html2pdf paints logo, watermark, and footer art reliably */
.letterhead-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 210mm;
  height: 297mm;
  max-height: 297mm;
  object-fit: contain;
  object-position: top right;
  z-index: 0;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
  display: block;
}

/* po info section and order to section */
.po-info-section_and_order-to-section{
  display: flex;
  justify-content: space-between;
  margin-bottom: 0;
}

/* PO Info Section */
.po-info-section {
  display: flex;
  justify-content: space-between;

}

.po-info-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 9999;
}

.po-left-info-inside-details{
  display: flex;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.po-label {
  font-weight: bold;
  font-size: 14px;
}

.po-value {
  font-size: 12px;
  font-weight: 700;
}

/* Order To Section */
.order-to-section {
  margin-bottom: 10px;
  width: 350px;
}

.section-title {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 2px;
  border-bottom: none;
  padding-bottom: 0;
  z-index: 9999;
}

.supplier-details {
  font-size: 11px;
  margin-bottom: 5px;
}

.supplier-name {
  font-weight: bold;
  font-size: 12px;
}

.supplier-address {
  font-size: 10px;
  line-height: 1.4;
  margin-top: 5px;
}

/* Products Table â€” avoid a tall empty band above totals when few line items */
.purchase-order-table-pdf-wrapper{
  width: 100%;
  overflow-x: auto;
  min-height: 0;
}


.table-1 {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.table-1 tbody:hover{
  border-right: none;
  
}

.table-1 tbody tr:hover{
  background-color: transparent !important;
  background: transparent !important;
  border-right: none !important;
}

.table-1 td {
  padding: 4px;
  text-align: left;
  background: transparent !important;
  background-color: transparent !important;
  border-top: 1px solid rgba(0,0,0,0.2);
}

.table-1 thead,
.table-1 tbody,
.table-1 tr{
  background: transparent !important;
  background-color: transparent !important;
}

.table-1 th {
  background-color: transparent !important;
  background-color: initial !important;
  font-weight: bold;
  padding: 4px;
  text-align: left;
}

.table-1 tbody td {
  vertical-align: top;
}

.po-product-remark {
  font-size: 9px;
  margin-top: 2px;
  line-height: 1.25;
  font-weight: normal;
  word-break: break-word;
}

.hr{
  color: #218838;
  background: #117328;
  height: 4px;
  width: 100%;
}

/* Footer Section */
.footer-section {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 5px;
}

.footer-box{
  display: flex;
  justify-content: space-between;
  gap: 90px;
}

.footer-left {
  flex: 1 1;
  font-size: 11px;
  line-height: 1.6;
}

.footer-right {
  width: 280px;
}

.amount-in-words {
  margin-bottom: 0;
  font-size: 11px;
  line-height: 1.5;
}

.payment-term {
  margin-bottom: 12px;
  font-size: 11px;
}

.eway-bill-note {
  margin-bottom: 12px;
  font-size: 11px;
  line-height: 1.4;
}

.transport-info {
  margin-top: 10px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

.transport-info div {
  margin-bottom: 2px;
}

/*.summary-title {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
  padding-bottom: 5px;
}*/

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 10px;
}

.summary-table td {
  padding: 0 8px;
}

.summary-label {
  text-align: left;
  font-weight: normal;
}

.summary-value {
  text-align: right;
  font-weight: normal;
  font-size: 14px;
}

.summary-table .total-row td {
  font-weight: bold;
}

.signatory {
  text-align: right;
  font-size: 11px;
  margin-top: 0;
  font-style: italic;
  padding-left: 20px;
  padding-right: 20px;
}

/*
 * html2pdf adds .pdf-export-mode on the clone. It must match the on-screen card â€” NOT a fixed A4
 * box. Forcing height: 287mm + letterhead height:100% scaled the JPEG to the full page while
 * content stayed short, leaving a white band and tiny type (broken download vs browser).
 */
.purchase-order-document.pdf-export-mode {
  box-shadow: none !important;
  /* Same as .purchase-order-document on screen so capture matches the live page */
  padding: 88px 18px 18px !important;
  max-width: 210mm !important;
  width: auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.purchase-order-document.pdf-export-mode .letterhead-bg {
  width: 210mm !important;
  height: 297mm !important;
  max-height: 297mm !important;
  object-fit: contain !important;
  object-position: top right !important;
}

.purchase-order-document.pdf-export-mode .purchase-order-content {
  padding-top: 35px !important;
}

/* Print: natural flow like the browser; letterhead art stays one graphic at top-right */
@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .pdf-actions {
    display: none;
  }

  .pdf-container {
    padding: 0;
    background: white;
  }

  .purchase-order-document {
    box-shadow: none;
    padding: 20mm 8mm 6mm;
    max-width: 100%;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    page-break-inside: auto;
    break-inside: auto;
  }

  .purchase-order-content {
    padding-top: 35px;
  }

  .letterhead-bg {
    height: 297mm;
    max-height: 297mm;
    width: 210mm;
    object-fit: contain;
    object-position: top right;
  }

  @page {
    margin: 10mm;
    size: A4;
  }
}

/* table break control */
.table-1 {
  page-break-inside: auto;
}

.table-1 tr {
  page-break-inside: avoid;
  page-break-after: auto;
}
.dashboard-container {
    padding: 30px;
    flex: 1 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }
  
  .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }
  
  .dashboard-header h1 {
    color: #333;
    margin: 0;
  }
  
  .dashboard-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  
  .search-box {
    flex: 1 1;
    min-width: 300px;
    position: relative;
  }
  
  .search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
  }
  
  .search-box input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
  }
  
  .filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .filter-box label {
    font-weight: 500;
    color: #333;
  }
  
  .filter-box select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
  }
  
  .dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
  }
  
  .stat-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .stat-card p {
    margin: 0;
    font-size: 32px;
    font-weight: bold;
    color: #333;
  }
  
  @media (max-width: 768px) {
    .dashboard-container {
      padding: 15px;
    }
  
    .dashboard-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
    }
  
    .dashboard-stats {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }
  
    .dashboard-filters {
      flex-direction: column;
    }
  
    .search-box {
      min-width: 0;
      min-width: initial;
    }
  }
  
  @media (max-width: 480px) {
    .dashboard-stats {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }
  
    .stat-card {
      padding: 15px 10px;
    }
  
    .stat-card h3 {
      font-size: 12px;
    }
  
    .stat-card p {
      font-size: 24px;
    }
  }
  
  .table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
  }
  
  .data-table thead {
    background: #f8f9fa;
  }
  
  .data-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    white-space: nowrap;
  }
  
  /* Column widths */
  .data-table th:nth-child(1) { width: 80px; }   /* PR No */
  .data-table th:nth-child(2) { width: 120px; }  /* Request Date */
  .data-table th:nth-child(3) { width: auto; }    /* Product - takes remaining space */
  .data-table th:nth-child(4) { width: 80px; }   /* Quantity */
  .data-table th:nth-child(5) { width: 100px; }  /* Department */
  .data-table th:nth-child(6) { width: 100px; }  /* Requester */
  .data-table th:nth-child(7) { width: 80px; }   /* Priority */
  .data-table th:nth-child(8) { width: 90px; }   /* Status */
  .data-table th:nth-child(9) { width: 120px; }  /* Remark */
  .data-table th:nth-child(10) { width: 200px; } /* Actions */
  
  .data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .data-table tbody tr:hover {
    background: #f8f9fa;
  }
  
  .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }
  
  .status-badge.pending {
    background: #fff3cd;
    color: #856404;
  }
  
  .status-badge.approved {
    background: #d4edda;
    color: #155724;
  }
  
  .status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
  }
  
  .priority-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .priority-badge.normal {
    background: #e7f3ff;
    color: #0066cc;
  }
  
  .priority-badge.urgent {
    background: #ffe6e6;
    color: #cc0000;
  }
  
  .remark-cell {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Product column - allow wrapping for long names */
  /* .data-table td:nth-child(3) {
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
  } */
  
  .no-data {
    text-align: center;
    padding: 40px;
    color: #999;
  }
  
  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
  }
  
  .pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-info {
    font-size: 14px;
    color: #666;
  }
  
  .error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
  }
  
  .loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
  }
  
  .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
  }
  
  .btn-primary {
    background: #007bff;
    color: white;
  }
  
  .btn-primary:hover {
    background: #0056b3;
  }
  
  .btn i {
    margin-right: 5px;
  }
  
  .btn-secondary {
    background: #6c757d;
    color: white;
  }
  
  .btn-secondary:hover {
    background: #5a6268;
  }
  
  .btn-danger {
    background: #dc3545;
    color: white;
  }
  
  .btn-danger:hover {
    background: #c82333;
  }
  
  .btn-danger:disabled {
    background: #dc3545;
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  /* Action Buttons */
  .actions-cell {
    min-width: 200px;
    white-space: nowrap;
    overflow: visible;
  }
  
  .action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }
  
  .action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .action-btn i {
    margin: 0;
    font-size: 11px;
  }
  
  .action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .approve-btn {
    background: #28a745;
    color: white;
  }
  
  .approve-btn:hover:not(:disabled) {
    background: #218838;
  }
  
  .reject-btn {
    background: #dc3545;
    color: white;
  }
  
  .reject-btn:hover:not(:disabled) {
    background: #c82333;
  }
  
  .action-status {
    display: block;
    font-size: 11px;
    color: #666;
  }
  
  .action-status small {
    display: block;
  }
  
  /* Modal Styles */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
  }
  
  .modal-header h3 {
    margin: 0;
    color: #333;
  }
  
  .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }
  
  .modal-close:hover {
    background: #f8f9fa;
    color: #333;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-body p {
    margin: 10px 0;
    color: #333;
  }
  
  .modal-body .form-group {
    margin-top: 20px;
  }
  
  .modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
  }
  
  .modal-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
  }
  
  .modal-body textarea:focus {
    outline: none;
    border-color: #007bff;
  }
  
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
  }
  
  /* Assign to — same pattern as DWR Price Request */
  .pr-dashboard-assign-cell {
    vertical-align: middle;
    min-width: 160px;
  }
  
  .pr-dashboard-assign-select {
    width: 100%;
    max-width: 220px;
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
  }
  
  .pr-dashboard-assign-readonly {
    font-size: 13px;
    color: #374151;
  }

  .qc-store-entry-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e9ecef;
  }

  .qc-store-entry-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .qc-store-entry-tab:hover {
    color: #007bff;
  }

  .qc-store-entry-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
  }

  .qc-store-entry-tab-count {
    font-size: 0.85rem;
    opacity: 0.9;
  }

  .badge-pending-qc {
    background-color: #0d6efd;
    color: #fff;
  }
  
  
.dashboard-container {
  padding: 30px;
  flex: 1 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-header h1 {
  color: #0f172a;
  margin: 0;
}

.dashboard-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1 1;
  min-width: 300px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 14px;
  color: #0f172a;
}

.search-box input::placeholder {
  color: #64748b;
  opacity: 1;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-box label {
  font-weight: 600;
  color: #1e293b;
}

.filter-box select {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 14px;
  min-width: 150px;
  color: #0f172a;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e9ecef;
}

/* Numbers live in h3, labels in p (matches styles.css .stat-info + RFQ/PR markup) */
.stat-card .stat-info h3 {
  margin: 0 0 6px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.stat-card .stat-info p {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 15px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .dashboard-filters {
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
    min-width: initial;
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 15px 10px;
  }

  .stat-card .stat-info p {
    font-size: 11px;
  }

  .stat-card .stat-info h3 {
    font-size: 1.5rem;
  }
}

.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  border-bottom: 2px solid #cbd5e1;
  font-size: 13px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Column widths */
.data-table th:nth-child(1) { width: 80px; }   /* PR No */
.data-table th:nth-child(2) { width: 120px; }  /* Request Date */
.data-table th:nth-child(3) { width: auto; }    /* Product - takes remaining space */
.data-table th:nth-child(4) { width: 80px; }   /* Quantity */
.data-table th:nth-child(5) { width: 100px; }  /* Department */
.data-table th:nth-child(6) { width: 100px; }  /* Requester */
.data-table th:nth-child(7) { width: 80px; }   /* Priority */
.data-table th:nth-child(8) { width: 90px; }   /* Status */
.data-table th:nth-child(9) { width: 120px; }  /* Remark */
.data-table th:nth-child(10) { width: 200px; } /* Actions */

.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: #000000;
  font-weight: 600;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table tbody tr td strong,
.data-table tbody tr td b {
  color: #000000;
  font-weight: 700;
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.approved {
  background: #d4edda;
  color: #155724;
}

.status-badge.rejected {
  background: #f8d7da;
  color: #721c24;
}

.priority-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.priority-badge.normal {
  background: #e7f3ff;
  color: #0066cc;
}

.priority-badge.urgent {
  background: #ffe6e6;
  color: #cc0000;
}

.remark-cell {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Product column - allow wrapping for long names */
/* .data-table td:nth-child(3) {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
} */

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #475569;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #475569;
  font-size: 16px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn i {
  margin-right: 5px;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-danger:disabled {
  background: #dc3545;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Action Buttons */
.actions-cell {
  min-width: 200px;
  white-space: nowrap;
  overflow: visible;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.action-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.action-btn i {
  margin: 0;
  font-size: 11px;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.approve-btn {
  background: #28a745;
  color: white;
}

.approve-btn:hover:not(:disabled) {
  background: #218838;
}

.reject-btn {
  background: #dc3545;
  color: white;
}

.reject-btn:hover:not(:disabled) {
  background: #c82333;
}

.action-status {
  display: block;
  font-size: 11px;
  color: #475569;
}

.action-status small {
  display: block;
}

/*
 * Reject modal — scoped class names so global `.modal-overlay` / `.modal-content`
 * (e.g. ProductDashboard.css with !important) cannot break this dialog.
 */
.pr-reject-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
  isolation: isolate;
}

.pr-reject-modal__dialog {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.pr-reject-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.pr-reject-modal__header h3 {
  margin: 0;
  color: #0f172a;
}

.pr-reject-modal__close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #475569;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.pr-reject-modal__close:hover {
  background: #f8f9fa;
  color: #0f172a;
}

.pr-reject-modal__body {
  padding: 20px;
}

.pr-reject-modal__body p {
  margin: 10px 0;
  color: #334155;
}

.pr-reject-modal__body .form-group {
  margin-top: 20px;
}

.pr-reject-modal__body label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #1e293b;
}

.pr-reject-modal__body textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.pr-reject-modal__body textarea:focus {
  outline: none;
  border-color: #007bff;
}

.pr-reject-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

/* Assign to — same pattern as DWR Price Request */
.pr-dashboard-assign-cell {
  vertical-align: middle;
  min-width: 160px;
}

.pr-dashboard-assign-select {
  width: 100%;
  max-width: 220px;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
}

.pr-dashboard-assign-readonly {
  font-size: 13px;
  color: #374151;
}


/* Purchase Supplier List Styles */
.purchase-supplier-list {
  padding: 20px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.purchase-supplier-list .title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.purchase-supplier-list .title-box-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.purchase-supplier-list .add-supplier-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(17, 153, 142, 0.35);
}

.purchase-supplier-list .add-supplier-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(17, 153, 142, 0.45);
  color: white;
  text-decoration: none;
}

.purchase-supplier-list .title-box h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
}

.purchase-supplier-list .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.purchase-supplier-list .back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

/* Stats Container */
.purchase-supplier-list .stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.purchase-supplier-list .stat-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.purchase-supplier-list .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.purchase-supplier-list .stat-content h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
}

.purchase-supplier-list .stat-content p {
  margin: 4px 0 0 0;
  color: #7f8c8d;
  font-size: 14px;
  font-weight: 500;
}

/* Search Section */
.purchase-supplier-list .search-section {
  margin-bottom: 20px;
}

.purchase-supplier-list .search-box {
  position: relative;
  max-width: 400px;
}

.purchase-supplier-list .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 14px;
  pointer-events: none;
}

.purchase-supplier-list .search-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.3s ease;
}

.purchase-supplier-list .search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.purchase-supplier-list .search-input::placeholder {
  color: #6c757d;
}

/* Container Box */
.purchase-supplier-list .container-box-inner {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* Table Wrapper */
.purchase-supplier-list .table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Table Styles */
.purchase-supplier-list .table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.purchase-supplier-list .table th {
  background: #f8f9fa;
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e9ecef;
  font-size: 14px;
}

.purchase-supplier-list .table th.sortable-header {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.purchase-supplier-list .table th.sortable-header:hover {
  background-color: #e9ecef;
}

.purchase-supplier-list .table th.sortable-header span {
  margin-right: 8px;
}

.purchase-supplier-list .table th.sortable-header i {
  font-size: 12px;
  color: #667eea;
  margin-left: 4px;
}

.purchase-supplier-list .table th.sortable-header i.sort-inactive {
  color: #adb5bd;
  opacity: 0.5;
}

.purchase-supplier-list .table th.sortable-header:hover i.sort-inactive {
  opacity: 1;
  color: #667eea;
}

.purchase-supplier-list .table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.purchase-supplier-list .table td:last-child {
  white-space: nowrap;
  width: 1%;
  min-width: 80px;
}

.purchase-supplier-list .table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Company Info */
.purchase-supplier-list .company-info strong {
  display: block;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 4px;
}

.purchase-supplier-list .company-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* Contact Info */
.purchase-supplier-list .contact-info strong {
  display: block;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 4px;
}

.purchase-supplier-list .contact-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* Location Info */
.purchase-supplier-list .location-info {
  display: flex;
  flex-direction: column;
}

.purchase-supplier-list .location-info span {
  color: #2c3e50;
  font-weight: 500;
}

.purchase-supplier-list .location-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* Action Buttons */
.purchase-supplier-list .action-buttons {
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-width: -webkit-fit-content;
  min-width: fit-content;
}

.purchase-supplier-list .action-buttons .action-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.purchase-supplier-list .action-buttons .action-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.purchase-supplier-list .action-buttons .action-btn .fa-eye {
  color: #22c55e;
}

.purchase-supplier-list .action-buttons .action-btn .fa-file-invoice-dollar {
  color: #0d9488;
}

.purchase-supplier-list .action-buttons .action-btn .fa-edit {
  color: #2563eb;
}

/* Pagination */
.purchase-supplier-list .pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.purchase-supplier-list .page-info {
  color: #7f8c8d;
  font-size: 14px;
}

.purchase-supplier-list .pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.purchase-supplier-list .pagination-btn {
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  background: white;
  color: #2c3e50;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.purchase-supplier-list .pagination-btn:hover:not(:disabled) {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.purchase-supplier-list .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.purchase-supplier-list .pagination-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.purchase-supplier-list .page-numbers {
  display: flex;
  gap: 4px;
}

/* Loading and Error States */
.purchase-supplier-list .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.purchase-supplier-list .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: purchase-supplier-spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes purchase-supplier-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.purchase-supplier-list .error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
}

.purchase-supplier-list .no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #7f8c8d;
}

.purchase-supplier-list .no-data i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.purchase-supplier-list .no-data p {
  font-size: 16px;
  margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .purchase-supplier-list {
    padding: 10px;
  }

  .purchase-supplier-list .title-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
  }

  .purchase-supplier-list .back-btn {
    width: 100%;
    justify-content: center;
  }

  .purchase-supplier-list .stats-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .purchase-supplier-list .table {
    min-width: 700px;
    font-size: 0.75rem;
  }

  .purchase-supplier-list .pagination-container {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .purchase-supplier-list .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .purchase-supplier-list .table {
    min-width: 800px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .purchase-supplier-list .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .purchase-supplier-list .stats-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
.all-tickets-status-cancelled,
.all-tickets-status-rejected {
  background: #fee2e2;
  color: #dc2626;
}

/* Actions column */
.all-tickets-th-actions,
.all-tickets-td-actions {
  width: 180px;
  text-align: center;
}

.pv-ticket-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0 2px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pv-ticket-view {
  background: #dbeafe;
  color: #1d4ed8;
}

.pv-ticket-view:hover {
  background: #2563eb;
  color: #fff;
}

.pv-ticket-close {
  background: #fee2e2;
  color: #dc2626;
}

.pv-ticket-close:hover {
  background: #dc2626;
  color: #fff;
}

.pv-ticket-reopen {
  background: #dcfce7;
  color: #15803d;
}

.pv-ticket-reopen:hover {
  background: #15803d;
  color: #fff;
}

.pv-ticket-status {
  background: #fef3c7;
  color: #b45309;
}

.pv-ticket-status:hover {
  background: #d97706;
  color: #fff;
}

.pv-ticket-reassign {
  background: #e0e7ff;
  color: #4338ca;
}

.pv-ticket-reassign:hover {
  background: #4338ca;
  color: #fff;
}

.pv-ticket-comment {
  background: #f3e8ff;
  color: #7c3aed;
}

.pv-ticket-comment:hover {
  background: #7c3aed;
  color: #fff;
}

/* Ticket detail modal */
.all-tickets-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.all-tickets-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.all-tickets-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.all-tickets-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.all-tickets-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
}

.all-tickets-modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.all-tickets-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.all-tickets-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px 24px;
  gap: 12px 24px;
}

.all-tickets-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.all-tickets-detail-row-full {
  grid-column-start: 1;
  grid-column-end: -1;
}

.all-tickets-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.all-tickets-detail-value {
  font-size: 14px;
  color: #1e293b;
}

.all-tickets-detail-description {
  white-space: pre-wrap;
  line-height: 1.5;
}

.all-tickets-detail-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #1e293b;
}

.pv-action-modal .all-tickets-modal-body {
  min-width: 360px;
}

.pv-action-field {
  margin-bottom: 16px;
}

.pv-action-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.pv-action-field input,
.pv-action-field select,
.pv-action-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
}

.pv-action-field textarea {
  resize: vertical;
  min-height: 80px;
}

.pv-action-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.pv-action-cancel {
  padding: 8px 16px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.pv-action-cancel:hover {
  background: #e2e8f0;
}

.pv-action-submit {
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.pv-action-submit:hover:not(:disabled) {
  background: #1d4ed8;
}

.pv-action-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
  
.dashboard-container {
  padding: 20px;
  max-width: 2000px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-header h1 {
  color: #0f172a;
  margin: 0;
}

.rfq-combine-hint {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #1e293b;
}

.rfq-combine-hint strong {
  color: #0f172a;
}

.dashboard-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1 1;
  min-width: 300px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 14px;
  color: #0f172a;
}

.search-box input::placeholder {
  color: #64748b;
  opacity: 1;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-box label {
  font-weight: 600;
  color: #1e293b;
}

.filter-box select {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 14px;
  min-width: 150px;
  color: #0f172a;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e9ecef;
}

.stat-card .stat-info h3 {
  margin: 0 0 6px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.stat-card .stat-info p {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  border-bottom: 2px solid #cbd5e1;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: #000000;
  font-weight: 600;
}

.data-table tbody tr td strong,
.data-table tbody tr td b {
  color: #000000;
  font-weight: 700;
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #e7f3ff;
  color: #0066cc;
}

.rfq-products-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 320px;
}

.rfq-product-names {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 12px;
  line-height: 1.45;
  color: #0369a1;
  font-weight: 600;
  word-break: break-word;
}

.rfq-product-names li {
  margin-bottom: 4px;
}

.rfq-product-names li:last-child {
  margin-bottom: 0;
}

.actions-cell {
  min-width: 180px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn i {
  margin: 0;
}

.view-btn {
  background: #17a2b8;
  color: white;
}

.view-btn:hover {
  background: #138496;
}

.order-btn {
  background: #28a745;
  color: white;
}

.order-btn:hover {
  background: #218838;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #475569;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #475569;
  font-size: 16px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn i {
  margin-right: 5px;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #0f172a;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #475569;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #0f172a;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* View Order Details Section */
.view-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-detail-field {
  display: flex;
  flex-direction: column;
}

.view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

.view-detail-field span {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #334155;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 700;
  color: #0f172a;
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #475569;
  font-style: italic;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.view-modal-footer .close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-modal-footer .close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-outline-success {
  background-color: transparent;
  color: #28a745;
  border: 1px solid #28a745;
}

.btn-outline-success:hover {
  background-color: #28a745;
  color: white;
}

.btn-outline-primary {
  background-color: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.btn-outline-primary:hover {
  background-color: #007bff;
  color: white;
}

.remark-cell {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* RFQ list: combined PO selection */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.data-table tbody tr.rfq-row-muted td {
  color: #475569;
  background-color: #f1f5f9;
}

.data-table tbody tr.rfq-row-po-pending td {
  background-color: #fff4cc;
}

.data-table tbody tr.rfq-row-po-pending:hover td {
  background-color: #ffefb3;
}

.data-table tbody input[type='checkbox'] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.data-table tbody input[type='checkbox']:disabled {
  cursor: not-allowed;
}


/* QA View Ticket - inherits from ViewTicketsWithActions */
.qa-main-content .all-tickets-page {
  padding: 20px 15px;
}

@media (max-width: 768px) {
  .qa-main-content .all-tickets-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .qa-main-content .all-tickets-tabs {
    flex-wrap: wrap;
  }

  .qa-main-content .all-tickets-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.msds-report-section {
  margin-top: 30px;
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msds-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.msds-report-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.status-controls {
  display: flex;
  gap: 10px;
}

.status-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.status-btn {
  background-color: #e0e0e0;
  color: #666;
}

.status-btn.pending.active {
  background-color: #ffc107;
  color: #000;
  font-weight: 600;
}

.status-btn.pending:hover {
  background-color: #ffb300;
}

.status-btn.approved.active {
  background-color: #28a745;
  color: white;
  font-weight: 600;
}

.status-btn.approved:hover {
  background-color: #218838;
}

.status-btn.rejected.active {
  background-color: #dc3545;
  color: white;
  font-weight: 600;
}

.status-btn.rejected:hover {
  background-color: #c82333;
}

.status-btn:hover {
  background-color: #d0d0d0;
}

.msds-report-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.msds-report-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  bottom: -2px;
}

.msds-report-tab:hover {
  color: #007bff;
  background-color: #f8f9fa;
}

.msds-report-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  font-weight: 600;
}

.msds-report-content {
  min-height: 300px;
  padding: 20px 0;
}

.msds-report-tab-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.msds-report-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msds-report-form-group label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.msds-report-input,
.msds-report-select,
.msds-report-textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.msds-report-input:focus,
.msds-report-select:focus,
.msds-report-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.msds-report-input:disabled,
.msds-report-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.msds-report-textarea {
  resize: vertical;
  min-height: 100px;
}

.msds-report-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.msds-report-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

.msds-report-save-btn {
  padding: 10px 30px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.msds-report-save-btn:hover {
  background-color: #0056b3;
}

.msds-report-save-btn:active {
  transform: scale(0.98);
}

.msds-report-save-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

.msds-report-message {
  padding: 10px 15px;
  border-radius: 4px;
  margin-right: 15px;
  font-size: 14px;
  font-weight: 500;
}

.msds-report-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.msds-report-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
  .msds-report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .status-controls {
    width: 100%;
    justify-content: space-between;
  }

  .status-btn {
    flex: 1 1;
  }

  .msds-report-tabs {
    flex-wrap: wrap;
  }

  .msds-report-tab {
    flex: 1 1;
    min-width: 80px;
  }

  .msds-report-form-row {
    grid-template-columns: 1fr;
  }
}


.add-parameter {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.add-parameter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-parameter-header-left h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #333;
  font-weight: 600;
}

.add-parameter-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.add-parameter-header-right span {
  color: #666;
  font-size: 0.9rem;
}

.add-parameter-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.add-parameter-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-parameter-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: none;
  max-width: initial;
}

.form-g-1-p{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  grid-gap: 20px;
  gap: 20px;
  
}

.form-group.para-n{
  flex-basis: initial;
}


.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.form-control {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

/* Parameter Name and Extra Field: allow normal case (no forced caps) */
.add-parameter-form #parameter_name,
.add-parameter-form #extra_field {
  text-transform: none;
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.cancel-btn {
  padding: 12px 24px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
}

.submit-btn {
  padding: 12px 24px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.submit-btn:hover:not(:disabled) {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.examples-section {
  margin-top: 40px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.examples-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.example-group {
  background-color: white;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.example-group h4 {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
}

.example-group ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.example-group li {
  margin: 5px 0;
  font-size: 0.9rem;
  color: #555;
}

.add-parameter-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.add-parameter-footer p {
  margin: 0;
}

@media (max-width: 1000px){
  .form-g-1-p{
    gap: 10px;
  }
}

@media (max-width: 768px){
  .form-g-1-p{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 5px;
}*/

.cancel-btn{
  justify-content: center;
}

}

/* Billing Confirmation Sales Order Styles */
.billing-confirmation-sales-order {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.billing-confirmation-header {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.billing-confirmation-header h2 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.billing-confirmation-header p {
  margin: 0 0 15px 0;
  color: #64748b;
  font-size: 1rem;
}

.billing-confirmation-controls {
  display: flex;
  gap: 20px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #64748b;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.billing-confirmation-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.billing-confirmation-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.billing-confirmation-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.billing-confirmation-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.billing-orders-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.billing-table-container {
  overflow-x: auto;
}

.billing-orders-table,
.billing-products-table {
  width: 100%;
  border-collapse: collapse;
}

.billing-orders-table thead,
.billing-products-table thead {
  background-color: #f1f5f9;
}

.billing-orders-table th,
.billing-products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  border-bottom: 2px solid #e2e8f0;
}

.billing-orders-table td,
.billing-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.875rem;
}

.billing-orders-table tbody tr:hover,
.billing-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.billing-orders-table tbody tr.selected {
  background-color: #dbeafe;
}

.view-billing-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.view-billing-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.view-billing-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.confirm-billing-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.confirm-billing-btn:hover:not(:disabled) {
  background-color: #059669;
}

.confirm-billing-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.confirm-billing-btn i.fa-check-circle {
  color: #10b981;
}

.loading-cell {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.batch-info {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

.billing-note {
  margin-top: 20px;
  padding: 16px;
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
}

.billing-note-text {
  margin: 0;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.6;
}

.billing-copyright {
  margin-top: 20px;
  padding: 16px;
  text-align: left;
  color: #64748b;
  font-size: 0.75rem;
}

.billing-confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.billing-confirmed-badge i {
  color: #10b981;
}

.billing-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.billing-pending-badge i {
  color: #f59e0b;
}

/* View Modal Styles */
.billing-view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.billing-view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 95%;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.billing-view-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f8fafc;
}

.billing-view-modal-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
}

.billing-modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.billing-modal-close-btn:hover {
  background-color: #e2e8f0;
  color: #1e293b;
}

.billing-view-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1;
}

.billing-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.billing-order-info {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f8fafc;
  border-radius: 6px;
  flex-wrap: wrap;
}

.billing-order-info-item {
  display: flex;
  gap: 8px;
  color: #475569;
  font-size: 0.9rem;
}

.billing-order-info-item strong {
  color: #1e293b;
  font-weight: 600;
}

.billing-view-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background-color: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

.billing-modal-close-button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.billing-modal-close-button:hover {
  background-color: #2563eb;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
  .billing-view-modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .billing-view-modal-overlay {
    padding: 0;
  }

  .billing-order-info {
    flex-direction: column;
    gap: 12px;
  }
}


.coa-letterhead-page {
  padding: 20px;
}

.coa-letterhead-header {
  margin-bottom: 16px;
}

.coa-letterhead-header h2 {
  margin: 0;
  font-size: 28px;
  color: #1f2937;
}

.coa-letterhead-header p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.coa-letterhead-form-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.coa-letterhead-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-gap: 14px;
  gap: 14px;
  align-items: end;
}

.coa-letterhead-form-row {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.coa-letterhead-form-row label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.coa-letterhead-input,
.coa-letterhead-file {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.coa-letterhead-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.coa-letterhead-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.coa-letterhead-btn {
  border: none;
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.coa-letterhead-btn.primary {
  background: #2563eb;
  color: #ffffff;
}

.coa-letterhead-btn.primary:hover {
  background: #1d4ed8;
}

.coa-letterhead-btn.secondary {
  background: #e5e7eb;
  color: #1f2937;
}

.coa-letterhead-btn.secondary:hover {
  background: #d1d5db;
}

.coa-letterhead-table-wrap {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow-x: auto;
}

.coa-letterhead-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.coa-letterhead-table thead {
  background: #f8fafc;
}

.coa-letterhead-table th,
.coa-letterhead-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.coa-letterhead-table th {
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
}

.coa-letterhead-table td {
  color: #4b5563;
}

.coa-letterhead-table tbody tr:hover {
  background: #f9fafb;
}

.coa-letterhead-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.coa-letterhead-link:hover {
  text-decoration: underline;
}

.coa-letterhead-view-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.coa-letterhead-view-btn:hover {
  background: #1d4ed8;
}

.coa-letterhead-edit-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.coa-letterhead-edit-btn:hover {
  background: #0d9488;
}

@media (max-width: 980px) {
  .coa-letterhead-form {
    grid-template-columns: 1fr;
  }
}


.sample-upload-page {
  padding: 1rem;
}

.sample-upload-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sample-upload-header h2 {
  margin: 0 0 0.25rem;
  color: #1e293b;
}

.sample-upload-header p {
  margin: 0;
  color: #64748b;
}

.sample-upload-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sample-upload-add-btn:hover {
  background: #1d4ed8;
}

.sample-upload-error,
.sample-upload-success {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.sample-upload-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sample-upload-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.sample-upload-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.sample-upload-table-wrap h3 {
  margin: 0 0 1rem;
  color: #334155;
}

.sample-upload-filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-gap: 1rem;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.sample-upload-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sample-upload-filter-field label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
}

.sample-upload-filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-bottom: 2px;
}

.sample-upload-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.sample-upload-pagination-info {
  color: #64748b;
  font-size: 0.9rem;
}

.sample-upload-pagination-controls {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.sample-upload-pagination-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.sample-upload-pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.sample-upload-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sample-upload-pagination-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.sample-upload-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.sample-upload-modal-content {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 920px;
  min-height: 420px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.75rem 2rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.sample-upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sample-upload-modal-header h3 {
  margin: 0;
  color: #1e293b;
}

.sample-upload-modal-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.sample-upload-modal-close:hover {
  color: #1e293b;
}

.sample-upload-file-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.sample-upload-selected-files {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem;
  background: #f8fafc;
}

.sample-upload-selected-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.15rem;
}

.sample-upload-selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.sample-upload-selected-file:last-child {
  border-bottom: none;
}

.sample-upload-selected-name {
  font-size: 0.9rem;
  color: #334155;
  word-break: break-all;
}

.sample-upload-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

.sample-upload-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sample-upload-form-row-full {
  grid-column: 1 / -1;
}

.sample-upload-form-row label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
}

.sample-upload-input,
.sample-upload-remark,
.sample-upload-file {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
}

.sample-upload-input:focus,
.sample-upload-remark:focus,
.sample-upload-file:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.sample-upload-remark {
  resize: vertical;
  min-height: 4.5rem;
  font-family: inherit;
}

.sample-upload-picker {
  position: relative;
}

.sample-upload-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  z-index: 20;
}

.sample-upload-picker-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.sample-upload-picker-option:hover {
  background: #f1f5f9;
}

.sample-upload-picker-sub {
  display: block;
  color: #64748b;
  font-size: 0.8rem;
}

.sample-upload-remove-file {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.sample-upload-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sample-upload-btn {
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

.sample-upload-btn.primary {
  background: #2563eb;
  color: #fff;
}

.sample-upload-btn.primary:hover {
  background: #1d4ed8;
}

.sample-upload-btn.secondary {
  background: #e2e8f0;
  color: #334155;
}

.sample-upload-table-wrap {
  overflow-x: auto;
}

.sample-upload-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sample-upload-table th,
.sample-upload-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.sample-upload-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.sample-upload-table tbody tr:hover {
  background: #f8fafc;
}

.sample-upload-file-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sample-upload-file-links a {
  color: #2563eb;
  text-decoration: none;
}

.sample-upload-file-links a:hover {
  text-decoration: underline;
}

.sample-upload-edit-btn {
  border: none;
  background: #059669;
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.sample-upload-edit-btn:hover {
  background: #047857;
}

.sample-upload-empty,
.sample-upload-loading {
  text-align: center;
  color: #64748b;
  padding: 1rem;
}

@media (max-width: 768px) {
  .sample-upload-form-grid {
    grid-template-columns: 1fr;
  }

  .sample-upload-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sample-upload-filters {
    grid-template-columns: 1fr;
  }
}

.coa-report-container {
  padding: 20px;
  max-width: 100%;
  margin: 0 auto;
}

.coa-report-header {
  margin-bottom: 20px;
}

.coa-report-header h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.report-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entries-control select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field-select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 140px;
  background: #fff;
  color: #333;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 200px;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

.coa-report-table-container {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.coa-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.coa-report-table thead {
  background-color: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.coa-report-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  color: #333;
  white-space: nowrap;
}

.coa-report-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
  position: relative;
}

.coa-report-table td button {
  position: relative;
  z-index: 1000 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.status-cell {
  pointer-events: auto !important;
}

.status-cell button {
  z-index: 1000 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.coa-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.coa-report-table tbody tr:hover .status-cell button {
  z-index: 1001 !important;
}

.coa-report-table tbody tr:last-child td {
  border-bottom: none;
}

.view-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.view-btn:hover {
  background-color: #0056b3;
}

.view-btn i {
  font-size: 12px;
}

/* Action Buttons Group */
.action-buttons-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Approve Button */
.approve-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
}

.approve-btn:hover:not(:disabled) {
  background-color: #218838;
}

.approve-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.approve-btn i {
  font-size: 12px;
}

/* Status Badge */
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.status-approved {
  background-color: #28a745;
  color: white;
}

/* Status Button */
.status-btn {
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer !important;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  position: relative;
  z-index: 100 !important;
  pointer-events: auto !important;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.status-pending-btn {
  background-color: #ffc107;
  color: #856404;
  border: 1px solid #ffc107;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.status-pending-btn:hover:not(:disabled) {
  background-color: #e0a800;
  border-color: #e0a800;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer !important;
}

.status-pending-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer !important;
}

.status-pending-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.status-pending-btn:not(:disabled) {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.status-pending-btn:not(:disabled):hover {
  cursor: pointer !important;
}

.status-pending-btn:not(:disabled):active {
  cursor: pointer !important;
}

.status-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.status-clickable:hover {
  opacity: 0.8;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-clickable:active {
  transform: scale(0.98);
}

/* Expand/Collapse Button */
.expand-icon-cell {
  width: 40px;
  text-align: center;
  padding: 8px !important;
}

.expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  color: #007bff;
  font-size: 14px;
  transition: background-color 0.2s;
}

.expand-btn:hover {
  background-color: #f0f0f0;
}

.expand-btn i {
  font-size: 12px;
}

/* Expanded Row */
.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px !important;
  background-color: #f8f9fa;
}

.expanded-content-wrapper {
  width: 100%;
}

.coa-details-section {
  margin-bottom: 30px;
}

.coa-details-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  padding: 15px;
  background-color: white;
  border-radius: 4px;
}

.details-grid div {
  padding: 8px;
}

.details-grid strong {
  color: #333;
  margin-right: 8px;
}

.parameters-table-wrapper {
  width: 100%;
}

.parameters-section {
  margin-top: 20px;
}

.parameters-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.parameters-table-wrapper h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 16px;
}

.parameters-inline-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
}

.parameters-inline-table thead {
  background-color: #e9ecef;
}

.parameters-inline-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  color: #333;
  font-size: 13px;
}

.parameters-inline-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 13px;
}

.parameters-inline-table tbody tr:hover {
  background-color: #f8f9fa;
}

.parameters-inline-table tbody tr:last-child td {
  border-bottom: none;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

.pagination button:hover:not(:disabled) {
  background-color: #f8f9fa;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  font-size: 14px;
  color: #666;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1200px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.close-btn:hover {
  background-color: #f0f0f0;
  color: #333;
}

.modal-body {
  padding: 20px;
}

/* Approve Modal Styles */
.approve-modal-content {
  max-width: 500px !important;
}

.approve-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.approve-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.approve-form label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.approve-form .form-value {
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
  color: #555;
  font-size: 14px;
  min-height: 20px;
}

.remark-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.remark-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.close-modal-btn {
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  background-color: #f0f0f0;
  border-color: #bbb;
}

.approve-modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  background-color: #28a745;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.approve-modal-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.approve-modal-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.coa-details-section {
  margin-bottom: 30px;
}

.coa-details-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.details-grid div {
  padding: 8px;
}

.details-grid strong {
  color: #333;
  margin-right: 8px;
}

.parameters-section {
  margin-top: 20px;
}

.parameters-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.parameters-modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.parameters-modal-table thead {
  background-color: #f8f9fa;
}

.parameters-modal-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  color: #333;
}

.parameters-modal-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

.parameters-modal-table tbody tr:hover {
  background-color: #f8f9fa;
}

.parameter-name-cell {
  font-weight: 500;
  padding: 12px;
}

.parameter-name-cell.heavy-metals {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.parameter-name-cell.microbiological {
  background-color: #ffcdd2;
  color: #c62828;
}

.parameter-name-cell.general {
  background-color: #e3f2fd;
  color: #1976d2;
}

.no-parameters {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

.details-grid.coaOneApproved-details{
  background: #fff;
}

.details-grid.coaOneApproved-details strong{
  color: #4b5563;
  font-weight: 600;
}

.details-grid.coaOneApproved-details div{
  background-color: #fff;
}

@media (max-width: 768px) {
  .search-control {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-field-select,
  .search-input {
    width: 100%;
    min-width: 0;
  }

  .coa-report-table {
    font-size: 12px;
  }

  .coa-report-table th,
  .coa-report-table td {
    padding: 8px 4px;
  }

  .modal-content {
    max-width: 95%;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
}

/* Sales order note modal (QC pending COA reports) */
.coa-note-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.coa-note-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 520px;
  width: 100%;
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
}

.coa-note-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.coa-note-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
}

.coa-note-modal-close {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f8f8;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.coa-note-modal-close:hover {
  background: #eee;
}

.coa-note-modal-body {
  padding: 16px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #222;
  font-size: 14px;
  line-height: 1.5;
}

.coa-note-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid #c5d4e8;
  border-radius: 4px;
  background: #f0f5fc;
  color: #1a56a8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.coa-note-view-btn:hover:not(:disabled) {
  background: #e2ecf9;
  border-color: #9db8dc;
}

.coa-note-view-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


.create-coa-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #efe;
  color: #3c3;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #cfc;
}

.coa-form {
  background: #f5f5f5;
  padding: 30px;
  border-radius: 8px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-column {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

.form-group input[readOnly] {
  background-color: #f0f0f0;
  cursor: not-allowed;
}

.date-inputs {
  display: flex;
  gap: 10px;
}

.date-inputs select {
  flex: 1 1;
}

.tr-number-input-group {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  overflow: hidden;
}

.tr-number-prefix {
  padding: 10px 12px;
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 500;
  border-right: 1px solid #ddd;
  white-space: nowrap;
  font-size: 14px;
}

.tr-number-input {
  flex: 1 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 14px;
  background: white;
}

.tr-number-input-group:focus-within {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.parameter-select-group {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.parameter-select-group select {
  flex: 1 1;
  min-width: 150px;
}

.parameter-select-group select[multiple] {
  min-height: 100px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.parameter-select-group select[multiple] option {
  padding: 5px;
  cursor: pointer;
}

.parameter-select-group select[multiple] option:hover {
  background-color: #f0f0f0;
}

.parameter-search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.parameter-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.add-parameter-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.add-parameter-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.add-parameter-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.help-text {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
}

.parameters-table-section {
  margin: 30px 0;
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  overflow-x: auto;
}

.parameters-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.parameters-table th {
  white-space: nowrap;
}

.parameters-table td {
  vertical-align: middle;
}

.parameters-table td:first-child {
  width: 25%;
}

.parameters-table td:nth-child(2),
.parameters-table td:nth-child(3),
.parameters-table td:nth-child(4) {
  width: 20%;
}

.parameters-table td:nth-child(5),
.parameters-table td:nth-child(6) {
  width: 7.5%;
}

.parameters-table thead {
  background-color: #f8f9fa;
}

.parameters-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  color: #333;
}

.parameters-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

.parameters-table tbody tr:hover {
  background-color: #f8f9fa;
}

.no-parameters-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-style: italic;
  background-color: #f8f9fa;
}

.active-parameter {
  background-color: #fff;
}

.inactive-parameter {
  background-color: #f8f9fa;
  opacity: 0.7;
}

.inactive-parameter input {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.not-added-text {
  color: #999;
  font-style: italic;
  font-size: 12px;
}

.parameter-name {
  font-weight: 500;
  padding: 12px;
}

.category-label {
  font-weight: 600;
  font-size: 13px;
  margin-right: 5px;
}

.new-parameter-input-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.new-parameter-name-input {
  flex: 1 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  min-width: 200px;
}

.new-parameter-name-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.parameter-name.heavy-metals {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.parameter-name.microbiological {
  background-color: #ffcdd2;
  color: #c62828;
}

.parameter-name.general {
  background-color: #e3f2fd;
  color: #1976d2;
}

.parameters-table input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.delete-btn:hover {
  background-color: #c82333;
}

.delete-btn i {
  margin-right: 5px;
}

/* Duplicate Parameter Alert Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.alert-modal-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 90%;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-modal-header {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-modal-header i {
  font-size: 24px;
}

.alert-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.alert-modal-body {
  padding: 24px;
  color: #333;
}

.alert-modal-body p {
  margin: 0 0 12px 0;
  font-size: 15px;
  line-height: 1.6;
}

.alert-modal-body p:last-child {
  margin-bottom: 0;
}

.alert-modal-body strong {
  color: #ff9800;
  font-weight: 600;
}

.alert-modal-footer {
  padding: 16px 24px;
  background-color: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e0e0e0;
}

.alert-modal-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.alert-modal-btn:hover {
  background-color: #0056b3;
}

.alert-modal-btn:active {
  transform: scale(0.98);
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

.submit-btn {
  padding: 12px 40px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover:not(:disabled) {
  background-color: #218838;
}

.submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .date-inputs {
    flex-direction: column;
  }

  .parameter-select-group {
    flex-direction: column;
    align-items: stretch;
  }
}


.second_form_row{
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-basis: initial !important;
    gap: 0;
    margin: 0;
    justify-content: initial !important;
}

.Create-second_form_row{
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-basis: initial !important;
    gap: 0;
    margin: 0;
    justify-content: initial !important;
}

.f-one-column{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 5px;
    width: 100%;
}

.f-two-column,
.f-three-column{
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
}

.mfg-d,
.anlysis-g,
.expiry-d{
    width: 100%;
    flex-basis: initial;
}

.expiry-d{
    width: 170%;
}

.mfg-inp,
.anlysis-inp,
.exp-inp{
    width: 100%;
}
@media (max-width: 768px){
    .f-one-column{
        flex-wrap: wrap;
        gap: 5px;
    }

    .f-two-column{
        flex-wrap: wrap;
        gap: 5px;
    }
}
.create-consignee {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.create-consignee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-consignee-header-left h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.create-consignee-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.create-consignee-header-right span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.create-consignee-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.create-consignee-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-consignee-success {
  background-color: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-consignee-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.form-control {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
  color: #94a3b8;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.submit-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.consignees-table-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.consignees-table-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.loading-message,
.empty-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.table-container {
  overflow-x: auto;
}

.consignees-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignees-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.consignees-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.consignees-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.consignees-table tbody tr:hover {
  background-color: #f8f9fa;
}

.consignees-table tbody tr:last-child td {
  border-bottom: none;
}

.edit-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.edit-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.cancel-btn {
  padding: 12px 32px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 10px;
}

.cancel-btn:hover:not(:disabled) {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-link {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.back-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.create-consignee-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.create-consignee-footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .consignees-table {
    font-size: 0.85rem;
  }

  .consignees-table th,
  .consignees-table td {
    padding: 8px 12px;
  }
}


.msds-container {
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.msds-form-wrapper {
  background-color: white;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.msds-title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  text-transform: uppercase;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #efe;
  color: #3c3;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #cfc;
}

.msds-form {
  width: 100%;
}

.msds-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.msds-section:last-of-type {
  border-bottom: none;
}

.msds-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1976d2;
  background-color: #e3f2fd;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 4px solid #1976d2;
}

.msds-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

@media (max-width: 768px) {
  .msds-form-grid {
    grid-template-columns: 1fr;
  }
}

.msds-form-group {
  display: flex;
  flex-direction: column;
}

.msds-form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.msds-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  color: #333;
  transition: border-color 0.3s ease;
}

.msds-input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.msds-input.readonly {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
  border-color: #e0e0e0;
}

.msds-input[readonly] {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

.msds-submit-container {
  display: flex;
  justify-content: center;
  margin: 40px 0 20px;
}

.msds-submit-btn {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-transform: uppercase;
}

.msds-submit-btn:hover:not(:disabled) {
  background-color: #1565c0;
}

.msds-submit-btn:disabled {
  background-color: #90caf9;
  cursor: not-allowed;
}

.msds-footer {
  text-align: left;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.msds-footer p {
  color: #666;
  font-size: 12px;
  margin: 0;
}

/* Date input styling */
input[type="date"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .msds-form-wrapper {
    padding: 20px;
  }
  
  .msds-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .msds-container {
    padding: 10px;
  }
  
  .msds-form-wrapper {
    padding: 15px;
  }
  
  .msds-title {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .msds-section-title {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .msds-form-grid {
    gap: 15px;
  }
}


.create-coa-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #efe;
  color: #3c3;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #cfc;
}

.coa-form {
  background: #f5f5f5;
  padding: 30px;
  border-radius: 8px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-column {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

.form-group input[readOnly] {
  background-color: #f0f0f0;
  cursor: not-allowed;
}

/*
 * Other modules ship global rules like `.form-group input[type="text"] { text-transform: uppercase }`
 * (bundled via App). Override here so Two COA create + edit accept mixed case.
 */
.create-coa-container .coa-form input,
.create-coa-container .coa-form select,
.create-coa-container .coa-form textarea,
.view-modal-body .coa-form input,
.view-modal-body .coa-form select,
.view-modal-body .coa-form textarea,
.view-modal-content .coa-form input,
.view-modal-content .coa-form select,
.view-modal-content .coa-form textarea {
  text-transform: none !important;
}

.create-coa-container .coa-form input::placeholder,
.create-coa-container .coa-form textarea::placeholder,
.view-modal-body .coa-form input::placeholder,
.view-modal-body .coa-form textarea::placeholder,
.view-modal-content .coa-form input::placeholder,
.view-modal-content .coa-form textarea::placeholder {
  text-transform: none !important;
}

.date-inputs {
  display: flex;
  gap: 10px;
}

.date-inputs select {
  flex: 1 1;
}

.tr-number-input-group {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  overflow: hidden;
}

.tr-number-prefix {
  padding: 10px 12px;
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 500;
  border-right: 1px solid #ddd;
  white-space: nowrap;
  font-size: 14px;
}

.tr-number-input {
  flex: 1 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 14px;
  background: white;
}

.tr-number-input-group:focus-within {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.parameter-select-group {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.parameter-select-group select {
  flex: 1 1;
  min-width: 150px;
}

.parameter-search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.parameter-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.add-parameter-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.add-parameter-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.add-parameter-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.help-text {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
}

/* Image Upload Styles */
.image-upload-section {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.image-upload-controls {
  flex: 1 1;
}

.image-upload-preview {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.image-preview-container {
  position: relative;
  display: inline-block;
}

.image-preview {
  max-width: 200px;
  max-height: 200px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s;
}

.image-remove-btn:hover {
  background: #c82333;
}

.image-remove-btn:active {
  transform: scale(0.95);
}

.sample-upload-images-section {
  margin: 24px 0;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.sample-upload-images-section--top {
  margin: 0 0 24px;
}

.sample-upload-images-section h3 {
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 1rem;
}

.sample-upload-images-message {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.sample-upload-images-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.sample-upload-image-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 88px;
}

.sample-upload-image-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample-upload-image-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.sample-upload-view-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  font-size: 0.85rem;
  text-decoration: none;
}

.sample-upload-view-link:hover {
  text-decoration: underline;
}

.sample-upload-thumbnail-link {
  display: inline-block;
  line-height: 0;
}

.sample-upload-thumbnail {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.sample-upload-thumbnail-link:hover .sample-upload-thumbnail {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.sample-upload-image-name {
  margin: 0;
  max-width: 200px;
  font-size: 0.8rem;
  color: #475569;
  text-align: center;
  word-break: break-word;
}

.sample-upload-other-files {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sample-upload-other-files-label {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.sample-upload-file-link {
  color: #2563eb;
  font-size: 0.9rem;
  text-decoration: none;
}

.sample-upload-file-link:hover {
  text-decoration: underline;
}

.parameters-table-section {
  margin: 30px 0;
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  overflow-x: auto;
}

.parameters-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.parameters-table th {
  white-space: nowrap;
}

.parameters-table td {
  vertical-align: middle;
}

.parameters-table td:first-child {
  width: 25%;
}

.parameters-table td:nth-child(2),
.parameters-table td:nth-child(3),
.parameters-table td:nth-child(4) {
  width: 20%;
}

.parameters-table td:nth-child(5),
.parameters-table td:nth-child(6) {
  width: 7.5%;
}

.parameters-table thead {
  background-color: #f8f9fa;
}

.parameters-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  color: #333;
}

.parameters-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

.parameters-table tbody tr:hover {
  background-color: #f8f9fa;
}

.no-parameters-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-style: italic;
  background-color: #f8f9fa;
}

.active-parameter {
  background-color: #fff;
}

.inactive-parameter {
  background-color: #f8f9fa;
  opacity: 0.7;
}

.inactive-parameter input {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.not-added-text {
  color: #999;
  font-style: italic;
  font-size: 12px;
}

.parameter-name {
  font-weight: 500;
  padding: 12px;
}

.category-label {
  font-weight: 600;
  font-size: 13px;
  margin-right: 5px;
}

.new-parameter-input-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.new-parameter-name-input {
  flex: 1 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  min-width: 200px;
}

.new-parameter-name-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.parameter-name.heavy-metals {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.parameter-name.microbiological {
  background-color: #ffcdd2;
  color: #c62828;
}

.parameter-name.general {
  background-color: #e3f2fd;
  color: #1976d2;
}

.parameters-table input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.delete-btn:hover {
  background-color: #c82333;
}

.delete-btn i {
  margin-right: 5px;
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

.submit-btn {
  padding: 12px 40px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover:not(:disabled) {
  background-color: #218838;
}

.submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

/* Duplicate Parameter Alert Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.alert-modal-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 90%;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-modal-header {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-modal-header i {
  font-size: 24px;
}

.alert-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.alert-modal-body {
  padding: 24px;
  color: #333;
}

.alert-modal-body p {
  margin: 0 0 12px 0;
  font-size: 15px;
  line-height: 1.6;
}

.alert-modal-body p:last-child {
  margin-bottom: 0;
}

.alert-modal-body strong {
  color: #ff9800;
  font-weight: 600;
}

.alert-modal-footer {
  padding: 16px 24px;
  background-color: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e0e0e0;
}

.alert-modal-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.alert-modal-btn:hover {
  background-color: #0056b3;
}

.alert-modal-btn:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .date-inputs {
    flex-direction: column;
  }

  .parameter-select-group {
    flex-direction: column;
    align-items: stretch;
  }

  .image-upload-section {
    flex-direction: column;
  }

  .image-preview {
    max-width: 100%;
  }

  div.form-row.second_form_row{
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  div.form-row{
    display: flex;
    flex-direction: row;
  }
}


/* Live Stock — balanced columns, compact remark (line-clamp), readable typography */

.live-stock-page .stock-report-table-container {
  max-width: 100%;
  overflow-x: auto;
}

.live-stock-page .live-stock-detail-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.live-stock-page .live-stock-detail-table th {
  white-space: normal;
  line-height: 1.35;
  vertical-align: bottom;
  padding: 12px 10px;
  font-size: 0.78rem;
}

.live-stock-page .live-stock-detail-table td {
  padding: 10px 10px;
  vertical-align: top;
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.live-stock-page .live-stock-detail-table td:first-child {
  font-weight: 500;
  color: #2563eb;
}

.live-stock-th-store-arn,
.live-stock-td-store-arn {
  width: 13%;
}

.live-stock-th-qc-arn,
.live-stock-td-qc-arn {
  width: 13%;
}

.live-stock-th-product,
.live-stock-td-product {
  width: 22%;
}

.live-stock-th-balance,
.live-stock-td-balance,
.live-stock-th-received-qty,
.live-stock-td-received-qty {
  width: 10%;
  text-align: right;
}

.live-stock-th-balance,
.live-stock-th-received-qty {
  white-space: nowrap;
}

.live-stock-td-balance,
.live-stock-td-received-qty {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.live-stock-th-remark,
.live-stock-td-remark {
  width: 18%;
}

.live-stock-th-actions,
.live-stock-td-actions {
  width: 9%;
  text-align: center;
  white-space: nowrap;
}

.live-stock-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
}

.live-stock-view-btn:hover:not(:disabled) {
  background: #dbeafe;
}

.live-stock-view-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.live-stock-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.live-stock-view-modal {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 920px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.live-stock-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.live-stock-view-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.live-stock-view-close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
}

.live-stock-view-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1 1;
}

.live-stock-view-error {
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 6px;
  font-size: 0.9rem;
}

.live-stock-view-loading,
.live-stock-view-empty {
  color: #64748b;
  margin: 0;
}

.live-stock-view-table-wrap {
  overflow-x: auto;
}

.live-stock-view-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.live-stock-view-table th,
.live-stock-view-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.live-stock-view-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
}

.live-stock-view-num {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.live-stock-view-footer {
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.live-stock-view-close-btn {
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 600;
  cursor: pointer;
}

.live-stock-view-close-btn:hover {
  background: #e2e8f0;
}

.live-stock-th-remark {
  color: #0f766e;
}

.live-stock-remark-inner {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #334155;
  max-height: calc(1.5em * 3);
}

.live-stock-remark-inner--empty {
  color: #94a3b8;
  -webkit-line-clamp: unset;
  max-height: none;
}

@media (max-width: 1100px) {
  .live-stock-page .live-stock-detail-table {
    min-width: 880px;
  }
}

.msds-report-container {
  padding: 20px;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.msds-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.msds-report-header h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
}

.report-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-controls {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #007bff;
}

.entries-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.entries-control select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
}

.search-control {
  position: relative;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #efe;
  color: #3c3;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #cfc;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

.msds-report-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.msds-report-table {
  width: 100%;
  border-collapse: collapse;
}

.msds-report-table thead {
  background-color: #f8f9fa;
}

.msds-report-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.msds-report-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
}

.msds-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.expand-icon-cell {
  width: 50px;
  text-align: center;
}

.expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #007bff;
  font-size: 16px;
  padding: 5px 10px;
  transition: color 0.3s;
}

.expand-btn:hover {
  color: #0056b3;
}

.expand-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #000;
}

.status-badge.status-approved {
  background-color: #28a745;
  color: white;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: white;
}

.status-cell {
  position: relative;
}

.status-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.status-pending-btn {
  background-color: #ffc107;
  color: #000;
}

.status-pending-btn:hover {
  background-color: #ffb300;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 1200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px !important;
}

.expanded-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.msds-details-section {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msds-details-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
  padding-bottom: 10px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.details-grid div {
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.details-grid strong {
  color: #333;
  margin-right: 8px;
}

.msds-report-section-wrapper {
  margin-top: 20px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

/* msds view */
.msds-form-grid.msds-view-grid{
  display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

@media (max-width: 768px) {
  .msds-report-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    width: 100%;
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .msds-report-table {
    font-size: 12px;
  }

  .msds-report-table th,
  .msds-report-table td {
    padding: 8px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
}


.parameter-list {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.parameter-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.parameter-list-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #333;
  font-weight: 600;
}

.add-parameter-btn {
  background-color: #059669;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-parameter-btn:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.parameter-list-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.parameter-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.parameter-list-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1;
  min-width: 260px;
  max-width: 420px;
  position: relative;
}

.parameter-list-search-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.parameter-list-search-wrap input {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

.parameter-list-search-clear {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}

.parameter-list-meta {
  font-size: 0.9rem;
  color: #64748b;
  white-space: nowrap;
}

.parameter-list-loading-cell,
.parameter-list-empty-cell {
  text-align: center;
  padding: 32px 16px !important;
  color: #64748b;
}

.parameter-list-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #e2e8f0;
}

.parameter-list-page-btn {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #334155;
  cursor: pointer;
  font-size: 0.875rem;
}

.parameter-list-page-btn:hover:not(:disabled) {
  background: #f8fafc;
}

.parameter-list-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.parameter-list-page-info {
  font-size: 0.875rem;
  color: #64748b;
  min-width: 120px;
  text-align: center;
}

.parameter-list-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.parameter-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.parameter-list-table thead {
  background-color: #f1f5f9;
}

.parameter-list-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.parameter-list-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.parameter-list-table tbody tr:hover {
  background-color: #f8fafc;
}

.parameter-list-table td {
  padding: 12px 16px;
  text-align: left;
  color: #64748b;
  font-size: 0.875rem;
  vertical-align: middle;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-btn,
.edit-btn,
.delete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-btn {
  background-color: #3b82f6;
  color: white;
}

.view-btn:hover {
  background-color: #2563eb;
}

.edit-btn {
  background-color: #f59e0b;
  color: white;
}

.edit-btn:hover {
  background-color: #d97706;
}

.delete-btn {
  background-color: #ef4444;
  color: white;
}

.delete-btn:hover {
  background-color: #dc2626;
}

.parameter-list-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.parameter-list-empty p {
  color: #64748b;
  font-size: 1.1rem;
}

.parameter-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.parameter-list-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.edit-modal-content {
  max-width: 700px;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-parameter-info {
  display: flex;
  flex-direction: row;
  gap: 80px;
}

.view-parameter-field {
  display: flex;
  flex-direction: column;
}

.view-parameter-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-parameter-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.modal-close-button {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Edit Form Styles */
.parameter-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-and-action-btn{
  display: flex;
  flex-direction: column;
}

.f-1-d-p{
  display: flex;
  gap: 50px;
}


.parameter-form-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

/* Parameter Name and Extra Field: allow normal case (no forced caps) */
.parameter-form #parameter_name,
.parameter-form #extra_field,
.parameter-form .form-group input[type="text"] {
  text-transform: none !important;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.cancel-btn {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background-color: #5a6268;
}

.submit-btn {
  padding: 10px 20px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.submit-btn:hover:not(:disabled) {
  background-color: #047857;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


.sales-order-final {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.sales-order-final-header {
  margin-bottom: 30px;
}

.sales-order-final-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.sales-order-final-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.9rem;
  color: #555;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.9rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

/* Messages */
.sales-order-final-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.sales-order-final-error i {
  font-size: 1.1rem;
}

/* Loading State */
.sales-order-final-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.sales-order-final-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.sales-order-final-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.sales-order-final-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 2000px;
}

.sales-order-final-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.sales-order-final-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 10;
}

.sales-order-final-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.sales-order-final-table tbody tr:hover {
  background-color: #f8f9fa;
}

.sales-order-final-table tbody tr:last-child {
  border-bottom: none;
}

.sales-order-final-table tbody tr.final-row {
  background-color: #e7f3ff;
}

.sales-order-final-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Action Buttons Group */
.action-buttons-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-btn {
  background-color: #007bff;
  color: white;
}

.view-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.view-btn i {
  font-size: 0.8rem;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.status-badge.status-verified {
  background-color: #28a745;
  color: white;
}

.status-badge.status-final {
  background-color: #007bff;
  color: white;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: white;
}

/* ACC Status */
.acc-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.acc-status.approved {
  background-color: #28a745;
  color: white;
}

.acc-status.pending {
  background-color: #ffc107;
  color: #856404;
}

/* Proceed Button */
.action-btn.proceed-btn {
  background-color: #28a745;
  color: white;
}

.action-btn.proceed-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.action-btn.proceed-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.action-btn.proceed-btn i {
  font-size: 0.8rem;
}

.action-btn.proceed-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Expanded Row */
.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px;
}

/* Products Table */
.products-table-wrapper {
  margin-top: 10px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
}

.products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.products-table tfoot td {
  font-weight: 600;
  color: #333;
}

/* Products Loading */
.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.products-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.products-loading p {
  color: #666;
  font-size: 0.9rem;
}

.no-products {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

/* Pagination */
.sales-order-final-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.9rem;
  color: #555;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: #999;
}

/* Empty State */
.sales-order-final-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sales-order-final-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Proceed Modal */
.proceed-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.proceed-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proceed-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.proceed-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.proceed-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.proceed-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.proceed-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.proceed-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* Order Details Section */
.proceed-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.proceed-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.proceed-detail-field {
  display: flex;
  flex-direction: column;
}

.proceed-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.proceed-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* Products Table */
.proceed-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.proceed-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1200px;
}

.proceed-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.proceed-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.proceed-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.proceed-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.proceed-products-table tbody tr:last-child {
  border-bottom: none;
}

.proceed-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.proceed-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  transition: border-color 0.3s ease;
}

.proceed-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.update-product-btn {
  padding: 6px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.update-product-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.update-product-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.update-product-btn i {
  font-size: 0.8rem;
}

/* Important Note */
.proceed-note {
  margin-bottom: 20px;
  padding: 15px 20px;
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  border-radius: 4px;
}

.proceed-note-text {
  margin: 0;
  color: #155724;
  font-size: 0.95rem;
  line-height: 1.5;
}

.proceed-note-text strong {
  font-weight: 600;
}

/* Copyright */
.proceed-copyright {
  text-align: left;
  padding: 10px 0;
  border-top: 1px solid #e9ecef;
  margin-top: 20px;
}

.proceed-copyright p {
  margin: 0;
  color: #999;
  font-size: 0.85rem;
}

/* Modal Footer */
.proceed-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.save-all-btn {
  padding: 12px 30px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.save-all-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-all-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.save-all-btn i {
  font-size: 0.9rem;
}

.proceed-modal-footer .cancel-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proceed-modal-footer .cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.proceed-modal-footer .cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* View Order Details Section */
.view-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-detail-field {
  display: flex;
  flex-direction: column;
}

.view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.view-modal-footer .close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-modal-footer .close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Inline Stock Section */
.inline-stock-section {
  width: 100%;
}

.inline-stock-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.1rem;
}

/* Request Form Section */
.request-form-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}

.request-form-section h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.request-form-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  align-items: end;
}

.request-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.request-form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.request-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  transition: border-color 0.3s;
}

.request-input:focus {
  outline: none;
  border-color: #007bff;
}

.request-input.readonly {
  background-color: #f8f9fa;
  cursor: not-allowed;
  color: #666;
}

.request-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.3s;
  height: -webkit-fit-content;
  height: fit-content;
}

.request-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.request-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.stock-table-container {
  overflow-x: auto;
  margin-top: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
}

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

.stock-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.stock-table tbody tr:hover {
  background-color: #f8f9fa;
}

.stock-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.stock-modal-loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

.apply-stock-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  font-size: 0.9rem;
}

.apply-stock-btn:hover:not(:disabled) {
  background-color: #218838;
}

.apply-stock-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sales-order-final {
    padding: 15px;
  }

  .sales-order-final-header h2 {
    font-size: 1.5rem;
  }

  .sales-order-final-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-order-final-table {
    font-size: 0.85rem;
  }

  .sales-order-final-table th,
  .sales-order-final-table td {
    padding: 10px 12px;
  }

  .sales-order-final-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Success Popup */
.success-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.success-popup-content {
  background: white;
  border-radius: 12px;
  padding: 40px 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  min-width: 350px;
  max-width: 500px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.success-popup-icon {
  font-size: 4rem;
  color: #28a745;
  margin-bottom: 20px;
  animation: scaleIn 0.3s ease 0.1s both;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.success-popup-icon i {
  display: block;
}

.success-popup-title {
  font-size: 1.5rem;
  color: #333;
  margin: 0 0 30px 0;
  font-weight: 600;
}

.success-popup-ok-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  min-width: 120px;
}

.success-popup-ok-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.success-popup-ok-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}


.pending-sample-dispatch {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.pending-sample-dispatch-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pending-sample-dispatch-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.pending-sample-dispatch-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.pending-sample-dispatch-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pending-sample-dispatch-search-row label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
}

.pending-sample-dispatch-search-input {
  flex: 1 1;
  min-width: 220px;
  max-width: 480px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
}

.pending-sample-dispatch-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.pending-sample-dispatch-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.pending-sample-dispatch-table-controls {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 12px;
}

.pending-sample-dispatch-table-controls .entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.pending-sample-dispatch-table-controls .entries-select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-size: 0.9rem;
}

.pending-sample-dispatch-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.pending-sample-dispatch-pagination-info {
  font-size: 0.95rem;
  color: #64748b;
}

.pending-sample-dispatch-pagination-btn {
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: white;
  color: #334155;
  font-size: 0.9rem;
  cursor: pointer;
}

.pending-sample-dispatch-pagination-btn:hover:not(:disabled) {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

.pending-sample-dispatch-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pending-sample-dispatch-table-container {
  overflow-x: auto;
}

.pending-sample-dispatch-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pending-sample-dispatch-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.pending-sample-dispatch-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pending-sample-dispatch-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.pending-sample-dispatch-table tbody tr:hover {
  background-color: #f8f9fa;
}

.pending-sample-dispatch-table tbody tr:last-child td {
  border-bottom: none;
}

.consignee-address {
  color: #64748b;
  font-size: 0.85rem;
}

.batch-type-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.batch-type-lab {
  background-color: #dbeafe;
  color: #1e40af;
}

.batch-type-comercial {
  background-color: #fef3c7;
  color: #92400e;
}

.batch-type-ws {
  background-color: #d1fae5;
  color: #065f46;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.view-btn {
  background-color: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover:not(:disabled) {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.view-btn:disabled {
  background-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

.update-method-btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-method-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.35);
}

.update-method-btn:disabled {
  background-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

.accept-sample-btn-table {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.accept-sample-btn-table:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.accept-sample-btn-table:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-style: italic;
}

/* View Modal Styles - Matching MarketingFinalRecords */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.pending-sample-dispatch .view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 96vw !important;
  max-width: 96vw !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-error i {
  font-size: 1.1rem;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dispatch-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
  margin-top: 15px;
}

.dispatch-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-weight: 600;
  color: #667eea;
  font-size: 0.9rem;
}

.info-item span {
  color: #333;
  font-size: 0.95rem;
}

.qc-accept-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.accept-action-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
  display: flex;
  justify-content: center;
}

.accept-sample-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.accept-sample-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.accept-sample-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.detail-item label {
  font-weight: 600;
  color: #667eea;
  font-size: 0.9rem;
}

.detail-item span {
  color: #333;
  font-size: 0.95rem;
}

.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
  -webkit-overflow-scrolling: touch;
}

.view-products-table-qc {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

/* Column widths â€” keeps long product names inside their column (wrap) instead of overlapping */
.view-products-col-select {
  width: 52px;
}

.view-products-col-buyer {
  width: 11%;
}

.view-products-col-product {
  width: 24%;
}

.view-products-col-batch-type {
  width: 8%;
}

.view-products-col-batch-no {
  width: 10%;
}

.view-products-col-qty {
  width: 7%;
}

.view-products-col-method {
  width: 12%;
}

.view-products-col-remarks {
  width: 9%;
}

.view-products-col-status {
  width: 8%;
}

.view-products-col-action {
  width: 11%;
}

.view-products-table-qc thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table-qc th.view-products-th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  white-space: normal;
  vertical-align: bottom;
  line-height: 1.25;
  word-break: break-word;
  -webkit-hyphens: auto;
          hyphens: auto;
}

.view-products-table-qc th.view-products-th-select {
  white-space: nowrap;
  vertical-align: middle;
}

.view-products-table-qc tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table-qc tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table-qc tbody tr:last-child {
  border-bottom: none;
}

.view-products-table-qc td {
  padding: 12px 10px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: top;
  min-width: 0;
}

.view-products-table-qc td.view-products-td-text {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.view-products-table-qc td.view-products-td-text--product {
  font-weight: 500;
  color: #333;
}

.view-products-table-qc td.view-products-td-compact,
.view-products-table-qc td.view-products-td-select,
.view-products-table-qc td.view-products-td-action {
  vertical-align: middle;
}

.view-products-table-qc td.view-products-td-select {
  text-align: center;
}

.view-products-table-qc td.view-products-td-action {
  text-align: center;
}

.view-products-td-compact .batch-type-badge-view {
  margin-left: 0;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.no-products {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.view-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.select-all-controls {
  display: flex;
  align-items: center;
}

.select-all-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.select-all-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.dispatched-row {
  background-color: #f0f9ff;
  opacity: 0.8;
}

.dispatched-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pending-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.dispatch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
}

.dispatch-selected-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dispatch-selected-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.dispatch-selected-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.selected-count {
  color: #667eea;
  font-weight: 600;
  font-size: 0.9rem;
}

.batch-number-display {
  font-weight: 600;
  color: #667eea;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 4px 8px;
  background-color: #f0f4ff;
  border-radius: 4px;
  display: inline-block;
}

.batch-number-generating {
  color: #999;
  font-style: italic;
  font-size: 0.85rem;
}

.batch-number-input-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-number-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 120px;
  font-family: 'Courier New', monospace;
}

.batch-number-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.batch-number-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.batch-number-saving {
  color: #667eea;
  font-size: 0.9rem;
}

.method-of-prep-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.method-of-prep-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 140px;
}

.method-of-prep-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.method-of-prep-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.method-of-prep-saving {
  color: #667eea;
  font-size: 0.9rem;
}

.batch-type-info {
  margin: 8px 0 0 0;
  font-size: 0.9rem;
  color: #666;
}

.batch-type-badge-view {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

.dispatched-check-icon {
  color: #10b981;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dispatch-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.dispatch-status-badge.dispatched-main {
  background-color: #d1fae5;
  color: #065f46;
}

.dispatch-status-badge.pending-main {
  background-color: #fef3c7;
  color: #92400e;
}

.dispatch-single-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dispatch-single-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.dispatch-single-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dispatch-single-btn i {
  font-size: 0.8rem;
}

.dispatched-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
}

.pending-sample-dispatch-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.pending-sample-dispatch-footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .dispatch-details-grid {
    grid-template-columns: 1fr;
  }

  .pending-sample-dispatch-table {
    font-size: 0.85rem;
  }

  .pending-sample-dispatch-table th,
  .pending-sample-dispatch-table td {
    padding: 8px 12px;
  }

  .view-modal-overlay {
    padding: 10px;
  }

  .view-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .view-modal-header {
    padding: 15px 20px;
  }

  .view-modal-header h2 {
    font-size: 1.2rem;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-products-table {
    font-size: 0.85rem;
    min-width: 700px;
  }

  .view-products-table th,
  .view-products-table td {
    padding: 8px 10px;
  }
}

.purchase-request-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.purchase-request-modal-content {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.purchase-request-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

.purchase-request-modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.purchase-request-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.purchase-request-modal-close:hover {
  background-color: #e0e0e0;
  color: #333;
}

.purchase-request-modal-body {
  padding: 20px;
  flex: 1 1;
  overflow-y: auto;
}

.purchase-request-form-section {
  margin-bottom: 20px;
}

.purchase-request-form-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.2rem;
  border-bottom: 2px solid #059669;
  padding-bottom: 10px;
}

.purchase-request-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 15px;
}

.purchase-request-form-group {
  display: flex;
  flex-direction: column;
}

.purchase-request-form-group-full {
  grid-column-start: 1; grid-column-end: -1;
}

.purchase-request-form-group label {
  margin-bottom: 5px;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
}

.purchase-request-input,
.purchase-request-input-disabled {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.purchase-request-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1);
}

.purchase-request-input-disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #666;
}

.purchase-request-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.purchase-request-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.purchase-request-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.purchase-request-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.purchase-request-btn-primary {
  background-color: #059669;
  color: white;
}

.purchase-request-btn-primary:hover:not(:disabled) {
  background-color: #047857;
}

.purchase-request-btn-secondary {
  background-color: #6b7280;
  color: white;
}

.purchase-request-btn-secondary:hover:not(:disabled) {
  background-color: #4b5563;
}

/* Responsive design */
@media (max-width: 768px) {
  .purchase-request-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .purchase-request-form-row {
    grid-template-columns: 1fr;
  }

  .purchase-request-form-group-full {
    grid-column: 1;
  }
}

.purchase-request-product-picker {
  position: relative;
}

.purchase-request-product-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 20;
}

.purchase-request-product-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}

.purchase-request-product-option:hover {
  background: #f0fdfa;
}

.purchase-request-product-option-empty {
  color: #666;
  cursor: default;
}


.qc-dashboard-container {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.qc-dashboard-header {
  margin-bottom: 30px;
}

.qc-dashboard-header h2 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 1.8rem;
}

.qc-dashboard-header p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.qc-dashboard-controls {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  max-width: 400px;
  margin: 10px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

.search-box input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background-color: #f8f9fa;
}

.data-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.no-data {
  text-align: center;
  padding: 40px !important;
  color: #666;
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
}

.badge-secondary {
  background-color: #e9ecef;
  color: #495057;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.action-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.form-row {
  display: grid;
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
  .form-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .form-row-4 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.form-group input,
.form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-order-details {
  margin-bottom: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-detail-field {
  display: flex;
  flex-direction: column;
}

.view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.view-modal-footer .close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-modal-footer .close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}


/* QC Dashboard Styles - Matching Sales Dashboard Style */
.qc-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.qc-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.qc-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.qc-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.qc-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.qc-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.qc-metric-card-1 { --metric-color: #3b82f6; }
.qc-metric-card-2 { --metric-color: #f59e0b; }
.qc-metric-card-3 { --metric-color: #10b981; }
.qc-metric-card-4 { --metric-color: #ec4899; }
.qc-metric-card-5 { --metric-color: #8b5cf6; }
.qc-metric-card-6 { --metric-color: #8b5cf6; }
.qc-metric-card-7 { --metric-color: #ec4899; }
.qc-metric-card-8 { --metric-color: #f97316; }
.qc-metric-card-9 { --metric-color: #06b6d4; }
.qc-metric-card-10 { --metric-color: #14b8a6; }
.qc-metric-card-11 { --metric-color: #f59e0b; }
.qc-metric-card-12 { --metric-color: #10b981; }
.qc-metric-card-13 { --metric-color: #f59e0b; }
.qc-metric-card-14 { --metric-color: #10b981; }
.qc-metric-card-15 { --metric-color: #6366f1; }
.qc-metric-card-16 { --metric-color: #3b82f6; }
.qc-metric-card-17 { --metric-color: #ef4444; }

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-blue {
  background: #3b82f6;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.bg-orange {
  background: #f97316;
}

.bg-teal {
  background: #14b8a6;
}

.bg-indigo {
  background: #6366f1;
}

.bg-danger {
  background: #ef4444;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.qc-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.qc-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / QC Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / QC Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .qc-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .qc-dashboard {
    padding: 15px;
  }

  .qc-metrics-row {
    grid-template-columns: 1fr;
  }

  .qc-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


.qc-purchase-requests-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.qc-purchase-requests-header {
  margin-bottom: 30px;
}

.qc-purchase-requests-header h2 {
  color: #333;
  margin-bottom: 5px;
  font-size: 1.8rem;
}

.qc-purchase-requests-header p {
  color: #666;
  font-size: 0.95rem;
}

.qc-purchase-requests-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: #999;
}

.search-box input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-box label {
  font-weight: 500;
  color: #333;
}

.filter-box select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.qc-purchase-requests-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 30px;
}

.qc-purchase-requests-stats .stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.card-icon.purple {
  background: #667eea;
}

.card-icon.pink {
  background: #e91e63;
}

.card-icon.blue {
  background: #2196f3;
}

.card-icon.green {
  background: #4caf50;
}

.card-content {
  flex: 1 1;
}


.qc-purchase-requests-stats .stat-card h3 {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.qc-purchase-requests-stats .stat-card p {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  text-align: left;
  margin-bottom: 4px;
}

.qc-purchase-requests-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.qc-purchase-requests-table {
  width: 100%;
  border-collapse: collapse;
}

.qc-purchase-requests-table thead {
  background-color: #f8f9fa;
}

.qc-purchase-requests-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
}

.qc-purchase-requests-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
  color: #555;
}

.qc-purchase-requests-table tbody tr:hover {
  background-color: #f8f9fa;
}

.qc-purchase-requests-table .no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
}

.status-badge.pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.approved {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.rejected {
  background-color: #f8d7da;
  color: #721c24;
}

.priority-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
}

.priority-badge.normal {
  background-color: #e7f3ff;
  color: #004085;
}

.priority-badge.urgent {
  background-color: #ffe6e6;
  color: #cc0000;
}

.remark-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.9rem;
  color: #666;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1rem;
}


.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
.qpr-page {
  padding: 18px;
}

.qpr-header h2 {
  margin: 0 0 6px;
}

.qpr-header p {
  margin: 0 0 14px;
  color: #666;
}

.qpr-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.qpr-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.qpr-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.qpr-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.qpr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.qpr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qpr-field label {
  font-size: 13px;
  font-weight: 600;
}

.qpr-field input,
.qpr-field select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.qpr-dropdown {
  position: relative;
}

.qpr-dropdown-trigger {
  width: 100%;
  min-height: 41px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 14px;
}

.qpr-dropdown-placeholder {
  color: #9ca3af;
}

.qpr-dropdown-value {
  color: #111827;
}

.qpr-dropdown-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid #6b7280;
  border-bottom: 2px solid #6b7280;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.15s ease;
}

.qpr-dropdown-caret.open {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.qpr-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 30;
  padding: 8px;
}

.qpr-dropdown-search {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  margin-bottom: 8px;
}

.qpr-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
}

.qpr-dropdown-option {
  width: 100%;
  border: none;
  background: #fff;
  text-align: left;
  padding: 10px 8px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

.qpr-dropdown-option:hover,
.qpr-dropdown-option.selected {
  background: #f1f5f9;
}

.qpr-dropdown-empty {
  color: #64748b;
  font-size: 13px;
  padding: 8px;
}

.qpr-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.qpr-actions button,
.qpr-search button,
.qpr-row-actions button,
.qpr-pagination button {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  background: #6366f1;
  color: #fff;
  font-size: 13px;
}

.qpr-actions button[type="button"],
.qpr-search button,
.qpr-pagination button {
  background: #6b7280;
}

.qpr-row-actions .danger {
  background: #dc2626;
}

.qpr-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.qpr-table-header h3 {
  margin: 0;
}

.qpr-search {
  display: flex;
  gap: 8px;
}

.qpr-search input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  min-width: 260px;
}

.qpr-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.qpr-table {
  width: 100%;
  border-collapse: collapse;
}

.qpr-table th,
.qpr-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-size: 13px;
}

.qpr-table th {
  background: #f8fafc;
  font-weight: 600;
}

.qpr-empty {
  text-align: center !important;
  color: #64748b;
  padding: 20px !important;
}

.qpr-row-actions {
  display: flex;
  gap: 6px;
}

.qpr-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 960px) {
  .qpr-grid {
    grid-template-columns: 1fr;
  }

  .qpr-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .qpr-search {
    width: 100%;
  }

  .qpr-search input {
    min-width: 0;
    width: 100%;
  }
}

.qcrs-page {
  padding: 18px;
}

.qcrs-header h2 {
  margin: 0 0 6px;
}

.qcrs-header p {
  margin: 0 0 14px;
  color: #666;
}

.qcrs-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0;
}

.qcrs-tab-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.qcrs-tab-btn:hover:not(.active) {
  color: #334155;
  background: #f8fafc;
}

.qcrs-tab-btn.active {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

.qcrs-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.qcrs-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.qcrs-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.qcrs-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.qcrs-table-header h3 {
  margin: 0;
}

.qcrs-search {
  display: flex;
  gap: 8px;
}

.qcrs-search input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  min-width: 280px;
}

.qcrs-search button,
.qcrs-pagination button {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  background: #6b7280;
  color: #fff;
  font-size: 13px;
}

.qcrs-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.qcrs-table {
  width: 100%;
  border-collapse: collapse;
}

.qcrs-table th,
.qcrs-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-size: 13px;
}

.qcrs-table th {
  background: #f8fafc;
  font-weight: 600;
}

.qcrs-empty {
  text-align: center !important;
  color: #64748b;
  padding: 20px !important;
}

.qcrs-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qcrs-action-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
}

.qcrs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.qcrs-modal {
  width: 760px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

.qcrs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.qcrs-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.qcrs-close-btn {
  border: none;
  background: #e5e7eb;
  color: #111827;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.qcrs-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.qcrs-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qcrs-modal-field label {
  font-size: 12px;
  font-weight: 600;
}

.qcrs-modal-field input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.qcrs-modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.qcrs-modal-actions button {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
}

@media (max-width: 960px) {
  .qcrs-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .qcrs-search {
    width: 100%;
  }

  .qcrs-search input {
    min-width: 0;
    width: 100%;
  }
}

.received-store-entry-management {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.received-store-header {
  margin-bottom: 30px;
}

.received-store-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.received-store-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Tabs */
.received-store-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0;
}

.received-store-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.received-store-tab:hover {
  color: #007bff;
}

.received-store-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  font-weight: 600;
}

.received-store-tab-count {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Search */
.received-store-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.received-store-search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}

.received-store-search-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

.received-store-search-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.received-store-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.received-store-search-input::placeholder {
  color: #999;
}

.received-store-search-clear {
  padding: 10px 16px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.received-store-search-clear:hover {
  background: #f8f9fa;
  color: #333;
  border-color: #adb5bd;
}

/* Messages */
.received-store-error,
.received-store-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.received-store-error {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.received-store-success {
  background-color: #efe;
  color: #3c3;
  border: 1px solid #cfc;
}

.received-store-error i,
.received-store-success i {
  font-size: 1.1rem;
}

/* Loading State */
.received-store-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.received-store-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.received-store-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.received-store-table {
  width: 100%;
  border-collapse: collapse;
}

.received-store-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

/* Quantity columns ki width control */
table th:nth-child(2),
table td:nth-child(2),
table th:nth-child(4),
table td:nth-child(4),
table th:nth-child(5),
table td:nth-child(5) {
  max-width: 120px;
  word-wrap: break-word;
  white-space: normal;   
}
/* Quantity columns ki width control */
table th:nth-child(3),
table td:nth-child(3) {
  max-width: 170px;
  word-wrap: break-word;
  white-space: normal;  
}

.received-store-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.received-store-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.received-store-table tbody tr:hover {
  background-color: #f8f9fa;
}

.received-store-table tbody tr:last-child {
  border-bottom: none;
}

.received-store-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.received-store-yield-lod-input {
  width: 100%;
  min-width: 72px;
  max-width: 120px;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.received-store-yield-lod-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.received-store-yield-lod-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f1f3f5;
}

.received-store-table td:first-child {
  font-weight: 600;
  color: #007bff;
}

/* Status Toggle */
.status-toggle-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.status-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  cursor: pointer;
}

.status-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.status-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.status-toggle input:checked + .status-toggle-slider {
  background-color: #28a745;
}

.status-toggle input:checked + .status-toggle-slider:before {
  transform: translateX(24px);
}

.status-toggle input:disabled + .status-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.status-toggle-slider.received {
  background-color: #17a2b8;
}

.status-toggle-slider.approved {
  background-color: #28a745;
}

.status-toggle-slider i {
  font-size: 0.7rem;
  color: white;
  z-index: 1;
  position: relative;
}

.status-date {
  font-size: 0.75rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.status-date i {
  font-size: 0.7rem;
}

.status-warning {
  font-size: 0.7rem;
  color: #ff9800;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  margin-top: 4px;
  font-weight: 500;
}

.status-warning i {
  font-size: 0.7rem;
}

/* QC Status Dropdown */
.qc-status-dropdown {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: white;
  color: #333;
  cursor: pointer;
  min-width: 140px;
  transition: all 0.2s ease;
}

.qc-status-dropdown:hover:not(:disabled) {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.qc-status-dropdown:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.qc-status-dropdown:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.7;
}

.qc-status-dropdown option {
  padding: 8px;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.status-badge.status-sent-to-qc {
  background-color: #17a2b8;
  color: #fff;
}

.status-badge.status-received-by-qc {
  background-color: #17a2b8;
  color: #fff;
}

.status-badge.status-approved {
  background-color: #28a745;
  color: #fff;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: #fff;
}

.status-badge.status-retest-pending {
  background-color: #6f42c1;
  color: #fff;
}

/* Retest Column */
.retest-cell {
  text-align: center;
}

.retest-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.retest-badge.retest-yes {
  background-color: #6f42c1;
  color: #fff;
}

.retest-badge.retest-no {
  background-color: #e9ecef;
  color: #6c757d;
}

/* Empty State */
.received-store-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.received-store-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Remark Column */
.remark-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.remark-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  color: #666;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remark-icon-btn:hover {
  background-color: #f0f0f0;
  color: #007bff;
  transform: scale(1.1);
}

.remark-icon-btn:active {
  transform: scale(0.95);
}

.remark-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: #28a745;
  border-radius: 50%;
  border: 2px solid white;
}

/* Remark Modal */
.remark-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.remark-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.remark-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}

.remark-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.remark-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: #666;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.remark-modal-close:hover {
  background-color: #f0f0f0;
  color: #333;
}

.remark-modal-body {
  padding: 24px;
  flex: 1 1;
  overflow-y: auto;
}

.remark-modal-arn {
  margin-bottom: 20px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #555;
}

.remark-modal-arn strong {
  color: #333;
  margin-right: 8px;
}

.remark-modal-textarea-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remark-modal-textarea-container label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.remark-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s ease;
}

.remark-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.remark-textarea::placeholder {
  color: #999;
}

.remark-modal-note {
  margin-top: 12px;
  padding: 10px;
  background-color: #e7f3ff;
  border-left: 3px solid #007bff;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #0056b3;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.remark-modal-note i {
  margin-top: 2px;
  flex-shrink: 0;
}

.remark-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e9ecef;
}

.remark-modal-cancel,
.remark-modal-save {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remark-modal-cancel {
  background-color: #f8f9fa;
  color: #666;
}

.remark-modal-cancel:hover:not(:disabled) {
  background-color: #e9ecef;
  color: #333;
}

.remark-modal-save {
  background-color: #007bff;
  color: white;
}

.remark-modal-save:hover:not(:disabled) {
  background-color: #0056b3;
}

.remark-modal-cancel:disabled,
.remark-modal-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .received-store-entry-management {
    padding: 15px;
  }

  .received-store-header h2 {
    font-size: 1.5rem;
  }

  .received-store-table {
    font-size: 0.85rem;
  }

  .received-store-table th,
  .received-store-table td {
    padding: 10px 12px;
  }

  .remark-modal-content {
    max-width: 100%;
    margin: 10px;
  }

  .remark-modal-header,
  .remark-modal-body,
  .remark-modal-footer {
    padding: 16px;
  }
}

.required-asterisk {
  color: #dc2626;
}

.reject-modal-error {
  margin-top: 8px;
  color: #dc2626;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.remark-modal-save.reject-modal-confirm {
  background-color: #dc2626;
}

.remark-modal-save.reject-modal-confirm:hover:not(:disabled) {
  background-color: #b91c1c;
}


.sales-order-approved {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.sales-order-approved-header {
  margin-bottom: 30px;
}

.sales-order-approved-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.sales-order-approved-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.9rem;
  color: #555;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  background: white;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.9rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

/* Messages */
.sales-order-approved-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.sales-order-approved-error i {
  font-size: 1.1rem;
}

/* Loading State */
.sales-order-approved-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.sales-order-approved-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.sales-order-approved-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.sales-order-approved-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 2000px;
}

.sales-order-approved-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.sales-order-approved-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 10;
}

.sales-order-approved-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.sales-order-approved-table tbody tr:hover {
  background-color: #f8f9fa;
}

.sales-order-approved-table tbody tr:last-child {
  border-bottom: none;
}

.sales-order-approved-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Action Buttons */
.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-btn {
  background-color: #007bff;
  color: white;
}

.view-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.view-btn:active {
  transform: translateY(0);
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-verified {
  background-color: #d4edda;
  color: #155724;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

.status-final {
  background-color: #cce5ff;
  color: #004085;
}

.acc-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.acc-status.approved {
  background-color: #d4edda;
  color: #155724;
}

/* Pagination */
.sales-order-approved-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.9rem;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #666;
}

/* Empty State */
.sales-order-approved-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* View Order Details Section */
.view-order-details {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-detail-field {
  display: flex;
  flex-direction: column;
}

.view-detail-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-detail-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

.no-products {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 1rem;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.view-modal-footer .close-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-modal-footer .close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sales-order-approved {
    padding: 15px;
  }

  .sales-order-approved-header h2 {
    font-size: 1.5rem;
  }

  .sales-order-approved-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-order-approved-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-buttons {
    justify-content: center;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .view-detail-row {
    grid-template-columns: 1fr;
  }
}


.pending-sales-order {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.pending-sales-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pending-sales-order-header-left {
  display: flex;
  align-items: center;
}

.vhc-label {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.pending-sales-order-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pending-sales-order-header-right span {
  color: #666;
  font-size: 0.9rem;
}

.detail-print-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.detail-print-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.pending-sales-order-title {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.pending-sales-order-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-sales-order-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.pending-sales-order-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.pending-sales-order-table thead {
  background-color: #f1f5f9;
}

.pending-sales-order-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.pending-sales-order-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.pending-sales-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.pending-sales-order-table td {
  padding: 12px 16px;
  text-align: left;
  color: #64748b;
  font-size: 0.875rem;
  vertical-align: middle;
}

.view-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.view-btn i {
  font-size: 0.875rem;
}

/* View Modal */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.view-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

/* View Order Info */
.view-order-info {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-order-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-order-info-field {
  display: flex;
  flex-direction: column;
}

.view-order-info-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-order-info-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

/* View Note Section */
.view-note-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.view-note-section label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.view-note-content {
  padding: 12px 15px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.modal-close-button {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.status-complete {
  display: inline-block;
  padding: 4px 8px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.pending-sales-order-note {
  padding: 15px 20px;
  background-color: #fef3c7;
  border-top: 2px solid #e2e8f0;
  color: #92400e;
  font-size: 0.9rem;
  line-height: 1.6;
}

.pending-sales-order-note strong {
  font-weight: 600;
}

.pending-sales-order-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748b;
  font-size: 1.1rem;
}

.no-data {
  text-align: center;
  color: #94a3b8;
  padding: 40px 20px !important;
}

.pending-sales-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.pending-sales-order-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* View Section Styles */
.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 150px;
}

.view-detail-item.full-width {
    grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-products-table tfoot {
  background-color: #f8f9fa;
}

.view-products-table tfoot tr {
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  padding: 12px 14px;
}

/* Pagination Styles */
.pending-sales-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 16px;
  background-color: white;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination-btn.active:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #64748b;
  font-size: 0.875rem;
  -webkit-user-select: none;
          user-select: none;
}

@media (max-width: 768px) {
  .pending-sales-order-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-info {
    text-align: center;
    margin-bottom: 10px;
  }

  .pagination-controls {
    justify-content: center;
  }
}



.sample-dispatch-complete {
  min-height: 100vh;
  background-color: #f5f5f5;
  padding: clamp(12px, 2vw, 24px);
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
}

.sample-dispatch-complete-header {
  position: relative;
  margin-bottom: 24px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
}

.sample-dispatch-back-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #667eea;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.sample-dispatch-back-btn:hover {
  background: #5a6fd6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.sample-dispatch-back-btn:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.sample-dispatch-complete-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  padding: 0 120px;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .sample-dispatch-complete-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 4px;
  }

  .sample-dispatch-back-btn {
    position: static;
    transform: none;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .sample-dispatch-complete-title {
    padding: 0;
    font-size: 1.35rem;
  }
}

.sample-dispatch-complete-content {
  width: 100%;
  max-width: min(100%, 100vw - 2 * clamp(12px, 2vw, 24px));
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  padding: clamp(16px, 2.5vw, 24px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.sample-dispatch-complete-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 20px;
}

.sample-dispatch-complete-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sample-dispatch-complete-form .form-group label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #444;
}

.sample-dispatch-complete-form .form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
  font-family: inherit;
}

.sample-dispatch-complete-method-hint {
  line-height: 1.45;
}

.sample-dispatch-complete-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  color: #c33;
  margin-bottom: 16px;
}

.sample-dispatch-complete-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  color: #155724;
  margin-bottom: 16px;
}

.sample-dispatch-complete-loading {
  text-align: center;
  padding: 48px 20px;
  color: #666;
}

.sample-dispatch-complete-loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: sd-spin 0.8s linear infinite;
}

@keyframes sd-spin {
  to {
    transform: rotate(360deg);
  }
}

.actions-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.update-btn,
.final-update-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.update-btn {
  background: #667eea;
  color: white;
}

.update-btn:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.final-update-btn {
  background: #28a745;
  color: white;
}

.final-update-btn:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.form-control:read-only {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.product-list-section {
  margin-top: 20px;
}

.product-list-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.product-list-table thead {
  background-color: #f8f9fa;
}

.product-list-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  white-space: nowrap;
}

.product-list-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
  vertical-align: top;
}

.product-list-table td.sd-qc-store-td {
  overflow: visible;
  min-width: 280px;
  max-width: 420px;
}

/* Prod_Name: same overflow behavior as QC store column (floating panel escapes scroll). */
.product-list-table .sd-prod-name-td {
  position: relative;
  overflow: visible;
  min-width: 260px;
  max-width: 420px;
  vertical-align: top;
}

.sd-prod-readonly .sd-qc-line-name {
  font-size: 0.8rem;
}

.product-list-table tbody tr:hover {
  background-color: #f8f9fa;
}

.product-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  font-family: inherit;
}

.product-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.sample-dispatch-complete-footer {
  text-align: center;
  padding: 24px;
  color: #888;
  font-size: 0.85rem;
}

.sample-dispatch-complete-footer p {
  margin: 0;
}

/* QC store picker + release (Sample Dispatch Register) */
.sd-qc-hint-top {
  font-size: 0.9rem;
  color: #444;
  margin: 0 0 12px;
  line-height: 1.45;
}

/* Outer: visible so absolutely positioned QC dropdown (opens upward) is not clipped. */
.product-list-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.product-list-table-inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.sd-qc-cell {
  min-width: 0;
  position: relative;
}

.sd-qc-cell.sd-qc-cell--open {
  z-index: 55;
}

.sd-qc-readonly-box {
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 2px 0;
}

.sd-qc-line-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.sd-qc-line-summary--toggle {
  gap: 3px;
}

.sd-qc-line-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sd-qc-line-meta {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.35;
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sd-qc-line-arn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
}

.sd-qc-line-qty {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #334155;
}

.sd-qc-line-sep {
  color: #94a3b8;
  font-weight: 400;
}

.sd-qc-placeholder-label {
  color: #94a3b8;
  font-size: 0.82rem;
  font-style: italic;
}

.sd-qc-warn-text {
  color: #b45309;
  font-size: 0.78rem;
  line-height: 1.35;
}

.sd-qc-dropdown-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.sd-qc-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  margin-bottom: 10px;
  min-height: 48px;
  box-sizing: border-box;
}

.sd-qc-dropdown-toggle:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
}

.sd-qc-dropdown-toggle:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.sd-qc-dropdown-label {
  min-width: 0;
  flex: 1 1;
  text-align: left;
}

/* In-flow panel (catalog picker etc.) */
.sd-qc-dropdown-panel {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: -4px;
  margin-bottom: 8px;
}

/* Viewport-fixed QC list — not clipped by .product-list-table-inner overflow-x */
.sd-qc-dropdown-panel.sd-qc-dropdown-panel--floating {
  display: flex;
  flex-direction: column;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  box-sizing: border-box;
}

.sd-qc-floating-head {
  flex-shrink: 0;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sd-qc-search-input {
  width: 100%;
  margin: 0;
  padding: 9px 11px;
  font-size: 0.875rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
}

.sd-qc-search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.sd-qc-result-count {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sd-qc-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border-top: 1px solid #eee;
  min-height: 0;
}

.sd-qc-dropdown-list--floating {
  flex: 1 1;
  min-height: 0;
  max-height: none;
  border-top: none;
}

.sd-qc-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.sd-qc-option--stacked {
  padding-top: 10px;
  padding-bottom: 10px;
}

.sd-qc-option-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.84rem;
  line-height: 1.35;
  margin-bottom: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sd-qc-option-meta {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sd-qc-option-arn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
}

.sd-qc-option-qty {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #475569;
}

.sd-qc-row-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  grid-column-gap: 10px;
  column-gap: 10px;
  grid-row-gap: 2px;
  row-gap: 2px;
  align-items: start;
  width: 100%;
}

.sd-qc-row-cols--toggle {
  font-size: 0.75rem;
}

.sd-qc-col-name {
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.sd-qc-col-arn {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-qc-col-qty {
  white-space: nowrap;
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.sd-qc-option:hover {
  background: #f0f7ff;
}

.sd-qc-option.is-selected {
  background: #e3f2fd;
}

.sd-qc-empty {
  padding: 12px;
  font-size: 0.85rem;
  color: #888;
}

.sd-qc-release-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 4px;
}

.sd-qc-release-qty-input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding: 9px 11px;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.sd-qc-release-btn {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 9px 14px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sd-qc-release-btn:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.sd-method-readonly {
  font-size: 0.82rem;
  color: #333;
  line-height: 1.35;
  max-width: 220px;
  word-break: break-word;
}

.sd-method-placeholder {
  color: #999;
  font-style: italic;
}

.sd-batch-auto-hint {
  display: block;
  color: #28a745;
  font-size: 11px;
  margin-top: 2px;
}

.sd-factory-name-input {
  min-width: 140px;
  max-width: 220px;
}

.sd-qty-cell {
  min-width: 100px;
  vertical-align: middle;
}

.sd-qty-display-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sd-qty-value {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #1e293b;
}

.sd-qty-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.sd-qty-edit-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.sd-qty-edit-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 200px;
}

.sd-qty-edit-input {
  width: 72px;
  min-width: 0;
  padding: 4px 6px;
  font-size: 0.85rem;
}

.sd-qty-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
}

.sd-qty-icon-btn--save {
  background: #059669;
  color: #fff;
  border-color: #047857;
}

.sd-qty-icon-btn--save:hover:not(:disabled) {
  background: #047857;
}

.sd-qty-icon-btn--cancel {
  background: #fff;
  color: #64748b;
  border-color: #cbd5e1;
}

.sd-qty-icon-btn--cancel:hover:not(:disabled) {
  background: #f8fafc;
}

.sd-qty-icon-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sd-qty-edit-error {
  flex: 1 1 100%;
  font-size: 0.72rem;
  color: #b91c1c;
  line-height: 1.3;
}

/* ─── PPIC-style “Make a Request” inline panel (below product table) ─── */
.sd-qc-req-inline-panel {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  box-sizing: border-box;
}

.sd-qc-req-inline-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f1f5f9 0%, #fff 100%);
}

.sd-qc-req-inline-panel-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.sd-qc-req-inline-panel-dismiss {
  border: none;
  background: #e2e8f0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sd-qc-req-inline-panel-dismiss:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.sd-qc-req-inline-panel-body {
  padding: 18px 20px 20px;
}

.sd-qc-req-inline-panel-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sd-qc-req-modal-summary {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #334155;
}

.sd-qc-req-modal-summary p {
  margin: 0 0 8px;
}

.sd-qc-req-modal-summary p:last-child {
  margin-bottom: 0;
}

.sd-qc-req-modal-qc-line {
  font-size: 0.85rem;
  color: #475569;
}

.sd-qc-req-modal-loading {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
}

.sd-qc-req-modal-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  border: 3px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: sd-spin 0.75s linear infinite;
}

.sd-qc-req-inline-stock {
  margin-top: 8px;
}

.sd-qc-req-form-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.sd-qc-req-form-section h4 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.sd-qc-req-form-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 12px 16px;
  gap: 12px 16px;
  align-items: end;
}

.sd-qc-req-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sd-qc-req-form-field--full {
  grid-column: 1 / -1;
}

.sd-qc-req-form-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.sd-qc-req-input-readonly {
  background: #f8fafc !important;
  cursor: default;
}

.sd-qc-req-field-error {
  grid-column: 1 / -1;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  font-size: 0.85rem;
}

.sd-qc-req-update-btn {
  padding: 10px 20px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.sd-qc-req-update-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.sd-qc-req-stock-heading {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.sd-qc-req-stock-hint {
  font-weight: 400;
  color: #64748b;
  font-size: 0.82rem;
}

.sd-qc-req-stock-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.sd-qc-req-stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sd-qc-req-stock-table th,
.sd-qc-req-stock-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.sd-qc-req-stock-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.sd-qc-req-stock-table tbody tr:hover {
  background: #fafbfc;
}

.sd-qc-req-bal-link {
  background: none;
  border: none;
  padding: 0;
  color: #059669;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.sd-qc-req-bal-link:disabled {
  color: #94a3b8;
  text-decoration: none;
  cursor: not-allowed;
}

.sd-qc-req-empty {
  text-align: center;
  padding: 28px 16px;
  color: #64748b;
}

.sd-qc-req-empty-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 8px;
}

.sd-qc-req-cancel-btn {
  padding: 8px 18px;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-weight: 500;
}

.sd-qc-req-remove-last-wrap {
  margin-bottom: 16px;
}

.sd-qc-req-remove-last-btn {
  background-color: #dc2626;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.sd-qc-req-remove-last-btn:hover:not(:disabled) {
  background-color: #b91c1c;
}

.sd-qc-req-remove-last-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sd-qc-req-cancel-btn:hover {
  background: #f8fafc;
}

.sample-dispatch-register {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.sample-dispatch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sample-dispatch-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.sample-dispatch-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.sample-dispatch-edit-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.sample-dispatch-loading-inline {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-consignee-link {
  color: white;
  text-decoration: underline;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.add-consignee-link:hover {
  opacity: 0.8;
}

.sample-dispatch-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.sample-dispatch-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample-dispatch-success {
  background-color: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample-dispatch-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
  grid-auto-flow: row;
  width: 100%;
  min-width: 0; /* Prevents grid overflow */
  grid-auto-rows: auto;
  box-sizing: border-box;
}

.form-grid .form-group {
  min-width: 0; /* Prevents flex items from overflowing */
  max-width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.form-control {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.readonly-input {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.product-entry-section {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.product-entry-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  color: #333;
  font-weight: 600;
}

.product-form-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.add-product-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  width: -webkit-fit-content;
  width: fit-content;
}

.add-product-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.product-list-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.product-list-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-list-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.product-list-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-list-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.product-list-table tbody tr:hover {
  background-color: #f8f9fa;
}

.product-list-table tbody tr:last-child td {
  border-bottom: none;
}

.edit-product-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.edit-product-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.edit-product-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cancel-edit-btn {
  padding: 10px 20px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cancel-edit-btn:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.product-id-badge {
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 5px;
}

.remarks-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.save-details-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.save-details-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.save-details-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sample-dispatch-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.sample-dispatch-footer p {
  margin: 0;
}

/* Responsive design */
@media (min-width: 769px) {
  .form-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 20px;
  }
}

@media (max-width: 1200px) and (min-width: 769px) {
  .form-grid {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .form-grid,
  .product-form-grid {
    grid-template-columns: 1fr;
  }

  .sample-dispatch-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .product-list-table {
    font-size: 0.85rem;
  }

  .product-list-table th,
  .product-list-table td {
    padding: 8px 12px;
  }
}

@media (max-width: 1200px) {
  .product-form-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-form-grid {
    grid-template-columns: 1fr;
  }
}


.sample-dispatch-report {
  padding: 20px;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.sample-dispatch-report-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.sample-dispatch-report-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.sample-dispatch-report-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sample-dispatch-report-print-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.45);
}

.sample-dispatch-report-print-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.sample-dispatch-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.sample-dispatch-report-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sample-dispatch-report-error {
  background-color: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sample-dispatch-report-table-wrapper {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.sample-dispatch-report-table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 14px;
  color: #666;
}

.entries-select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 14px;
  color: #666;
}

.search-input {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 200px;
}

.sample-dispatch-report-table-container {
  overflow-x: auto;
}

.sample-dispatch-report-table {
  width: 100%;
  border-collapse: collapse;
}

.sample-dispatch-report-table thead {
  background-color: #f8f9fa;
}

.sample-dispatch-report-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.sample-dispatch-report-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #555;
}

.sample-dispatch-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.sample-dispatch-report-table tbody tr.accepted-row {
  background-color: #e8f5e9;
}

.sample-dispatch-report-table tbody tr.accepted-row:hover {
  background-color: #c8e6c9;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.yes-badge {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.no-badge {
  background-color: #f8d7da;
  color: #721c24;
}

.accept-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.accept-btn:hover:not(:disabled) {
  background-color: #218838;
}

.accept-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.accepted-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background-color: #d4edda;
  color: #155724;
}

.complete-btn {
  background-color: #17a2b8;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.complete-btn:hover:not(:disabled) {
  background-color: #138496;
}

.complete-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.sample-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sample-status-approve-btn,
.sample-status-reject-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}

.sample-status-approve-btn {
  background-color: #fff;
  color: #15803d;
  border: 1px solid #16a34a;
}

.sample-status-approve-btn:hover:not(:disabled) {
  background-color: #f0fdf4;
}

.sample-status-reject-btn {
  background-color: #fff;
  color: #b91c1c;
  border: 1px solid #dc2626;
}

.sample-status-reject-btn:hover:not(:disabled) {
  background-color: #fef2f2;
}

.sample-status-approve-btn:disabled,
.sample-status-reject-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sample-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.sample-status-badge.approved {
  background-color: #d4edda;
  color: #155724;
}

.sample-status-badge.rejected {
  background-color: #f8d7da;
  color: #721c24;
}

.sample-status-badge.pending {
  background-color: #fff3cd;
  color: #856404;
}

.sample-dispatch-report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-top: 1px solid #e0e0e0;
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-controls {
  display: flex;
  gap: 8px;
}

.pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.sample-dispatch-report-empty {
  padding: 40px;
  text-align: center;
  color: #666;
  font-size: 16px;
}

/* Expand row for products */
.expand-cell {
  padding: 8px !important;
  vertical-align: middle;
}

.expand-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: #666;
  border-radius: 4px;
}

.expand-btn:hover {
  background-color: #eee;
  color: #333;
}

.products-summary {
  display: inline-block;
}

.products-summary small {
  display: block;
  color: #888;
  font-size: 12px;
  margin-top: 2px;
}

.no-products {
  color: #999;
}

/* Products detail expandable panel */
.products-detail-row td {
  padding: 0 !important;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

.products-detail-panel {
  padding: 16px 24px 16px 48px;
}

.products-subtable {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.products-subtable th {
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
}

.products-subtable td {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}

.products-subtable tr:last-child td {
  border-bottom: none;
}

.products-subtable .status-badge.no-badge {
  background-color: #fff3cd;
  color: #856404;
}

.sample-dispatch-product-pr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.sample-dispatch-product-pr-btn:hover {
  opacity: 0.92;
}

.sample-dispatch-product-pr-no {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 6px;
  white-space: nowrap;
}

@media(max-width: 768px){
  .sample-dispatch-report-table-controls{
    display: flex;
    flex-direction: column;
  }
}
/* Sample Report — tab-specific styles. Reuses .sample-dispatch-report-* base styles. */

.sample-report-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0 16px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.sample-report-tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  border-radius: 6px 6px 0 0;
}

.sample-report-tab-btn:hover:not(.active) {
  color: #0d9488;
  background-color: #f5fbfa;
}

.sample-report-tab-btn.active {
  color: #0f766e;
  border-bottom-color: #0d9488;
  background-color: #f0fdfa;
}

.sample-report-tab-btn .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  margin-left: 8px;
  background-color: #e6f4f1;
  color: #0f766e;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.sample-report-tab-btn.active .tab-count {
  background-color: #0d9488;
  color: #fff;
}

/* Group header row in either tab */
.group-header-row td {
  background-color: #f0fdfa;
  font-weight: 600;
  border-top: 2px solid #d6f0eb;
  vertical-align: middle;
}

.group-header-row td.group-name-cell {
  font-size: 14px;
  color: #0f766e;
}

.group-meta {
  display: inline-flex;
  gap: 12px;
  margin-left: 12px;
  font-size: 12px;
  color: #555;
  font-weight: 500;
}

.group-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background-color: #e0f2f1;
  color: #0f766e;
  border-radius: 999px;
  font-weight: 600;
}

.store-qc-sample-report {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.store-qc-sample-report-header {
  margin-bottom: 30px;
}

.store-qc-sample-report-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.store-qc-sample-report-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Messages */
.store-qc-sample-report-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.store-qc-sample-report-error i {
  font-size: 1.1rem;
}

/* Loading State */
.store-qc-sample-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.store-qc-sample-report-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.store-qc-sample-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.store-qc-sample-report-table {
  width: 100%;
  border-collapse: collapse;
}

.store-qc-sample-report-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.store-qc-sample-report-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.store-qc-sample-report-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.store-qc-sample-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.store-qc-sample-report-table tbody tr.sent-to-qc-row {
  background-color: #f0f8ff;
}

.store-qc-sample-report-table tbody tr.sent-to-qc-row:hover {
  background-color: #e6f3ff;
}

.store-qc-sample-report-table tbody tr.qc-approved-row {
  background-color: #f0fff4;
}

.store-qc-sample-report-table tbody tr.qc-approved-row:hover {
  background-color: #e6ffe6;
}

.store-qc-sample-report-table tbody tr:last-child {
  border-bottom: none;
}

.store-qc-sample-report-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.store-qc-sample-report-table td:first-child {
  font-weight: 600;
  color: #007bff;
  position: relative;
}

.approved-badge {
  margin-left: 8px;
  color: #28a745;
  font-size: 0.85rem;
  vertical-align: middle;
}

.sent-badge {
  margin-left: 8px;
  color: #007bff;
  font-size: 0.85rem;
  vertical-align: middle;
}

.approved-badge i,
.sent-badge i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Sent Date/Time Column */
.sent-date-cell {
  color: #007bff;
  font-weight: 500;
}

.sent-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #007bff;
  font-size: 0.9rem;
}

.sent-date-time i {
  font-size: 0.8rem;
  color: #007bff;
}

.not-sent {
  color: #999;
  font-style: italic;
}

/* QC Approved Status Column */
.qc-approved-cell {
  color: #28a745;
  font-weight: 500;
}

.qc-pending-cell {
  color: #ffc107;
  font-weight: 500;
}

.approved-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 600;
}

.approved-status i {
  font-size: 0.85rem;
  color: #28a745;
}

.pending-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffc107;
  font-size: 0.9rem;
  font-weight: 600;
}

.pending-status i {
  font-size: 0.85rem;
  color: #ffc107;
}

/* QC Approved Date/Time Column */
.qc-approved-date-cell {
  color: #28a745;
  font-weight: 500;
}

.approved-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
}

.approved-date-time i {
  font-size: 0.8rem;
  color: #28a745;
}

.not-approved {
  color: #999;
  font-style: italic;
}

/* Empty State */
.store-qc-sample-report-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.store-qc-sample-report-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* View Button */
.view-details-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-details-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.view-details-btn:active {
  transform: translateY(0);
}

.view-details-btn i {
  font-size: 0.85rem;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-modal-error i {
  font-size: 1.1rem;
}

/* View Section Styles */
.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item p {
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

/* View Details Table */
.view-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-details-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-details-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-details-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.view-details-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.view-details-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-details-table tbody tr:last-child {
  border-bottom: none;
}

.view-details-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-qc-sample-report {
    padding: 15px;
  }

  .store-qc-sample-report-header h2 {
    font-size: 1.5rem;
  }

  .store-qc-sample-report-table {
    font-size: 0.85rem;
  }

  .store-qc-sample-report-table th,
  .store-qc-sample-report-table td {
    padding: 10px 12px;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-detail-grid {
    grid-template-columns: 1fr;
  }

  .view-details-table {
    font-size: 0.85rem;
  }

  .view-details-table th,
  .view-details-table td {
    padding: 8px 12px;
  }
}


.complete-order {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.complete-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.complete-order-title {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.complete-order-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #666;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.complete-order-search-btn,
.complete-order-reset-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.complete-order-search-btn {
  background-color: #3b82f6;
  color: #fff;
}

.complete-order-search-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.complete-order-search-btn:disabled,
.complete-order-reset-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.complete-order-reset-btn {
  background-color: #e2e8f0;
  color: #334155;
}

.complete-order-reset-btn:hover:not(:disabled) {
  background-color: #cbd5e1;
}

.complete-order-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.complete-order-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.complete-order-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.complete-order-table thead {
  background-color: #f1f5f9;
}

.complete-order-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.complete-order-table th:first-child {
  text-align: center;
}

.complete-order-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.complete-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.complete-order-table td {
  padding: 12px 16px;
  color: #334155;
  font-size: 0.875rem;
}

.complete-order-table td:first-child {
  text-align: center;
  font-weight: 500;
}

.no-data {
  text-align: center;
  padding: 40px !important;
  color: #64748b;
  font-style: italic;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.view-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.view-btn i {
  font-size: 0.8rem;
}

.copy-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.copy-btn i {
  font-size: 0.8rem;
}

.send-mail-select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.875rem;
  background-color: white;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.send-mail-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-mail-select:hover {
  border-color: #94a3b8;
}

.complete-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.complete-order-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pagination Styles */
.complete-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  background-color: white;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: #64748b;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  color: #666;
  font-size: 0.9rem;
}

.entries-select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: white;
  color: #334155;
  cursor: pointer;
}

.entries-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.view-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 1.1rem;
}

/* View Order Info */
.view-order-info {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.view-order-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.view-order-info-field {
  display: flex;
  flex-direction: column;
}

.view-order-info-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.view-order-info-field span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* View Products Table */
.view-products-section {
  margin-bottom: 30px;
  overflow-x: auto;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

/* View Note Section */
.view-note-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.view-note-section label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.view-note-content {
  padding: 12px 15px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* View Modal Footer */
.view-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.modal-close-button {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}


.create-consignee {
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.create-consignee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-consignee-header-left h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  font-weight: 600;
}

.create-consignee-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.create-consignee-header-right span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.create-consignee-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.create-consignee-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-consignee-success {
  background-color: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-consignee-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.create-consignee-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.create-consignee-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.create-consignee-form .form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.create-consignee-form .form-control {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

.create-consignee-form .form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.create-consignee-form .form-control::placeholder {
  color: #94a3b8;
}

.create-consignee-form textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.create-consignee-form .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.create-consignee-form .submit-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.create-consignee-form .submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.create-consignee-form .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.consignees-table-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.consignees-table-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.loading-message,
.empty-message {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 1rem;
}

.loading-message i {
  margin-right: 10px;
}

.table-container {
  overflow-x: auto;
}

.consignees-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consignees-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.consignees-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.consignees-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 0.95rem;
}

.consignees-table tbody tr:hover {
  background-color: #f8f9fa;
}

.consignees-table tbody tr:last-child td {
  border-bottom: none;
}

.create-consignee .edit-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.create-consignee .edit-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.create-consignee-form .cancel-btn {
  padding: 12px 32px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 10px;
}

.create-consignee-form .cancel-btn:hover:not(:disabled) {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.create-consignee-form .cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-link {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.back-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.create-consignee-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.create-consignee-footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .create-consignee-form .form-row {
    grid-template-columns: 1fr;
  }

  .consignees-table {
    font-size: 0.85rem;
  }

  .consignees-table th,
  .consignees-table td {
    padding: 8px 12px;
  }
}


.final-order-list {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.final-order-header {
  margin-bottom: 30px;
}

.final-order-title {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  background-color: #ffeb3b;
  padding: 15px 20px;
  border-radius: 6px;
  text-align: center;
}

.final-order-filters {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.supplier-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.supplier-filter label {
  font-weight: 600;
  color: #555;
  font-size: 0.95rem;
}

.supplier-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  min-width: 200px;
}

.supplier-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Messages */
.final-order-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.final-order-error i {
  font-size: 1.1rem;
}

/* Loading State */
.final-order-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.final-order-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Controls */
.final-order-table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.entries-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entries-selector label {
  font-size: 0.95rem;
  color: #555;
}

.entries-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.entries-select:focus {
  outline: none;
  border-color: #007bff;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  font-size: 0.95rem;
  color: #555;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Table Container */
.final-order-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.final-order-table-wrapper {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.final-order-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 2000px;
}

.final-order-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.final-order-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.final-order-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.final-order-table tbody tr:hover {
  background-color: #f8f9fa;
}

.final-order-table tbody tr:last-child {
  border-bottom: none;
}

.final-order-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.expand-icon {
  color: #007bff;
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  padding: 4px;
}

.expand-icon:hover {
  color: #0056b3;
  transform: scale(1.1);
}

.pending-row {
  background-color: #fff5f5;
}

.pending-row:hover {
  background-color: #ffe5e5;
}

.pending-order {
  color: #dc3545;
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-verified {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-final {
  background-color: #d4edda;
  color: #155724;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

/* Action Buttons */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100px;
}

.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #6c757d !important;
}

.view-btn {
  background-color: #17a2b8;
  color: white;
}

.view-btn:hover:not(:disabled) {
  background-color: #138496;
}

.edit-btn {
  background-color: #3b82f6;
  color: white;
}

.edit-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.final-btn {
  background-color: #dc3545;
  color: white;
  font-weight: 700;
}

.final-btn:hover:not(:disabled) {
  background-color: #c82333;
}

.final-btn i {
  margin-right: 5px;
}

.final-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Pagination */
.final-order-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.9rem;
  color: #666;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: #666;
}

/* Empty State */
.final-order-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

  .final-order-empty p {
    color: #999;
    font-size: 1.1rem;
  }

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 150px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.view-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.view-form-field {
  display: flex;
  flex-direction: column;
}

.view-form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.view-form-field input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: #f8f9fa;
  transition: border-color 0.3s ease;
}

.view-form-field input:focus {
  outline: none;
  border-color: #007bff;
}

.view-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-error i {
  font-size: 1.1rem;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

/* Products Table in View Modal */
.view-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.view-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.view-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.view-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-products-table tbody tr:last-child {
  border-bottom: none;
}

.view-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.view-products-table tfoot {
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.view-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

/* Responsive View Modal */
@media (max-width: 768px) {
  .view-modal-overlay {
    padding: 10px;
  }

  .view-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .view-modal-header {
    padding: 15px 20px;
  }

  .view-modal-header h2 {
    font-size: 1.2rem;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .view-section h3 {
    font-size: 1.1rem;
  }

  .view-products-table {
    font-size: 0.85rem;
    min-width: 800px;
  }

  .view-products-table th,
  .view-products-table td {
    padding: 8px 10px;
  }
}

/* Expanded Row Styles */
.expanded-row {
  background-color: #f8f9fa;
}

.expanded-cell {
  padding: 20px !important;
  background-color: #f8f9fa;
}

.products-table-wrapper {
  background: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.products-table thead {
  background-color: #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
  white-space: nowrap;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 10px 12px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.products-table tfoot {
  background-color: #e9ecef;
  border-top: 2px solid #dee2e6;
}

.products-table tfoot td {
  font-weight: 600;
  color: #333;
  padding: 12px;
}

.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.products-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.no-products {
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .final-order-list {
    padding: 15px;
  }

  .final-order-title {
    font-size: 1.2rem;
    padding: 12px 15px;
  }

  .final-order-table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .entries-selector,
  .search-box {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .final-order-table {
    font-size: 0.8rem;
  }

  .final-order-table th,
  .final-order-table td {
    padding: 8px 10px;
  }

  .action-buttons-group {
    min-width: 90px;
  }

  .action-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .final-order-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
}


.rejected-orders {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.rejected-orders-header {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rejected-orders-search {
  flex: 1 1;
  min-width: 260px;
  max-width: 420px;
  margin-left: auto;
}

.rejected-orders-search-input-wrapper {
  position: relative;
  width: 100%;
}

.rejected-orders-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.rejected-orders-search-input {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rejected-orders-search-input::placeholder {
  color: #94a3b8;
}

.rejected-orders-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.rejected-orders-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.rejected-orders-search-clear:hover {
  background: #e2e8f0;
  color: #334155;
}

.rejected-orders-clear-search-btn {
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.rejected-orders-clear-search-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.rejected-orders-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Messages */
.rejected-orders-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.rejected-orders-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.rejected-orders-error i,
.rejected-orders-success i {
  font-size: 1.1rem;
}

/* Loading State */
.rejected-orders-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.rejected-orders-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #dc3545;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.rejected-orders-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.rejected-orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.rejected-orders-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.rejected-orders-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.rejected-orders-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.rejected-orders-table tbody tr:hover {
  background-color: #f8f9fa;
}

.rejected-orders-table tbody tr:last-child {
  border-bottom: none;
}

.rejected-orders-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: white;
}

/* Edit Button */
.edit-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.edit-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.edit-btn:active {
  transform: translateY(0);
}

.edit-btn i {
  font-size: 0.85rem;
}

/* Empty State */
.rejected-orders-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rejected-orders-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Modal Styles */
.edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.edit-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.edit-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.edit-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.edit-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.edit-section {
  margin-bottom: 30px;
}

.edit-section:last-child {
  margin-bottom: 0;
}

.edit-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

/* View Detail Styles (matching FinalOrderList) */
.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
  width: 100%;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 150px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

/* Responsive grid for medium screens */
@media (max-width: 1200px) and (min-width: 901px) {
  .edit-form-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .edit-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field.full-width {
  grid-column-start: 1; grid-column-end: -1;
  margin-top: 10px;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: white;
  transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #007bff;
}

.form-field input.readonly-input,
.form-field textarea.readonly-input {
  background: #f8f9fa;
  cursor: not-allowed;
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* Product Entry Form */
.product-entry-form {
  margin-bottom: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.add-btn,
.cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-btn {
  background-color: #28a745;
  color: white;
}

.add-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.cancel-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Products Table */
.products-table-wrapper {
  margin-top: 20px;
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.edit-product-btn,
.delete-product-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 5px;
}

.edit-product-btn {
  background-color: #007bff;
  color: white;
}

.edit-product-btn:hover {
  background-color: #0056b3;
}

.delete-product-btn {
  background-color: #dc3545;
  color: white;
}

.delete-product-btn:hover {
  background-color: #c82333;
}

/* Modal Footer */
.edit-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
}

.save-btn {
  padding: 12px 30px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.edit-modal-footer .cancel-btn {
  padding: 12px 30px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-modal-footer .cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.edit-modal-footer .cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rejected-orders {
    padding: 15px;
  }

  .rejected-orders-header h2 {
    font-size: 1.5rem;
  }

  .rejected-orders-table {
    font-size: 0.85rem;
  }

  .rejected-orders-table th,
  .rejected-orders-table td {
    padding: 10px 12px;
  }

  .edit-modal-overlay {
    padding: 10px;
  }

  .edit-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .edit-modal-header {
    padding: 15px 20px;
  }

  .edit-modal-header h2 {
    font-size: 1.2rem;
  }

  .edit-modal-body {
    padding: 20px;
  }

  .edit-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .edit-section h3 {
    font-size: 1.1rem;
  }

  .products-table {
    font-size: 0.85rem;
    min-width: 800px;
  }

  .products-table th,
  .products-table td {
    padding: 8px 10px;
  }

  .edit-modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }

  .save-btn,
  .edit-modal-footer .cancel-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}


/* Sales Create Order Styles */

.sales-create-order {
  padding: 5px 20px 10px 20px;
  max-width: 100%;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.sales-order-header {
  margin-bottom: 10px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sales-order-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.sales-order-header .add-consignee-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.sales-order-header .add-consignee-link:hover {
  background-color: #3b82f6;
  color: white;
}

.sales-order-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.sales-order-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.sales-order-form {
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: none !important;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #e2e8f0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.form-group {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(16.666% - 17px);
  min-width: 150px;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  flex: 1 1 100%;
}

.form-group label {
  margin-bottom: 3px;
  font-weight: 600;
  color: #333;
  font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.form-group input[type="text"]:not(.readonly-input):not([readonly]),
.form-group textarea {
  text-transform: uppercase;
}

.form-group input[type="text"].readonly-input,
.form-group input[type="number"].readonly-input,
.form-group input[type="text"][readonly],
.form-group input[type="number"][readonly],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select {
  text-transform: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.readonly-input {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #666;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 5px;
}

.form-actions.save-section {
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.add-btn {
  padding: 8px 20px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.add-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.cancel-btn {
  padding: 8px 20px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.cancel-btn:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
}

.save-btn {
  padding: 8px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

/* Products Table */
.products-table-container {
  overflow-x: auto;
  margin-top: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: white;
  border: 1px solid #e5e7eb;
  position: relative;
}

.products-table-container::-webkit-scrollbar {
  height: 8px;
}

.products-table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.products-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.products-table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.products-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1200px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.products-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: 2px solid #5a67d8;
}

.products-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  /* color: #ffffff; */
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.products-table th:last-child {
  border-right: none;
}

.products-table tbody {
  background: white;
}

.products-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  background: white;
}

.products-table tbody tr:hover {
  background-color: #f0f9ff;
  border-left: 3px solid #3b82f6;
  border-right: 3px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
  transform: scale(1.001);
  z-index: 1;
  position: relative;
}

.products-table tbody tr:last-child {
  border-bottom: 2px solid #e5e7eb;
}

.products-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.products-table tbody tr:nth-child(even):hover {
  background-color: #f0f9ff;
}

.products-table td {
  padding: 12px 16px;
  color: #374151;
  font-size: 0.9rem;
  vertical-align: middle;
  border-right: 1px solid #f3f4f6;
  white-space: nowrap;
}

.products-table td:last-child {
  border-right: none;
}

.products-table tfoot {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 3px solid #667eea;
  font-weight: 600;
}

.products-table tfoot tr {
  border-bottom: none;
}

.products-table tfoot tr:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: none;
  border-right: none;
  box-shadow: none;
  transform: none;
}

.products-table tfoot td {
  padding: 12px 16px;
  color: #1e293b;
  font-size: 0.95rem;
  border-right: 1px solid #dee2e6;
}

.products-table tfoot td:last-child {
  border-right: none;
}

.products-table tfoot tr:last-child {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-top: 3px solid #3b82f6;
}

.products-table tfoot tr:last-child td {
  color: #1e40af;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 16px;
}

.products-table tfoot tr:last-child:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.grand-total-row {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  border-top: 3px solid #3b82f6 !important;
}

.grand-total-row td {
  color: #1e40af !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 14px 16px !important;
}

.grand-total-row:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.sales-create-order .edit-btn,
.sales-create-order .delete-btn {
  padding: 8px 14px;
  margin: 0 4px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sales-create-order .edit-btn {
  background-color: #3b82f6;
  color: #ffffff;
}

.sales-create-order .edit-btn:hover {
  background-color: #2563eb;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.sales-create-order .edit-btn:active {
  transform: translateY(0);
}

.sales-create-order .delete-btn {
  background-color: #ef4444;
  color: white;
}

.sales-create-order .delete-btn:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.sales-create-order .delete-btn:active {
  transform: translateY(0);
}

.sales-create-order .edit-btn i,
.sales-create-order .delete-btn i {
  font-size: 0.9rem;
  color: inherit;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(25% - 15px);
  }
}

@media (max-width: 768px) {
  .sales-create-order {
    padding: 15px;
  }

  .sales-order-form {
    padding: 20px;
  }

  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(50% - 10px);
  }

  .products-table-container {
    margin-top: 10px;
    border-radius: 6px;
  }

  .products-table {
    font-size: 0.85rem;
    min-width: 1000px;
  }

  .products-table th {
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  .products-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .products-table tfoot td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .sales-create-order .edit-btn,
  .sales-create-order .delete-btn {
    padding: 6px 10px;
    margin: 0 2px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .form-group {
    flex: 1 1 100%;
  }

  .save-btn,
  .add-btn {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }
}

/* Buyer Expandable Details */
.buyer-expand-btn {
  transition: transform 0.3s ease, color 0.3s ease;
}

.buyer-expand-btn:hover {
  color: #2563eb;
  transform: scale(1.1);
}

.buyer-expand-btn:active {
  transform: scale(0.95);
}

.buyer-details-expanded {
  margin-top: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.buyer-details-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
}

.buyer-details-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
}

.buyer-details-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.buyer-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.detail-label {
  font-weight: 600;
  color: #495057;
  min-width: 140px;
  font-size: 0.9rem;
}

.detail-value {
  color: #212529;
  flex: 1 1;
  font-size: 0.95rem;
  word-break: break-word;
}

.consignees-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #dee2e6;
}

.consignees-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  margin-top: 15px;
}

.consignee-item {
  padding: 12px;
  background-color: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.consignee-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.consignee-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
  margin-bottom: 6px;
}

.consignee-address {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.consignee-phone {
  color: #495057;
  font-size: 0.85rem;
  margin-top: 4px;
}

.no-consignees {
  padding: 15px;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  background-color: white;
  border-radius: 6px;
  border: 1px dashed #dee2e6;
}

.no-consignees p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive adjustments for buyer details */
@media (max-width: 768px) {
  .consignees-list {
    grid-template-columns: 1fr;
  }

  .buyer-detail-item {
    flex-direction: column;
    gap: 5px;
  }

  .detail-label {
    min-width: auto;
  }
}

.form-s-inside-r{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 10px;
  gap: 10px;

}

.form-order-top-fields {
  width: 100%;
}

.form-s-inside-order-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  width: 100%;
}

.form-s-inside-order-row .form-group {
  min-width: 0;
}

.form-s-inside-order-row .form-group select,
.form-s-inside-order-row .form-group input,
.form-s-inside-order-row .form-group button.form-input {
  width: 100%;
  box-sizing: border-box;
}

.form-s-inside-buyer-order-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.form-s-inside-buyer-order-row .form-group {
  min-width: 0;
}

.form-s-inside-buyer-order-row .form-group input {
  width: 100%;
  box-sizing: border-box;
}

.form-s-inside-po-row {
  width: 100%;
  margin-top: 10px;
}

.form-s-inside-po-row .form-group {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1400px) {
  .form-s-inside-order-row,
  .form-s-inside-buyer-order-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .form-s-inside-order-row,
  .form-s-inside-buyer-order-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .form-s-inside-order-row,
  .form-s-inside-buyer-order-row {
    grid-template-columns: 1fr;
  }
}

.po-upload-view-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.po-upload-remove-cross {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: white;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.po-upload-remove-cross:hover {
  filter: brightness(0.95);
}
/* Sales Dashboard Styles */
.sales-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.sales-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.sales-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 15px;
  gap: 15px;
  width: 100%;
  box-sizing: border-box;
}

.sales-metric-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sales-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sales-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.sales-metric-card-1 { --metric-color: #3b82f6; }
.sales-metric-card-2 { --metric-color: #f59e0b; }
.sales-metric-card-3 { --metric-color: #10b981; }
.sales-metric-card-4 { --metric-color: #ec4899; }
.sales-metric-card-5 { --metric-color: #06b6d4; }

.sales-so-payment-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sales-so-payment-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.sales-metrics-row--payment-due {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
}

.sales-metric-card-payment-pending {
  --metric-color: #f59e0b;
}

.sales-metric-card-payment-overdue {
  --metric-color: #ef4444;
}

.sales-metric-card--clickable {
  cursor: pointer;
}

.sales-metric-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.sales-metric-card--clickable:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.bg-danger {
  background: #ef4444;
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  display: none;
  width: 60px;
  height: 30px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.sales-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.sales-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .sales-metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .sales-metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .sales-metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sales-dashboard {
    padding: 15px;
  }

  .sales-metrics-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .sales-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


.sales-order-verification {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.verification-header {
  margin-bottom: 30px;
}

.verification-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.verification-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 28px;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.verification-filters-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.verification-filters-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #495057;
}

.verification-filters-group > .verification-filters-label {
  flex: 0 0 100%;
  margin-bottom: 2px;
}

.verification-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #555;
}

.verification-filter-field span {
  font-weight: 500;
}

.verification-date-input {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #333;
  min-width: 140px;
}

.verification-date-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.verification-filters-clear {
  align-self: flex-end;
  margin-bottom: 2px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.verification-filters-clear:hover {
  background: #e9ecef;
}

.verification-filters-empty-hint {
  margin: 0;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: #856404;
  background: #fff3cd;
  border-bottom: 1px solid #ffeeba;
}

.verification-filter-count {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Messages */
.verification-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.verification-error i {
  font-size: 1.1rem;
}

/* Loading State */
.verification-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.verification-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.verification-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.verification-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.verification-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.verification-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.verification-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.verification-table tbody tr:hover {
  background-color: #f8f9fa;
}

.verification-table tbody tr:last-child {
  border-bottom: none;
}

.verification-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.verification-table td:first-child {
  font-weight: 600;
  color: #007bff;
}

/* Check Now Button */
.check-now-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.check-now-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.check-now-btn:active:not(:disabled) {
  transform: translateY(0);
}

.check-now-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.check-now-btn i {
  font-size: 0.85rem;
}

.check-now-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Action Buttons */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100px;
}

.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #6c757d !important;
}

.view-btn {
  background-color: #17a2b8;
  color: white;
}

.view-btn:hover:not(:disabled) {
  background-color: #138496;
}

.edit-btn {
  background-color: #3b82f6;
  color: white;
}

.edit-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

/* Empty State */
.verification-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.verification-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sales-order-verification {
    padding: 15px;
  }

  .verification-header h2 {
    font-size: 1.5rem;
  }

  .verification-table {
    font-size: 0.85rem;
  }

  .verification-table th,
  .verification-table td {
    padding: 10px 12px;
  }

  .check-now-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

/* Modal Styles */
.verification-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.verification-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 2001;
}

.verification-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.verification-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.verification-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}

.verification-section {
  margin-bottom: 30px;
}

.verification-section:last-child {
  margin-bottom: 0;
}

.verification-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

/* View Detail Styles (matching FinalOrderList) */
.view-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
  width: 100%;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 150px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item span {
  font-size: 0.95rem;
  color: #333;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.verification-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

@media (max-width: 1200px) {
  .verification-form-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .verification-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .verification-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: #f8f9fa;
  transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #007bff;
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* Products Table in Modal */
.verification-products-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.verification-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.verification-products-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.verification-products-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
}

.verification-products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.verification-products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.verification-products-table tbody tr:last-child {
  border-bottom: none;
}

.verification-products-table td {
  padding: 12px 14px;
  color: #555;
  font-size: 0.9rem;
  vertical-align: middle;
}

.verification-products-table tfoot {
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.verification-products-table tfoot td {
  font-weight: 600;
  color: #333;
}

/* Modal Footer */
.verification-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #f8f9fa;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.verify-btn,
.reject-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verify-btn {
  background-color: #6c757d;
  color: white;
}

.verify-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.reject-btn {
  background-color: #dc3545;
  color: white;
}

.reject-btn:hover:not(:disabled) {
  background-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.verify-btn:disabled,
.reject-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.verify-btn i,
.reject-btn i {
  font-size: 0.9rem;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.status-badge.status-verified {
  background-color: #28a745;
  color: white;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: white;
}

.status-badge.status-final {
  background-color: #007bff;
  color: white;
}

/* Status Input */
.status-input {
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-input.status-pending {
  background-color: #fff3cd !important;
  color: #856404 !important;
  border-color: #ffc107 !important;
}

.status-input.status-verified {
  background-color: #d4edda !important;
  color: #155724 !important;
  border-color: #28a745 !important;
}

.status-input.status-rejected {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border-color: #dc3545 !important;
}

.status-input.status-final {
  background-color: #cce5ff !important;
  color: #004085 !important;
  border-color: #007bff !important;
}

/* Status Message */
.status-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  color: #856404;
  font-weight: 500;
  width: 100%;
  justify-content: center;
}

.status-message i {
  font-size: 1.2rem;
}

.status-message i.fa-check-circle {
  color: #28a745;
}

.status-message i.fa-times-circle {
  color: #dc3545;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .verification-modal-overlay {
    padding: 10px;
  }

  .verification-modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .verification-modal-header {
    padding: 15px 20px;
  }

  .verification-modal-header h2 {
    font-size: 1.2rem;
  }

  .verification-modal-body {
    padding: 20px;
  }

  .verification-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .verification-section h3 {
    font-size: 1.1rem;
  }

  .verification-products-table {
    font-size: 0.85rem;
    min-width: 800px;
  }

  .verification-products-table th,
  .verification-products-table td {
    padding: 8px 10px;
  }

  .verification-modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }

  .verify-btn,
  .reject-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}


.marketing-sales-report {
  padding: 20px;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.marketing-sales-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marketing-sales-report-header h1 {
  margin: 0;
  color: #333;
  font-size: 24px;
}

.marketing-sales-report-filters {
  display: flex;
  gap: 15px;
  align-items: center;
}

.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date-filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.date-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-top: 0;
  transition: background-color 0.3s;
}

.search-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.search-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.marketing-sales-report-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marketing-sales-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.marketing-sales-report-loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.marketing-sales-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.marketing-sales-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.marketing-sales-report-table thead {
  background-color: #f8f9fa;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

.marketing-sales-report-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-size: 12px;
}

.marketing-sales-report-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
  font-size: 12px;
}

.marketing-sales-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.order-row {
  background-color: white;
}

.order-row-rejected {
  background-color: #f8d7da;
}

.marketing-sales-report-table tbody tr.order-row-rejected:hover {
  background-color: #f1aeb5;
}

.products-row {
  background-color: #f8f9fa;
}

.products-row td {
  padding: 0;
  border: none;
}

.products-table-container {
  padding: 15px;
  background-color: #f8f9fa;
}

/*.products-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
  }*/

.products-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0;
  box-sizing: border-box;
  border: none !important;
}

.products-table th {
  background: #f7fafc;
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  border: none !important;
}

.products-table td {
  padding: 16px 12px;
  color: #2d3748;
  font-size: 11px;
  border: none !important;
}

.product-name-cell{
  text-overflow: ellipsis;
}
.products-table tbody td{
  vertical-align: baseline;
  vertical-align: initial;
}

.products-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.products-table tbody tr.even-row {
  background: white;
}

.products-table tbody tr.odd-row {
  background: #f8fafc;
}

.products-table tbody tr:hover {
  background: #f1f5f9 !important;
  border-left: none !important;
  box-shadow: none !important;
}

.product-name-cell{
  word-wrap: break-word;
  white-space: normal !important;
}


/*.products-table thead {
    background-color: #e9ecef;
  }
*/

/*.products-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    font-size: 11px;
  }*/

/*.products-table td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
    font-size: 11px;
  }*/

/*.products-table tbody tr:hover {
    background-color: #f8f9fa;
  }*/

/*.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #007bff;
    font-size: 14px;
    padding: 5px 10px;
    transition: color 0.3s;
  }*/

/*.expand-btn:hover {
    color: #0056b3;
  }*/

.remark-cell {
  max-width: 200px;
  word-wrap: break-word;
  white-space: normal;
  border: none !important;
}

.marketing-sales-report-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
}

/* Action column: View + Copy (aligned with Complete Order page) */
.sales-order-report-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.marketing-sales-report-table .sales-order-report-copy-btn {
  background-color: #10b981;
  color: white;
  border: none;
}

.marketing-sales-report-table .sales-order-report-copy-btn:hover:not(:disabled) {
  background-color: #059669;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Sales Order Report — buyer filter combobox */
.sales-report-header--dropdown-open {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.sales-report-filters-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  overflow: visible;
  position: relative;
}

.sales-report-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sales-report-buyer-combobox {
  min-width: 260px;
  flex: 0 1 280px;
  position: relative;
}

.sales-report-buyer-combobox-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sales-report-buyer-combobox-input {
  width: 100%;
  padding: 8px 56px 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;
  background: #fff;
}

.sales-report-buyer-combobox-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.sales-report-buyer-combobox-input.has-selection {
  background: #f8fafc;
  font-weight: 500;
}

.sales-report-buyer-combobox-toggle,
.sales-report-buyer-combobox-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
}

.sales-report-buyer-combobox-toggle {
  right: 4px;
}

.sales-report-buyer-combobox-toggle:hover,
.sales-report-buyer-combobox-clear:hover {
  color: #334155;
}

.sales-report-buyer-combobox-clear {
  right: 28px;
}

.sales-report-buyer-combobox-menu {
  position: fixed;
  z-index: 10050;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  max-height: min(280px, 45vh);
  overflow-y: auto;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.sales-report-buyer-combobox-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.sales-report-buyer-combobox-option:last-child {
  border-bottom: none;
}

.sales-report-buyer-combobox-option:hover,
.sales-report-buyer-combobox-option.selected {
  background: #eff6ff;
}

.sales-report-buyer-combobox-empty {
  padding: 12px 14px;
  color: #64748b;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .marketing-sales-report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .marketing-sales-report-filters {
    width: 100%;
    flex-wrap: wrap;
  }
}
.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
.user-hierarchy-page {
  padding: 24px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.hierarchy-header {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.hierarchy-header h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  color: #1a202c;
}

.hierarchy-header p {
  margin: 0 0 16px 0;
  color: #718096;
  font-size: 14px;
}

.hierarchy-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  min-width: 200px;
}

.btn-create {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-create:hover {
  opacity: 0.9;
}

.back-btn {
  padding: 8px 16px;
  background: #e2e8f0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-btn:hover {
  background: #cbd5e0;
}

.hierarchy-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: white;
  border-radius: 12px;
}

.hierarchy-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hierarchy-error {
  background: #fed7d7;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hierarchy-success {
  background: #c6f6d5;
  color: #276749;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hierarchy-tree {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tree-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 180px;
  grid-gap: 16px;
  gap: 16px;
  padding: 12px 20px;
  background: #f7fafc;
  font-weight: 600;
  font-size: 13px;
  color: #4a5568;
  border-bottom: 1px solid #e2e8f0;
}

.tree-node {
  padding: 4px 0;
}

.tree-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 180px;
  grid-gap: 16px;
  gap: 16px;
  padding: 12px 20px;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}

.tree-row:hover {
  background: #f8fafc;
}

.user-name {
  font-weight: 500;
  color: #1a202c;
}

.user-email {
  font-size: 13px;
  color: #718096;
}

.under-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #e6fffa;
  color: #234e52;
  width: -webkit-fit-content;
  width: fit-content;
}

.edit-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: #edf2f7;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.edit-btn:hover {
  background: #e2e8f0;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detach-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #feb2b2;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detach-btn:hover:not(:disabled) {
  background: #fed7d7;
}

.detach-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tree-children {
  border-left: 2px solid #e2e8f0;
  margin-left: 20px;
}

.hierarchy-empty {
  padding: 40px;
  text-align: center;
  color: #718096;
}

/* Form */
.hierarchy-form {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  max-width: 560px;
}

.reportees-checkbox-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}

.reportee-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
}

.reportee-checkbox input {
  cursor: pointer;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2d3748;
}

.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
}

.hierarchy-select-dropdown {
  position: relative;
  width: 100%;
}

.hierarchy-select-btn {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  text-align: left;
  padding: 10px 36px 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #718096;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hierarchy-select-btn.has-value {
  color: #1a202c;
}

.hierarchy-select-btn:hover,
.hierarchy-select-btn:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.hierarchy-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1;
}

.hierarchy-select-btn i {
  font-size: 11px;
  color: #718096;
  flex-shrink: 0;
}

.hierarchy-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  z-index: 1000;
  max-height: 280px;
  display: flex;
  flex-direction: column;
}

.hierarchy-select-search-wrap {
  position: relative;
  padding: 10px;
  border-bottom: 1px solid #edf2f7;
}

.hierarchy-select-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 12px;
  pointer-events: none;
}

.hierarchy-select-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 32px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.hierarchy-select-search:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.hierarchy-reportee-search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 10px;
}

.hierarchy-reportee-search:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.hierarchy-reportee-search:disabled {
  background: #f7fafc;
  color: #a0aec0;
  cursor: not-allowed;
}

.hierarchy-select-list {
  overflow-y: auto;
  max-height: 220px;
}

.hierarchy-select-item {
  width: 100%;
  padding: 10px 14px;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid #f7fafc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #2d3748;
  text-align: left;
}

.hierarchy-select-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hierarchy-select-item:hover {
  background-color: #f7fafc;
}

.hierarchy-select-item.selected {
  background-color: #ebf4ff;
  color: #2b6cb0;
  font-weight: 600;
}

.hierarchy-select-empty {
  padding: 16px;
  color: #a0aec0;
  text-align: center;
  font-size: 13px;
  font-style: italic;
}

.form-group small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #718096;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-save {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-save:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-clear {
  padding: 10px 24px;
  background: #e2e8f0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-clear:hover {
  background: #cbd5e0;
}

.complete-indent-list-page {
  padding: 20px;
  max-width: 100%;
  min-height: 100vh;
  background-color: #f8fafc;
}

.complete-indent-list-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
  text-align: center;
}

/* Product Filter Section */
.complete-indent-list-product-filter {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.complete-indent-list-product-filter label {
  display: block;
  font-weight: 600;
  color: #334155;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.complete-indent-list-product-select {
  width: 100%;
  max-width: 500px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s;
  background: white;
}

.complete-indent-list-product-select:hover {
  border-color: #94a3b8;
}

.complete-indent-list-product-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tabs */
.complete-indent-list-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.complete-indent-list-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.complete-indent-list-tab:hover {
  color: #334155;
  background: #f8fafc;
}

.complete-indent-list-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: #f8fafc;
}

/* No Selection State */
.complete-indent-list-no-selection {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.complete-indent-list-no-selection p {
  margin: 0;
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Error & Loading */
.complete-indent-list-error {
  background: #fee;
  color: #c00;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.complete-indent-list-loading {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.complete-indent-list-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Table */
.complete-indent-list-table-wrap {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow-x: auto;
  margin-bottom: 20px;
}

.complete-indent-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.complete-indent-list-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.complete-indent-list-table thead th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.complete-indent-list-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.complete-indent-list-table tbody tr:hover {
  background-color: #f1f5f9;
}

.complete-indent-list-table tbody td {
  padding: 12px;
  font-size: 0.9rem;
  color: #334155;
}

.complete-indent-list-empty {
  text-align: center;
  padding: 40px 20px !important;
  color: #94a3b8;
  font-style: italic;
}

/* Status Badge */
.complete-indent-list-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.complete-indent-list-status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.complete-indent-list-status-badge.approved {
  background: #dbeafe;
  color: #1e40af;
}

.complete-indent-list-status-badge.processing {
  background: #fde68a;
  color: #78350f;
}

.complete-indent-list-status-badge.complete {
  background: #d1fae5;
  color: #065f46;
}

.complete-indent-list-status-badge.rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* View Button */
.complete-indent-list-view-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.complete-indent-list-view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.complete-indent-list-view-btn:active {
  transform: translateY(0);
}

/* Modal */
.complete-indent-list-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.complete-indent-list-modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.complete-indent-list-modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.complete-indent-list-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.complete-indent-list-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.complete-indent-list-modal-close:hover {
  background-color: rgba(255,255,255,0.2);
}

.complete-indent-list-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1;
}

.complete-indent-list-detail-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.complete-indent-list-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.complete-indent-list-detail-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
  display: inline-block;
}

.complete-indent-list-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.complete-indent-list-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.complete-indent-list-detail-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.complete-indent-list-detail-value {
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
}

.complete-indent-list-detail-remarks {
  background: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid #667eea;
  font-size: 0.9rem;
  color: #334155;
  margin: 0;
}

.complete-indent-list-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

.complete-indent-list-modal-close-btn {
  background: #64748b;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.complete-indent-list-modal-close-btn:hover {
  background: #475569;
}

/* Footer */
.complete-indent-list-footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .complete-indent-list-page {
    padding: 15px;
  }

  .complete-indent-list-title {
    font-size: 1.4rem;
  }

  .complete-indent-list-product-select {
    max-width: 100%;
  }

  .complete-indent-list-tabs {
    flex-wrap: wrap;
  }

  .complete-indent-list-tab {
    flex: 1 1;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .complete-indent-list-detail-grid {
    grid-template-columns: 1fr;
  }

  .complete-indent-list-modal {
    max-width: 100%;
    margin: 10px;
  }

  .complete-indent-list-no-selection {
    padding: 40px 20px;
  }

  .complete-indent-list-no-selection i {
    font-size: 2.5rem !important;
  }
}

.indent-stock-report-page .indent-stock-section {
  margin-bottom: 28px;
}

.indent-stock-section-title {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e293b;
  padding: 8px 4px;
  border-bottom: 2px solid #0f766e;
}

.indent-stock-meta {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
  font-weight: 400;
}

.indent-stock-detail-panel {
  padding: 12px 20px 16px 56px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.indent-stock-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px 20px;
  gap: 12px 20px;
  font-size: 0.88rem;
  color: #334155;
}

.indent-stock-detail-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 2px;
}

.indent-stock-sub {
  color: #94a3b8;
  font-size: 0.8rem;
}

.indent-stock-ledger-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.indent-stock-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.indent-stock-ledger-table th,
.indent-stock-ledger-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.indent-stock-ledger-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.indent-stock-ledger-table td.num {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.indent-stock-ledger-type.in {
  color: #0f766e;
  font-weight: 600;
}

.indent-stock-ledger-type.out {
  color: #b45309;
  font-weight: 600;
}

@media print {
  .stock-report-header .stock-report-filters,
  .stock-report-product-filter-row,
  .stock-report-date-info {
    display: none !important;
  }
}

.production-released-container {
  padding: 20px;
  max-width: 2000px;
  margin: 0 auto;
}

.production-released-header {
  margin-bottom: 30px;
}

.production-released-header h2 {
  color: #333;
  margin-bottom: 5px;
  font-size: 1.8rem;
}

.production-released-header p {
  color: #666;
  font-size: 0.95rem;
}

.production-released-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-released-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow-x: auto;
}

.production-released-table-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.production-released-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.production-released-search label {
  font-weight: 500;
  color: #333;
}

.production-released-search input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 300px;
}

.production-released-search input:focus {
  outline: none;
  border-color: #007bff;
}

.production-released-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

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

.production-released-table thead {
  background-color: #f8f9fa;
}

.production-released-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
}

.production-released-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  color: #555;
}

.production-released-table tbody tr:hover {
  background-color: #f8f9fa;
}

.production-released-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

.production-released-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

.production-released-pagination-info {
  color: #666;
  font-size: 0.9rem;
}

.production-released-pagination-controls {
  display: flex;
  gap: 8px;
}

.production-released-pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.production-released-pagination-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.production-released-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.production-released-pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.production-released-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modal Styles */
.production-released-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.production-released-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.production-released-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #e9ecef;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.production-released-modal-header h3 {
  margin: 0;
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
}

.production-released-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 1.3rem;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.production-released-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.production-released-modal-content {
  padding: 24px;
}

.production-released-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 2px solid #e9ecef;
  background-color: #f8f9fa;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.production-released-modal-cancel-btn,
.production-released-modal-confirm-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.production-released-modal-cancel-btn {
  background-color: #6c757d;
  color: white;
}

.production-released-modal-cancel-btn:hover:not(:disabled) {
  background-color: #5a6268;
  transform: translateY(-1px);
}

.production-released-modal-confirm-btn {
  background-color: #28a745;
  color: white;
}

.production-released-modal-confirm-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.production-released-modal-cancel-btn:disabled,
.production-released-modal-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .production-released-container {
    padding: 10px;
  }

  .production-released-table {
    font-size: 0.85rem;
    overflow-x: auto;
  }

  .production-released-table th,
  .production-released-table td {
    padding: 8px;
  }

  .production-released-pagination {
    flex-direction: column;
    gap: 15px;
  }
}


.release-misc-items-page {
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.release-misc-items-header {
  margin-bottom: 24px;
}

.release-misc-items-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.release-misc-items-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.release-misc-items-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: release-misc-items-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes release-misc-items-spin {
  to { transform: rotate(360deg); }
}

.release-misc-items-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  border-radius: 6px;
  font-size: 0.95rem;
}

.release-misc-items-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  border-radius: 6px;
  font-size: 0.95rem;
}

.release-misc-items-stock-info {
  padding: 16px 20px;
  margin-bottom: 24px;
  background: #e0f2fe;
  border-left: 4px solid #0ea5e9;
  border-radius: 4px;
  font-size: 1.1rem;
  color: #0c4a6e;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.release-misc-items-stock-info strong {
  font-weight: 600;
}

.release-misc-items-stock-info span {
  font-size: 1rem;
  color: #0369a1;
}

/* Product Details Section */
.release-misc-items-product-details {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  padding: 24px;
  margin-bottom: 24px;
}

.release-misc-items-details-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.release-misc-items-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.release-misc-items-detail-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
}

.release-misc-items-detail-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #cbd5e1;
}

.release-misc-items-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dotted #e2e8f0;
}

.release-misc-items-detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.detail-value {
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 600;
  text-align: right;
}

.detail-label.available-highlight {
  color: #059669;
  font-weight: 600;
}

.detail-value.available-highlight {
  color: #059669;
  font-size: 1.1rem;
}

.release-misc-items-form {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  padding: 24px;
}

.release-misc-items-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 24px;
}

.release-misc-items-form-group {
  display: flex;
  flex-direction: column;
}

.release-misc-items-form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 8px;
}

.release-misc-items-form-group .required {
  color: #dc2626;
}

.release-misc-items-input,
.release-misc-items-select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.release-misc-items-input:focus,
.release-misc-items-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.release-misc-items-input:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

.release-misc-items-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.release-misc-items-field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #dc2626;
  font-weight: 500;
}

.release-misc-items-field-success {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #16a34a;
  font-weight: 500;
}

.release-misc-items-product-dropdown {
  position: relative;
  width: 100%;
}

.release-misc-items-product-button {
  font-family: inherit;
}

.release-misc-items-product-button:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
}

.release-misc-items-product-button:hover:not(:disabled) {
  border-color: #94a3b8;
}

.release-misc-items-product-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.release-misc-items-product-dropdown-item {
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.release-misc-items-product-dropdown-item:last-child {
  border-bottom: none;
}

.release-misc-items-product-dropdown-item:hover {
  background: #f8fafc;
}

.release-misc-items-product-stock {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: normal;
}

.release-misc-items-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.release-misc-items-submit-btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  transition: background 0.2s;
  min-width: 150px;
}

.release-misc-items-submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.release-misc-items-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Release History Section */
.release-misc-items-history-section {
  margin-top: 32px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  padding: 24px;
}

.release-misc-items-history-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.release-misc-items-history-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
}

.release-misc-items-history-empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
}

.release-misc-items-history-table-wrap {
  overflow-x: auto;
}

.release-misc-items-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 1400px;
}

.release-misc-items-history-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.release-misc-items-history-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.release-misc-items-history-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.release-misc-items-history-table tbody tr:hover {
  background: #f8fafc;
}

.release-misc-items-history-table tbody tr.release-misc-items-history-summary {
  background: #f1f5f9;
  border-top: 2px solid #cbd5e1;
  font-weight: 600;
}

.release-misc-items-history-table tbody tr.release-misc-items-history-summary:hover {
  background: #e2e8f0;
}

.release-misc-items-history-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}

.release-misc-items-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.release-misc-items-status-released {
  background: #dcfce7;
  color: #166534;
}

.release-misc-items-status-partial {
  background: #fef3c7;
  color: #92400e;
}

.release-misc-items-status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.release-misc-items-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 768px) {
  .release-misc-items-page {
    padding: 16px;
  }

  .release-misc-items-title {
    font-size: 1.5rem;
  }

  .release-misc-items-details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .release-misc-items-product-details {
    padding: 16px;
  }

  .release-misc-items-form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .release-misc-items-form {
    padding: 16px;
  }

  .release-misc-items-form-actions {
    flex-direction: column;
  }

  .release-misc-items-submit-btn {
    width: 100%;
  }
}

.release-product {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.release-product-header {
  margin-bottom: 30px;
}

.release-product-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.release-product-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Error Message */
.release-product-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.release-product-error i {
  font-size: 1.1rem;
}

/* Success Message */
.release-product-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.release-product-success i {
  font-size: 1.1rem;
  color: #28a745;
}

/* Loading State */
.release-product-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.release-product-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.release-product-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.release-product-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.release-product-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.release-product-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.release-product-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.release-product-table tbody tr:hover {
  background-color: #f8f9fa;
}

.release-product-table tbody tr:last-child {
  border-bottom: none;
}

.release-product-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.release-product-table td:first-child {
  font-weight: 600;
  color: #333;
}

.request-sent-badge {
  margin-left: 8px;
  color: #28a745;
  font-size: 0.85rem;
  vertical-align: middle;
}

.request-sent-badge i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Type Badge */
.release-product-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.release-product-type-badge.type-original {
  background-color: #e3f2fd;
  color: #1976d2;
}

.release-product-type-badge.type-adjustment {
  background-color: #fff3e0;
  color: #f57c00;
}

.release-product-type-badge.type-transfer {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

/* Request Date/Time Column */
.request-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 500;
}

.request-date-time i {
  font-size: 0.8rem;
  color: #28a745;
}

.no-date {
  color: #999;
  font-style: italic;
}

/* Release Date/Time Column */
.release-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 500;
}

.release-date-time i {
  font-size: 0.8rem;
  color: #28a745;
}

/* Release Button */
.release-product-btn {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.release-product-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.release-product-btn:active:not(:disabled) {
  transform: translateY(0);
}

.release-product-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.release-product-btn i {
  font-size: 0.85rem;
}

.release-product-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Action Success Message */
.release-product-action-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #d4edda;
  color: #155724;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.release-product-action-success i {
  font-size: 0.9rem;
  color: #28a745;
}

/* Empty State */
.release-product-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.release-product-empty i {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 16px;
}

.release-product-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .release-product {
    padding: 15px;
  }

  .release-product-header h2 {
    font-size: 1.5rem;
  }

  .release-product-table {
    font-size: 0.85rem;
  }

  .release-product-table th,
  .release-product-table td {
    padding: 10px 12px;
  }
}


/* Sales Order Release Styles */
.sales-order-release {
  padding: 20px;
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
}

.sales-order-release-header {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sales-order-release-header h2 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 1.5rem;
}

.sales-order-release-header p {
  margin: 0 0 15px 0;
  color: #64748b;
  font-size: 1rem;
}

.sales-order-release-controls {
  display: flex;
  gap: 20px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box label {
  color: #64748b;
  font-size: 0.9rem;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sales-order-release-error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sales-order-release-error--modal {
  border: 1px solid #fecaca;
  width: 100%;
  box-sizing: border-box;
}

.sales-order-release-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
}

.sales-order-release-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sales-order-release-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.release-orders-table-section,
.release-products-table-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.release-table-container {
  overflow-x: auto;
}

.release-orders-table,
.release-products-table {
  width: 100%;
  border-collapse: collapse;
}

.release-orders-table thead,
.release-products-table thead {
  background-color: #f1f5f9;
}

.release-orders-table th,
.release-products-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  border-bottom: 2px solid #e2e8f0;
}

.release-orders-table td,
.release-products-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.875rem;
}

.release-orders-table tbody tr:hover,
.release-products-table tbody tr:hover {
  background-color: #f8fafc;
}

.release-orders-table tbody tr.selected {
  background-color: #dbeafe;
}

.view-dispatch-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.view-dispatch-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.view-dispatch-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.confirm-release-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.confirm-release-btn:hover:not(:disabled) {
  background-color: #059669;
}

.confirm-release-btn:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.confirm-release-btn i.fa-check-circle {
  color: #10b981;
}

.loading-cell {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.batch-info {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

.release-note {
  margin-top: 20px;
  padding: 16px;
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
}

.release-note-text {
  margin: 0;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.6;
}

.release-copyright {
  margin-top: 20px;
  padding: 16px;
  text-align: left;
  color: #64748b;
  font-size: 0.75rem;
}

.release-view-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
}

.release-view-modal-content {
  width: min(1200px, 96vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.release-view-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.release-view-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #1e293b;
}

.release-view-modal-close {
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 4px;
}

.release-view-modal-close:hover {
  background: #e2e8f0;
}

.release-view-modal-body {
  overflow: auto;
  padding: 12px 16px 16px;
}

.billing-confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.billing-confirmed-badge i {
  color: #10b981;
}

.billing-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.billing-pending-badge i {
  color: #f59e0b;
}


.send-store-to-qc {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.send-qc-header {
  margin-bottom: 30px;
}

.send-qc-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.send-qc-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Messages */
.send-qc-error,
.send-qc-success {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.send-qc-error {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.send-qc-success {
  background-color: #efe;
  color: #3c3;
  border: 1px solid #cfc;
}

.send-qc-error i,
.send-qc-success i {
  font-size: 1.1rem;
}

/* Loading State */
.send-qc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.send-qc-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Filters - inline bar */
.send-qc-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 8px 8px 0 0;
}

.send-qc-filters-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.send-qc-filter-inp {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 140px;
  outline: none;
  transition: border-color 0.2s;
}

.send-qc-filter-inp:focus {
  border-color: #007bff;
}

.send-qc-filter-inp::placeholder {
  color: #6c757d;
}

.send-qc-filter-clear-btn {
  padding: 8px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s;
}

.send-qc-filter-clear-btn:hover {
  background: #f8f9fa;
  color: #333;
}

.send-qc-filter-count {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Pagination */
.send-qc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.send-qc-page-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: white;
  color: #333;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.send-qc-page-btn:hover:not(:disabled) {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.send-qc-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-qc-page-info {
  font-size: 0.95rem;
  color: #555;
}

.send-qc-page-range {
  font-size: 0.85rem;
  color: #888;
  margin-left: 4px;
}

/* Table Container */
.send-qc-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.send-qc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1250px;
}

.send-qc-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.send-qc-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.send-qc-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.send-qc-table tbody tr:hover {
  background-color: #f8f9fa;
}

.send-qc-table tbody tr.sent-to-qc-row {
  background-color: #f0f8ff;
}

.send-qc-table tbody tr.sent-to-qc-row:hover {
  background-color: #e6f3ff;
}

.send-qc-table tbody tr:last-child {
  border-bottom: none;
}

.send-qc-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.send-qc-table td:first-child {
  font-weight: 600;
  color: #007bff;
  position: relative;
}

.sent-badge {
  margin-left: 8px;
  color: #28a745;
  font-size: 0.85rem;
  vertical-align: middle;
}

.sent-badge i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Sample Quantity Input */
.sample-qty-input {
  width: 120px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.sample-qty-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.sample-qty-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* Send to QC Button */
.send-to-qc-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.send-to-qc-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.send-to-qc-btn:active:not(:disabled) {
  transform: translateY(0);
}

.send-to-qc-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.send-to-qc-btn.sent-btn {
  background-color: #28a745;
  cursor: default;
  opacity: 1;
}

.send-to-qc-btn.sent-btn:hover {
  background-color: #28a745;
  transform: none;
  box-shadow: none;
}

.send-to-qc-btn.sent-btn i {
  color: white;
  margin-right: 6px;
}

.send-to-qc-btn i {
  font-size: 0.85rem;
}

/* Sent Date/Time Column */
.sent-date-cell {
  color: #28a745;
  font-weight: 500;
}

.sent-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
}

.sent-date-time i {
  font-size: 0.8rem;
  color: #28a745;
}

.not-sent {
  color: #999;
  font-style: italic;
}

.send-to-qc-btn i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Product Type Badge */
.product-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.product-type-badge.raw-herbs {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.product-type-badge.extract {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffb74d;
}

/* Empty State */
.send-qc-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.send-qc-empty i {
  font-size: 3rem;
  color: #ddd;
  margin-bottom: 20px;
}

.send-qc-empty p {
  color: #999;
  font-size: 1.1rem;
  margin: 10px 0;
}

.send-qc-empty-subtitle {
  color: #bbb !important;
  font-size: 0.9rem !important;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .send-store-to-qc {
    padding: 15px;
  }

  .send-qc-header h2 {
    font-size: 1.5rem;
  }

  .send-qc-table {
    font-size: 0.85rem;
  }

  .send-qc-table th,
  .send-qc-table td {
    padding: 10px 12px;
  }

  .sample-qty-input {
    width: 100px;
  }

  .send-to-qc-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}


.stock-report-management {
    padding: 20px;
    max-width: 100%;
    overflow-x: auto;
    background-color: #f5f5f5;
    min-height: 100vh;
  }
  
  /* Header Section */
  .stock-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .stock-report-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
    font-weight: 600;
  }
  
  .stock-report-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
  }
  
  .stock-report-product-select{
    min-width: 0;
    max-width: 40px;
  }
  
  .stock-report-location-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
    flex-wrap: wrap;
  }
  
  .stock-report-location-filters label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
  }
  
  .stock-report-location-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 150px;
  }
  
  .stock-report-location-select:hover:not(:disabled) {
    border-color: #007bff;
  }
  
  .stock-report-location-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .stock-report-location-select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    color: #6c757d;
  }
  
  .stock-report-clear-location-btn {
    padding: 8px 12px;
    border: 1px solid #dc3545;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    background: white;
    color: #dc3545;
    margin-left: 8px;
  }
  
  .stock-report-clear-location-btn:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
  }
  
  .stock-report-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
  }
  
  .stock-report-date-range label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
  }
  
  .stock-report-date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
  }
  
  .stock-report-date-input:hover {
    border-color: #007bff;
  }
  
  .stock-report-date-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .stock-report-date-separator {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
  }
  
  .stock-report-clear-date-btn {
    padding: 8px 12px;
    border: 1px solid #dc3545;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    background: white;
    color: #dc3545;
  }
  
  .stock-report-clear-date-btn:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
  }
  
  .stock-report-product-select {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.2s;
  }
  
  .stock-report-product-select:hover {
    border-color: #007bff;
  }
  
  .stock-report-product-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .stock-report-export-btn,
  .stock-report-print-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
  }
  
  .stock-report-export-btn {
    background-color: #007bff;
    color: white;
  }
  
  .stock-report-export-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  }
  
  .stock-report-print-btn {
    background-color: #28a745;
    color: white;
  }
  
  .stock-report-print-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
  }
  
  /* Product Section */
  .stock-report-product-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
  }
  
  .stock-report-product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .stock-report-product-info label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .stock-report-product-name {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
  }
  
  .stock-report-check-btn {
    padding: 10px 24px;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
  }
  
  .stock-report-check-btn:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
  }
  
  .stock-report-back-btn {
    padding: 10px 24px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-left: 12px;
  }
  
  .stock-report-back-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
  }
  
  .stock-report-product-actions {
    display: flex;
    align-items: center;
  }
  
  /* Error Message */
  .stock-report-date-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #004085;
    font-size: 0.95rem;
  }
  
  .stock-report-date-info i {
    color: #0066cc;
  }
  
  .stock-report-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .stock-report-error i {
    font-size: 1.1rem;
  }
  
  /* Loading State */
  .stock-report-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
  }
  
  .stock-report-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Table Container */
  .stock-report-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
  }
  
  .stock-report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1400px;
  }
  
  .stock-report-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
  }
  
  .stock-report-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
  
  .stock-report-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
  }
  
  .stock-report-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .stock-report-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .stock-report-table td {
    padding: 14px 16px;
    color: #555;
    font-size: 0.95rem;
    vertical-align: middle;
  }
  
  .stock-report-table td:first-child {
    font-weight: 600;
    color: #007bff;
  }
  
  /* Type Badge */
  .stock-report-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .stock-report-type-badge.type-return {
    background-color: #ffc107;
    color: #856404;
  }
  
  .stock-report-type-badge.type-original {
    background-color: #17a2b8;
    color: #fff;
  }
  
  .stock-report-type-badge.type-ready {
    background-color: #28a745;
    color: #fff;
  }
  
  /* View Button */
  .stock-report-view-btn {
    padding: 8px 12px;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
  }
  
  .stock-report-view-btn:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .stock-report-view-btn i {
    font-size: 0.9rem;
  }
  
  .stock-report-edit-btn {
    padding: 8px 12px;
    background-color: #f0ad4e;
    color: white;
    border: 1px solid #eea236;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .stock-report-edit-btn:hover {
    background-color: #ec971f;
    border-color: #d58512;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(240, 173, 78, 0.3);
  }
  
  .stock-report-edit-btn i {
    font-size: 0.9rem;
  }
  
  .stock-report-action-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
  }
  
  .stock-report-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
  }
  
  .stock-report-status-badge.status-approved {
    background-color: #28a745;
    color: #fff;
  }
  
  .stock-report-status-badge.status-rejected {
    background-color: #dc3545;
    color: #fff;
  }
  
  .stock-report-status-badge.status-pending {
    background-color: #ffc107;
    color: #856404;
  }
  
  /* Products List */
  .stock-report-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .stock-report-products-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
  }
  
  .stock-report-products-header-spacer {
    width: 36px;
    flex-shrink: 0;
  }
  
  .stock-report-products-header-label {
    flex: 1 1;
    display: flex;
    align-items: center;
  }
  
  .stock-report-products-header-label span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .stock-report-products-header-actions {
    min-width: 140px;
    flex-shrink: 0;
  }
  
  .stock-report-product-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
  }
  
  .stock-report-product-filter-row label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
  }
  
  .stock-report-product-dropdown-btn {
    width: 100%;
    text-align: left;
    padding: 10px 35px 10px 12px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  
  .stock-report-product-dropdown-btn:hover {
    border-color: #007bff;
  }
  
  .stock-report-product-dropdown-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1;
    min-width: 0;
  }
  
  .stock-report-product-dropdown-btn i {
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
  }
  
  .stock-report-product-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 4px;
    max-height: 300px;
    display: flex;
    flex-direction: column;
  }
  
  .stock-report-product-dropdown-search-wrap {
    padding: 8px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }
  
  .stock-report-product-dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
  }
  
  .stock-report-product-dropdown-search:focus {
    border-color: #007bff;
  }
  
  .stock-report-product-dropdown-list {
    overflow-y: auto;
    max-height: 240px;
  }
  
  .stock-report-product-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    font-size: 14px;
  }
  
  .stock-report-product-dropdown-item:hover {
    background-color: #f5f5f5 !important;
  }
  
  .stock-report-product-dropdown-item i {
    color: #3b82f6;
    margin-left: 8px;
    font-size: 14px;
  }
  
  .stock-report-product-dropdown-empty {
    padding: 16px;
    color: #999;
    text-align: center;
    font-size: 14px;
    font-style: italic;
  }
  
  .stock-report-product-filter-count {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
  }
  
  .stock-report-product-row {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }
  
  .stock-report-product-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
  }
  
  .stock-report-expand-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .stock-report-expand-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  }
  
  .stock-report-product-info-inline {
    flex: 1 1;
    display: flex;
    align-items: center;
  }
  
  .stock-report-product-name-inline {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
  }
  
  .stock-report-check-btn-inline {
    padding: 8px 20px;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
  }
  
  .stock-report-check-btn-inline:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
  }
  
  .stock-report-product-items {
    padding: 20px;
    background: white;
  }
  
  /* Stock Modal */
  .stock-report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
  }
  
  .stock-report-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .stock-report-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
  }
  
  .stock-report-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }
  
  .stock-report-modal-body {
    padding: 24px;
    flex: 1 1;
  }
  
  .stock-report-categories {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  .stock-report-category-header {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    grid-gap: 16px;
    gap: 16px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .stock-report-category-label-header {
    font-weight: 600;
  }
  
  .stock-report-category-value-header {
    text-align: right;
    font-weight: 600;
  }
  
  .stock-report-category-item {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    grid-gap: 16px;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
  }
  
  .stock-report-category-item:hover {
    background-color: #f8f9fa;
  }
  
  .stock-report-category-item:last-child {
    border-bottom: none;
  }
  
  .stock-report-category-label {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
  }
  
  .stock-report-category-value {
    font-size: 1rem;
    color: #495057;
    font-weight: 600;
    text-align: right;
  }
  
  .stock-report-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
  }
  
  .stock-report-modal-close-btn {
    padding: 10px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .stock-report-modal-close-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  }
  
  .stock-report-modal-save-btn {
    padding: 10px 24px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-left: 12px;
  }
  
  .stock-report-modal-save-btn:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
  }
  
  .stock-report-modal-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }
  
  .stock-report-save-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  /* Edit Stock Modal */
  .stock-report-edit-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .stock-report-edit-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
  }
  
  .stock-report-edit-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
  }
  
  .stock-report-edit-modal-body {
    padding: 24px;
    flex: 1 1;
    overflow-y: auto;
  }
  
  .stock-report-edit-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .stock-report-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .stock-report-edit-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .stock-report-edit-form-row.stock-report-edit-form-full {
    flex-direction: column;
  }
  
  .stock-report-edit-field {
    flex: 1 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .stock-report-edit-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
  }
  
  .stock-report-edit-field input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
  }
  
  .stock-report-edit-field input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  .stock-report-edit-field input.stock-report-edit-readonly,
  .stock-report-edit-field input[readonly] {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
  }
  
  .stock-report-edit-field input.stock-report-edit-readonly:focus,
  .stock-report-edit-field input[readonly]:focus {
    border-color: #ddd;
    box-shadow: none;
  }
  
  .stock-report-edit-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }
  
  /* View Details Modal */
  .stock-report-view-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .stock-report-view-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
  }
  
  .stock-report-view-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
  }
  
  .stock-report-view-modal-body {
    padding: 24px;
    flex: 1 1;
  }
  
  .stock-report-view-table-container {
    overflow-x: auto;
  }
  
  .stock-report-view-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
  }
  
  .stock-report-view-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
  }
  
  .stock-report-view-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
  
  .stock-report-view-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
  }
  
  .stock-report-view-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .stock-report-view-table tbody tr:last-child {
    border-bottom: none;
  }
  
  .stock-report-view-table td {
    padding: 12px 16px;
    color: #555;
    font-size: 0.95rem;
    vertical-align: middle;
  }
  
  .stock-report-view-table td:first-child,
  .stock-report-view-table td:nth-child(2) {
    text-align: right;
    font-weight: 500;
  }
  
  .stock-report-view-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
  }
  
  /* Empty State */
  .stock-report-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .stock-report-empty p {
    color: #999;
    font-size: 1.1rem;
  }
  
  /* Print Styles */
  @media print {
    .stock-report-management {
      background-color: white;
      padding: 0;
    }
  
    .stock-report-header,
    .stock-report-product-section,
    .stock-report-filters button,
    .stock-report-check-btn,
    .stock-report-check-btn-inline,
    .stock-report-expand-btn,
    .stock-report-view-btn {
      display: none;
    }
  
    .stock-report-table-container {
      box-shadow: none;
    }
  
    .stock-report-table {
      min-width: 100%;
    }
  
    .stock-report-table thead {
      background-color: #f8f9fa !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .stock-report-header {
      flex-direction: column;
      gap: 16px;
      align-items: flex-start;
    }
  
    .stock-report-filters {
      width: 100%;
      flex-wrap: wrap;
    }
  
    .stock-report-product-select {
      flex: 1 1;
      min-width: 150px;
    }
  
    .stock-report-product-section {
      flex-direction: column;
      gap: 16px;
      align-items: flex-start;
    }
  
    .stock-report-table {
      font-size: 0.85rem;
    }
  
    .stock-report-table th,
    .stock-report-table td {
      padding: 10px 12px;
    }
  
    .stock-report-date-range{
      display: grid;
      grid-template-columns: 1fr 1fr;
    }
  }
  
  
.stock-quantity-release {
  padding: 20px;
  max-width: 100%;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.sqr-header {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sqr-header h2 {
  font-size: 1.6rem;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.sqr-header p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.sqr-error {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #f5c6cb;
}

.sqr-success {
  background: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #c3e6cb;
}

.sqr-search-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.sqr-search-mode {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}

.sqr-search-mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

.sqr-search-mode input[type="radio"] {
  cursor: pointer;
}

.sqr-search-wrap {
  position: relative;
  max-width: 400px;
}

.sqr-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.sqr-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.sqr-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0 0;
  padding: 0;
  list-style: none;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 10;
}

.sqr-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sqr-dropdown-item:last-child {
  border-bottom: none;
}

.sqr-dropdown-item:hover {
  background: #f0f7ff;
}

.sqr-dropdown-meta {
  font-size: 0.8rem;
  color: #666;
}

.sqr-dropdown-empty {
  cursor: default;
  color: #888;
  font-style: italic;
}

.sqr-dropdown-empty:hover {
  background: white;
}

.sqr-clear-selection {
  margin-top: 10px;
  padding: 8px 14px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.sqr-clear-selection:hover {
  background: #e0e0e0;
}

.sqr-loading {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sqr-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: sqr-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes sqr-spin {
  to {
    transform: rotate(360deg);
  }
}

.sqr-loading p,
.sqr-empty p {
  margin: 0;
  color: #666;
}

.sqr-empty {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sqr-table-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sqr-table-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #333;
}

.sqr-table-wrap {
  overflow-x: auto;
}

.sqr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

.sqr-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.sqr-table tbody tr:hover {
  background: #fafafa;
}

.sqr-cell-product {
  max-width: 220px;
  word-break: break-word;
}

.sqr-input-sales-order {
  width: 100%;
  min-width: 140px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.sqr-input-sales-order:focus {
  outline: none;
  border-color: #007bff;
}

.sqr-input-qty {
  width: 100px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.sqr-input-qty:focus {
  outline: none;
  border-color: #007bff;
}

.sqr-input-remark {
  width: 100%;
  min-width: 120px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.sqr-input-remark:focus {
  outline: none;
  border-color: #007bff;
}

.sqr-btn-release {
  padding: 8px 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.sqr-btn-release:hover:not(:disabled) {
  background: #0056b3;
}

.sqr-btn-release:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.stock-report-management {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* Header Section */
.stock-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-report-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.stock-report-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.stock-report-product-select{
  min-width: 0;
  max-width: 40px;
}

.stock-report-location-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #ddd;
  flex-wrap: wrap;
}

.stock-report-location-filters label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.stock-report-location-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 150px;
}

.stock-report-location-select:hover:not(:disabled) {
  border-color: #007bff;
}

.stock-report-location-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-report-location-select:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  color: #6c757d;
}

.stock-report-clear-location-btn {
  padding: 8px 12px;
  border: 1px solid #dc3545;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  background: white;
  color: #dc3545;
  margin-left: 8px;
}

.stock-report-clear-location-btn:hover {
  background-color: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.stock-report-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.stock-report-date-range label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.stock-report-date-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
}

.stock-report-date-input:hover {
  border-color: #007bff;
}

.stock-report-date-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-report-date-separator {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.stock-report-clear-date-btn {
  padding: 8px 12px;
  border: 1px solid #dc3545;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  background: white;
  color: #dc3545;
}

.stock-report-clear-date-btn:hover {
  background-color: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.stock-report-product-select {
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  color: #333;
  min-width: 200px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.stock-report-product-select:hover {
  border-color: #007bff;
}

.stock-report-product-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-report-export-btn,
.stock-report-print-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.stock-report-export-btn {
  background-color: #007bff;
  color: white;
}

.stock-report-export-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.stock-report-print-btn {
  background-color: #28a745;
  color: white;
}

.stock-report-print-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Product Section */
.stock-report-product-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.stock-report-product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-report-product-info label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-report-product-name {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.stock-report-check-btn {
  padding: 10px 24px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.stock-report-check-btn:hover {
  background-color: #138496;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.stock-report-back-btn {
  padding: 10px 24px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  margin-left: 12px;
}

.stock-report-back-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.stock-report-product-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stock-report-product-balance-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-report-hold-badge,
.stock-report-hold-badge-inline {
  padding: 8px 16px;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Error Message */
.stock-report-date-info {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #004085;
  font-size: 0.95rem;
}

.stock-report-date-info i {
  color: #0066cc;
}

.stock-report-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-report-error i {
  font-size: 1.1rem;
}

/* Loading State */
.stock-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.stock-report-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.stock-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.stock-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.stock-report-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.stock-report-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stock-report-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.stock-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.stock-report-table tbody tr:last-child {
  border-bottom: none;
}

.stock-report-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.stock-report-table td:first-child {
  font-weight: 600;
  color: #007bff;
}

/* Type Badge */
.stock-report-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.stock-report-type-badge.type-return {
  background-color: #ffc107;
  color: #856404;
}

.stock-report-type-badge.type-original {
  background-color: #17a2b8;
  color: #fff;
}

.stock-report-type-badge.type-ready {
  background-color: #28a745;
  color: #fff;
}

/* View Button */
.stock-report-view-btn {
  padding: 8px 12px;
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.stock-report-view-btn:hover {
  background-color: #dee2e6;
  border-color: #adb5bd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-report-view-btn i {
  font-size: 0.9rem;
}

.stock-report-edit-btn {
  padding: 8px 12px;
  background-color: #f0ad4e;
  color: white;
  border: 1px solid #eea236;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stock-report-edit-btn:hover {
  background-color: #ec971f;
  border-color: #d58512;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(240, 173, 78, 0.3);
}

.stock-report-edit-btn i {
  font-size: 0.9rem;
}

.stock-report-action-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.stock-report-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.stock-report-status-badge.status-approved {
  background-color: #28a745;
  color: #fff;
}

.stock-report-status-badge.status-rejected {
  background-color: #dc3545;
  color: #fff;
}

.stock-report-status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

/* Products List */
.stock-report-products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stock-report-products-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
}

.stock-report-products-header-spacer {
  width: 36px;
  flex-shrink: 0;
}

.stock-report-products-header-label {
  flex: 1 1;
  display: flex;
  align-items: center;
}

.stock-report-products-header-label span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-report-products-header-actions {
  min-width: 140px;
  flex-shrink: 0;
}

.stock-report-product-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  flex-wrap: wrap;
}

.stock-report-product-filter-row label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.stock-report-product-dropdown-btn {
  width: 100%;
  text-align: left;
  padding: 10px 35px 10px 12px;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stock-report-product-dropdown-btn:hover {
  border-color: #007bff;
}

.stock-report-product-dropdown-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1;
  min-width: 0;
}

.stock-report-product-dropdown-btn i {
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
}

.stock-report-product-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  display: flex;
  flex-direction: column;
}

.stock-report-product-dropdown-search-wrap {
  padding: 8px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.stock-report-product-dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.stock-report-product-dropdown-search:focus {
  border-color: #007bff;
}

.stock-report-product-dropdown-list {
  overflow-y: auto;
  max-height: 240px;
}

.stock-report-product-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.stock-report-product-dropdown-item:hover {
  background-color: #f5f5f5 !important;
}

.stock-report-product-dropdown-item i {
  color: #3b82f6;
  margin-left: 8px;
  font-size: 14px;
}

.stock-report-product-dropdown-empty {
  padding: 16px;
  color: #999;
  text-align: center;
  font-size: 14px;
  font-style: italic;
}

.stock-report-product-filter-count {
  font-size: 0.85rem;
  color: #6c757d;
  white-space: nowrap;
}

.stock-report-product-row {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  overflow-x: auto;
}

.stock-report-product-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.stock-report-product-header .stock-report-product-balance-badges {
  margin-left: auto;
}

.stock-report-expand-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  /*background-color: #007bff;*/
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  flex-shrink: 0;
}

.stock-report-expand-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.stock-report-product-info-inline {
  flex: 1 1;
  display: flex;
  align-items: center;
}

.stock-report-product-name-inline {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.stock-report-check-btn-inline {
  padding: 8px 20px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.stock-report-check-btn-inline:hover {
  background-color: #138496;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.stock-report-product-items {
  padding: 20px;
  background: white;
}

/* Ready Stock Report — detail modal: 5 label/value columns per row */
.ready-stock-detail-modal {
  max-width: min(1180px, calc(100vw - 40px)) !important;
  width: 100%;
}

.ready-stock-detail-body {
  padding: 16px 18px 24px;
}

.ready-stock-detail-section {
  margin-bottom: 22px;
}

.ready-stock-detail-section:last-child {
  margin-bottom: 0;
}

.ready-stock-detail-section-title {
  font-size: 13px;
  color: #5a5c69;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.ready-stock-detail-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 12px 14px;
  gap: 12px 14px;
  align-items: start;
}

.ready-stock-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  background: #f8f9fc;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}

.ready-stock-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #858796;
  line-height: 1.3;
}

.ready-stock-detail-value {
  font-size: 13px;
  color: #2d3748;
  font-weight: 500;
  word-break: break-word;
  line-height: 1.4;
}

@media (max-width: 992px) {
  .ready-stock-detail-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .ready-stock-detail-grid-5 {
    grid-template-columns: 1fr;
  }
}

/* Stock Modal */
.stock-report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.stock-report-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.stock-report-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.stock-report-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.stock-report-modal-body {
  padding: 24px;
  flex: 1 1;
}

.stock-report-categories {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stock-report-category-header {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  grid-gap: 16px;
  gap: 16px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-report-category-label-header {
  font-weight: 600;
}

.stock-report-category-value-header {
  text-align: right;
  font-weight: 600;
}

.stock-report-category-item {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  grid-gap: 16px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.stock-report-category-item:hover {
  background-color: #f8f9fa;
}

.stock-report-category-item:last-child {
  border-bottom: none;
}

.stock-report-category-label {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

.stock-report-category-value {
  font-size: 1rem;
  color: #495057;
  font-weight: 600;
  text-align: right;
}

.stock-report-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
}

.stock-report-modal-close-btn {
  padding: 10px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.stock-report-modal-close-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.stock-report-modal-save-btn {
  padding: 10px 24px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  margin-left: 12px;
}

.stock-report-modal-save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.stock-report-modal-save-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.stock-report-save-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Edit Stock Modal */
.stock-report-edit-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.stock-report-edit-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.stock-report-edit-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
  font-weight: 600;
}

.stock-report-edit-modal-body {
  padding: 24px;
  flex: 1 1;
  overflow-y: auto;
}

.stock-report-edit-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-report-edit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stock-report-edit-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.stock-report-edit-form-row.stock-report-edit-form-full {
  flex-direction: column;
}

.stock-report-edit-field {
  flex: 1 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-report-edit-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

.stock-report-edit-field input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.stock-report-edit-field input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-report-edit-field input.stock-report-edit-readonly,
.stock-report-edit-field input[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.stock-report-edit-field input.stock-report-edit-readonly:focus,
.stock-report-edit-field input[readonly]:focus {
  border-color: #ddd;
  box-shadow: none;
}

.stock-report-edit-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* View Details Modal */
.stock-report-view-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.stock-report-view-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.stock-report-view-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.stock-report-view-modal-body {
  padding: 24px;
  flex: 1 1;
}

.stock-report-view-table-container {
  overflow-x: auto;
}

.stock-report-view-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.stock-report-view-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.stock-report-view-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stock-report-view-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.stock-report-view-table tbody tr:hover {
  background-color: #f8f9fa;
}

.stock-report-view-table tbody tr:last-child {
  border-bottom: none;
}

.stock-report-view-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.stock-report-view-table td:first-child,
.stock-report-view-table td:nth-child(2) {
  text-align: right;
  font-weight: 500;
}

.stock-report-view-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
}

/* Empty State */
.stock-report-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stock-report-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* Print Styles */
@media print {
  .stock-report-management {
    background-color: white;
    padding: 0;
  }

  .stock-report-header,
  .stock-report-product-section,
  .stock-report-filters button,
  .stock-report-check-btn,
  .stock-report-check-btn-inline,
  .stock-report-expand-btn,
  .stock-report-view-btn {
    display: none;
  }

  .stock-report-table-container {
    box-shadow: none;
  }

  .stock-report-table {
    min-width: 100%;
  }

  .stock-report-table thead {
    background-color: #f8f9fa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .stock-report-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .stock-report-filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .stock-report-product-select {
    flex: 1 1;
    min-width: 150px;
  }

  .stock-report-product-section {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .stock-report-table {
    font-size: 0.85rem;
  }

  .stock-report-table th,
  .stock-report-table td {
    padding: 10px 12px;
  }

  .stock-report-date-range{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.stock-report-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.stock-report-pagination-btn {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-size: 0.9rem;
}

.stock-report-pagination-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.stock-report-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stock-report-pagination-info {
  font-size: 0.9rem;
  color: #4b5563;
}


.create-indent-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
  }
  
  .create-indent-header {
    margin-bottom: 30px;
  }
  
  .create-indent-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
  }
  
  .create-indent-header p {
    color: #666;
    font-size: 14px;
  }
  
  .create-indent-form {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .form-section {
    margin-bottom: 40px;
  }
  
  .form-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
  }
  
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .section-header h2 {
    margin-bottom: 0;
    border-bottom: none;
  }
  
  .action-buttons-group {
    display: flex;
    flex-direction: column;
  }

  .action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .add-item-btn {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    transition: background-color 0.2s;
  }
  
  .add-item-btn:hover:not(:disabled) {
    background-color: #1565c0;
  }
  
  .add-item-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
  }
  
  .form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
  }
  
  .required {
    color: #d32f2f;
  }
  
  .form-group input,
  .form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
  }
  
  .form-group input:focus,
  .form-group select:focus {
    outline: none;
    border-color: #1976d2;
  }
  
  .form-group input:disabled,
  .form-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
  }
  
  .form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: default;
  }

  .quantity-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .quantity-input-wrap input {
    flex: 0 1 120px;
  }

  .unit-hint {
    font-size: 13px;
    color: #666;
  }
  
  .indent-detail-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .detail-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
  }
  
  .remove-item-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    transition: background-color 0.2s;
  }
  
  .remove-item-btn:hover {
    background-color: #c62828;
  }
  
  .form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
  }
  
  .submit-btn {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
  }
  
  .submit-btn:hover:not(:disabled) {
    background-color: #1565c0;
  }
  
  .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  /* Confirmation Modal Styles */
  .view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }

  .view-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .view-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
  }

  .view-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
  }

  .modal-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
  }

  .modal-close-btn:hover {
    background: #e9ecef;
    color: #333;
  }

  .view-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1;
  }

  .confirmation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
  }

  .confirmation-table thead {
    background-color: #f5f5f5;
  }

  .confirmation-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
    font-size: 14px;
  }

  .confirmation-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 14px;
  }

  .confirmation-table tbody tr:hover {
    background-color: #f9f9f9;
  }

  .confirmation-table tbody tr:last-child td {
    border-bottom: none;
  }

  .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f9f9f9;
    border-radius: 0 0 8px 8px;
  }

  .modal-btn-close {
    background-color: #757575;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
  }

  .modal-btn-close:hover {
    background-color: #616161;
  }

  .modal-btn-confirm {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
  }

  .modal-btn-confirm:hover:not(:disabled) {
    background-color: #1565c0;
  }

  .modal-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  @media (max-width: 768px) {
    .form-row {
      grid-template-columns: 1fr;
    }
  
    .create-indent-container {
      padding: 15px;
    }
  
    .create-indent-form {
      padding: 20px;
    }

    .view-modal-content {
      max-width: 95%;
      max-height: 95vh;
    }

    .view-modal-body {
      padding: 20px;
    }

    .view-modal-header h2 {
      font-size: 1.2rem;
    }

    .confirmation-table th,
    .confirmation-table td {
      padding: 8px 12px;
      font-size: 13px;
    }
  }

  /* PPIC Create Indent — product source tabs (misc vs catalog) */
  .indent-product-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e8e8e8;
  }

  .indent-product-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
  }

  .indent-product-tab:hover {
    color: #333;
  }

  .indent-product-tab.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
  }

  .catalog-picker-hint {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .catalog-assign-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  .catalog-assign-row label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
  }

  .catalog-assign-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 140px;
  }

  .catalog-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
  }

  .catalog-product-table-wrap {
    overflow: auto;
    max-height: 300px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 24px;
    background: #fff;
  }

  .catalog-product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }

  .catalog-product-table thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ede9fe;
    color: #333;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
  }

  .catalog-product-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
  }

  .catalog-product-table tbody tr {
    cursor: pointer;
    transition: background-color 0.12s;
  }

  .catalog-product-table tbody tr:hover {
    background: #faf5ff;
  }

  .catalog-product-table tbody tr.catalog-row-selected {
    background: #ede9fe;
  }

  .catalog-line-product-display {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 14px;
    color: #333;
    min-height: 20px;
  }

  .catalog-line-placeholder {
    color: #999;
    font-style: italic;
  }

  .indent-detail-card.indent-detail-card--catalog-target {
    border-color: #a78bfa;
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.25);
  }

/* Store Dashboard Styles - Matching Sales Dashboard Style */
.store-dashboard {
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.store-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics Row */
.store-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.store-metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.store-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.store-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  background: linear-gradient(90deg, var(--metric-color, #3b82f6), transparent);
}

.store-metric-card-1 { --metric-color: #3b82f6; }
.store-metric-card-2 { --metric-color: #10b981; }
.store-metric-card-3 { --metric-color: #f59e0b; }
.store-metric-card-4 { --metric-color: #ec4899; }
.store-metric-card-5 { --metric-color: #f59e0b; }
.store-metric-card-6 { --metric-color: #10b981; }
.store-metric-card-7 { --metric-color: #06b6d4; }
.store-metric-card-8 { --metric-color: #3b82f6; }
.store-metric-card-9 { --metric-color: #06b6d4; }
.store-metric-card-10 { --metric-color: #f59e0b; }
.store-metric-card-11 { --metric-color: #10b981; }
.store-metric-card-12 { --metric-color: #f59e0b; }
.store-metric-card-13 { --metric-color: #10b981; }

.store-metric-card--highlight {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 42%);
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 15px;
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.bg-primary {
  background: #3b82f6;
}

.bg-success {
  background: #10b981;
}

.bg-warning {
  background: #f59e0b;
}

.bg-purple {
  background: #8b5cf6;
}

.bg-pink {
  background: #ec4899;
}

.bg-cyan {
  background: #06b6d4;
}

.bg-info {
  background: #06b6d4;
}

.text-warning {
  color: #f59e0b;
}

.text-success {
  color: #10b981;
}

.text-info {
  color: #06b6d4;
}

.text-primary {
  color: #3b82f6;
}

.metric-info {
  flex: 1 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.metric-chart {
  width: 80px;
  height: 40px;
  flex-shrink: 0;
}

.mini-chart {
  width: 100%;
  height: 100%;
  position: relative;
}

.mini-chart::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #3b82f6, transparent);
  background: linear-gradient(to top, var(--metric-color, #3b82f6), transparent);
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}

.metric-change {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.metric-change span {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.metric-change.positive span {
  background: #d1fae5;
  color: #065f46;
}

.metric-change.negative span {
  background: #fee2e2;
  color: #991b1b;
}

/* Charts Row */
.store-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.store-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.chart-value {
  text-align: right;
}

.chart-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.chart-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chart-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.chart-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  color: #64748b;
  cursor: pointer;
}

.chart-container {
  margin-top: 20px;
}

/* Revenue Growth Chart */
.revenue-line-chart {
  position: relative;
  height: 162px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Earning Statistic */
.earning-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.earning-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1;
  min-width: 120px;
  transition: all 0.2s ease;
}

.earning-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.earning-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.earning-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 2px;
}

.earning-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.bar-chart {
  position: relative;
  height: 200px;
}

.bar-chart-svg {
  width: 100%;
  height: 100%;
}

/* Campaigns / Store Status */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.campaign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.campaign-icon {
  font-size: 1.25rem;
}

.campaign-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.campaign-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.progress-bar-wrapper {
  flex: 1 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.campaign-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 35px;
  text-align: right;
}

/* Customer Overview / Store Overview */
.customer-overview-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.customer-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.donut-chart-container {
  flex: 1 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
}

.donut-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .store-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .store-dashboard {
    padding: 15px;
  }

  .store-metrics-row {
    grid-template-columns: 1fr;
  }

  .store-charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-value {
    text-align: left;
  }

  .earning-summary {
    flex-direction: column;
  }

  .customer-overview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }
}


.store-grinding-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.store-grinding-release-modal {
  max-width: 980px !important;
  width: calc(100% - 32px) !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.store-grinding-release-modal .job-work-view-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  border-bottom: none;
}

.store-grinding-release-modal .job-work-view-modal-header h2 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
}

.store-grinding-release-modal .job-work-view-modal-close {
  color: rgba(255, 255, 255, 0.9);
}

.store-grinding-release-modal .job-work-view-modal-body {
  padding: 20px 24px 24px;
  background: #f8fafc;
}

.store-grinding-info-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 18px;
}

.store-grinding-info-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.store-grinding-info-item label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.store-grinding-info-item span {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}

.store-grinding-products-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.store-grinding-products-card h3 {
  margin: 0;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.store-grinding-products-table-wrap {
  overflow-x: auto;
}

.store-grinding-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.store-grinding-products-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.store-grinding-products-table tbody td {
  padding: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.store-grinding-products-table tbody tr:last-child td {
  border-bottom: none;
}

.store-grinding-products-table tbody tr:hover {
  background: #fafbfc;
}

.store-grinding-product-name {
  font-weight: 600;
  color: #0f172a;
  max-width: 220px;
  line-height: 1.4;
}

.store-grinding-qty-cell {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.store-grinding-field {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.store-grinding-field:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.store-grinding-field:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.store-grinding-field-select {
  min-width: 220px;
  max-width: 280px;
  cursor: pointer;
}

.store-grinding-field-qty {
  width: 110px;
  min-width: 110px;
}

.store-grinding-release-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 96px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.store-grinding-release-btn:hover:not(:disabled) {
  background: #0f766e;
}

.store-grinding-release-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.store-grinding-status-partial {
  background: #fef3c7;
  color: #b45309;
}

.store-grinding-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 900px) {
  .store-grinding-info-card {
    grid-template-columns: 1fr;
  }

  .store-grinding-field-select {
    min-width: 180px;
    max-width: 100%;
  }
}

.store-indent-po-list-page {
  padding: 20px 24px;
  max-width: 100%;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.store-indent-po-list-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.store-indent-po-list-message {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0 0 20px 0;
  padding: 12px 16px;
  background: #e0f2fe;
  border-left: 4px solid #0ea5e9;
  border-radius: 4px;
}

.store-indent-po-list-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 16px;
  max-width: 520px;
}

.store-indent-po-list-search-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  flex-shrink: 0;
}

.store-indent-po-list-search-input-wrap {
  position: relative;
  flex: 1 1;
  min-width: 220px;
}

.store-indent-po-list-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

.store-indent-po-list-search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
}

.store-indent-po-list-search-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.store-indent-po-list-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.store-indent-po-list-search-clear:hover {
  color: #334155;
}

.store-indent-po-list-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.store-indent-po-list-tab {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.2s;
}

.store-indent-po-list-tab:hover {
  color: #334155;
  background: #f1f5f9;
}

.store-indent-po-list-tab.active {
  color: #1e293b;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.store-indent-po-list-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  border-radius: 6px;
  font-size: 0.95rem;
}

.store-indent-po-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.store-indent-po-list-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: store-indent-po-list-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes store-indent-po-list-spin {
  to { transform: rotate(360deg); }
}

.store-indent-po-list-table-wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  border: 1px solid #e2e8f0;
}

.store-indent-po-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  font-size: 0.9rem;
}

.store-indent-po-list-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.store-indent-po-list-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.store-indent-po-list-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.store-indent-po-list-table tbody tr:hover {
  background: #f8fafc;
}

.store-indent-po-list-table tbody tr.store-indent-po-list-selected {
  background: #e0f2fe;
  border-left: 3px solid #0ea5e9;
}

.store-indent-po-list-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.store-indent-po-list-check-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  transition: background 0.2s;
}

.store-indent-po-list-check-btn:hover {
  background: #1d4ed8;
}

.store-indent-po-list-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}

.store-indent-po-list-table td.store-indent-po-list-empty {
  text-align: center;
  color: #94a3b8;
  padding: 40px;
}

.store-indent-po-list-indent-link {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0;
}

.store-indent-po-list-indent-link:hover {
  color: #1d4ed8;
}

.store-indent-po-list-store-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.store-indent-po-list-not-received {
  color: #dc2626;
  font-size: 0.9rem;
}

.store-indent-po-list-received {
  color: #16a34a;
  font-size: 0.9rem;
  font-weight: 500;
}

.store-indent-po-list-rejected-status {
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fef2f2;
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* Status Badge */
.store-indent-po-list-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.store-indent-po-list-status-badge.requested {
  background: #fef3c7;
  color: #92400e;
}

.store-indent-po-list-status-badge.pending {
  background: #fce7f3;
  color: #9d174d;
}

.store-indent-po-list-status-badge.processing {
  background: #fef3c7;
  color: #92400e;
}

.store-indent-po-list-status-badge.complete {
  background: #d1fae5;
  color: #065f46;
}

.store-indent-po-list-status-badge.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.store-indent-po-list-receive-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #16a34a;
  color: #fff;
  transition: background 0.2s;
}

.store-indent-po-list-receive-btn:hover:not(:disabled) {
  background: #15803d;
}

.store-indent-po-list-receive-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.store-indent-po-list-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Details Section */
.store-indent-po-list-details {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-top: 24px;
}

.store-indent-po-list-details-title {
  margin: 0;
  padding: 16px 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

/* Rejection Banner Styles */
.store-indent-po-list-rejection-banner {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  margin: 0 20px 16px 20px;
  background: #fef2f2;
  border: 2px solid #fca5a5;
  border-radius: 8px;
  align-items: center;
}

.store-indent-po-list-rejection-icon {
  font-size: 2rem;
  color: #dc2626;
  flex-shrink: 0;
}

.store-indent-po-list-rejection-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #991b1b;
}

.store-indent-po-list-rejection-info p {
  margin: 4px 0;
  font-size: 0.9rem;
  color: #7f1d1d;
}

.store-indent-po-list-rejection-info p strong {
  font-weight: 600;
  color: #991b1b;
}

.store-indent-po-list-details-table-wrap {
  overflow-x: auto;
}

.store-indent-po-list-details-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1600px;
  font-size: 0.9rem;
}

.store-indent-po-list-details-table thead {
  background: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
}

.store-indent-po-list-details-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.store-indent-po-list-details-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.store-indent-po-list-details-table tbody tr:hover {
  background: #f8fafc;
}

.store-indent-po-list-table td.store-indent-po-list-products,
.store-indent-po-list-details-table td.store-indent-po-list-products {
  white-space: normal;
  min-width: 12rem;
  max-width: 28rem;
}

.store-indent-po-list-details-table td {
  padding: 10px 14px;
  color: #475569;
  vertical-align: middle;
}


@media (max-width: 768px) {
  .store-indent-po-list-page {
    padding: 16px;
  }

  .store-indent-po-list-title {
    font-size: 1.5rem;
  }

  .store-indent-po-list-tab {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .store-indent-po-list-table {
    min-width: 800px;
    font-size: 0.85rem;
  }

  .store-indent-po-list-details-table {
    min-width: 1400px;
    font-size: 0.85rem;
  }

  .store-indent-po-list-table th,
  .store-indent-po-list-table td,
  .store-indent-po-list-details-table th,
  .store-indent-po-list-details-table td {
    padding: 8px 10px;
  }
}

/* Store Management Entry Styles */

.store-management-entry {
  padding: 20px 30px;
  max-width: 2000px;
  margin: 0 auto;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.store-entry-header {
  margin-bottom: 30px;
}

.store-entry-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.store-entry-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-entry-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-entry-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(16.666% - 14px);
  display: flex;
  min-width: 150px;
  flex-direction: column;
}

/* Grade field at end: spans three columns */
.form-group.form-group-span-3 {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: calc(50% - 10px);
  min-width: 200px;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.form-group input[type="text"]:not(.readonly-input):not([readonly]),
.form-group textarea {
  text-transform: uppercase;
}

.form-group input[type="text"].readonly-input,
.form-group input[type="number"].readonly-input,
.form-group input[type="text"][readonly],
.form-group input[type="number"][readonly],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select {
  text-transform: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.readonly-input {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #666;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.save-btn {
  padding: 12px 30px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.save-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

/* Approved/Rejected Entries Section */
.approved-rejected-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.toggle-list-btn {
  padding: 8px 16px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-list-btn:hover {
  background-color: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.entries-list-container {
  margin-top: 20px;
}

.entries-loading,
.entries-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.entries-table-container {
  overflow-x: auto;
}

.entries-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.entries-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.entries-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.entries-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.entries-table tbody tr:hover {
  background-color: #f8f9fa;
}

.entries-table tbody tr:last-child {
  border-bottom: none;
}

.entries-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.entries-table td:first-child {
  font-weight: 600;
  color: #667eea;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.status-approved {
  background-color: #28a745;
  color: #fff;
}

.status-badge.status-rejected {
  background-color: #dc3545;
  color: #fff;
}

.status-badge.status-pending {
  background-color: #ffc107;
  color: #856404;
}

.qc-remark-cell {
  max-width: 200px;
}

.remark-text {
  display: block;
  color: #333;
  font-size: 0.9rem;
  line-height: 1.4;
}

.no-remark {
  color: #999;
  font-style: italic;
  font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-management-entry {
    padding: 15px;
  }

  .store-entry-form {
    padding: 20px;
  }

  .form-group {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .form-group {
    flex: 1 1 100%;
  }

  .save-btn {
    width: 100%;
  }
}


.store-po-list-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 30px 40px;
  box-sizing: border-box;
}

.store-po-list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.store-po-list-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #c5d4c0;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.store-po-list-tab:hover {
  background: #f1f8f4;
  border-color: #a5c9a0;
}

.store-po-list-tab.active {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
}

.store-po-list-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 0.85rem;
  font-weight: 700;
}

.store-po-list-tab.active .store-po-list-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.store-po-modal-line-tabs {
  margin-top: 4px;
  margin-bottom: 12px;
}

.store-po-list-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.store-po-list-controls .search-input {
  flex: 1 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid #c5d4c0;
  border-radius: 6px;
  font-size: 14px;
}

.store-po-search-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #2e7d32;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.store-po-search-btn:hover:not(:disabled) {
  background: #256628;
}

.store-po-search-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.store-po-reset-btn {
  padding: 10px 20px;
  border: 1px solid #c5d4c0;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.store-po-reset-btn:hover:not(:disabled) {
  background: #f8faf8;
}

.store-po-reset-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.store-po-order-block {
  margin-bottom: 24px;
  border: 1px solid #d4e6d0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.store-po-order-header {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-gap: 10px 20px;
  gap: 10px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
  border-bottom: 1px solid #c8e6c9;
  font-size: 13px;
}

.store-po-order-header strong {
  display: block;
  color: #2e7d32;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.store-po-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.store-po-products-table th {
  text-align: left;
  padding: 10px 12px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  color: #374151;
}

.store-po-products-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.store-po-products-table tr:last-child td {
  border-bottom: none;
}

.store-po-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e3f2fd;
  color: #1565c0;
}

.store-po-badge.misc {
  background: #fff3e0;
  color: #e65100;
}

.store-po-empty {
  text-align: center;
  padding: 48px 16px;
  color: #6b7280;
}

.store-po-meta-count {
  font-size: 14px;
  color: #374151;
  margin-bottom: 16px;
}

.store-po-products-table th.store-po-col-action,
.store-po-products-table td.store-po-col-action {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.store-po-view-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #059669;
  color: #fff;
  transition: background 0.15s ease;
}

.store-po-view-btn:hover {
  background: #047857;
}

.store-po-view-btn:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

.store-po-view-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 5000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

.store-po-view-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.store-po-view-modal--wide {
  max-width: min(960px, calc(100vw - 40px));
}

.store-po-view-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
}

.store-po-view-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.store-po-view-modal-close {
  border: none;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.store-po-view-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.store-po-view-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
}

.store-po-view-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 14px;
}

.store-po-view-grid {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  grid-gap: 8px 16px;
  gap: 8px 16px;
  font-size: 13px;
}

.store-po-view-grid dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.store-po-view-grid dd {
  margin: 0;
  color: #0f172a;
  word-break: break-word;
}

.store-po-view-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  cursor: pointer;
}

.store-po-view-back:hover {
  background: #d1fae5;
}

.store-po-view-lines-heading {
  margin: 22px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
}

.store-po-view-empty-lines {
  margin: 0 0 8px;
  font-size: 14px;
  color: #6b7280;
}

.store-po-view-lines-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.store-po-view-lines-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 13px;
}

.store-po-view-lines-table th,
.store-po-view-lines-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  text-align: left;
}

.store-po-view-lines-table th {
  background: #fafafa;
  font-weight: 600;
  color: #374151;
}

.store-po-view-lines-table tr:last-child td {
  border-bottom: none;
}

.store-po-view-lines-table .store-po-col-action {
  text-align: right;
}

.store-po-view-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #64748b;
}

.store-po-store-entry-dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.store-po-store-entry-pending {
  color: #6b7280;
  font-size: 13px;
}

.store-po-store-entry-msg {
  font-size: 13px;
  font-weight: 600;
  color: #047857;
}

.store-po-header-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.store-po-store-entry-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #0d9488;
  color: #fff;
  transition: background 0.15s ease;
}

.store-po-store-entry-btn:hover:not(:disabled) {
  background: #0f766e;
}

.store-po-store-entry-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.store-po-line-store-entry-cell {
  min-width: 118px;
  vertical-align: middle;
}

.store-po-store-entry-btn--line {
  white-space: nowrap;
}

.store-po-state-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 280px;
}

.store-po-state-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #059669;
  border-radius: 6px;
  cursor: pointer;
  background: #ecfdf5;
  color: #047857;
  white-space: nowrap;
}

.store-po-state-btn:hover {
  background: #d1fae5;
}

.store-po-line-actions-cell {
  vertical-align: middle;
  text-align: right;
}

.store-po-line-done {
  font-size: 12px;
  font-weight: 600;
  color: #047857;
}

.store-po-line-allocate-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 300px;
  margin-left: auto;
}

.store-po-partial-qty-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.store-po-partial-qty-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.store-po-partial-qty-caption {
  flex-shrink: 0;
  max-width: 96px;
  line-height: 1.2;
}

.store-po-partial-qty-hint {
  margin: 0;
  max-width: 280px;
  font-size: 10px;
  line-height: 1.35;
  color: #64748b;
  text-align: right;
  align-self: flex-end;
}

.store-po-partial-qty-input {
  width: 88px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #c5d4c0;
  border-radius: 6px;
  text-align: right;
}

.store-po-partial-qty-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.store-po-exceeded-hint {
  margin: 0;
  max-width: 220px;
  font-size: 10px;
  line-height: 1.35;
  color: #b45309;
}

.store-po-exceeded-summary {
  color: #b45309;
  font-weight: 600;
}

.store-po-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.store-po-store-nav-hint {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  align-self: flex-end;
}

.store-po-state-btn-group--compact {
  max-width: 300px;
}

.store-po-store-nav-btn {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  background: #f8fafc;
  color: #475569;
  white-space: nowrap;
}

.store-po-store-nav-btn:hover {
  background: #f1f5f9;
}

.store-po-state-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.store-po-misc-location-modal {
  max-width: 420px;
  width: 100%;
}

.store-po-misc-location-body {
  padding: 16px 20px 20px;
}

.store-po-misc-location-summary {
  margin: 0 0 16px;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

.store-po-misc-location-field {
  margin-bottom: 14px;
}

.store-po-misc-location-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2e7d32;
  margin-bottom: 6px;
}

.store-po-misc-location-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c5d4c0;
  border-radius: 6px;
  font-size: 14px;
}

.store-po-misc-location-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.store-po-misc-location-save {
  padding: 8px 16px;
  font-size: 13px;
}

.store-po-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 12px 0;
}

.store-po-pagination-btn {
  padding: 8px 16px;
  border: 1px solid #c5d4c0;
  border-radius: 6px;
  background: #fff;
  color: #2e7d32;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.store-po-pagination-btn:hover:not(:disabled) {
  background: #f0f7ee;
}

.store-po-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.store-po-pagination-info {
  font-size: 13px;
  color: #374151;
}

.store-qpr-page {
  padding: 18px;
}

.store-qpr-header h2 {
  margin: 0 0 6px;
}

.store-qpr-header p {
  margin: 0 0 14px;
  color: #666;
}

.store-qpr-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.store-qpr-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.store-qpr-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.store-qpr-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.store-qpr-table-header h3 {
  margin: 0;
}

.store-qpr-search {
  display: flex;
  gap: 8px;
}

.store-qpr-search input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  min-width: 280px;
}

.store-qpr-search button,
.store-qpr-pagination button {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  background: #6b7280;
  color: #fff;
  font-size: 13px;
}

.store-qpr-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.store-qpr-table {
  width: 100%;
  border-collapse: collapse;
}

.store-qpr-table th,
.store-qpr-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-size: 13px;
}

.store-qpr-table th {
  background: #f8fafc;
  font-weight: 600;
}

.store-qpr-empty {
  text-align: center !important;
  color: #64748b;
  padding: 20px !important;
}

.store-qpr-release-input {
  width: 120px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}

.store-qpr-action-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
}

.store-qpr-action-btn.done {
  background: #16a34a;
  cursor: not-allowed;
}

.store-qpr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.store-qpr-modal {
  width: 760px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

.store-qpr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.store-qpr-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.store-qpr-close-btn {
  border: none;
  background: #e5e7eb;
  color: #111827;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.store-qpr-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.store-qpr-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-qpr-modal-field label {
  font-size: 12px;
  font-weight: 600;
}

.store-qpr-modal-field input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.store-qpr-modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.store-qpr-modal-actions button {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
}

.store-qpr-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 960px) {
  .store-qpr-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-qpr-search {
    width: 100%;
  }

  .store-qpr-search input {
    min-width: 0;
    width: 100%;
  }
}

.store-received-consignment-docs {
  padding: 20px;
}

.store-received-consignment-docs-header h2 {
  margin: 0 0 6px 0;
  color: #1f2937;
}

.store-received-consignment-docs-header p {
  margin: 0 0 16px 0;
  color: #6b7280;
}

.store-received-consignment-docs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-weight: 600;
  color: #374151;
}

.filter-group input,
.filter-group select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
}

.filter-group small {
  color: #6b7280;
  font-size: 12px;
}

.store-received-consignment-docs-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.store-received-consignment-docs-loading,
.store-received-consignment-docs-empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 18px;
  color: #6b7280;
  text-align: center;
}

.store-received-consignment-docs-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.selected-consignment-banner {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
}

.store-received-consignment-docs-table {
  width: 100%;
  border-collapse: collapse;
}

.store-received-consignment-docs-table th,
.store-received-consignment-docs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  font-size: 14px;
}

.store-received-consignment-docs-table th {
  background: #f8fafc;
  color: #111827;
  font-weight: 600;
}

.document-view-link {
  color: #1f2937;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.document-view-link:hover {
  background-color: #e5e7eb;
  color: #111827;
}

/* Received Consignment Management Styles - Full Width */

.received-consignment-management {
    padding: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  
  .received-consignment-header {
    margin-bottom: 30px;
    width: 100%;
  }
  
  .received-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .received-consignment-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
  }
  
  .received-consignment-header p {
    font-size: 1rem;
    color: #666;
  }
  
  .received-region-banner {
    margin: -10px 0 20px;
    padding: 10px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #1e3a5f;
  }
  
  .consignment-status-btn {
    padding: 12px 24px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    white-space: nowrap;
  }
  
  .consignment-status-btn:hover:not(:disabled) {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }
  
  .consignment-status-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  }
  
  .consignment-status-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
  }
  
  .consignment-status-btn i {
    font-size: 1rem;
  }
  
  /* Loading State */
  .received-consignment-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 400px;
  }
  
  .received-consignment-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .received-consignment-loading p {
    color: #666;
    font-size: 1rem;
  }
  
  /* Selector Section */
  .received-consignment-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
  }
  
  .received-selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 250px;
    flex: 1 1;
    max-width: 100%;
  }
  
  .received-selector-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
  }
  
  .received-warehouse-select,
  .received-consignment-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
  }

.received-searchable-dropdown {
  position: relative;
  width: 100%;
}

.received-searchable-dropdown-btn {
  width: 100%;
  min-width: 0;
  min-width: initial;
  text-align: left;
  padding: 10px 35px 10px 12px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  position: relative;
  transition: all 0.3s ease;
}

.received-searchable-dropdown-btn:hover:not(:disabled) {
  border-color: #667eea;
}

.received-searchable-dropdown-btn:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.received-searchable-dropdown-btn:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.received-searchable-dropdown-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 20px;
}

.received-searchable-dropdown-btn i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  pointer-events: none;
}

.received-searchable-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
  max-height: 300px;
  display: flex;
  flex-direction: column;
}

.received-searchable-dropdown-search-wrap {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.received-searchable-dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.received-searchable-dropdown-options {
  overflow-y: auto;
  max-height: 240px;
}

.received-searchable-dropdown-empty {
  padding: 16px;
  color: #999;
  text-align: center;
  font-size: 14px;
}

.received-searchable-dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.received-searchable-dropdown-option:hover {
  background-color: #f5f5f5;
}

.received-searchable-dropdown-option.selected {
  background-color: #e3f2fd;
}

.received-searchable-dropdown-option.selected i {
  color: #3b82f6;
  margin-left: 8px;
  font-size: 14px;
}
  
  .received-warehouse-select:hover,
  .received-consignment-select:hover {
    border-color: #667eea;
  }
  
  .received-warehouse-select:focus,
  .received-consignment-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  }
  
  .received-warehouse-select:disabled,
  .received-consignment-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  .received-warehouse-fixed-note {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
  }
  
  .received-location-hint {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 8px 0 16px 0;
  }
  
  .received-location-hint i {
    margin-right: 6px;
  }
  
  /* Messages */
  .received-consignment-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .received-consignment-error i {
    font-size: 1.2rem;
  }
  
  .received-consignment-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .received-consignment-success i {
    font-size: 1.2rem;
  }
  
  /* Empty State */
  .received-consignment-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
  }
  
  /* Products Section */
  .received-consignment-products {
    margin-top: 30px;
    width: 100%;
  }
  
  .received-consignment-products h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
  }
  
  .received-products-table-container {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }
  
  .received-products-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    box-sizing: border-box;
  }
  
  .received-products-table thead {
    background-color: #f8f9fa;
  }
  
  .received-products-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
    font-size: 0.95rem;
  }
  
  .received-products-table th:first-child {
    text-align: center;
    width: 60px;
  }
  
  .received-products-table td:first-child {
    text-align: center;
    font-weight: 500;
    color: #666;
  }
  
  .received-products-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    color: #555;
  }
  
  .received-products-table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .received-products-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  /* Received Quantity Input */
  .received-qty-input {
    width: 120px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: right;
    transition: all 0.3s ease;
  }
  
  .received-qty-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  }
  
  .received-qty-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  /* Balance Quantity Input - same styling as Received Qty */
  .balance-qty-input {
    width: 120px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: right;
    transition: all 0.3s ease;
  }
  
  .balance-qty-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  }
  
  .balance-qty-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  /* Balance Quantity - read-only (auto-calculated) */
  .balance-qty-readonly {
    display: inline-block;
    min-width: 80px;
    padding: 8px 10px;
    font-size: 0.95rem;
    text-align: right;
    color: #374151;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: default;
  }
  
  /* Receive Status Button (Blue) */
  .receive-status-btn {
    padding: 8px 16px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  
  .receive-status-btn:hover:not(:disabled) {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  }
  
  .receive-status-btn:active:not(:disabled) {
    transform: translateY(0);
  }
  
  .receive-status-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
  }
  
  .receive-status-btn.received {
    background-color: #10b981;
  }
  
  .receive-status-btn.received:hover:not(:disabled) {
    background-color: #059669;
  }
  
  .receive-status-btn i {
    font-size: 0.9rem;
  }
  
  /* Received Status Badge */
  .received-status-badge {
    padding: 8px 16px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  
  .received-status-badge i {
    font-size: 0.9rem;
  }
  
  /* Receive Button (for quantity update) */
  .received-receive-btn {
    padding: 8px 16px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .received-receive-btn:hover:not(:disabled) {
    background-color: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  }
  
  .received-receive-btn:active:not(:disabled) {
    transform: translateY(0);
  }
  
  .received-receive-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  .received-receive-btn i {
    font-size: 0.9rem;
  }
  
  /* Actions Section */
  .received-consignment-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .receive-all-btn {
    padding: 12px 24px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    text-align: left;
  }
  
  .receive-all-btn:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }
  
  .receive-all-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  }
  
  .receive-all-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
  }
  
  .receive-all-btn i {
    font-size: 1rem;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .received-consignment-management {
      padding: 15px;
      width: 100%;
      max-width: 100%;
    }
  
    .received-consignment-header h2 {
      font-size: 1.5rem;
    }
  
    .received-header-content {
      flex-direction: column;
      align-items: stretch;
    }
  
    .consignment-status-btn {
      width: 100%;
      justify-content: center;
    }
  
    .received-consignment-selector {
      flex-direction: column;
      width: 100%;
    }
  
    .received-selector-group {
      min-width: 100%;
      width: 100%;
    }
  
    .received-warehouse-select,
  .received-consignment-select {
      width: 100%;
    }
  
    .received-products-table-container {
      font-size: 0.9rem;
      width: 100%;
      overflow-x: auto;
    }
  
    .received-products-table {
      min-width: 1000px;
    }
  
    .received-products-table th,
    .received-products-table td {
      padding: 10px 12px;
      font-size: 0.85rem;
    }
  
    .received-qty-input {
      width: 100%;
      max-width: 120px;
    }
  
    .received-consignment-actions {
      justify-content: stretch;
    }
  
    .receive-all-btn {
      width: 100%;
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .received-consignment-management {
      padding: 10px;
    }
  
    .received-consignment-header h2 {
      font-size: 1.3rem;
    }
  
    .received-consignment-header p {
      font-size: 0.9rem;
    }
  
    .received-products-table {
      min-width: 800px;
      font-size: 0.8rem;
    }
  
    .received-products-table th,
    .received-products-table td {
      padding: 8px 10px;
      font-size: 0.8rem;
    }
  
    .receive-status-btn {
      padding: 6px 12px;
      font-size: 0.85rem;
    }
  }
  
  
.store-sample-report {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.store-sample-report-header {
  margin-bottom: 30px;
}

.store-sample-report-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.store-sample-report-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Search filters */
.store-sample-report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.store-sample-report-filters input {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 140px;
}

.store-sample-report-filters input:focus {
  outline: none;
  border-color: #0b5ed7;
  box-shadow: 0 0 0 2px rgba(11, 94, 215, 0.2);
}

.store-sample-report-search-btn {
  padding: 8px 14px;
  background: #0b5ed7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.store-sample-report-search-btn:hover {
  background: #0a52c2;
}

/* Pagination */
.store-sample-report-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.store-sample-report-pagination button {
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.store-sample-report-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.store-sample-report-pagination button:not(:disabled):hover {
  background: #f8fafc;
  border-color: #0b5ed7;
  color: #0b5ed7;
}

.store-sample-report-pagination span {
  font-size: 0.9rem;
  color: #64748b;
}

/* Tabs */
.store-sample-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.store-sample-report-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.store-sample-report-tab:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.store-sample-report-tab.active {
  background: #0b5ed7;
  border-color: #0b5ed7;
  color: #ffffff;
}

.store-sample-report-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
}

.store-sample-report-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Messages */
.store-sample-report-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.store-sample-report-error i {
  font-size: 1.1rem;
}

/* Loading State */
.store-sample-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.store-sample-report-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Table Container */
.store-sample-report-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.store-sample-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1300px;
}

.store-sample-report-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.store-sample-report-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.store-sample-report-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.store-sample-report-table tbody tr:hover {
  background-color: #f8f9fa;
}

.store-sample-report-table tbody tr.sent-to-qc-row {
  background-color: #f0f8ff;
}

.store-sample-report-table tbody tr.sent-to-qc-row:hover {
  background-color: #e6f3ff;
}

.store-sample-report-table tbody tr.qc-approved-row {
  background-color: #f0fff4;
}

.store-sample-report-table tbody tr.qc-approved-row:hover {
  background-color: #e6ffe6;
}

.store-sample-report-table tbody tr.qc-rejected-row {
  background-color: #fff5f5;
}

.store-sample-report-table tbody tr.qc-rejected-row:hover {
  background-color: #ffecec;
}

.store-sample-report-table tbody tr:last-child {
  border-bottom: none;
}

.store-sample-report-table td {
  padding: 14px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

.store-sample-report-table td:first-child {
  font-weight: 600;
  color: #007bff;
  position: relative;
}

.approved-badge {
  margin-left: 8px;
  color: #28a745;
  font-size: 0.85rem;
  vertical-align: middle;
}

.sent-badge {
  margin-left: 8px;
  color: #007bff;
  font-size: 0.85rem;
  vertical-align: middle;
}

.rejected-badge {
  margin-left: 8px;
  color: #dc3545;
  font-size: 0.85rem;
  vertical-align: middle;
}

.approved-badge i,
.sent-badge i,
.rejected-badge i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Sent Date/Time Column */
.sent-date-cell {
  color: #007bff;
  font-weight: 500;
}

.sent-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #007bff;
  font-size: 0.9rem;
}

.sent-date-time i {
  font-size: 0.8rem;
  color: #007bff;
}

.not-sent {
  color: #999;
  font-style: italic;
}

/* QC Approved Status Column */
.qc-approved-cell {
  color: #28a745;
  font-weight: 500;
}

.qc-rejected-cell {
  color: #dc3545;
  font-weight: 500;
}

.qc-pending-cell {
  color: #ffc107;
  font-weight: 500;
}

.approved-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 600;
}

.approved-status i {
  font-size: 0.85rem;
  color: #28a745;
}

.pending-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffc107;
  font-size: 0.9rem;
  font-weight: 600;
}

.pending-status i {
  font-size: 0.85rem;
  color: #ffc107;
}

/* Rejected Status */
.rejected-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dc3545;
  font-size: 0.9rem;
  font-weight: 600;
}

.rejected-status i {
  font-size: 0.85rem;
  color: #dc3545;
}

/* QC Approved Date/Time Column */
.qc-approved-date-cell {
  color: #28a745;
  font-weight: 500;
}

.qc-rejected-date-cell {
  color: #dc3545;
  font-weight: 500;
}

.approved-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #28a745;
  font-size: 0.9rem;
}

.approved-date-time i {
  font-size: 0.8rem;
  color: #28a745;
}

.rejected-date-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dc3545;
  font-size: 0.9rem;
}

.rejected-date-time i {
  font-size: 0.8rem;
  color: #dc3545;
}

.not-approved {
  color: #999;
  font-style: italic;
}

/* Empty State */
.store-sample-report-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.store-sample-report-empty p {
  color: #999;
  font-size: 1.1rem;
}

/* View Button */
.view-details-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-details-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.view-details-btn:active {
  transform: translateY(0);
}

.view-details-btn i {
  font-size: 0.85rem;
}

/* Retest Column */
.retest-yes-cell {
  color: #6f42c1;
  font-weight: 600;
}

.retest-no-cell {
  color: #999;
}

.retest-yes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6f42c1;
  font-size: 0.9rem;
  font-weight: 700;
}

.retest-yes i {
  font-size: 0.85rem;
  color: #6f42c1;
}

.retest-no {
  font-style: italic;
  color: #999;
}

/* Mark Retest Button */
.mark-retest-btn {
  padding: 8px 12px;
  background-color: #6f42c1;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mark-retest-btn:hover {
  background-color: #5a35a6;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(111, 66, 193, 0.25);
}

.mark-retest-btn:active {
  transform: translateY(0);
}

.mark-retest-btn i {
  font-size: 0.85rem;
}

/* View Modal Styles */
.view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.view-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.view-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #333;
}

.view-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1 1;
}

.view-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.view-modal-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.view-modal-error {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.view-modal-error i {
  font-size: 1.1rem;
}

/* View Section Styles */
.view-section {
  margin-bottom: 30px;
}

.view-section:last-child {
  margin-bottom: 0;
}

.view-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.view-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.view-detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.view-detail-item.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.view-detail-item label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-detail-item p {
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

/* View Details Table */
.view-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.view-details-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-details-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.view-details-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.view-details-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.view-details-table tbody tr:hover {
  background-color: #f8f9fa;
}

.view-details-table tbody tr:last-child {
  border-bottom: none;
}

.view-details-table td {
  padding: 12px 16px;
  color: #555;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-sample-report {
    padding: 15px;
  }

  .store-sample-report-header h2 {
    font-size: 1.5rem;
  }

  .store-sample-report-table {
    font-size: 0.85rem;
  }

  .store-sample-report-table th,
  .store-sample-report-table td {
    padding: 10px 12px;
  }

  .view-modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .view-modal-body {
    padding: 20px;
  }

  .view-detail-grid {
    grid-template-columns: 1fr;
  }

  .view-details-table {
    font-size: 0.85rem;
  }

  .view-details-table th,
  .view-details-table td {
    padding: 8px 12px;
  }
}


.all-tickets-page {
    padding: 20px 24px;
    max-width: 100%;
    background: #f8fafc;
    min-height: calc(100vh - 100px);
  }
  
  .all-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .all-tickets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 4px 0 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  
  .all-tickets-tab:hover {
    color: #1e293b;
  }
  
  .all-tickets-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
  }
  
  .all-tickets-tab-content {
    min-height: 200px;
  }
  
  .all-tickets-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
  }
  
  .all-tickets-create-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }
  
  .all-tickets-create-btn:hover {
    background: #1d4ed8;
    color: #fff;
  }
  
  .all-tickets-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
  }
  
  .all-tickets-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  
  .all-tickets-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
  }
  
  .all-tickets-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: all-tickets-spin 0.7s linear infinite;
    margin-bottom: 12px;
  }
  
  @keyframes all-tickets-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  .all-tickets-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .all-tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  
  .all-tickets-table th,
  .all-tickets-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .all-tickets-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
  }
  
  .all-tickets-table tbody tr:hover {
    background: #f8fafc;
  }
  
  .all-tickets-table tbody tr:last-child td {
    border-bottom: none;
  }
  
  .all-tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .all-tickets-status-open {
    background: #dbeafe;
    color: #1d4ed8;
  }
  
  .all-tickets-status-in_progress,
  .all-tickets-status-inprogress {
    background: #fef3c7;
    color: #b45309;
  }
  
  .all-tickets-status-on_hold {
    background: #f3e8ff;
    color: #7c3aed;
  }
  
  .all-tickets-status-resolved,
  .all-tickets-status-closed {
    background: #dcfce7;
    color: #15803d;
  }
  
  .all-tickets-status-cancelled,
  .all-tickets-status-rejected {
    background: #fee2e2;
    color: #dc2626;
  }
  
.unigoods-container {
  padding: 30px;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.unigoods-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.unigoods-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.error-message {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message i {
  font-size: 1.2rem;
}

.success-message {
  background-color: #d1fae5;
  color: #059669;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-message i {
  font-size: 1.2rem;
}

.add-item-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.add-item-section h3 {
  font-size: 1.3rem;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 600;
}

.item-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.form-group.full-width {
  grid-column-start: 1; grid-column-end: -1;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 24px;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.btn-add {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: -webkit-fit-content;
  width: fit-content;
  transition: background-color 0.2s;
}

.btn-add:hover {
  background-color: #2563eb;
}

.btn-add i {
  font-size: 0.9rem;
}

.items-list-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.items-list-section h3 {
  font-size: 1.3rem;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 600;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #64748b;
}

.loading-spinner {
  border: 3px solid #e2e8f0;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-data i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

.no-data p {
  font-size: 1rem;
  margin: 0;
}

.items-table-wrapper {
  overflow-x: auto;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.items-table thead {
  background-color: #f1f5f9;
}

.items-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
  border-bottom: 2px solid #e2e8f0;
}

.items-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.items-table tbody tr:hover {
  background-color: #f8fafc;
}

.items-table tbody tr:last-child td {
  border-bottom: none;
}

.edit-input,
.edit-select {
  padding: 8px 10px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  min-width: 120px;
}

.edit-input:focus,
.edit-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-edit,
.btn-save,
.btn-cancel {
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-right: 5px;
}

.btn-edit {
  color: #3b82f6;
}

.btn-edit:hover {
  background-color: #eff6ff;
}

.btn-save {
  color: #059669;
}

.btn-save:hover {
  background-color: #d1fae5;
}

.btn-cancel {
  color: #dc2626;
}

.btn-cancel:hover {
  background-color: #fee2e2;
}

.btn-edit i,
.btn-save i,
.btn-cancel i {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .unigoods-container {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .items-table-wrapper {
    overflow-x: scroll;
  }

  .items-table {
    font-size: 0.85rem;
    min-width: 800px;
  }

  .items-table th,
  .items-table td {
    padding: 8px 10px;
  }
}

.unigoods-category-container {
  padding: 30px;
  background-color: #f8fafc;
  min-height: calc(100vh - 100px);
}

.unigoods-category-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.unigoods-category-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.error-message {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message i {
  font-size: 1.2rem;
}

.success-message {
  background-color: #d1fae5;
  color: #059669;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-message i {
  font-size: 1.2rem;
}

.add-category-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.add-category-section h3 {
  font-size: 1.3rem;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 600;
}

.category-form {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.form-group {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  max-width: 400px;
  width: 100%;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-add {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
  height: -webkit-fit-content;
  height: fit-content;
}

.btn-add:hover {
  background-color: #2563eb;
}

.btn-add i {
  font-size: 0.9rem;
}

.categories-list-section {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.categories-list-section h3 {
  font-size: 1.3rem;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 600;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #64748b;
}

.loading-spinner {
  border: 3px solid #e2e8f0;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-data i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

.no-data p {
  font-size: 1rem;
  margin: 0;
}

.categories-table-wrapper {
  overflow-x: auto;
}

.categories-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.categories-table thead {
  background-color: #f1f5f9;
}

.categories-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
  border-bottom: 2px solid #e2e8f0;
}

.categories-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.categories-table tbody tr:hover {
  background-color: #f8fafc;
}

.categories-table tbody tr:last-child td {
  border-bottom: none;
}

.edit-input {
  padding: 8px 10px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  font-size: 0.95rem;
  width: 100%;
  max-width: 300px;
}

.edit-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-edit,
.btn-save,
.btn-cancel {
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-right: 5px;
}

.btn-edit {
  color: #3b82f6;
}

.btn-edit:hover {
  background-color: #eff6ff;
}

.btn-save {
  color: #059669;
}

.btn-save:hover {
  background-color: #d1fae5;
}

.btn-cancel {
  color: #dc2626;
}

.btn-cancel:hover {
  background-color: #fee2e2;
}

.btn-edit i,
.btn-save i,
.btn-cancel i {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .unigoods-category-container {
    padding: 20px;
  }

  .category-form {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-add {
    width: 100%;
    justify-content: center;
  }

  .categories-table-wrapper {
    overflow-x: scroll;
  }

  .categories-table {
    font-size: 0.85rem;
  }

  .categories-table th,
  .categories-table td {
    padding: 8px 10px;
  }
}

.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-bell__trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #4a5568;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.notification-bell__trigger:hover,
.notification-bell__trigger--open {
  background: rgba(25, 118, 210, 0.08);
  color: #1976d2;
}

.notification-bell__trigger i {
  font-size: 1.1rem;
}

.notification-bell__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.notification-bell__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  width: min(360px, calc(100vw - 24px));
  max-height: 420px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.notification-bell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
}

.notification-bell__header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a202c;
}

.notification-bell__header span {
  font-size: 0.75rem;
  color: #718096;
}

.notification-bell__list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-bell__item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: default;
}

.notification-bell__item--unread {
  background: #f0f7ff;
}

.notification-bell__item-title {
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a202c;
  line-height: 1.35;
}

.notification-bell__item-summary {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: #4a5568;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-bell__item-meta {
  font-size: 0.72rem;
  color: #94a3b8;
}

.notification-bell__empty,
.notification-bell__loading,
.notification-bell__error {
  padding: 24px 14px;
  text-align: center;
  font-size: 0.85rem;
  color: #718096;
}

.notification-bell__error {
  color: #c53030;
}

