/* Wholesaler Portal Professional Styles */

/* Customer Message Styles */
.whp-customer-message {
  background: #e3f2fd;
  border: 1px solid #2196f3;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.whp-customer-message p {
  margin: 0;
  color: #1976d2;
  font-size: 16px;
}

.whp-customer-message a {
  color: #1976d2;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 1px solid #1976d2;
  transition: all 0.3s ease;
}

.whp-customer-message a:hover {
  color: #0d47a1;
  border-bottom-color: #0d47a1;
}

/* Order Form Styles */
.wholesale-ordering-content {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin: 20px 0;
}

.wholesale-ordering-content h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 24px;
  border-bottom: 2px solid #40A9FF;
  padding-bottom: 10px;
}

.order-form-container {
  width: 100%;
  overflow-x: auto;
}

/* Ensure order form displays properly */
.order-form-container .order-form-app {
  width: 100% !important;
  max-width: 100% !important;
}

/* Help text styles */
.whp-help-text {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 15px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.whp-help-text strong {
  color: #495057;
  display: block;
  margin-bottom: 8px;
}

.whp-help-text code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

/* Error message styles */
.whp-error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin: 10px 0;
}

.whp-error-message p {
  margin: 5px 0;
}

.whp-error-message code {
  background: #f5c6cb;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}

/* Access message styles */
.whp-access-message {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
  padding: 20px;
  border-radius: 4px;
  margin: 10px 0;
  text-align: center;
}

.whp-access-message h3 {
  color: #0c5460;
  margin-bottom: 15px;
  font-size: 18px;
}

.whp-access-message p {
  margin: 10px 0;
}

.whp-button {
  display: inline-block;
  background: #40A9FF;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.whp-button:hover {
  background: #1890ff;
  color: white;
  text-decoration: none;
}

/* Shortcode preview styles */
.whp-shortcode-preview {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 10px;
  margin: 10px 0;
  font-size: 13px;
}

.whp-shortcode-preview strong {
  color: #495057;
  margin-left: 5px;
}

.whp-shortcode-preview code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #495057;
}

/* Note styles */
.whp-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  font-size: 13px;
}

.whp-note strong {
  color: #856404;
}

/* WooCommerce My Account Menu Styles */
.woocommerce-MyAccount-navigation ul li a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  text-decoration: none !important;
  position: relative !important;
}

