// ========================================
// SETTINGS — System Settings Container
// ========================================

.settings-container {
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.settings-sidebar {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  border-right: 1px solid #e9ecef;
  min-height: 600px;
}

.settings-tabs-nav {
  padding: 0;
}

.settings-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  h5 {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
  }
}

.settings-nav {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;

  &::-webkit-scrollbar {
    height: 4px;
  }

  &::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  &::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;

    &:hover {
      background: #764ba2;
    }
  }
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border: none;
  background: transparent;
  color: #495057;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
  position: relative;
  border-left: 3px solid transparent;

  i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
  }

  &:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    border-left-color: #667eea;
  }

  &.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;

    &::before {
      content: '';
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-top: 8px solid transparent;
      border-bottom: 8px solid transparent;
      border-right: 8px solid #ffffff;
    }
  }
}

.settings-content {
  background: #ffffff;
}

.settings-content-wrapper {
  padding: 2rem;
  min-height: 600px;
}

.settings-content-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;

  h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  p {
    font-size: 0.875rem;
    margin: 0;
  }
}

.settings-content-body {
  position: relative;
}

.settings-container .tab-content {
  animation: settingsFadeIn 0.3s ease-in;

  .form-group {
    margin-bottom: 1.5rem;
  }

  label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
  }

  .form-control,
  .vs__dropdown-toggle {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;

    &:focus {
      border-color: #667eea;
      box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }
  }
}

@keyframes settingsFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.system-actions-card {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 2rem;
  border: 1px solid #e9ecef;

  h5 {
    color: #2c3e50;
    font-weight: 600;
  }
}

.action-btn-system {
  padding: 0.75rem 2rem;
  font-weight: 500;
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }
}

.settings-footer {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
}

.submit-btn {
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  border-radius: 0.375rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
  }

  &:active {
    transform: translateY(0);
  }
}

.custom-switch {
  padding-left: 2.5rem;
}

// ========================================
// SETTINGS — Mobile Tab Selector
// ========================================

.mobile-tab-selector {
  padding: 1rem;
  background: #ffffff;
  border-bottom: 1px solid #e9ecef;
  position: relative;
  z-index: 1000;
  overflow: visible !important;

  * {
    overflow: visible !important;
  }

  .custom-select,
  select {
    background-image: none;
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 8px 10px;
    padding-right: 2.5rem;
  }
}

.mobile-tab-select {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  background: #ffffff;
  color: #495057;
  cursor: pointer;
  min-height: 48px;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  appearance: menulist;
  text-align: left;
  direction: ltr;

  &:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
  }

  option {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    height: auto;
    line-height: 1.5;
    display: block;
    text-align: left;
    direction: ltr;
    min-height: 44px;
  }
}

// ========================================
// SETTINGS — Backup Tab
// ========================================

.backup-table-wrapper {
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.btn-generate-backup {
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }
}

.btn-delete-backup {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;

  &:hover {
    transform: scale(1.05);
  }
}

// ========================================
// SETTINGS — Dashboard Widget Order
// ========================================

.dashboard-settings-tab .dashboard-settings-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.dashboard-widget-order-list {
  margin: 0;
  padding: 0;
  max-width: 560px;
}

.dashboard-widget-order-item {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  list-style: none;
  cursor: default;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

  &:hover {
    background: #fff;
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
}

.dashboard-widget-order-ghost {
  opacity: 0.45;
  background: #e9ecef !important;
  border: 2px dashed #adb5bd !important;
  border-radius: 0.5rem;

  .widget-order-number,
  .widget-order-label {
    opacity: 0.8;
  }
}

.dashboard-widget-order-chosen {
  background: #f0f4ff !important;
  border-color: #8b9dc3 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-widget-order-drag {
  opacity: 1;
  background: #fff !important;
  border: 2px solid #8B5CF6 !important;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25) !important;
  border-radius: 0.5rem;
  cursor: grabbing !important;

  .drag-handle {
    cursor: grabbing !important;
    color: #8B5CF6;
  }
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 0.75rem;
  color: #6c757d;
  cursor: grab;
  border-radius: 0.375rem;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;

  &:hover {
    background: #e9ecef;
    color: #495057;
  }

  &:active {
    cursor: grabbing;
  }

  .i-Drag {
    font-size: 1.1rem;
  }
}

.widget-order-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.75rem;
  padding: 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6c757d;
  background: #e9ecef;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.dashboard-widget-order-chosen .widget-order-number,
.dashboard-widget-order-drag .widget-order-number {
  background: #8B5CF6;
  color: #fff;
}

.widget-order-label {
  flex: 1;
  font-weight: 500;
  color: #212529;
  font-size: 0.9375rem;
}

// ========================================
// SETTINGS — POS Receipt Demo
// ========================================

.pos-receipt-demo {
  width: 330px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  padding: 10px;
  border: 1px dashed #dee2e6;
  font-size: 11px;

  .info {
    text-align: center;
  }

  .table_data {
    width: 100%;
    font-size: 11px;
  }
}

.demo-logo-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e9ecef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: #6c757d;

  &.small {
    width: 40px;
    height: 40px;
    font-size: 8px;
  }
}

