/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Import other stylesheets */
@import "sync.css";
@import "auth.css";
@import "duplicates.css";

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* Header Navigation */
header {
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo-link {
  display: inline-block;
  margin-right: 40px;
  text-decoration: none;
  height: 40px;
}

.logo-image {
  height: 40px;
  width: auto;
  vertical-align: middle;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

nav a:hover,
nav a.active {
  color: #333;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4a5568;
}

.notification-icon {
  text-decoration: none;
  font-size: 20px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Page Content */
.customers-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.page-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  color: #1a1a1a;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.btn-primary:hover {
  background-color: #3a7bc8;
  border-color: #3a7bc8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
}

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

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

.btn-danger {
  background-color: #f56565;
  color: white;
  border-color: #f56565;
}

.btn-danger:hover {
  background-color: #e53e3e;
  border-color: #e53e3e;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-outline {
  background-color: transparent;
  color: #4a90e2;
  border-color: #4a90e2;
}

.btn-outline:hover {
  background-color: #4a90e2;
  color: white;
}

/* Table Container */
.customers-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Table Styles */
.customers-table {
  width: 100%;
  border-collapse: collapse;
}

.customers-table thead {
  background-color: #fafafa;
  border-bottom: 1px solid #e0e0e0;
}

.customers-table th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}

.customers-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.1s;
}

.customers-table tbody tr:hover {
  background-color: #fafafa;
}

.customers-table tbody tr:last-child {
  border-bottom: none;
}

.customers-table td {
  padding: 20px;
  font-size: 14px;
}

.email-cell {
  color: #4a90e2;
}

.subscriptions-cell {
  color: #666;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-active {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-inactive {
  background-color: #fafafa;
  color: #666;
}

.customer-link {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
}

.customer-link:hover {
  text-decoration: underline;
}

.subscription-count {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.subscription-count.active {
  background: #e8f5e9;
  color: #2e7d32;
}

.subscription-count.inactive {
  background: #fff3e0;
  color: #ef6c00;
}

.subscription-count.none {
  color: #999;
}

.renewal-date {
  font-size: 0.875rem;
  color: #666;
}

.btn-link {
  color: #4a90e2;
  text-decoration: none;
  font-size: 0.875rem;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Subscriptions Page */
.subscriptions-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Subscription Type Tabs */
.subscription-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
  margin-top: 20px;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  text-decoration: none;
  color: #6b7280;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-item:hover {
  color: #374151;
  background-color: #f9fafb;
}

.tab-item.active {
  color: #4a90e2;
  border-bottom-color: #4a90e2;
}

.tab-label {
  font-size: 14px;
}

.tab-count {
  background: #e5e7eb;
  color: #374151;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.tab-item.active .tab-count {
  background: #dbeafe;
  color: #4a90e2;
}

/* Type Badges */
.type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.type-badge.type-recurring {
  background: #d1fae5;
  color: #065f46;
}

.type-badge.type-one_time {
  background: #fef3c7;
  color: #92400e;
}

.type-badge.type-complimentary {
  background: #ede9fe;
  color: #5b21b6;
}

.price-cell {
  font-weight: 500;
}

.text-muted {
  color: #9ca3af;
  font-style: italic;
}

/* Search and Filters Section */
.search-filters-section {
  margin-bottom: 30px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #999;
}

.search-hint {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #999;
}

.filters-wrapper {
  display: flex;
  gap: 12px;
}

.filter-dropdown {
  position: relative;
  min-width: 200px;
}

.filter-select {
  width: 100%;
  padding: 10px 32px 10px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: white;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: #999;
}

.dropdown-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Subscriptions Table */
.subscriptions-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.subscriptions-table thead {
  background-color: #fafafa;
  border-bottom: 1px solid #e0e0e0;
}

.subscriptions-table th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}

.subscriptions-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.1s;
}

.subscriptions-table tbody tr:hover {
  background-color: #fafafa;
}

.subscriptions-table tbody tr:last-child {
  border-bottom: none;
}

