@import url("https://use.typekit.net/emh3okj.css");

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #FF9F1C;
  --text-color: #011627;
  --background-color: #FDFFFC;
  --blue-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --subtle-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --card-shadow: 0 10px 25px rgba(0,0,0,0.15);
  --hover-shadow: 0 20px 40px rgba(0,0,0,0.2);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
}

/* RESET AND BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  background: var(--background-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* LOGIN PAGE BODY OVERRIDE */
body.login-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  width: 100% !important;
  height: 100% !important;
}

.login-page .main-content,
.login-page .framewrap {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* UNIFIED HEADER SYSTEM */
.unified-header {
  background: var(--blue-gradient);
  border-bottom: 1px solid #1d4ed8;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
}

.logo-section {
  flex-shrink: 0;
}

.logo-section a {
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-section a:hover {
  transform: scale(1.05);
}

.header-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
}

/* PAGE-SPECIFIC CONTROLS */
.page-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.page-controls > div {
  display: none;
}

/* Order Management Controls */
.order-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  backdrop-filter: blur(10px);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: white;
  color: #1e40af;
  border-color: white;
  font-weight: 600;
}

.search-box {
  position: relative;
}

.search-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 8px;
  width: 300px;
  font-size: 0.875rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  width: 16px;
  height: 16px;
}

/* Products Page Controls */
.products-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.add-product-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.add-product-btn:hover {
  background: #e68a00;
  transform: translateY(-1px);
}

/* Login Controls */
.login-prompt {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.login-btn, .signup-btn {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.login-btn:hover, .signup-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* USER MENU */
.user-menu {
  position: relative;
  flex-shrink: 0;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.user-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.user-icon {
  font-size: 1.2rem;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  margin-top: 0.5rem;
  overflow: hidden;
}

.user-menu:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.1;
  transition: left 0.3s;
}

.dropdown-item:hover::before {
  left: 100%;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: var(--primary-color);
  transform: translateX(5px);
}

.dropdown-item i {
  width: 16px;
  font-size: 0.875rem;
}

/* MAIN CONTENT STRUCTURE */
.framewrap {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  width: 100%;
  padding: 2rem;
}

.main-content.constrained {
  max-width: 1400px;
  margin: 0 auto;
}

.main-content.full-width {
  max-width: none;
}

.main {
  width: 100%;
  margin: 2rem auto;
  flex: 1;
}

.eightywrap, .div_tabs, .div_toolbox {
  width: 80%;
  margin: 0 auto;
}

/* TYPOGRAPHY */
h1, h2, h3 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 800;
}

.user {
  font-size: 0.9rem;
  vertical-align: middle;
}

/* HOME PAGE OPTION CARDS */
.optionwrap {
  width: 100%;
  margin: 2rem auto;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 1rem;
}

.optiona {
  text-decoration: none;
  color: var(--text-color);
  flex: 0 1 300px;
  min-width: 280px;
}

.optiona i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  display: block;
}

.options {
  width: 100%;
  padding: 2.5rem 2rem;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.options::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--blue-gradient);
}

.options h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.options p {
  font-size: 1rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.options:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-color);
}

.options:hover i {
  color: var(--secondary-color);
  transform: scale(1.1);
}

/* ORDER MANAGEMENT STYLES */
.loading {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.orders-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
}

.order-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.order-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.order-card.expanded {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  border-color: var(--primary-color);
  transform: translateY(-4px);
}

.order-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.order-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s;
}

.order-header:hover::before {
  left: 100%;
}