.demo-logo-rect {
  width: 60px;
  height: 40px;
  background: #e9ecef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  color: #6c757d;
  border-radius: 4px;
}

.demo-qr-box {
  width: 80px;
  height: 80px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  margin: 0 auto;
}

.zatca-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.zatca-qr-title {
  font-weight: 700;
  font-size: 10px;
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.receipt-layout-3 {
  .info {
    text-align: left;

    .d-flex {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }
  }
}

.receipt-font-sm {
  font-size: 11px;
}

// ========================================
// SETTINGS — POS Receipt Responsive
// ========================================

@media (max-width: 768px) {
  .pos-receipt-demo {
    width: 100%;
    padding: 12px;
    font-size: 10px;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    .table_data {
      font-size: 10px !important;
      min-width: 100%;

      td, th {
        white-space: nowrap;
        padding: 2px 4px;
      }

      td:first-child {
        white-space: normal;
        word-wrap: break-word;
      }
    }
  }

  .demo-logo-circle {
    width: 50px;
    height: 50px;
    font-size: 9px;

    &.small {
      width: 35px;
      height: 35px;
      font-size: 7px;
    }
  }

  .demo-logo-rect {
    width: 50px;
    height: 35px;
    font-size: 7px;
  }

  .demo-qr-box {
    width: 70px;
    height: 70px;
  }

  .zatca-qr-title {
    font-size: 9px;
  }

  .receipt-layout-3 {
    .info .d-flex {
      flex-direction: column;
      gap: 8px;
    }

    .demo-logo-rect {
      align-self: flex-end;
    }
  }

  .settings-container .tab-content {
    .form-group {
      width: 100%;
    }

    .btn-group-toggle.btn-group {
      display: flex;
      flex-wrap: wrap;
      width: 100%;

      .btn {
        flex: 1;
        min-width: 0;
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }

  .pos-receipt-demo .table_data {
    font-size: 10px !important;
  }
}

@media (max-width: 480px) {
  .settings-container .tab-content {
    .btn-group-toggle.btn-group {
      flex-direction: column;

      .btn {
        width: 100%;
        margin-bottom: 4px;
        border-radius: 0.25rem !important;
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
        white-space: normal;
        word-wrap: break-word;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }

  .pos-receipt-demo {
    padding: 8px;
    font-size: 9px;

    .table_data {
      font-size: 9px !important;
    }

    small {
      word-wrap: break-word;
      overflow-wrap: break-word;
    }
  }

  .demo-logo-circle {
    width: 40px;
    height: 40px;
    font-size: 8px;

    &.small {
      width: 30px;
      height: 30px;
      font-size: 6px;
    }
  }

  .demo-logo-rect {
    width: 40px;
    height: 30px;
    font-size: 6px;
  }

  .demo-qr-box {
    width: 60px;
    height: 60px;
  }

  .zatca-qr-title {
    font-size: 8px;
  }
}

@media (max-width: 360px) {
  .pos-receipt-demo {
    font-size: 8px;
    padding: 6px;

    .table_data {
      font-size: 8px !important;
    }

    td, th {
      padding: 2px 4px;
    }
  }
}

// ========================================
// SETTINGS — System Settings Responsive
// ========================================

@media (max-width: 991.98px) {
  .settings-sidebar {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    min-height: auto;
  }

  .settings-content-wrapper {
    padding: 1.5rem;
  }

  .settings-content-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;

    h4 {
      font-size: 1.25rem;
    }

    p {
      font-size: 0.8125rem;
    }
  }
}

@media (max-width: 767.98px) {
  .settings-container {
    margin: 0 -15px;
  }

  .settings-content-wrapper {
    padding: 1rem;
  }

  .settings-content-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;

    h4 {
      font-size: 1.125rem;
    }
  }

  .settings-footer {
    flex-direction: column;
    gap: 1rem;
  }

  .submit-btn {
    width: 100%;
  }

  .settings-tabs-nav {
    max-height: none;
  }

  .settings-header {
    padding: 1rem;

    h5 {
      font-size: 1rem;
    }
  }

  .mobile-tab-selector {
    &.sidebar-open {
      display: none !important;
    }
  }

  .mobile-tab-selector {
    position: relative;
    z-index: 1050;
  }

  .mobile-tab-select {
    position: relative;
    z-index: 1051;

    &:focus {
      z-index: 1052;
    }
  }
}

@media (max-width: 575.98px) {
  .settings-content-wrapper {
    padding: 0.75rem;
  }

  .settings-content-header h4 {
    font-size: 1rem;
  }

  .mobile-tab-selector {
    padding: 0.75rem;
    position: sticky !important;
    top: 0;
    z-index: unset !important;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: visible !important;
  }

  .mobile-tab-select {
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    min-height: 44px;
    width: 100%;

    option {
      padding: 0.625rem 0.875rem;
      font-size: 0.875rem;
      white-space: normal;
      word-wrap: break-word;
      overflow-wrap: break-word;
      max-width: 100%;
    }
  }

  .settings-container .tab-content {
    .form-group {
      margin-bottom: 1rem;
    }

    label {
      font-size: 0.8125rem;
    }

    .vgt-table {
      font-size: 0.8125rem;
    }

    .row > [class*="col-"] {
      margin-bottom: 1rem;
    }

    .btn {
      font-size: 0.875rem;
      padding: 0.5rem 1rem;
    }
  }

  .system-actions-card {
    padding: 1.5rem;
  }
}

// ========================================
// SETTINGS — System Health
// ========================================

.system-health-card {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.metric-card {
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: box-shadow 0.2s ease;

  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

.metric-icon-wrap {
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1;

  i {
    font-size: 2rem;
  }
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

// ========================================
// SETTINGS — SMS Templates
// ========================================

.sms-body-textarea {
  height: 200px !important;
}

// ========================================
// SETTINGS — QuickBooks Sync
// ========================================

.qb-sync-panel {
  background: rgba(15, 23, 42, 0.063);
  border: 1px solid #e5e7eb;
}

.qb-stat-card-total {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.qb-stat-card-synced {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.qb-stat-card-failed {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.qb-emoji-icon {
  font-size: 26px;
}

.qb-audit-message {
  max-width: 300px;
}

.qb-form-full {
  width: 100%;
}

// ========================================
// SETTINGS — Update Settings
// ========================================

.update-settings-panel {
  background: rgba(15, 23, 42, 0.063);
  border: 1px solid #e5e7eb;
}

// ========================================
// SETTINGS — WooCommerce Main
// ========================================

.woocommerce-settings-card {
  border-radius: 12px;
  overflow: hidden;
  border: none;
}

.woocommerce-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  border-radius: 0;

  h4, p, .text-white {
    color: white !important;
  }

  .wc-header-subtitle {
    opacity: 0.9;
  }
}

.woocommerce-icon-wrapper {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.woocommerce-icon {
  font-size: 28px;
  color: white;
}

.connection-badge {
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.woocommerce-tabs {
  .nav-tabs {
    border-bottom: 2px solid #f0f0f0;
    padding: 0 1rem;

    .nav-link {
      border: none;
      border-bottom: 3px solid transparent;
      color: #6c757d;
      font-weight: 500;
      padding: 1rem 1.5rem;
      transition: all 0.3s ease;
      margin-right: 0.5rem;

      &:hover {
        color: #667eea;
        background: rgba(102, 126, 234, 0.05);
        border-bottom-color: rgba(102, 126, 234, 0.3);
      }

      &.active {
        color: #667eea;
        background: transparent;
        border-bottom-color: #667eea;
        font-weight: 600;
      }
    }
  }
}

.woocommerce-tabs-content {
  min-height: 400px;
}

.badge-pulse {
  animation: wcPulse 2s infinite;
}

@keyframes wcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.log-detail-content {
  padding: 0.5rem 0;
}

.log-detail-item label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.log-context {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

// ========================================
// SETTINGS — WooCommerce Shared Tab Styles
// ========================================

.woocommerce-settings-card {

  .info-alert-modern {
    border-radius: 12px;
    border-left: 4px solid #17a2b8;
    background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 100%);
    padding: 1.25rem;
  }

  .action-card {
    border-radius: 12px;
    border: none;
    padding: 1.5rem;
    background: #f8f9fa;
  }

  .stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .stat-card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    &:hover {
      transform: translateY(-8px);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }
  }

  .stat-decoration {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.08;
    top: -30px;
    right: -30px;
  }

  .stat-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
  }

  .stat-icon {
    font-size: 28px;
    color: white;
  }

  .stat-content {
    flex: 1;
    z-index: 1;
  }

  .stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
  }

  .stat-value-small {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  // Entity-specific icon/decoration colors
  .stat-card.total-customers .stat-icon-wrapper,
  .stat-card.total-products .stat-icon-wrapper,
  .stat-card.total-brands .stat-icon-wrapper,
  .stat-card.total-categories .stat-icon-wrapper,
  .stat-card.connection-status .stat-icon-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .stat-card.total-customers .stat-decoration,
  .stat-card.total-products .stat-decoration,
  .stat-card.total-brands .stat-decoration,
  .stat-card.total-categories .stat-decoration,
  .stat-card.connection-status .stat-decoration {
    background: #667eea;
  }

  .stat-card.synced-customers .stat-icon-wrapper,
  .stat-card.synced-products .stat-icon-wrapper,
  .stat-card.synced-brands .stat-icon-wrapper,
  .stat-card.synced-categories .stat-icon-wrapper,
  .stat-card.in-stock .stat-icon-wrapper {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  }

  .stat-card.synced-customers .stat-decoration,
  .stat-card.synced-products .stat-decoration,
  .stat-card.synced-brands .stat-decoration,
  .stat-card.synced-categories .stat-decoration,
  .stat-card.in-stock .stat-decoration {
    background: #10b981;
  }

  .stat-card.unsynced-customers .stat-icon-wrapper,
  .stat-card.unsynced-products .stat-icon-wrapper,
  .stat-card.unsynced-brands .stat-icon-wrapper,
  .stat-card.unsynced-categories .stat-icon-wrapper {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  }

  .stat-card.unsynced-customers .stat-decoration,
  .stat-card.unsynced-products .stat-decoration,
  .stat-card.unsynced-brands .stat-decoration,
  .stat-card.unsynced-categories .stat-decoration {
    background: #f59e0b;
  }

  .stat-card.out-stock .stat-icon-wrapper {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  }

  .stat-card.out-stock .stat-decoration {
    background: #ef4444;
  }

  .stat-card.connection-status {
    &.connected .stat-icon-wrapper {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }

    &.connected .stat-decoration {
      background: #10b981;
    }

    &.disconnected .stat-icon-wrapper {
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    &.disconnected .stat-decoration {
      background: #ef4444;
    }
  }

  .connection-text {
    font-weight: 700;
    color: #667eea;
  }

  .stat-card.connection-status.connected .connection-text {
    color: #10b981;
  }

  .stat-card.connection-status.disconnected .connection-text {
    color: #ef4444;
  }

  // Gradient stat-values (all tabs except OrdersTab)
  .wc-gradient-stats {
    .stat-value {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .stat-card.synced-customers .stat-value,
    .stat-card.synced-products .stat-value,
    .stat-card.synced-brands .stat-value,
    .stat-card.synced-categories .stat-value,
    .stat-card.in-stock .stat-value {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .stat-card.unsynced-customers .stat-value,
    .stat-card.unsynced-products .stat-value,
    .stat-card.unsynced-brands .stat-value,
    .stat-card.unsynced-categories .stat-value {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .stat-card.out-stock .stat-value {
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
  }

  // Action buttons
  .btn-action-primary {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    transition: all 0.3s ease;

    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
    }
  }

  .btn-action-secondary {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;

    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    }
  }

  .btn-action-bidirectional {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;

    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
    }
  }

  .btn-action-warning,
  .btn-action-refresh,
  .btn-action-danger {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;

    &:hover:not(:disabled) {
      transform: translateY(-2px);
    }
  }

  .mini-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(23, 162, 184, 0.2);
    border-top-color: #17a2b8;
    border-radius: 50%;
    animation: wcSpin 0.6s linear infinite;
  }

  @keyframes wcSpin {
    to { transform: rotate(360deg); }
  }

  // Progress card (ProductsTab, StockTab)
  .progress-card {
    border-radius: 12px;
    border: none;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  }

  .progress-header {
    display: flex;
    align-items: center;
  }

  .progress-modern {
    border-radius: 10px;
    overflow: hidden;
    background: #e9ecef;

    .progress-bar {
      background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
      border-radius: 10px;
    }
  }

  .progress-text {
    font-weight: 700;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }

  .progress-details {
    padding-top: 0.5rem;
  }

  .progress-detail-item {
    display: flex;
    align-items: center;
    font-size: 14px;
  }

  // Logs (LogsTab, StatusOverviewTab)
  .log-message {
    font-size: 13px;
    color: #6c757d;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status-badge {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 12px;
  }

  .logs-overview-card,
  .logs-card {
    border-radius: 12px;
    border: none;

    .card-header {
      background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
      border-bottom: 2px solid #e9ecef;
      padding: 1.25rem 1.5rem;
      border-radius: 12px 12px 0 0;
    }
  }

  .logs-table {
    thead.logs-table-header th {
      background: #f8f9fa;
      font-weight: 700;
      color: #495057;
      text-transform: uppercase;
      font-size: 12px;
      letter-spacing: 0.5px;
      border-bottom: 2px solid #dee2e6;
      padding: 1rem;
    }

    tbody {
      tr {
        transition: all 0.2s ease;

        &:hover {
          background: #f8f9ff;
          transform: scale(1.01);
        }
      }

      td {
        padding: 1rem;
        vertical-align: middle;
      }
    }
  }

  // Filters (LogsTab)
  .filters-card {
    border-radius: 12px;
    border: none;

    .card-header {
      background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
      border-bottom: 2px solid #e9ecef;
      padding: 1rem 1.5rem;
      border-radius: 12px 12px 0 0;
    }
  }

  .form-group-modern {
    margin-bottom: 0;

    label {
      font-weight: 600;
      color: #495057;
      margin-bottom: 0.5rem;
      font-size: 13px;
    }
  }

  .form-control-modern {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    height: 40px;

    &:focus {
      border-color: #667eea;
      box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    }
  }

  .v-select-modern .vs__dropdown-toggle {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    min-height: 40px;

    &:focus {
      border-color: #667eea;
    }
  }

  .pagination-modern {
    .page-link {
      border-radius: 8px;
      margin: 0 2px;
      border: 1px solid #dee2e6;
      color: #667eea;

      &:hover {
        background: #f8f9ff;
        border-color: #667eea;
      }
    }

    .page-item.active .page-link {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-color: #667eea;
      color: white;
    }
  }
}

// ========================================
// SETTINGS — WooCommerce SettingsTab
// ========================================

.woocommerce-settings-card {
  .settings-form-card {
    border-radius: 12px;
    border: none;

    .card-header {
      background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
      border-bottom: 2px solid #e9ecef;
      padding: 1.25rem 1.5rem;
      border-radius: 12px 12px 0 0;
    }
  }

  .settings-form-card .form-group-modern {
    label {
      font-size: 14px;
    }
  }

  .input-icon-wrapper {
    position: relative;
  }

  .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 1;
  }

  .settings-form-card .form-control-modern {
    padding-left: 40px;
    height: 44px;
  }

  .form-help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 12px;
  }

  .connection-status-wrapper {
    display: flex;
    align-items: center;
  }

  .connection-status-badge {
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .btn-modern-primary {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    }
  }

  .btn-modern-outline {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-width: 2px;
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
    }
  }

  .sync-alert-modern {
    border-radius: 8px;
    border-left: 4px solid #667eea;
    background: #f8f9ff;
    padding: 1rem;
  }

  .guide-card {
    border-radius: 12px;
    border: none;

    .card-header {
      background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
      border-bottom: 2px solid #e9ecef;
      padding: 1.25rem 1.5rem;
      border-radius: 12px 12px 0 0;
    }
  }

  .guide-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;

    &:last-child {
      border-bottom: none;
    }
  }

  .guide-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 15px;
    display: flex;
    align-items: center;
  }

  .guide-intro {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
  }

  .guide-intro code,
  .guide-list code {
    background: #e2e8f0;
    color: #1e293b;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
  }

  .guide-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;

    li {
      padding: 0.5rem 0;
      display: flex;
      align-items: flex-start;
      color: #4a5568;
      line-height: 1.6;
    }
  }

  .code-block-wrapper {
    margin-top: 0.75rem;
  }

  .code-label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    margin-bottom: 0.5rem;
    display: block;
  }

  .code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    border: 1px solid #334155;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
  }
}