.subscriptions-table td {
  padding: 20px;
  font-size: 14px;
}

.customer-cell {
  font-weight: 500;
  color: #333;
}

.product-name {
  color: #4a90e2;
}

.date-cell {
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .customers-page,
  .subscriptions-page {
    padding: 20px 10px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .customers-table th,
  .customers-table td,
  .subscriptions-table th,
  .subscriptions-table td {
    padding: 12px;
    font-size: 13px;
  }
  
  .email-cell {
    word-break: break-word;
  }
  
  .filters-wrapper {
    flex-direction: column;
  }
  
  .filter-dropdown {
    width: 100%;
  }
  
  /* Customer Detail Responsive */
  .customer-metrics {
    grid-template-columns: 1fr;
  }
  
  .customer-details-grid {
    grid-template-columns: 1fr;
  }
  
  /* Dashboard Responsive */
  .dashboard-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .analytics-row {
    grid-template-columns: 1fr;
  }
  
  .metric-card {
    padding: 20px;
  }
  
  .metric-value {
    font-size: 28px;
  }
  
  .analytics-card {
    padding: 20px;
  }
  
  .renewals-table {
    font-size: 13px;
  }
  
  .renewals-table th,
  .renewals-table td {
    padding: 8px;
  }
}

/* Create Subscription Page */
.create-subscription-page,
.create-customer-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #333;
}

.breadcrumb-separator {
  color: #999;
}

.breadcrumb-current {
  color: #333;
}

/* Form Styles */
.subscription-form,
.customer-form {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 32px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.select-wrapper {
  position: relative;
}

.form-select,
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
  transition: border-color 0.2s;
}

.form-select {
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: #999;
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.create-link {
  font-size: 13px;
  color: #4a90e2;
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}

.create-link:hover {
  text-decoration: underline;
}

.form-input[type="date"] {
  cursor: pointer;
}

.form-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}