/* Force override for critical elements */
.whp-login-form .whp-checkbox-custom {
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #ddd !important;
  border-radius: 4px !important;
  background: #fff !important;
  position: relative !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.whp-login-form .whp-checkbox:checked + .whp-checkbox-custom {
  background: #0073aa !important;
  border-color: #0073aa !important;
}

.whp-login-form .whp-checkbox:checked + .whp-checkbox-custom:after {
  content: '✓' !important;
  color: white !important;
  font-size: 14px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.whp-login-form .whp-toggle-password-btn {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 0 !important;
  color: #666 !important;
  font-size: 18px !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
}

.whp-login-form .whp-toggle-password-btn i {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Login Form Styles */
.whp-login-container {
  max-width: 400px;
  margin: 2em auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.whp-login-form {
  width: 100%;
}

.whp-login-form h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.whp-login-form input[type="text"],
.whp-login-form input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.whp-login-form input[type="text"]:focus,
.whp-login-form input[type="password"]:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Password field with toggle button */
.whp-password-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.whp-password-field input[type="password"],
.whp-password-field input[type="text"] {
  width: 100%;
  padding-right: 45px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  padding: 12px 45px 12px 12px;
}

.whp-toggle-password-btn {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 8px !important;
  color: #666 !important;
  font-size: 18px !important;
  transition: color 0.3s !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 4px !important;
  margin: 0 !important;
}

.whp-toggle-password-btn:focus {
  outline: none !important;
}

.whp-login-form input[type="submit"] {
  width: 100%;
  padding: 12px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.whp-login-form input[type="submit"]:hover {
  background: #005a87;
}

.whp-login-form label {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}

.whp-login-form input[type="checkbox"] {
  margin-left: 8px;
}

.whp-error {
  background: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
}

.whp-logged-in-message {
  text-align: center;
  padding: 20px;
  background: #d4edda;
  color: #155724;
  border-radius: 4px;
  border: 1px solid #c3e6cb;
}

/* Dashboard Styles */
.whp-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.whp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  flex-wrap: wrap;
}

.whp-header h2 {
  margin: 0;
  color: #333;
}

.whp-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.whp-user-info p {
  margin: 0;
  color: #666;
}

.whp-logout {
  background: #dc3545;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.whp-logout:hover {
  background: #c82333;
  color: white;
}

/* Filters Styles */
.whp-filters {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.whp-search {
  margin-bottom: 15px;
}

.whp-search input {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.whp-filters-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.whp-filters-row select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 150px;
}

/* Products Grid */
.whp-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.whp-product-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.whp-product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f8f9fa;
}

.whp-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.whp-product-info {
  padding: 15px;
}

.whp-product-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #333;
  line-height: 1.4;
}

.whp-product-sku {
  font-size: 12px;
  color: #666;
  margin: 0 0 8px 0;
}

.whp-product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

.whp-price-label {
  font-size: 12px;
  color: #666;
}

.whp-price-value {
  font-size: 16px;
  font-weight: 600;
  color: #28a745;
}

.whp-min-qty {
  font-size: 12px;
  color: #dc3545;
  margin: 5px 0;
  font-weight: 500;
}

.whp-product-desc {
  font-size: 13px;
  color: #666;
  margin: 8px 0 0 0;
  line-height: 1.4;
}

.whp-no-products {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

/* Loading State */
.whp-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .whp-dashboard {
    padding: 10px;
  }
  
  .whp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .whp-user-info {
    width: 100%;
    justify-content: space-between;
  }
  
  .whp-filters-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .whp-filters-row select {
    width: 100%;
    min-width: auto;
  }
  
  .whp-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .whp-product-card {
    margin-bottom: 0;
  }
  
  .whp-product-image {
    height: 150px;
  }
  
  .whp-product-info {
    padding: 12px;
  }
  
  .whp-product-title {
    font-size: 14px;
  }
  
  .whp-price-value {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .whp-login-container {
    margin: 1em;
    padding: 15px;
  }
  
  .whp-products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .whp-product-image {
    height: 120px;
  }
  
  .whp-product-info {
    padding: 10px;
  }
}

/* RTL Support */
.rtl .whp-filters-row {
  direction: rtl;
}

.rtl .whp-product-price {
  direction: rtl;
}

.rtl .whp-user-info {
  direction: rtl;
}

/* Animation for smooth transitions */
.whp-product-card {
  animation: fadeInUp 0.3s ease-out;
}

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

/* Search and Filter Enhancements */
.whp-search input:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.whp-filters-row select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Button Styles */
.whp-login-form input[type="submit"],
.whp-logout {
  transition: all 0.3s ease;
}

.whp-login-form input[type="submit"]:active,
.whp-logout:active {
  transform: translateY(1px);
}

/* Notification Styles */
.whp-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  z-index: 9999;
  animation: slideInRight 0.3s ease-out;
  max-width: 300px;
}

.whp-notification.whp-success {
  background: #28a745;
}

.whp-notification.whp-error {
  background: #dc3545;
}

.whp-notification.whp-warning {
  background: #ffc107;
  color: #212529;
}

.whp-notification.whp-info {
  background: #17a2b8;
}

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

/* Field Error Styles */
.whp-field-error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.whp-error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

/* Hover Effects */
.whp-product-card.whp-hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Mobile Menu Styles */
.whp-mobile-toggle {
  display: none;
  background: #0073aa;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 15px;
}

.whp-mobile-menu {
  display: none;
}

.whp-mobile-menu.whp-active {
  display: block;
}

/* Lazy Loading */
.whp-lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.whp-lazy.loaded {
  opacity: 1;
}

/* Print Styles */
@media print {
  .whp-filters,
  .whp-header,
  .whp-logout {
    display: none !important;
  }
  
  .whp-product-card {
    break-inside: avoid;
    margin-bottom: 20px;
  }
  
  .whp-products-grid {
    display: block;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .whp-product-card {
    border: 2px solid #000;
  }
  
  .whp-price-value {
    font-weight: bold;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .whp-product-card,
  .whp-login-form input[type="submit"],
  .whp-logout {
    transition: none;
  }
  
  .whp-product-card {
    animation: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .whp-login-container {
    background: #2d3748;
    color: #e2e8f0;
  }
  
  .whp-dashboard {
    background: #1a202c;
    color: #e2e8f0;
  }
  
  .whp-header {
    background: #2d3748;
  }
  
  .whp-filters {
    background: #2d3748;
  }
  
  .whp-product-card {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .whp-product-title {
    color: #e2e8f0;
  }
  
  .whp-search input,
  .whp-filters-row select {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
  }
}

/* Accessibility Improvements */
.whp-product-card:focus-within {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.whp-login-form input:focus,
.whp-search input:focus,
.whp-filters-row select:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

/* Skip Link for Accessibility */
.whp-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #0073aa;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.whp-skip-link:focus {
  top: 6px;
}

/* Loading Spinner */
.whp-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Enhanced Button Styles */
.whp-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #0073aa;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.whp-btn:hover {
  background: #005a87;
  color: white;
  text-decoration: none;
}

.whp-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

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

.whp-btn.whp-btn-secondary:hover {
  background: #545b62;
}

.whp-btn.whp-btn-success {
  background: #28a745;
}

.whp-btn.whp-btn-success:hover {
  background: #1e7e34;
}

.whp-btn.whp-btn-danger {
  background: #dc3545;
}

.whp-btn.whp-btn-danger:hover {
  background: #c82333;
}

/* Enhanced Form Styles */
.whp-form-container {
  max-width: 800px;
  margin: 20px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.whp-wholesaler-form {
  padding: 30px;
}

.whp-form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

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

.whp-form-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.whp-form-section h3:before {
  content: '';
  width: 4px;
  height: 20px;
  background: #0073aa;
  margin-left: 10px;
  border-radius: 2px;
}

.whp-form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

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

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

.whp-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.whp-form-group input,
.whp-form-group select,
.whp-form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.whp-form-group input:focus,
.whp-form-group select:focus,
.whp-form-group textarea:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.whp-form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
  font-style: italic;
}

.whp-form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.whp-form-actions .whp-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.whp-form-actions .whp-btn-primary {
  background: #0073aa;
  color: white;
}

.whp-form-actions .whp-btn-primary:hover {
  background: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.whp-form-actions .whp-btn-secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e0e0e0;
}

.whp-form-actions .whp-btn-secondary:hover {
  background: #e9ecef;
  border-color: #d0d0d0;
}

.whp-form-actions .dashicons {
  font-size: 16px;
}

/* Form Validation Styles */
.whp-form-group input:invalid,
.whp-form-group select:invalid,
.whp-form-group textarea:invalid {
  border-color: #dc3545;
}

.whp-form-group input:valid,
.whp-form-group select:valid,
.whp-form-group textarea:valid {
  border-color: #28a745;
}

/* Responsive Design */
@media (max-width: 768px) {
  .whp-form-container {
    margin: 10px;
    border-radius: 0;
  }
  
  .whp-wholesaler-form {
    padding: 20px;
  }
  
  .whp-form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .whp-form-actions {
    flex-direction: column;
  }
  
  .whp-form-actions .whp-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Form Loading State */
.whp-form-loading {
  opacity: 0.6;
  pointer-events: none;
}

.whp-form-loading .whp-btn {
  position: relative;
}

.whp-form-loading .whp-btn:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Success Message */
.whp-success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px 20px;
  border-radius: 6px;
  border: 1px solid #c3e6cb;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.whp-success-message:before {
  content: '✓';
  font-weight: bold;
  font-size: 18px;
}

/* Error Message */
.whp-error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.whp-error-message:before {
  content: '✗';
  font-weight: bold;
  font-size: 18px;
}

/* Admin Dashboard Styles */
.whp-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.whp-admin-header h1 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 700;
}

.whp-header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

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

.whp-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  border-left: 4px solid #0073aa;
}

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

.whp-stat-card.whp-stat-success {
  border-left-color: #28a745;
}

.whp-stat-card.whp-stat-warning {
  border-left-color: #ffc107;
}

.whp-stat-card.whp-stat-danger {
  border-left-color: #dc3545;
}

.whp-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0073aa, #005a87);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.whp-stat-success .whp-stat-icon {
  background: linear-gradient(135deg, #28a745, #1e7e34);
}

.whp-stat-warning .whp-stat-icon {
  background: linear-gradient(135deg, #ffc107, #e0a800);
}

.whp-stat-danger .whp-stat-icon {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

.whp-stat-content h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.whp-stat-content p {
  margin: 5px 0 0 0;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

/* Table Container */
.whp-table-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.whp-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.whp-bulk-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.whp-bulk-actions select {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  font-size: 14px;
}

.whp-table-search input {
  padding: 8px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  width: 250px;
  font-size: 14px;
}

.whp-table-search input:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Users Table */
.whp-table-wrapper {
  overflow-x: auto;
}

.whp-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.whp-users-table th {
  background: #f8f9fa;
  padding: 15px 12px;
  text-align: right;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

.whp-users-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

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

.whp-checkbox-column {
  width: 50px;
  text-align: center;
}

.whp-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 200px;
}

.whp-user-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
}

.whp-user-details h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.whp-user-meta {
  margin: 0;
  font-size: 12px;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.whp-username {
  font-weight: 500;
  color: #0073aa;
}

.whp-email, .whp-phone {
  color: #666;
}

.whp-company {
  min-width: 150px;
  font-weight: 500;
}

.whp-empty {
  color: #999;
  font-style: italic;
}

.whp-roles {
  min-width: 120px;
}

.whp-role-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin: 2px;
}

.whp-status {
  text-align: center;
}

.whp-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.whp-status-active {
  background: #d4edda;
  color: #155724;
}

.whp-status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.whp-last-login {
  color: #666;
  font-size: 13px;
}

.whp-actions {
  text-align: center;
}

.whp-action-buttons {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.whp-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whp-btn-sm .dashicons {
  font-size: 14px;
}

.whp-btn-sm .btn-text {
  margin-right: 5px;
  font-size: 11px;
}

/* Password Modal */
.whp-password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whp-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.whp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.whp-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.whp-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.whp-modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.whp-modal-body {
  padding: 25px;
}

.whp-password-display label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.whp-password-field {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.whp-password-field input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  background: #f8f9fa;
}

.whp-password-field input:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.whp-password-display small {
  color: #666;
  font-size: 12px;
  display: block;
}

/* Advanced Settings Page Styles */
.whp-settings-container {
  max-width: 1200px;
  margin: 20px 0;
}

.whp-settings-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.whp-settings-section {
  padding: 30px;
  border-bottom: 1px solid #e0e0e0;
}

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

.whp-settings-section h2 {
  margin: 0 0 25px 0;
  color: #333;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 15px;
}

.whp-settings-section h2:before {
  content: '';
  width: 4px;
  height: 25px;
  background: linear-gradient(135deg, #0073aa, #005a87);
  border-radius: 2px;
}

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

.whp-setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.whp-setting-group label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 5px;
}

.whp-setting-group small {
  color: #666;
  font-size: 12px;
  font-style: italic;
  margin-top: 5px;
}

.whp-input, .whp-select, .whp-textarea {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

.whp-input:focus, .whp-select:focus, .whp-textarea:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.whp-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* Toggle Switch Styles */
.whp-toggle-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.whp-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.whp-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.whp-toggle-slider {
  position: relative;
  width: 50px;
  height: 24px;
  background: #ccc;
  border-radius: 24px;
  transition: all 0.3s ease;
}

.whp-toggle-slider:before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.whp-toggle input:checked + .whp-toggle-slider {
  background: #0073aa;
}

.whp-toggle input:checked + .whp-toggle-slider:before {
  transform: translateX(26px);
}

.whp-toggle-label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

/* Settings Actions */
.whp-settings-actions {
  padding: 30px;
  background: #f8f9fa;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  border-top: 1px solid #e0e0e0;
}

.whp-btn-lg {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
}

.whp-btn-lg .dashicons {
  font-size: 18px;
  margin-left: 8px;
}

/* Responsive Design for Settings */
@media (max-width: 768px) {
  .whp-settings-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .whp-settings-section {
    padding: 20px;
  }
  
  .whp-settings-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .whp-settings-actions .whp-btn {
    width: 100%;
    justify-content: center;
  }
  
  .whp-toggle-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Settings Section Icons */
.whp-settings-section:nth-child(1) h2:before {
  background: linear-gradient(135deg, #28a745, #1e7e34);
}

.whp-settings-section:nth-child(2) h2:before {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

.whp-settings-section:nth-child(3) h2:before {
  background: linear-gradient(135deg, #ffc107, #e0a800);
}

.whp-settings-section:nth-child(4) h2:before {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

.whp-settings-section:nth-child(5) h2:before {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
}

/* Form Validation */
.whp-input:invalid, .whp-select:invalid, .whp-textarea:invalid {
  border-color: #dc3545;
}

.whp-input:valid, .whp-select:valid, .whp-textarea:valid {
  border-color: #28a745;
}

/* Loading State */
.whp-settings-form.loading {
  opacity: 0.6;
  pointer-events: none;
}

.whp-settings-form.loading .whp-btn {
  position: relative;
}

.whp-settings-form.loading .whp-btn:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Shortcodes Section Styles */
.whp-shortcodes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.whp-shortcode-item {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.whp-shortcode-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.whp-shortcode-item h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.whp-shortcode-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.whp-shortcode-box code {
  flex: 1;
  background: #f1f3f4;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #d63384;
  border: 1px solid #e0e0e0;
  word-break: break-all;
}

.whp-copy-btn {
  background: #0073aa;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.whp-copy-btn:hover {
  background: #005a87;
  transform: translateY(-1px);
}

.whp-copy-btn .dashicons {
  font-size: 14px;
}

.whp-shortcode-item p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

.whp-shortcode-usage {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.whp-shortcode-usage h4 {
  margin: 0 0 15px 0;
  color: #0066cc;
  font-size: 16px;
  font-weight: 600;
}

.whp-shortcode-usage ol {
  margin: 0;
  padding-right: 20px;
  color: #333;
}

.whp-shortcode-usage li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Responsive Shortcodes */
@media (max-width: 768px) {
  .whp-shortcodes-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .whp-shortcode-box {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .whp-copy-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Enhanced Login Form Styles */
.whp-login-container {
  max-width: 400px;
  margin: 50px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  overflow: hidden;
}

.whp-login-header {
  background: linear-gradient(135deg, #0073aa, #005a87);
  color: white;
  padding: 30px;
  text-align: center;
}

.whp-login-header h3 {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 700;
}

.whp-login-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

.whp-login-form {
  padding: 30px;
}

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

.whp-login-form .whp-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.whp-login-form input[type="text"],
.whp-login-form input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.whp-login-form input[type="text"]:focus,
.whp-login-form input[type="password"]:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.whp-remember-group {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 0;
}

.whp-remember-group .whp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #666;
  margin: 0;
}

.whp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #666;
}

.whp-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.whp-checkbox-custom {
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #ddd !important;
  border-radius: 4px !important;
  background: #fff !important;
  position: relative !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.whp-checkbox-custom:hover {
  border-color: #0073aa !important;
}

.whp-checkbox:checked + .whp-checkbox-custom {
  background: #0073aa !important;
  border-color: #0073aa !important;
}

.whp-checkbox:checked + .whp-checkbox-custom:after {
  content: '✓' !important;
  color: white !important;
  font-size: 14px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.whp-recaptcha-group {
  margin-bottom: 25px;
}

.whp-recaptcha-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.whp-recaptcha-placeholder {
  padding: 15px;
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 8px;
  text-align: center;
  color: #666;
}

.whp-form-actions {
  margin-bottom: 20px;
}

.whp-btn-block {
  width: 100%;
  justify-content: center;
}

.whp-login-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.whp-login-footer p {
  margin: 0;
  color: #666;
  font-size: 12px;
}

.whp-logged-in-message {
  max-width: 400px;
  margin: 50px auto;
  background: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #c3e6cb;
}

.whp-logged-in-message a {
  color: #155724;
  text-decoration: none;
  font-weight: 600;
}

.whp-logged-in-message a:hover {
  text-decoration: underline;
}

.whp-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  font-size: 14px;
}

/* Responsive Login Form */
@media (max-width: 480px) {
  .whp-login-container {
    margin: 20px;
    max-width: none;
  }
  
  .whp-login-header {
    padding: 20px;
  }
  
  .whp-login-form {
    padding: 20px;
  }
}

/* Empty State */
.whp-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.whp-empty-content {
  max-width: 400px;
  margin: 0 auto;
}

.whp-empty-content .dashicons {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 20px;
}

.whp-empty-content h3 {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 20px;
}

.whp-empty-content p {
  margin: 0 0 25px 0;
  color: #999;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .whp-admin-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  
  .whp-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .whp-table-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .whp-table-search input {
    width: 100%;
  }
  
  .whp-user-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .whp-action-buttons {
    flex-direction: column;
    gap: 3px;
  }
}

/* Wholesale Roles Page Styles */
.whp-roles-info {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.whp-roles-info h3 {
  margin-top: 0;
  color: #333;
}

.whp-roles-info ul {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.whp-roles-info li {
  padding: 8px 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: 4px;
  border-left: 4px solid #0073aa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.whp-roles-info li strong {
  color: #0073aa;
}

.whp-roles-info li code {
  background: #f1f1f1;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #666;
}

/* Admin Links */
.whp-admin-links {
  margin: 20px 0;
  padding: 20px;
  background: #e7f3ff;
  border-radius: 8px;
  border-left: 4px solid #0073aa;
}

.whp-admin-links p {
  margin: 10px 0;
}

.whp-admin-links .button {
  margin-right: 10px;
}

/* Visibility Info */
.whp-visibility-info {
  margin-top: 30px;
  padding: 20px;
  background: #fff3cd;
  border-radius: 8px;
  border: 1px solid #ffeaa7;
}

.whp-visibility-info h3 {
  margin-top: 0;
  color: #856404;
}

.whp-info-box {
  background: white;
  padding: 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #ffeaa7;
}

.whp-info-box ol {
  margin: 10px 0;
  padding-right: 20px;
}

.whp-info-box li {
  margin-bottom: 8px;
  color: #333;
}

.whp-info-box em {
  color: #666;
  font-style: italic;
}
.whp-checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  gap: 5px !important;
}
.whp-login-form .whp-toggle-password-btn {
  position: absolute !important;
  left: 12px !important;
  top: 30% !important;
  transform: translateY(-40%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 0 !important;
  color: #666 !important;
  font-size: 18px !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  right: auto !important;
}