.order-header:hover {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.order-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.order-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.order-id {
  font-weight: 600;
  color: #1e293b;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.order-summary {
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.customer-name {
  font-weight: 500;
  color: #374151;
}

.order-value {
  font-weight: 600;
  color: #059669;
  background: linear-gradient(135deg, #059669, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.expand-icon {
  width: 20px;
  height: 20px;
  color: #6b7280;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.order-card.expanded .expand-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.status-new, .status-unfulfilled {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.status-fulfilled {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 1px solid #86efac;
}

.status-hold {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  color: #92400e;
  border: 1px solid #fbbf24;
}

.order-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}

.order-card.expanded .order-body {
  max-height: 2000px;
  padding: 1.5rem;
}

.editable-field {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 1.5rem;
  position: relative;
}

.editable-field:hover {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.editable-field.editing {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.editable-field.saving {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  border-color: var(--warning-color);
}

.editable-field.shopify-field::after {
  content: "🛍️";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.7rem;
  opacity: 0.6;
}

.field-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.select-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.order-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.5rem;
}

.shipping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.shipping-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shipping-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
}

.packing-list {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.fulfillment-info {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #a7f3d0;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

.fulfillment-info.empty {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-color: #e5e7eb;
  color: #6b7280;
}

.order-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.action-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.action-btn::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;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.action-btn.secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
}

.action-btn.secondary:hover {
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

.action-btn.danger {
  background: linear-gradient(135deg, var(--error-color), #b91c1c);
}

.action-btn.danger:hover {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* GROUPED ORDER STYLES */
.order-group {
  margin-bottom: 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-group:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}

.order-group.expanded {
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.order-group.expanded .group-body {
  display: block;
}

.group-header {
  background: var(--primary-gradient);
  color: white;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.group-header::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;
}

.group-header:hover::before {
  left: 100%;
}

.group-header:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.group-header:focus {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

.group-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.group-indicator {
  font-weight: 600;
  font-size: 0.875rem;
  opacity: 0.9;
}

.group-id {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fef3c7;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.group-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.group-value {
  background: rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  backdrop-filter: blur(10px);
}

.group-body {
  display: none;
  padding: 1rem;
  background: #f8fafc;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.group-header .expand-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.order-group.expanded .group-header .expand-icon {
  transform: rotate(180deg);
}

.split-order-wrapper {
  margin-bottom: 1rem;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.split-order-wrapper:last-child {
  margin-bottom: 0;
}

.split-order-wrapper + .split-order-wrapper {
  border-top: 2px solid #e5e7eb;
  margin-top: 1rem;
}

.split-order-wrapper:hover {
  transform: translateX(4px);
}

.split-indicator {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.split-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s;
}

.split-indicator:hover::before {
  left: 100%;
}

.parent-order .split-indicator {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
  border-left-color: var(--success-color);
}

.split-order .split-indicator {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  color: #92400e;
  border-left-color: var(--secondary-color);
}

.grouped-order {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: white;
}

.grouped-order:hover {
  box-shadow: none !important;
  border: none !important;
  transform: none !important;
}

.grouped-order .order-header {
  background: white !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #e2e8f0;
}

.grouped-order .order-header::before {
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
}

.grouped-order .order-body {
  padding-top: 0.75rem;
  background: white;
}

.parent-order::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--success-color), transparent);
  opacity: 0.4;
}

/* Split Order Badges */
.order-id span[style*="background: #8b5cf6"] {
  background: linear-gradient(135deg, var(--secondary-color), #e68a00) !important;
  color: white !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 4px !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* MODERN LOGIN SCREEN */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 2rem;
  margin: 0;
  overflow: hidden;
  z-index: 9999;
  gap: 2rem;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.login-container img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
  cursor: pointer;
  animation: logoFadeIn 0.8s ease-out;
}

.login-container img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.3));
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
  margin: 0;
  animation: cardSlideUp 0.8s ease-out 0.2s both;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--blue-gradient);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #6b7280;
  font-size: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.form-field {
  position: relative;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-field input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  color: #1f2937;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.form-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
}

.form-field input::placeholder {
  color: #9ca3af;
}

.form-field.error input {
  border-color: var(--error-color);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success-message {
  color: var(--success-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-btn {
  width: 100%;
  background: var(--blue-gradient);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.login-btn:active {
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-btn.loading {
  pointer-events: none;
}

.login-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(241, 245, 249, 0.8);
  position: relative;
  z-index: 2;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.login-footer a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background: var(--primary-gradient);
  transition: all 0.3s ease;
}

.login-footer a:hover::after {
  width: 100%;
  left: 0;
}

.login-footer a:hover {
  color: var(--primary-hover);
}

.forgot-password {
  text-align: right;
  margin-top: 0.5rem;
}

.forgot-password a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.forgot-password a:hover {
  color: var(--primary-color);
}

@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TOAST NOTIFICATIONS */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--primary-gradient);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 1100 !important;
  transform: translateX(400px);
  transition: transform 0.4s ease;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: linear-gradient(135deg, var(--success-color), #10b981);
}

.toast.error {
  background: linear-gradient(135deg, var(--error-color), #ef4444);
}

.toast.warning {
  background: linear-gradient(135deg, var(--warning-color), #fbbf24);
}

.toast.split-success {
  background: linear-gradient(135deg, var(--secondary-color), #e68a00);
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 600px;
  margin: 5% auto;
  border-radius: 16px;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.modal-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-weight: 600;
  color: #1e293b;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.25rem;
}

.close-btn:hover {
  color: var(--error-color);
  background: rgba(239, 68, 68, 0.1);
}

.modal-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

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

/* CONNECTION STATUS */
.connection-status {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.connection-status.connected {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 1px solid var(--success-color);
}

.connection-status.disconnected {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid #f87171;
}

/* GENERAL FORM ELEMENTS */
.main-content input:not([type]), 
.main-content input[type="text"], 
.main-content input[type="password"], 
.main-content input[type="email"],
.main-content input[type="number"] {
  font-size: 1rem;
  padding: 0.75rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  color: #1f2937;
  transition: all 0.3s ease;
}

.main-content input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.main-content input::placeholder {
  color: #9ca3af;
}

.main-content label {
  font-weight: 600;
}

.main-content button:not(.login-btn):not(.filter-btn):not(.action-btn):not(.add-product-btn) {
  font-size: 1rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.main-content button:not(.login-btn):not(.filter-btn):not(.action-btn):not(.add-product-btn)::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;
}

.main-content button:not(.login-btn):not(.filter-btn):not(.action-btn):not(.add-product-btn):hover::before {
  left: 100%;
}

.main-content button:not(.login-btn):not(.filter-btn):not(.action-btn):not(.add-product-btn):hover {
  background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.main-content select {
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.main-content select:focus,
textarea:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* UTILITY CLASSES */
.green {
  background: linear-gradient(135deg, rgb(218, 247, 166), #bbf7d0) !important;
}

.amber {
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.9), #fed7aa) !important;
}

.red {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), #fecaca) !important;
}

.blue {
  background: var(--primary-gradient) !important;
  color: #fff !important;
}

.blueshade {
  background: linear-gradient(135deg, var(--primary-hover), #1d4ed8) !important;
  color: #fff !important;
  font-weight: 600;
}

.shade {
  background: linear-gradient(135deg, var(--secondary-color), #e68a00) !important;
  font-weight: 600;
}

.boldfont {
  font-weight: 800;
}

.hidden {
  display: none;
}

.status {
  text-align: center;
}

/* TABLES */
.datatable {
  width: 100% !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sorting_1 {
  color: #000 !important;
}

/* TOOLBOX */
.toolbox {
  width: 100%;
  text-align: right;
  margin-bottom: 0.1rem;
  margin-right: 0;
  padding-right: 0;
}

/* DIALOGS */
.dia {
  display: none;
  max-width: 80vw;
  max-height: 80vh;
  width: 100%;
  margin: 20px;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.dia textarea {
  width: 80%;
  max-width: 80%;
  min-height: 100px;
  max-height: 50vh;
  margin: 10px auto;
  display: block;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.dia textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* OVERLAYS AND LOADING */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  background-size: 400% 400%;
  opacity: 0.8;
  z-index: 10000;
  animation: Pulsate 4s linear infinite;
  backdrop-filter: blur(4px);
}

@keyframes Pulsate {
  0% {
    opacity: 0.6;
    background-position: 0% 50%;
  }
  50% {
    opacity: 0.9;
    background-position: 100% 50%;
  }
  100% {
    opacity: 0.6;
    background-position: 0% 50%;
  }
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 1024px) {
  .header-container {
    gap: 1rem;
  }

  .search-input {
    width: 250px;
  }

  .filter-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .unified-header {
    padding: 0.75rem 1rem;
  }

  .header-container {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .logo-section {
    order: 1;
  }

  .header-logo {
    height: 28px;
  }

  .header-content {
    order: 2;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .page-controls {
    gap: 0.75rem;
    align-items: stretch;
  }

  .order-filters {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
  }

  .search-box {
    width: 100%;
  }

  .search-input {
    width: 100%;
    padding: 0.375rem 0.75rem 0.375rem 2rem;
    font-size: 0.8rem;
  }

  .search-icon {
    width: 14px;
    height: 14px;
    left: 0.5rem;
  }

  .user-menu {
    align-self: center;
  }

  .user-trigger {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }

  .user-name {
    font-size: 0.8rem;
  }

  .user-icon {
    font-size: 1rem;
  }

  .dropdown-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-10px);
    font-size: 0.85rem;
  }

  .user-menu:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }

  .dropdown-item {
    padding: 0.5rem 0.75rem;
  }

  .add-product-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }

  .login-btn, .signup-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }

  .eightywrap, .div_tabs, .div_toolbox {
    width: 100%;
  }

  .optionwrap {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
  }

  .optiona {
    width: 100%;
    max-width: 400px;
    min-width: auto;
  }

  .options {
    width: 100%;
    padding: 2rem 1.5rem;
    margin: 0;
  }

  .optiona i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .options h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .options p {
    font-size: 0.9rem;
  }

  .toolbox {
    width: 100%;
    text-align: center !important;
  }

  .main-content.full-width {
    padding: 1rem 0.5rem;
  }

  .orders-grid {
    gap: 0.75rem;
    padding: 0 0.25rem;
  }

  .order-card {
    margin-bottom: 0.75rem;
    border-radius: 8px;
  }

  .order-header {
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .order-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .order-header-right {
    justify-content: space-between;
    align-items: center;
  }

  .order-id {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  .order-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    font-size: 0.8rem;
  }

  .customer-name {
    font-size: 0.85rem;
  }

  .order-value {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .order-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  .order-card.expanded .order-body {
    padding: 1rem 0.75rem;
  }

  .order-section {
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .shipping-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .shipping-item {
    gap: 0.25rem;
  }

  .shipping-label {
    font-size: 0.7rem;
  }

  .editable-field {
    padding: 0.5rem;
    font-size: 0.85rem;
    min-height: 2rem;
  }

  .packing-list {
    padding: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .fulfillment-info {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .order-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
  }

  .action-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  /* Group responsiveness */
  .group-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .group-header {
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .group-id {
    font-size: 1rem;
  }
  
  .group-count, .group-value {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .group-body {
    padding: 0.75rem;
  }
  
  .split-indicator {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .split-order-wrapper {
    margin-bottom: 0.75rem;
  }
  
  .split-order-wrapper + .split-order-wrapper {
    margin-top: 0.75rem;
  }

  /* Login responsiveness */
  .login-container {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .login-container img {
    max-width: 150px;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .unified-header {
    padding: 0.5rem 0.75rem;
  }

  .header-container {
    gap: 0.5rem;
  }

  .header-logo {
    height: 24px;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
    padding: 0.25rem 0.375rem;
    font-size: 0.7rem;
    min-width: 0;
  }

  .order-filters {
    width: 100%;
    gap: 0.25rem;
  }

  .search-input {
    padding: 0.25rem 0.5rem 0.25rem 1.75rem;
    font-size: 0.75rem;
  }

  .search-icon {
    width: 12px;
    height: 12px;
    left: 0.375rem;
  }

  .user-trigger {
    padding: 0.25rem 0.5rem;
  }

  .user-name {
    font-size: 0.75rem;
  }

  .user-icon {
    font-size: 0.9rem;
  }

  .optionwrap {
    padding: 0 0.5rem;
  }

  .optiona {
    max-width: none;
  }

  .options {
    padding: 1.5rem 1rem;
  }

  .optiona i {
    font-size: 2rem;
  }

  .options h2 {
    font-size: 1.1rem;
  }

  .options p {
    font-size: 0.85rem;
  }

  .main-content.full-width {
    padding: 0.75rem 0.25rem;
  }

  .orders-grid {
    gap: 0.5rem;
    padding: 0;
  }

  .order-header {
    padding: 0.5rem;
  }

  .order-id {
    font-size: 0.9rem;
  }

  .order-summary {
    font-size: 0.75rem;
  }

  .customer-name {
    font-size: 0.8rem;
  }

  .order-value {
    font-size: 0.85rem;
  }

  .order-status {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .order-card.expanded .order-body {
    padding: 0.75rem 0.5rem;
  }

  .section-title {
    font-size: 0.75rem;
  }

  .editable-field {
    padding: 0.4rem;
    font-size: 0.8rem;
    min-height: 1.8rem;
  }

  .shipping-label {
    font-size: 0.65rem;
  }

  .packing-list, .fulfillment-info {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .action-btn {
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  /* Group mobile styles */
  .group-header {
    padding: 0.5rem;
  }
  
  .group-info {
    gap: 0.25rem;
  }
  
  .group-id {
    font-size: 0.9rem;
  }
  
  .group-indicator {
    font-size: 0.8rem;
  }
  
  .group-count, .group-value {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }
  
  .group-body {
    padding: 0.5rem;
  }
  
  .split-indicator {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .grouped-order .order-header {
    padding: 0.5rem;
  }
  
  .grouped-order .order-card.expanded .order-body {
    padding: 0.75rem 0.5rem;
  }

  /* Mobile login adjustments */
  .login-container {
    padding: 1rem;
    gap: 1rem;
  }
  
  .login-container img {
    max-width: 120px;
  }
  
  .login-card {
    padding: 1.5rem 1rem;
  }

  .login-title {
    font-size: 1.5rem;
  }
}

/* PRINT STYLES */
@media print {
  .order-group {
    border: 1px solid #000;
    break-inside: avoid;
  }
  
  .group-header {
    background: #f0f0f0 !important;
    color: #000 !important;
  }
  
  .split-indicator {
    background: #f9f9f9 !important;
    color: #000 !important;
  }
  
  .unified-header,
  .connection-status,
  .toast {
    display: none !important;
  }
}

/* Mobile-First CSS Enhancements for Order Management */

/* Pull to Refresh Styles */
.pull-to-refresh {
  position: fixed;
  top: -100px;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: white;
  z-index: 1000;
  transition: transform 0.3s ease;
  backdrop-filter: blur(10px);
}

.pull-to-refresh-content {
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.pull-to-refresh.ready {
  background: var(--success-color);
}

/* Quick Actions Menu */
.quick-actions-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  animation: slideInUp 0.3s ease;
}

.quick-actions-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.quick-actions-content {
  position: relative;
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.quick-actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.quick-actions-header span {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color);
}

.quick-actions-close {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.quick-actions-close:hover {
  background: #e2e8f0;
  color: var(--error-color);
}

.quick-actions-buttons {
  display: grid;
  gap: 0.75rem;
}

.quick-action-btn {
  background: white;
  border: 2px solid #e2e8f0;
  color: var(--text-color);
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-action-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.quick-action-btn.primary {
  background: var(--primary-gradient);
  color: white;
  border-color: var(--primary-color);
}

.quick-action-btn.primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile Indicators */
.mobile-indicators {
  display: none;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-top: 0.5rem;
}

/* Order Selection Enhancements */
.order-selection {
  position: relative;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.order-selection input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  transform: scale(1.2);
}

.order-card.selected {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-color: var(--primary-color);
  transform: translateX(8px);
}

.order-card.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
  border-radius: 0 4px 4px 0;
}

/* Batch Controls */
.batch-controls {
  position: sticky;
  top: calc(var(--header-height, 80px) + 1rem);
  background: var(--primary-gradient);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(10px);
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.batch-info {
  font-weight: 600;
  font-size: 1rem;
}

.batch-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.batch-actions .action-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.batch-actions .action-btn:hover {
  transform: translateY(-1px);
}

/* Enhanced Mobile Modal Styles */
.modal.mobile-optimized {
  padding: 0;
}

.modal-content.mobile-modal {
  margin: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  border-radius: 0;
}

.modal-body.mobile-scrollable {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}

.modal-actions.mobile-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.modal-actions.mobile-actions .action-btn {
  flex: 1;
  text-align: center;
  min-height: 50px;
}

/* Virtual Keyboard Support */
body.keyboard-open {
  padding-bottom: var(--keyboard-height, 0px);
}

body.keyboard-open .modal-content {
  height: calc(100vh - var(--keyboard-height, 0px));
}

/* Touch Feedback */
.action-btn:active,
.filter-btn:active,
.editable-field:active {
  transform: scale(0.95);
  opacity: 0.8;
}

/* Enhanced Order Card Mobile Styles */
@media (max-width: 768px) {
  .mobile-indicators {
    display: block;
  }
  
  .order-header {
    position: relative;
    overflow: hidden;
  }
  
  .order-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1));
    pointer-events: none;
  }
  
  .order-selection {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .order-actions {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 2px solid #e2e8f0;
    margin: 0 -1.5rem -1.5rem;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  
  .action-btn {
    min-height: 50px;
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  /* Service Dropdown Mobile Enhancements */
  .service-dropdown-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .service-dropdown {
    font-size: 1rem;
    padding: 0.75rem;
    min-height: 50px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
  }
  
  .service-refresh-btn {
    width: 100%;
    min-height: 50px;
    font-size: 1rem;
    border-radius: 8px;
  }
  
  /* Editable Field Mobile Enhancements */
  .editable-field {
    min-height: 50px;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    position: relative;
  }
  
  .editable-field::after {
    content: '✎';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  
  .editable-field:hover::after {
    opacity: 1;
  }
  
  .editable-field.editing::after {
    display: none;
  }
  
  .field-input,
  .select-input {
    font-size: 1rem;
    padding: 0.75rem;
    min-height: 50px;
    border-radius: 8px;
  }
  
  /* Split Order Mobile Improvements */
  .split-indicator {
    padding: 0.75rem;
    font-size: 0.9rem;
    border-left-width: 6px;
    position: relative;
  }
  
  .split-indicator::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: 0.5;
  }
  
  /* Group Header Mobile Enhancements */
  .group-header {
    min-height: 70px;
    padding: 1rem;
  }
  
  .group-info {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .group-count,
  .group-value {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
  }
  
  /* Loading States */
  .loading {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }
  
  .spinner {
    width: 50px;
    height: 50px;
    border-width: 5px;
  }
  
  /* Toast Mobile Positioning */
  .toast {
    top: auto;
    bottom: 2rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.9rem;
    text-align: center;
    transform: translateY(100px);
  }
  
  .toast.show {
    transform: translateY(0);
  }
  
  /* Connection Status Mobile */
  .connection-status {
    bottom: auto;
    top: calc(var(--header-height, 80px) + 1rem);
    left: 1rem;
    right: 1rem;
    text-align: center;
    border-radius: 8px;
  }
}

/* Ultra-small screens (< 480px) */
@media (max-width: 480px) {
  .quick-actions-content {
    padding: 1rem;
    border-radius: 16px 16px 0 0;
  }
  
  .quick-actions-buttons {
    gap: 0.5rem;
  }
  
  .quick-action-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 50px;
  }
  
  .batch-controls {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .batch-actions {
    justify-content: center;
  }
  
  .batch-actions .action-btn {
    flex: 1;
    min-width: 0;
  }
  
  .order-card.expanded .order-body {
    padding: 1rem 0.75rem;
  }
  
  .order-actions {
    padding: 0.75rem;
    margin: 0 -0.75rem -0.75rem;
  }
  
  .action-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .service-dropdown,
  .field-input,
  .select-input {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
  
  .editable-field {
    padding: 0.6rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .split-indicator {
    padding: 0.6rem;
    font-size: 0.85rem;
  }
  
  .group-header {
    padding: 0.75rem;
    min-height: 60px;
  }
  
  .toast {
    bottom: 1rem;
    padding: 0.75rem;
    font-size: 0.85rem;
  }
}

/* Landscape orientation optimizations */
@media (orientation: landscape) and (max-height: 600px) {
  .modal-content.mobile-modal {
    height: 100vh;
    overflow-y: auto;
  }
  
  .modal-body.mobile-scrollable {
    max-height: calc(100vh - 120px);
  }
  
  .quick-actions-content {
    max-height: 80vh;
  }
  
  .batch-controls {
    position: relative;
    top: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .order-card {
    border-width: 2px;
  }
  
  .quick-action-btn {
    border-width: 3px;
  }
  
  .batch-controls {
    border: 2px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .quick-actions-menu {
    animation: none;
  }
  
  .pull-to-refresh,
  .quick-actions-content,
  .order-card,
  .action-btn {
    transition: none;
  }
  
  .spinner {
    animation: none;
    border-top-color: var(--primary-color);
  }
}

/* Focus visible styles for keyboard navigation */
.order-card:focus-visible,
.order-group:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 12px;
}

.action-btn:focus-visible,
.quick-action-btn:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  .quick-actions-content {
    background: #1f2937;
    color: #f9fafb;
  }
  
  .quick-actions-close {
    background: #374151;
    color: #9ca3af;
  }
  
  .quick-action-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }
  
  .modal-actions.mobile-actions {
    background: #1f2937;
    border-color: #374151;
  }
}

/* Fulfilled Order Cards */
.order-card.fulfilled-order {
  opacity: 0.85;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #bbf7d0;
  position: relative;
}

.order-card.fulfilled-order::before {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.2rem;
  opacity: 0.6;
  z-index: 1;
}

.order-card.fulfilled-order:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

/* Context Banner for Fulfilled Orders in Unfulfilled View */
.fulfillment-context-banner {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-bottom: 2px solid #93c5fd;
  padding: 0.75rem;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.fulfillment-context-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.context-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #1e40af;
  font-weight: 500;
}

.context-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.context-text {
  flex: 1;
}

.context-status {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Fulfilled Selection Indicator */
.fulfilled-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 2px solid #86efac;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  opacity: 0.8;
}

.fulfilled-indicator {
  font-size: 1.2rem;
  color: #166534;
}

/* Readonly Service Display */
.readonly-service-display {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  border-radius: 8px;
  color: #6b7280;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Group Status Indicators */
.group-status {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.group-status-fulfilled {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #065f46 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

.group-status-partial {
  background: rgba(249, 115, 22, 0.2) !important;
  color: #9a3412 !important;
  border-color: rgba(249, 115, 22, 0.4) !important;
}

.group-status-pending {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #1e40af !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}

.group-fulfillment-ratio {
  background: rgba(255, 255, 255, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  font-family: 'Monaco', 'Courier New', monospace;
}

/* Enhanced Group Styling Based on Status */
.order-group.group-status-fulfilled {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.order-group.group-status-fulfilled .group-header {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.order-group.group-status-partial {
  border-color: #fb923c;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.order-group.group-status-partial .group-header {
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

.order-group.group-status-pending .group-header {
  background: var(--primary-gradient);
}

/* Split Order Wrapper Status */
.split-order-wrapper.fulfilled-wrapper {
  opacity: 0.85;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #bbf7d0;
}

.split-order-wrapper.fulfilled-wrapper:hover {
  opacity: 0.95;
}

.split-indicator.fulfilled-indicator {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #065f46;
  border-left-color: #16a34a;
}

/* Disabled Action Buttons */
.action-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.action-btn.disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .fulfillment-context-banner {
    padding: 0.5rem;
  }
  
  .context-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .context-text {
    font-size: 0.8rem;
  }
  
  .context-status {
    align-self: flex-end;
    font-size: 0.7rem;
  }
  
  .group-info {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .group-status,
  .group-fulfillment-ratio {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }
  
  .fulfilled-selection {
    min-width: 40px;
    min-height: 40px;
  }
  
  .fulfilled-indicator {
    font-size: 1rem;
  }
  
  .order-card.fulfilled-order::before {
    font-size: 1rem;
    top: 0.25rem;
    right: 0.25rem;
  }
}

@media (max-width: 480px) {
  .context-banner-content {
    font-size: 0.8rem;
  }
  
  .context-text {
    font-size: 0.75rem;
  }
  
  .context-status {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
  
  .group-status,
  .group-fulfillment-ratio {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }
  
  .split-indicator {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  
  .readonly-service-display {
    font-size: 0.8rem;
    padding: 0.4rem;
  }
}

/* Animation for Context Banner */
@keyframes contextSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fulfillment-context-banner {
  animation: contextSlideIn 0.3s ease-out;
}

/* Print Styles */
@media print {
  .fulfillment-context-banner {
    background: #f0f0f0 !important;
    color: #000 !important;
    border-color: #ccc !important;
  }
  
  .order-card.fulfilled-order {
    background: #f9f9f9 !important;
    border: 1px solid #ccc !important;
  }
  
  .split-indicator.fulfilled-indicator {
    background: #f0f0f0 !important;
    color: #000 !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .order-card.fulfilled-order {
    border-width: 3px;
    border-color: #16a34a;
  }
  
  .fulfillment-context-banner {
    border-width: 3px;
    border-color: #3b82f6;
  }
  
  .context-status {
    border: 2px solid #1d4ed8;
  }
  
  .group-status {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .fulfillment-context-banner {
    animation: none;
  }
  
  .order-card.fulfilled-order,
  .split-order-wrapper.fulfilled-wrapper {
    transition: none;
  }
}

/* ADDITION FOR PRODUCTS */

.filter-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.filter-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.filter-select option {
    background: #1e40af;
    color: white;
}

/* Product Cards - Simplified and Fixed */
.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.product-card.expanded {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.product-card.needs-setup {
    border-left: 4px solid #f59e0b;
}

.product-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.product-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.product-header:hover {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.product-selection {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.product-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transform: scale(1.2);
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.product-image-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #9ca3af;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-sku {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.source-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.source-badge.shopify {
    background: #10b981;
    color: white;
}

.source-badge.database {
    background: #f59e0b;
    color: white;
}

.product-name {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.product-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
}

.product-status {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.expand-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.product-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.product-body {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card.expanded .product-body {
    max-height: 600px;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.product-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.editable-field {
    padding: 0.75rem;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.editable-field:hover {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.editable-field.editing {
    background: white;
    border-color: var(--primary-color);
    cursor: text;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.editable-field.saving {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border-color: #f59e0b;
}

.editable-field.needs-attention {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border-color: #f59e0b;
    color: #92400e;
    animation: attention-pulse 2s infinite;
}

@keyframes attention-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.field-input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

.shopify-info {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    font-size: 0.875rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row span:first-child {
    font-weight: 500;
    color: #065f46;
}

.info-row span:last-child {
    color: #047857;
}

/* Batch Controls */
.batch-controls {
    position: sticky;
    top: calc(var(--header-height, 80px) + 1rem);
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
}

.batch-info {
    font-weight: 600;
    font-size: 1rem;
}

.batch-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn.small {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.action-btn.small:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.action-btn.small.secondary {
    background: rgba(255, 255, 255, 0.1);
}

/* Toast Notifications - Fixed */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
}

.toast.toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .product-header {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .product-image, .product-image-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .product-sku {
        font-size: 1rem;
    }
    
    .field-row {
        grid-template-columns: 1fr;
    }
    
    .batch-controls {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .batch-actions {
        justify-content: center;
    }
    
    .toast {
        top: auto;
        bottom: 2rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        text-align: center;
        transform: translateY(100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .product-header {
        padding: 0.5rem;
    }
    
    .product-image, .product-image-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .product-card.expanded .product-body {
        padding: 1rem;
    }
    
    .filter-select {
        font-size: 0.8rem;
        padding: 0.375rem 2rem 0.375rem 0.75rem;
    }
}

/* Loading styles */
.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

#loadMoreBtn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

#loadMoreBtn::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;
}

#loadMoreBtn:hover::before {
    left: 100%;
}

#loadMoreBtn:hover {
    background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

#loadMoreBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#loadMoreBtn:disabled:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .load-more-container {
        padding: 1.5rem 1rem;
    }
    
    #loadMoreBtn {
        width: 100%;
        max-width: 300px;
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Batch Processing Modal Styles */
.batch-progress {
    text-align: center;
    padding: 2rem;
}

.batch-info {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #374151;
}

.batch-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

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

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

.batch-orders-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin: 1rem 0;
}

.batch-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.batch-order-item:last-child {
    border-bottom: none;
}

.batch-order-id {
    font-weight: 600;
    color: #1f2937;
}

.batch-order-customer {
    flex: 1;
    margin: 0 1rem;
    color: #6b7280;
}

.batch-order-status {
    font-weight: 500;
    font-size: 0.8rem;
}

.batch-result {
    margin-top: 1rem;
}

.batch-success, .batch-error {
    padding: 1rem;
    border-radius: 8px;
}

.batch-success {
    background: #f0fdf4;
    border: 1px solid #16a34a;
}

.batch-error {
    background: #fef2f2;
    border: 1px solid #dc2626;
}

.batch-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.error-message {
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-word;
}

/* Mobile responsiveness for batch processing */
@media (max-width: 768px) {
    .batch-order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .batch-order-customer {
        margin: 0;
    }
    
    .batch-actions {
        flex-direction: column;
    }
}

/* Search Box Styles */
.search-box {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}

.search-input {
    padding-left: 2.5rem;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-number {
    min-width: 2rem;
    height: 2rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-number:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.page-number.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-ellipsis {
    padding: 0 0.5rem;
    color: #9ca3af;
}

/* View Actions Layout */
.view-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: #6b7280;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .search-input {
        width: 100%;
    }
    
    .page-numbers {
        display: none;
    }
}

/* Date Range Picker Styles */
.date-range-picker {
    position: relative;
}

.date-range-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #1f2937;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 180px;
    width: 100%;
}

.date-range-trigger:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.date-range-trigger i:last-child {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.date-range-trigger.active i:last-child {
    transform: rotate(180deg);
}

.date-range-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 100;
    display: none;
    min-width: 280px;
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-range-dropdown.show {
    display: block;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-range-content {
    padding: 0.75rem;
}

.date-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.date-presets::-webkit-scrollbar {
    width: 6px;
}

.date-presets::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.date-presets::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.preset-btn {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #374151;
    transition: all 0.2s;
    text-align: left;
    white-space: nowrap;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.preset-btn[data-selected="true"] {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.preset-btn[data-selected="true"]:hover {
    background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
}

.custom-dates {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.date-input-group {
    margin-bottom: 0.75rem;
}

.date-input-group label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.date-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.date-actions .action-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.selected-range {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.range-label {
    color: #64748b;
    font-weight: 600;
}

.range-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .date-range-trigger {
        min-width: auto;
    }
    
    .date-range-dropdown {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        overflow-y: auto;
        animation: slideUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .date-range-dropdown::before {
        content: '';
        position: absolute;
        top: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #cbd5e0;
        border-radius: 2px;
    }
    
    .date-range-content {
        padding: 1.5rem 1rem 1rem;
    }
    
    .date-presets {
        grid-template-columns: 1fr;
        max-height: none;
    }
    
    .preset-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    overflow-y: auto;
}

.filter-content {
    background: white;
    width: 90%;
    max-width: 500px;
    margin: 2rem auto;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.filter-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.filter-title {
    font-weight: 600;
    color: #1e293b;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.filter-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-close:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.filter-modal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-of-type {
    margin-bottom: 1rem;
}

.filter-group-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.filter-group-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.checkbox-group::-webkit-scrollbar {
    width: 6px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.filter-item {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    font-size: 0.875rem;
    color: #374151;
}

.checkbox-label:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    transform: translateX(4px);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--primary-color);
}

.checkmark {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: white;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Date Range Styles */
.date-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.date-separator {
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
}

.date-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    color: #374151;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.date-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preset-btn {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #374151;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.preset-btn:hover::before {
    left: 100%;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

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

/* Active Filters Display */
.active-filters {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.active-filters-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.25rem 0.25rem 0.25rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.filter-tag::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.3s;
}

.filter-tag:hover::before {
    left: 100%;
}

.filter-tag:hover {
    background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-tag:active {
    transform: scale(0.95);
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    flex-shrink: 0;
}

.filter-btn.primary {
    flex: 1;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn.primary::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;
}

.filter-btn.primary:hover::before {
    left: 100%;
}

.filter-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.filter-btn.secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn.secondary:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Filter Button in Header Enhancement */
#filterModalBtn.active {
    background: var(--secondary-color) !important;
    color: white !important;
    border-color: var(--secondary-color) !important;
    position: relative;
}

#filterModalBtn.active::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 50%;
    animation: filterPulse 2s infinite;
}

@keyframes filterPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .filter-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .filter-header {
        padding: 1rem 1.5rem;
    }
    
    .filter-modal .modal-body {
        padding: 1rem 1.5rem;
    }
    
    .date-range {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .date-separator {
        text-align: center;
        font-size: 0.8rem;
    }
    
    .date-presets {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .preset-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .filter-actions {
        flex-direction: column;
        padding: 1rem 1.5rem;
    }
    
    .filter-btn.primary,
    .filter-btn.secondary {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .checkbox-label {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .checkbox-group {
        max-height: 150px;
    }
    
    .filter-tag {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        margin: 0.25rem;
    }
}

@media (max-width: 480px) {
    .filter-header {
        padding: 0.75rem 1rem;
    }
    
    .filter-modal .modal-body {
        padding: 0.75rem 1rem;
    }
    
    .filter-actions {
        padding: 0.75rem 1rem;
    }
    
    .filter-group-title {
        font-size: 0.8rem;
    }
    
    .checkbox-label {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .date-input {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .preset-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
}

/* Animation for modal opening */
.filter-modal {
    animation: fadeIn 0.3s ease;
}

.filter-content {
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .filter-content {
        border: 3px solid #000;
    }
    
    .checkbox-label {
        border: 1px solid #ccc;
    }
    
    .filter-tag {
        border: 2px solid white;
    }
    
    .preset-btn {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .filter-modal,
    .filter-content,
    .checkbox-label,
    .preset-btn,
    .filter-tag,
    .filter-btn.primary,
    .filter-btn.secondary {
        animation: none;
        transition: none;
    }
    
    .preset-btn::before,
    .filter-tag::before,
    .filter-btn.primary::before {
        display: none;
    }
    
    #filterModalBtn.active::after {
        animation: none;
    }
}

/* Focus styles for accessibility */
.checkbox-label:focus-within,
.preset-btn:focus,
.date-input:focus,
.filter-btn:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .filter-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .filter-header {
        background: #374151;
        border-color: #4b5563;
    }
    
    .filter-title {
        color: #f9fafb;
    }
    
    .filter-close {
        color: #9ca3af;
    }
    
    .filter-close:hover {
        background: rgba(239, 68, 68, 0.2);
    }
    
    .checkbox-label:hover {
        background: #374151;
    }
    
    .checkmark {
        background: #374151;
        border-color: #6b7280;
    }
    
    .date-input {
        background: #374151;
        border-color: #6b7280;
        color: #f9fafb;
    }
    
    .preset-btn {
        background: #374151;
        border-color: #6b7280;
        color: #f9fafb;
    }
    
    .preset-btn:hover {
        background: #4b5563;
    }
    
    .filter-actions {
        background: #374151;
        border-color: #4b5563;
    }
}

/* Manual Order Modal Styles */
.manual-order-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-section .section-title {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

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

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-input:required {
    border-left: 3px solid #f59e0b;
}

.form-input:required:valid {
    border-left: 3px solid #10b981;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.modal.manual-order-modal {
    z-index: 1001;
}

.modal.manual-order-modal .modal-content {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* New Order Button in Header - inherits from .filter-btn */
.filter-btn.new-order-btn {
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn.new-order-btn:hover {
    background: #059669;
    color: white;
}

.filter-btn.new-order-btn svg {
    width: 16px;
    height: 16px;
}

/* Product Selection Styles */
.product-search-container {
    position: relative;
}

.product-search-status {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.product-suggestions {
    position: fixed;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.product-suggestion {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

.product-suggestion:hover {
    background-color: #f9fafb;
}

.product-suggestion:last-child {
    border-bottom: none;
}

.product-suggestion-title {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.product-suggestion-details {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.product-suggestion-sku {
    font-family: monospace;
    background: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.selected-products-container {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-height: 100px;
    padding: 0.75rem;
    background: #fafbfc;
}

.no-products-message {
    color: #9ca3af;
    text-align: center;
    font-style: italic;
    padding: 2rem;
}

.selected-product {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selected-product:last-child {
    margin-bottom: 0;
}

.selected-product-info {
    flex: 1;
    min-width: 0;
}

.selected-product-name {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.selected-product-details {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selected-product-sku {
    font-family: monospace;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}

.selected-product-weight {
    color: #059669;
}

.selected-product-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quantity-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    color: #374151;
    transition: all 0.15s;
}

.quantity-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem;
    font-size: 0.75rem;
    height: 24px;
}

.remove-product-btn {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.remove-product-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.order-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-size: 0.875rem;
    color: #374151;
}

.summary-value {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

/* Loading states */
.product-search-loading {
    color: #3b82f6;
}

.product-search-error {
    color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .manual-order-modal .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .selected-product {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .selected-product-controls {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }
    
    .product-suggestions {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .manual-order-modal .modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .form-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .form-input {
        padding: 0.625rem;
    }
    
    .selected-product-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .quantity-controls {
        flex-wrap: wrap;
    }
}

.stat.forecast-stat {
    border-radius: 8px;
}

.forecast-confidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.confidence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.confidence-dot.confidence-high { background: #10b981; }
.confidence-dot.confidence-medium { background: #f59e0b; }
.confidence-dot.confidence-low { background: #ef4444; }

.velocity-detail, .cycle-detail {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.forecast-scenarios {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.scenario {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.scenario-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.scenario-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.scenario-prob {
    font-size: 0.7rem;
    color: #6b7280;
    font-style: italic;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 768px) {
    .forecast-scenarios {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Month Progress Header Styles */
.month-progress-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.month-info {
    margin-bottom: 1rem;
}

.month-title {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.month-progress {
    max-width: 400px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #64748b;
}

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

.mtd-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.mtd-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.mtd-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.mtd-detail {
    font-size: 0.75rem;
    color: #64748b;
}

/* Updated Forecast Scenarios Styles */
.forecast-scenarios {
    margin: 1rem 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.forecast-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.forecast-header h4 {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.forecast-note {
    font-size: 0.875rem;
    color: #64748b;
}

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

.scenario {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    border: 2px solid;
    transition: transform 0.2s ease;
}

.scenario:hover {
    transform: translateY(-2px);
}

.scenario.conservative {
    border-color: #f59e0b;
    background: #fefbf2;
}

.scenario.realistic {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.scenario.optimistic {
    border-color: #10b981;
    background: #f0fdf4;
}

.scenario-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scenario-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.scenario-prob {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .month-progress-header {
        padding: 1rem;
    }
    
    .mtd-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .mtd-stat {
        padding: 0.75rem;
    }
    
    .mtd-value {
        font-size: 1.25rem;
    }
    
    .scenarios-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .scenario {
        padding: 1rem;
    }
    
    .scenario-value {
        font-size: 1.5rem;
    }
}

.stat-sublabel {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}