.error-messages {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.error-messages ul {
  margin: 0;
  padding-left: 20px;
  color: #c00;
  font-size: 14px;
}

/* Dashboard Styles */
.dashboard-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

.secondary-metrics {
  margin-top: 20px;
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 600px;
}

/* Date Filter Section */
.date-filter-section {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.date-filter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.date-filter-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.date-preset-btn {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.date-preset-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.date-preset-btn.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.custom-date-range {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.date-input {
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

.date-separator {
  color: #6b7280;
  font-size: 14px;
}

.active-filter-info {
  margin-top: 12px;
  padding: 8px 12px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 4px;
  font-size: 13px;
}

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

.empty-state-cell {
  padding: 0 !important;
}

.empty-state-icon {
  margin: 0 auto 16px;
  width: 48px;
  height: 48px;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.empty-state-message {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.empty-state-simple {
  text-align: center;
  padding: 40px 20px;
}

.empty-state-simple svg {
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.empty-state-subtext {
  font-size: 13px;
  color: #9ca3af;
}

/* Growth indicators */
.text-success {
  color: #10b981;
  font-weight: 600;
}

.text-danger {
  color: #ef4444;
  font-weight: 600;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quick-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}

/* Sync Status Widget */
.sync-status-widget {
  background-color: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.sync-status-widget.sync-status-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.sync-icon {
  font-size: 18px;
}

.sync-text {
  flex: 1;
  color: #333;
}

.sync-link {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
}

.sync-link:hover {
  text-decoration: underline;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.metric-card {
  background-color: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  background-color: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-content {
  flex: 1;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}

.metric-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin: 4px 0;
}

.metric-subtext {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* Analytics Section */
.analytics-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.analytics-card {
  background-color: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: #1a1a1a;
}

/* Status List */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-name {
  font-size: 14px;
  color: #333;
  min-width: 80px;
}

.status-count {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 40px;
  text-align: right;
}

.status-bar {
  flex: 1;
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.status-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.status-fill.status-active {
  background-color: #2ecc71;
}

.status-fill.status-inactive {
  background-color: #95a5a6;
}

.status-fill.status-cancelled {
  background-color: #e74c3c;
}

.status-fill.status-expired {
  background-color: #f39c12;
}

/* Product List */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.product-rank {
  width: 24px;
  height: 24px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.product-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-name {
  font-size: 14px;
  color: #333;
}

.product-count {
  font-size: 12px;
  color: #999;
}

/* Renewals Table */
.renewals-table {
  overflow-x: auto;
}

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

.renewals-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e0e0e0;
}

.renewals-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.renewals-table tr:last-child td {
  border-bottom: none;
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.subscription {
  background-color: #e8f5e9;
  color: #2ecc71;
}

.activity-icon.customer {
  background-color: #e3f2fd;
  color: #4a90e2;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  color: #333;
  margin: 0 0 4px 0;
}

.activity-time {
  font-size: 12px;
  color: #999;
  margin: 0;
}

.empty-state {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 40px 0;
}

/* Sync Page Styles */
.sync-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Alert Styles */
.alert {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.alert h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.alert p {
  margin: 4px 0;
  font-size: 14px;
}

.alert code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

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

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

.sync-progress {
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  border-left: 4px solid #0c5460;
}

.sync-progress p {
  margin: 0.25rem 0;
}

.sync-progress strong {
  color: #0c5460;
}

.refresh-notice {
  font-size: 0.875rem;
  color: #666;
  margin-top: 1rem;
  font-style: italic;
}

/* Sync Actions Section */
.sync-actions-section {
  margin-bottom: 40px;
}

.sync-actions-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

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

.sync-action-card {
  background-color: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sync-action-card h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #1a1a1a;
}

.sync-action-card p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #666;
}

.last-sync {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Sync History Section */
.sync-history-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.sync-logs-table {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.sync-logs-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #fafafa;
}

.sync-logs-table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.sync-logs-table tr:last-child td {
  border-bottom: none;
}

/* Sync Status Badge */
.sync-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.sync-status-completed {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.sync-status-failed {
  background-color: #ffebee;
  color: #c62828;
}

.sync-status-running {
  background-color: #e3f2fd;
  color: #1565c0;
}

.sync-status-pending {
  background-color: #f5f5f5;
  color: #666;
}

.error-message {
  color: #c62828;
  font-size: 13px;
  cursor: help;
}

.sync-warning {
  color: #ff9800;
  font-size: 0.875rem;
  font-weight: 500;
}

.sync-errors {
  font-size: 0.875rem;
}

.sync-errors summary {
  cursor: pointer;
  color: #ff9800;
  font-weight: 500;
}

.sync-errors summary:hover {
  text-decoration: underline;
}

.error-details {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #fff3e0;
  border-radius: 4px;
  font-size: 0.75rem;
}

.error-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ffe0b2;
}

.error-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.error-item strong {
  color: #e65100;
}

/* Customer Detail Page */
.customer-detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.customer-detail-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 2rem;
}

.customer-email {
  color: #666;
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

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

.customer-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.customer-metrics .metric-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.customer-metrics .metric-card h4 {
  font-size: 0.75rem;
  color: #666;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.customer-metrics .metric-value {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.customer-metrics .metric-subtext {
  font-size: 0.875rem;
  color: #999;
  margin: 0.25rem 0 0 0;
}

.text-success {
  color: #2ecc71;
}

.text-muted {
  color: #999;
}

.customer-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.detail-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.subscriptions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subscription-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  background: #fafafa;
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.subscription-header h4 {
  margin: 0;
  font-size: 1rem;
}

.subscription-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.subscription-details p {
  margin: 0;
}

.orders-table {
  overflow-x: auto;
}

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

.orders-table th,
.orders-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.orders-table th {
  font-weight: 500;
  color: #666;
  font-size: 0.875rem;
}

.order-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.order-status-completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.order-status-processing {
  background: #e3f2fd;
  color: #1565c0;
}

.order-status-pending {
  background: #fff3e0;
  color: #ef6c00;
}

.view-more {
  margin-top: 1rem;
  text-align: center;
}

.view-more a {
  color: #4a90e2;
  text-decoration: none;
  font-size: 0.875rem;
}

.enrollments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enrollment-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
}

.enrollment-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: #4a90e2;
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #666;
  margin: 0.5rem 0 0 0;
}

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

.group-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
}

.group-item h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.group-members {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.info-grid p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

/* Orders Page */
.orders-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.header-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.stat-item {
  font-size: 0.875rem;
  color: #666;
}

.active-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #e3f2fd;
  border-radius: 20px;
  font-size: 0.875rem;
}

.remove-filter {
  text-decoration: none;
  color: #1565c0;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

.orders-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.orders-table thead {
  background-color: #fafafa;
  border-bottom: 1px solid #e0e0e0;
}

.orders-table th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}

.orders-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.1s;
}

.orders-table tbody tr:hover {
  background-color: #fafafa;
}

.orders-table tbody tr:last-child {
  border-bottom: none;
}

.orders-table td {
  padding: 20px;
  font-size: 14px;
}

.order-link {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
}

.order-link:hover {
  text-decoration: underline;
}

.customer-email {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}

.items-cell {
  color: #666;
}

.total-cell {
  font-weight: 500;
}

.order-status-cancelled,
.order-status-refunded,
.order-status-failed {
  background: #ffebee;
  color: #c62828;
}

.order-status-on-hold {
  background: #fff3e0;
  color: #ef6c00;
}

/* Order Detail Page */
.order-detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.order-detail-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 2rem;
}

.order-date {
  color: #666;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.order-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.customer-info p {
  margin: 0.5rem 0;
}

.billing-title {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.address {
  font-style: normal;
  line-height: 1.6;
}

.order-summary {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.summary-row.total {
  border-top: 2px solid #e0e0e0;
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.discount {
  color: #4caf50;
}

.payment-info h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.payment-info p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.items-section {
  margin-top: 2rem;
}

.items-table {
  overflow-x: auto;
}

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

.items-table th,
.items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.items-table th {
  font-weight: 500;
  color: #666;
  font-size: 0.875rem;
  background: #fafafa;
}

.product-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.variation-details {
  font-size: 0.75rem;
  color: #666;
}

.variation {
  display: inline-block;
  margin-right: 1rem;
}

.sku,
.quantity {
  color: #666;
}

.price,
.total {
  font-weight: 500;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.item-name {
  flex: 1;
  font-weight: 500;
}

.item-quantity {
  color: #666;
  margin: 0 2rem;
}

.item-total {
  font-weight: 500;
}

/* Users Page Styles */
.users-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.users-table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.users-table thead {
  background-color: #fafafa;
  border-bottom: 1px solid #e0e0e0;
}

.users-table th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}

.users-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.1s;
}

.users-table tbody tr:hover {
  background-color: #fafafa;
}

.users-table tbody tr:last-child {
  border-bottom: none;
}

.users-table td {
  padding: 20px;
  font-size: 14px;
}

/* Role Badge Styles */
.status-badge.status-admin {
  background-color: #fee;
  color: #c62828;
}

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

.status-badge.status-viewer {
  background-color: #f5f5f5;
  color: #666;
}\n\n/* Flash Messages */
.notice, .alert {
  padding: 12px 20px;
  margin: 0;
  font-size: 14px;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.notice {
  background-color: #e8f5e9;
  color: #2e7d32;
  border-bottom: 1px solid #a5d6a7;
}

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

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

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

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading .spinner {
  position: relative;
  top: -1px;
}

.sync-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #4a90e2;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

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

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

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

.pagination .page,
.pagination .next,
.pagination .prev,
.pagination .first,
.pagination .last {
  display: inline-block;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: #333;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination a:hover {
  background: #f5f5f5;
  border-color: #999;
}

.pagination .current {
  background: #333;
  color: white;
  border-color: #333;
}

.pagination .disabled {
  color: #999;
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination .gap {
  border: none;
  background: none;
}
