/**
 * PrimeLink Admin Styles
 * Version: 1.0.0
 * Package: PrimeLink
 *
 * @package PrimeLink
 */

/* ============================================
   Toast Notifications
   ============================================ */
.mt_primelink-toast-container {
  position: fixed;
  top: 32px; /* WooCommerce admin bar offset */
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: 100%;
}

.mt_primelink-toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  animation: mt_primelink-toast-slide-in 0.3s ease-out;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.mt_primelink-toast.mt_primelink-toast-exit {
  animation: mt_primelink-toast-slide-out 0.3s ease-in forwards;
  opacity: 0;
  transform: translateX(100%);
}

.mt_primelink-toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
}

.mt_primelink-toast-content {
  flex: 1;
  min-width: 0;
}

.mt_primelink-toast-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 4px 0;
  color: #1d2327;
}

.mt_primelink-toast-message {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  color: #50575e;
}

.mt_primelink-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: #646970;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-top: -2px;
  margin-right: -4px;
}

.mt_primelink-toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1d2327;
}

.mt_primelink-toast-close:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

/* Toast Types */
.mt_primelink-toast-success {
  border-left: 4px solid #00a32a;
}

.mt_primelink-toast-success .mt_primelink-toast-icon {
  background: rgba(0, 163, 42, 0.1);
  color: #00a32a;
}

.mt_primelink-toast-error {
  border-left: 4px solid #d63638;
}

.mt_primelink-toast-error .mt_primelink-toast-icon {
  background: rgba(214, 54, 56, 0.1);
  color: #d63638;
}

.mt_primelink-toast-warning {
  border-left: 4px solid #f0b849;
}

.mt_primelink-toast-warning .mt_primelink-toast-icon {
  background: rgba(240, 184, 73, 0.1);
  color: #dba617;
}

.mt_primelink-toast-info {
  border-left: 4px solid #2271b1;
}

.mt_primelink-toast-info .mt_primelink-toast-icon {
  background: rgba(34, 113, 177, 0.1);
  color: #2271b1;
}

/* Progress bar for auto-dismiss */
.mt_primelink-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.mt_primelink-toast-progress-bar {
  height: 100%;
  background: currentColor;
  transition: width linear;
  border-radius: 0 0 8px 8px;
}

.mt_primelink-toast-success .mt_primelink-toast-progress-bar {
  background: #00a32a;
}

.mt_primelink-toast-error .mt_primelink-toast-progress-bar {
  background: #d63638;
}

.mt_primelink-toast-warning .mt_primelink-toast-progress-bar {
  background: #dba617;
}

.mt_primelink-toast-info .mt_primelink-toast-progress-bar {
  background: #2271b1;
}

/* Animations */
@keyframes mt_primelink-toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes mt_primelink-toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
  .mt_primelink-toast-container {
    top: 46px; /* Mobile admin bar offset */
    right: 10px;
    left: 10px;
    max-width: none;
  }

  /* Global header: stack columns and left-align version on small screens */
  .mt_primelink-dashboard__left,
  .mt_primelink-dashboard__right {
    width: 100%;
  }

  .mt_primelink-dashboard__right {
    align-items: flex-start;
  }

  /* Dashboard: normalize actions layout on small screens */
  .mt_primelink-dashboard .mt_primelink-dashboard__actions{
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }
  .mt_primelink-dashboard .mt_primelink-dashboard__actions .button{
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   Keyboard Shortcuts Info Button & Modal
   ============================================ */
.mt_primelink-shortcuts-info {
  min-width: 36px;
  padding: 6px 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mt_primelink-shortcuts-info .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.mt_primelink-shortcuts-info:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Keyboard Shortcuts Modal */
.mt_primelink-shortcuts-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mt_primelink-shortcuts-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.mt_primelink-shortcuts-modal__content {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.mt_primelink-shortcuts-modal.is-active .mt_primelink-shortcuts-modal__content {
  transform: scale(1);
}

.mt_primelink-shortcuts-modal__header {
  padding: 24px 28px;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mt_primelink-shortcuts-modal__header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1d2327;
}

.mt_primelink-shortcuts-modal__close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #646970;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mt_primelink-shortcuts-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1d2327;
}

.mt_primelink-shortcuts-modal__body {
  padding: 28px;
}

.mt_primelink-shortcuts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mt_primelink-shortcuts-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f1;
}

.mt_primelink-shortcuts-list__item:last-child {
  border-bottom: none;
}

.mt_primelink-shortcuts-list__description {
  flex: 1;
  margin-right: 20px;
}

.mt_primelink-shortcuts-list__description strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 4px;
}

.mt_primelink-shortcuts-list__description span {
  font-size: 13px;
  color: #646970;
}

.mt_primelink-shortcuts-list__keys {
  display: flex;
  gap: 4px;
  align-items: center;
}

.mt_primelink-shortcuts-list kbd {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #1d2327;
  background-color: #f0f0f1;
  border: 1px solid #8c8f94;
  border-bottom-width: 2px;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 2px #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
}

.mt_primelink-shortcuts-list__separator {
  margin: 0 8px;
  color: #8c8f94;
  font-size: 12px;
}

.mt_primelink-shortcut-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  font-size: 12px;
  color: #50575e;
  z-index: 999998;
  max-width: 300px;
  animation: mt_primelink-fade-in 0.3s ease-out;
}

.mt_primelink-shortcut-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #1d2327;
  background-color: #f0f0f1;
  border: 1px solid #8c8f94;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 2px #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  margin: 0 2px;
}

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

/* ============================================
   Dashboard Widgets Styles
   ============================================ */
.mt-primelink-dashboard-widget {
  font-size: 13px;
}

.mt-primelink-dashboard-widget .widefat {
  margin: 0;
  border: 1px solid #c3c4c7;
}

.mt-primelink-dashboard-widget .widefat th {
  background: #f6f7f7;
  font-weight: 600;
  padding: 8px 12px;
}

.mt-primelink-dashboard-widget .widefat td {
  padding: 8px 12px;
}

.mt-primelink-dashboard-widget .widefat tbody tr:hover {
  background: #f6f7f7;
}

.mt-primelink-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.mt-primelink-status-badge.status-running {
  background: #2271b1;
  color: #fff;
}

.mt-primelink-status-badge.status-finished,
.mt-primelink-status-badge.status-completed {
  background: #00a32a;
  color: #fff;
}

.mt-primelink-status-badge.status-paused {
  background: #f0b849;
  color: #1d2327;
}

.mt-primelink-status-badge.status-error,
.mt-primelink-status-badge.status-failed {
  background: #d63638;
  color: #fff;
}

.mt-primelink-status-badge.status-idle {
  background: #f0f0f1;
  color: #646970;
}

.mt-primelink-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media screen and (max-width: 782px) {
  .mt-primelink-stats-grid {
    grid-template-columns: 1fr;
  }
}

.mt-primelink-wrap {
    padding: 10px 0;
}

.mt-primelink-choice.disabled {
  opacity: .5;
  pointer-events: none;
}

.mt-primelink-source-panels {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.mt-panel {
  padding: 12px;
}

/* Drag & Drop File Upload */
.mt-primelink-dropzone {
  position: relative;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 50px 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mt-primelink-dropzone:hover {
  border-color: #2271b1;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.mt-primelink-dropzone.drag-over {
  border-color: #2271b1;
  border-style: solid;
  background: rgba(34, 113, 177, 0.05);
  box-shadow: 0 8px 20px rgba(34, 113, 177, 0.2);
  transform: scale(1.02);
}

.mt-primelink-dropzone-content {
  pointer-events: none;
}

.mt-primelink-dropzone-icon {
  font-size: 56px;
  color: #2271b1;
  margin-bottom: 20px;
  opacity: 0.8;
}

.mt-primelink-dropzone-icon .dashicons {
  width: 56px;
  height: 56px;
  font-size: 56px;
}

.mt-primelink-dropzone-text {
  font-size: 18px;
  color: #1d2327;
  margin: 0 0 10px 0;
  font-weight: 500;
  line-height: 1.5;
}

.mt-primelink-dropzone-text strong {
  display: inline;
  font-weight: 600;
}

.mt-primelink-dropzone-text label {
  display: inline;
}

.mt-primelink-dropzone-link {
  color: #2271b1;
  text-decoration: underline;
  cursor: pointer;
  pointer-events: all;
  transition: color 0.2s ease;
  font-weight: 600;
}

.mt-primelink-dropzone-link:hover {
  color: #135e96;
}

.mt-primelink-dropzone-hint {
  font-size: 14px;
  color: #646970;
  margin: 12px 0 0 0;
  font-weight: 400;
}

.mt-primelink-dropzone-progress {
  width: 100%;
  max-width: 400px;
  margin-top: 20px;
}

.mt-primelink-dropzone-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.mt-primelink-dropzone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2271b1, #135e96);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.mt-primelink-dropzone-progress-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  display: block;
  text-align: center;
}

/* Buttons (global wizard) */
.mt-primelink-wrap .button,
.mt-primelink-wrap button.button,
.mt-primelink-wrap select.button{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.70);
  color: #1d2327;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.mt-primelink-wrap .button:hover,
.mt-primelink-wrap button.button:hover,
.mt-primelink-wrap select.button:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.90);
}
.mt-primelink-wrap select.button{
  min-width: 120px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d2327' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 28px;
}
.mt-primelink-wrap .button:disabled,
.mt-primelink-wrap button.button:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.mt-primelink-wrap .button-primary,
.mt-primelink-wrap button.button-primary{
  color: #0b2035;
  border-color: rgba(0,0,0,0.12);
  background: #FFFFFF;
  box-shadow: 0 12px 26px rgba(44, 158, 197, 0.24);
}
.mt-primelink-wrap .button-primary:hover,
.mt-primelink-wrap button.button-primary:hover{
  background: #FFFFFF;
  color: #0b2035;
}
.mt_primelink-slot-hidden{
  display: none !important;
}

.mt-primelink-wizard__footer .button{
  transition: transform .12s ease, box-shadow .12s ease;
}
.mt-primelink-wizard__footer .button:active{
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.mt_primelink-next-wrap{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mt_primelink-save-status{
  font-size: 12px;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.mt_primelink-save-status.is-saving{ color:#2563eb; }
.mt_primelink-save-status.is-saved{ color:#16a34a; }
.mt_primelink-save-status.is-error{ color:#dc2626; }
.mt_primelink-save-status:after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: 120%;
  background: rgba(17,24,39,0.9);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.mt_primelink-save-status:hover:after{
  opacity: 1;
  transform: translateY(0);
}
.mt_primelink-save-spinner{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(37,99,235,0.25);
  border-top-color: #2563eb;
  animation: mt_primelink-spin 0.7s linear infinite;
}
@keyframes mt_primelink-spin{
  to { transform: rotate(360deg); }
}

.mt_primelink-critical-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
.mt_primelink-critical-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,0,0,0.04);
  color: #374151;
}
.mt_primelink-critical-badge.is-ok{
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.mt_primelink-critical-badge.is-missing{
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.mt_primelink-summary-warnings{
  margin-top: 16px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px;
}
.mt_primelink-summary-warnings ul{
  margin: 8px 0 0;
  padding-left: 18px;
}
.mt_primelink-critical-missing{
  margin-top: 12px;
  border-left: 3px solid #f97316;
  padding-left: 10px;
  color: #9a3412;
}
.mt_primelink-critical-missing a{
  color: #2563eb;
  text-decoration: none;
}


/* Mapping UI */
.mt-primelink-mapping h4 { margin: 14px 0 6px; }

.mt-map-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 10px;
}

.mt-map-slot {
  background: rgba(255,255,255,0.6);
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 10px;
}

.mt-map-slot__label {
  font-weight: 600;
  margin-bottom: 6px;
}

.mt-map-slot__drop {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
}

.mt-map-slot__drop.is-over {
  outline: 2px solid rgba(0,0,0,0.2);
}

.mt-primelink-fields .mt-field-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 8px;
}

.mt-field {
  padding: 8px;
  border-radius: 8px;
  cursor: grab;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.18);
}

.mt-field:active { cursor: grabbing; }

.mt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  font-weight: 600;
}

.mt-chip-remove {
  text-decoration: none;
  font-weight: 800;
  line-height: 1;
}

.mt-preview-nav{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px 0;
}

.mt-preview-counter{
  font-weight: 600;
  opacity: 0.85;
}

.mt_primelink-filters-shell{
  align-items: stretch;
}
.mt_primelink-filters-card .mt_primelink-card-header{
  border-bottom: none;
}
.mt_primelink-filters-card .mt_primelink-card-body{
  padding-top: 6px;
}
.mt_primelink-filter-placeholder{
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
}
.mt_primelink-xml-root-row{
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}
.mt_primelink-xml-tags{
  margin-top: 8px;
}
.mt_primelink-xml-tags-list{
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
}
.mt_primelink-xml-tag-btn{
  padding: 6px 10px;
  width: 100%;
  justify-content: flex-start;
}
.mt_primelink-xml-tag-btn.is-filtered{
  border-color: rgba(108, 172, 255, 0.6);
  box-shadow: 0 4px 12px rgba(108, 172, 255, 0.25);
  background: rgba(108, 172, 255, 0.15);
}
.mt_primelink-filter-builder{
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.mt_primelink-filter-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(108, 172, 255, 0.16);
  border: 1px solid rgba(108, 172, 255, 0.28);
  color: #e7f2ff;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.mt_primelink-filter-builder__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.mt_primelink-filter-actions{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mt_primelink-filter-select{
  min-width: 120px;
}
.mt_primelink-filter-rows{
  display: grid;
  gap: 6px;
}
.mt_primelink-filter-row{
  display: grid;
  grid-template-columns: 1fr 120px 1fr auto;
  gap: 6px;
  align-items: center;
}
.mt_primelink-filter-row input,
.mt_primelink-filter-row select{
  width: 100%;
}
.mt_primelink-filter-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  margin-bottom: 6px;
}
.mt_primelink-filter-notice{
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,193,7,0.1);
  border: 1px solid rgba(255,193,7,0.3);
  color: #1d2327;
  font-size: 12px;
}
.mt_primelink-preview-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.mt_primelink-preview-controls label{
  margin: 0;
}
.mt_primelink-preview-pages{
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt_primelink-preview-pages .muted{
  font-size: 12px;
}
.mt_primelink-preview-limit{
  display: grid;
  gap: 2px;
}
.mt_primelink-preview-limit input{
  width: 80px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
}
.mt_primelink-title-inline{
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt_primelink-live-pill.mt_primelink-live-pill--small{
  padding: 2px 8px;
  font-size: 11px;
  box-shadow: 0 4px 10px rgba(215,38,61,0.2);
}
.mt_primelink-label{
  font-weight: 700;
  margin-bottom: 4px;
}
.mt_primelink-preview-card{
  min-height: 180px;
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Step 5 layout */
.mt_primelink-mapping-shell{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

/* Left panel */
.mt_primelink-fields-panel{
  position: sticky;
  top: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
}

.mt_primelink-fields-header{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.mt_primelink-fields-header h3{
  margin: 0;
  font-size: 15px;
  line-height: 38px;
  height: 38px;
  white-space: nowrap;
}
#mt_primelink-field-search{
  width: auto;
  flex: 1 1 auto;
  padding: 7px 10px;
  border-radius: 10px;
  height: 38px;
}

.mt_primelink-field-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 2px;
}

/* Draggable field chip */
.mt_primelink-file-field{
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  cursor: grab;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  user-select: none;
  font-size: 12.5px;
  list-style: none;
}
.mt_primelink-file-field:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.28);
}
.mt_primelink-file-field:active{ cursor: grabbing; }

/* Right main */
.mt_primelink-mapping-main{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Preview card already styled by step 4 vertical classes */
.mt_primelink-preview-card{
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Generic glass card */
.mt_primelink-card--glass{
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
}
.mt_primelink-card-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.mt_primelink-card-header h3{
  margin: 0;
  font-size: 15px;
}
.mt_primelink-card-body{
  padding: 12px;
}

.mt_primelink-groups-hint{
  font-size: 12px;
  opacity: .7;
}
.mt_primelink-map-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt_primelink-unmapped-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,99,71,0.1);
  border: 1px solid rgba(255,99,71,0.4);
  color: #ffc2b5;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mt_primelink-map-slot.unmapped .mt_primelink-map-drop{
  border: 1px dashed rgba(255,99,71,0.6);
  background: rgba(255,99,71,0.08);
}
.mt_primelink-map-slot{
  position: relative;
}
.mt_primelink-map-badge{
  grid-column: 1 / -1;
  justify-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 17, 33, 0.7);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f7f8fb;
  margin-bottom: 6px;
}
.mt_primelink-map-badge + .mt-map-slot__drop{
  margin-top: 0;
}
.mt_primelink-map-slot.is-auto .mt_primelink-map-badge{
  background: rgba(108, 172, 255, 0.16);
  border-color: rgba(108, 172, 255, 0.32);
  color: #0d2c66;
}
.mt_primelink-map-slot.is-manual .mt_primelink-map-badge{
  background: rgba(120, 239, 158, 0.16);
  border-color: rgba(120, 239, 158, 0.32);
  color: #0f5a30;
}
.mt_primelink-map-edit.is-visible{
  display: inline-flex !important;
}
.mt_primelink-mapping-main{
  position: relative;
}
.mt_primelink-file-field.is-new-field{
  border: 1px solid rgba(120, 239, 158, 0.6);
  box-shadow: 0 4px 14px rgba(120, 239, 158, 0.25);
}
.mt_primelink-attr-actions{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.mt_primelink-create-variations{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}
.mt_primelink-attr-row{
  border: 1px dashed rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.02);
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
}
.mt_primelink-attr-row__header{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.mt_primelink-attr-row__header .mt_primelink-attr-name{
  flex: 1;
  min-width: 200px;
}
.mt_primelink-attr-row__drop{
  margin-top: 8px;
}
.mt_primelink-product-type-wrap{
  margin-bottom: 12px;
}
.mt_primelink-product-type-wrap select{
  min-width: 180px;
  width: 100%;
  appearance: none;
  background: #f6f7f7;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mt_primelink-product-type-row{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}
.mt_primelink-product-mapped-slot-inline .mt_primelink-map-slot{
  margin-bottom: 0;
}
.mt_primelink-pd-tab[data-tab="variations"]{
  display: inline-flex;
}
.mt_primelink-product-subsection{
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.07);
}
.mt_primelink-pd-layout{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
}
.mt_primelink-pd-tabs{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mt_primelink-pd-tab{
  border: 1px solid rgba(0,0,0,0.08);
  background: #f6f7f7;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
}
.mt_primelink-pd-tab.is-active{
  background: #e6f0ff;
  border-color: #9bbcff;
}
.mt_primelink-pd-panels{
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 8px;
  padding: 12px;
}
.mt_primelink-pd-panel{
  display: none;
}
.mt_primelink-pd-panel.is-active{
  display: block;
}
.mt_primelink-field-hidden{
  display: none;
}
.mt_primelink-map-expected{
  font-size: 11px;
  color: #8cd2ff;
  margin-top: 2px;
}
.mt_primelink-map-warning{
  margin-top: 4px;
  color: #ffb7a2;
  font-size: 12px;
}
.mt-preview-value.has-warning{
  border-left: 2px solid rgba(255,99,71,0.5);
  padding-left: 6px;
}
.mt_primelink-next-tooltip{
  margin-top: 6px;
  color: #ffb7a2;
  font-size: 12px;
}

/* Templates */
.mt_primelink-templates-body{
  display: grid;
  gap: 8px;
}
.mt_primelink-template-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.mt_primelink-template-row--actions{
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.mt_primelink-template-row input,
.mt_primelink-template-row select{
  width: 100%;
  border-radius: 10px;
  height: 38px;
}
.mt_primelink-template-row--actions input,
.mt_primelink-template-row--actions select,
.mt_primelink-template-row--actions .button{
  height: 38px;
  line-height: 36px;
}
.mt_primelink-template-row--actions input#mt_primelink-target-search{
  flex: 1 1 0;
}
.mt_primelink-template-row--actions select#mt_primelink-load-template{
  flex: 0 0 220px;
}

.mt_primelink-alias-card .mt_primelink-card-body{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mt_primelink-alias-row{
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 8px;
  align-items: center;
}
.mt_primelink-alias-row input{
  height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
}
.mt_primelink-alias-row .button-link-delete{
  margin: 0;
}

.mt_primelink-right-search{
  margin: 0 0 10px;
  display: flex;
  justify-content: flex-end;
}
.mt_primelink-right-search input{
  width: 260px;
  max-width: 100%;
  border-radius: 10px;
  height: 38px;
}
.mt_primelink-other-options{
  display: grid;
  gap: 10px;
}
.mt_primelink-other-options .mt_primelink-form-row{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mt_primelink-other-options .mt_primelink-label{
  font-weight: 600;
}
.mt_primelink-other-options input[type="text"]{
  height: 38px;
  border-radius: 8px;
  padding: 7px 10px;
}
.mt_primelink-settings-card input[type="text"],
.mt_primelink-settings-card input[type="number"],
.mt_primelink-settings-card input[type="password"],
.mt_primelink-settings-card input[type="email"],
.mt_primelink-settings-card select{
  height: 38px;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.mt_primelink-settings-card input#mt_primelink-cron-token,
.mt_primelink-settings-card input#mt_primelink-source-retention{
  height: 38px;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.mt_primelink-settings-card .mt_primelink-check{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.mt_primelink-settings-card .mt_primelink-check input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 0;
}
.mt_primelink-email-builder{
  margin-top: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.75);
}
.mt_primelink-email-builder__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mt_primelink-email-builder__controls{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mt_primelink-email-blocks{
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.mt_primelink-email-block{
  padding: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  background: rgba(255,255,255,0.8);
  display: grid;
  gap: 6px;
}
.mt_primelink-email-block__header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.mt_primelink-email-block__controls button{
  margin-left: 4px;
}
.mt_primelink-email-block textarea,
.mt_primelink-email-block input[type="text"]{
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 6px 8px;
}
.mt_primelink-email-preview{
  max-height: 320px;
  overflow: auto;
}

/* Import chooser modal */
.mt_primelink-import-overlay{
  position: fixed;
  inset: 0;
  background: rgba(10,16,30,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}
.mt_primelink-import-modal{
  max-width: 820px;
  width: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  box-shadow: 0 14px 36px rgba(0,0,0,0.24);
}
.mt_primelink-import-modal__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mt_primelink-import-modal__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 12px;
  margin-top: 12px;
}
.mt_primelink-import-tile{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.mt_primelink-import-tile.is-active{
  border-color: rgba(99,102,241,0.45);
  box-shadow: 0 10px 24px rgba(99,102,241,0.2);
}
.mt_primelink-import-tile.is-disabled{
  opacity: 0.5;
  cursor: not-allowed;
}
.mt_primelink-import-tile__title{
  display: block;
  font-weight: 700;
  font-size: 16px;
}
.mt_primelink-import-tile__desc{
  display: block;
  font-size: 12px;
  opacity: 0.75;
}
.mt_primelink-import-modal-close{
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.mt_primelink-checkbox-row{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.mt_primelink-input-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.mt_primelink-input-actions{
  display: flex;
  gap: 6px;
}

/* Summary (Step 7) */
.mt_primelink-summary-accordion{
  display: grid;
  gap: 10px;
}
.mt_primelink-summary-panel{
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.mt_primelink-summary-panel summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mt_primelink-summary-panel summary::-webkit-details-marker{ display:none; }
.mt_primelink-summary-panel__body{
  padding: 12px 14px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.mt_primelink-summary-step{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 700;
}
.mt_primelink-summary-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 12px;
}
.mt_primelink-summary-card{
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
}
.mt_primelink-summary-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.mt_primelink-summary-eyebrow{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: .8;
}
.mt_primelink-summary-lead{
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.mt_primelink-summary-meta-grid{
  display: grid;
  gap: 6px;
}
.mt_primelink-summary-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}
.mt_primelink-summary-stack{
  display: grid;
  gap: 8px;
}
.mt_primelink-summary-stat-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap: 10px;
  margin: 6px 0;
}
.mt_primelink-summary-stat{
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
}
.mt_primelink-stat-value{
  font-size: 18px;
  font-weight: 700;
}
.mt_primelink-stat-label{
  font-size: 12px;
  opacity: .8;
}
.mt_primelink-summary-row,
.mt_primelink-summary-list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  word-break: break-word;
}
.mt_primelink-summary-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.mt_primelink-pill-row{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mt_primelink-summary-label{
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mt_primelink-summary-value{
  font-size: 13px;
  text-align: right;
  word-break: break-all;
}
.mt_primelink-summary-pill,
.mt_primelink-summary-pill.alt{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  width: fit-content;
  font-size: 12px;
}
.mt_primelink-summary-pill.alt{
  background: rgba(255,255,255,0.04);
}
.mt_primelink-live-pill{
  background: linear-gradient(135deg, #ff5f6d, #d7263d);
  border-color: rgba(215,38,61,0.65);
  color: #fff;
  box-shadow: 0 8px 18px rgba(215,38,61,0.26);
  position: relative;
}
.mt_primelink-live-pill::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  flex-shrink: 0;
  margin-right: 4px;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.55);
  animation: mt_primelinkLivePulse 1.8s ease-in-out infinite;
}
@keyframes mt_primelinkLivePulse{
  0%{ transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  70%{ transform: scale(1); box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100%{ transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.mt_primelink-pill-ghost{
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.12);
}
.mt_primelink-summary-divider{
  height: 1px;
  background: rgba(255,255,255,0.14);
  margin: 2px 0;
}
.mt_primelink-summary-subtitle{
  margin: 6px 0 2px;
  font-size: 12px;
  opacity: .85;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mt_primelink-empty{
  opacity: .7;
  font-style: italic;
}

/* Runner (Step 8) */
.mt_primelink-run-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.mt_primelink-run-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt_primelink-run-status{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mt_primelink-run-status.is-running{ background: rgba(46, 204, 113, 0.14); border-color: rgba(46,204,113,0.3); }
.mt_primelink-run-status.is-paused{ background: rgba(241, 196, 15, 0.14); border-color: rgba(241,196,15,0.3); }
.mt_primelink-run-status.is-finished{ background: rgba(52, 152, 219, 0.14); border-color: rgba(52,152,219,0.3); }
.mt_primelink-run-status.is-idle{ opacity: .85; }

.mt_primelink-run-shell{
  display: grid;
  gap: 12px;
}
.mt_primelink-progress-wrap{
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}
.mt_primelink-progress-bar{
  position: relative;
  width: 100%;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.mt_primelink-progress-bar__inner{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6dd5ed, #2193b0, #6dd5ed);
  background-size: 200% 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 2px;
  box-shadow: 0 2px 8px rgba(33, 147, 176, 0.3);
}

/* Loading shimmer effect when running */
.mt_primelink-progress-bar__inner.is-running::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
.mt_primelink-progress-meta{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mt_primelink-progress-pill{
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 600;
  font-size: 12px;
}
.mt_primelink-run-stats{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 10px;
}
.mt_primelink-run-stat{
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
}
.mt_primelink-stat-label{
  font-size: 12px;
  opacity: .8;
  margin-bottom: 4px;
}
.mt_primelink-run-log{
  margin-top: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.12);
}
.mt_primelink-run-log__line{
  font-family: Consolas, Menlo, Monaco, monospace;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mt_primelink-run-log__line:last-child{
  border-bottom: 0;
}
.mt_primelink-run-log__placeholder{
  opacity: .7;
  font-style: italic;
  text-align: center;
}

/* Dashboard */
.mt_primelink-dashboard__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mt_primelink-dashboard__left{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.mt_primelink-dashboard__right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.mt_primelink-brand-head{
  display: flex;
  align-items: center;
}
.mt_primelink-brand-logo{
  display: block;
  max-width: 200px;
  height: auto;
}
.mt_primelink-brand-logo--large{
  max-width: 190px;
}
.mt_primelink-dashboard__headline{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mt_primelink-wizard-version-inline--top-right{
  text-align: right;
}
.mt_primelink-dashboard__actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mt_primelink-dashboard__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.mt_primelink-dash-card{
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mt_primelink-dash-label{
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: .7;
}
.mt_primelink-dash-value{
  font-size: 26px;
  font-weight: 800;
}
.mt_primelink-dash-value.is-running{ color: #27ae60; }
.mt_primelink-dash-value.is-paused{ color: #f1c40f; }
.mt_primelink-dash-value.is-finished{ color: #2980b9; }

.mt_primelink-dash-panel{
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mt_primelink-dash-panel__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mt_primelink-dash-table{
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}
.mt_primelink-dash-table th,
.mt_primelink-dash-table td{
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mt_primelink-dash-table tbody tr:nth-child(even){
  background: rgba(255,255,255,0.04);
}
.mt_primelink-status-pill{
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}
.mt_primelink-status-running{ background: rgba(46,204,113,0.14); border-color: rgba(46,204,113,0.3); }
.mt_primelink-status-paused{ background: rgba(241,196,15,0.14); border-color: rgba(241,196,15,0.3); }
.mt_primelink-status-finished{ background: rgba(52,152,219,0.14); border-color: rgba(52,152,219,0.3); }
.mt_primelink-status-idle{ opacity: .8; }
.mt_primelink-dash-progress{
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 4px;
}
.mt_primelink-dash-progress__bar{
  height: 100%;
  background: linear-gradient(90deg, #6dd5ed, #2193b0);
}
.mt_primelink-import-actions{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mt_primelink-imports-table .button{
  padding: 6px 10px;
}
.mt_primelink-import-bulk-actions{
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Settings */
.mt_primelink-settings-tabs{
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.mt_primelink-tab-btn{
  padding: 8px 12px;
}
.mt_primelink-tab-btn.is-active{
  border-color: rgba(0,0,0,0.2);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}
.mt_primelink-settings-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 14px;
}
.mt_primelink-settings-card{
  padding: 14px;
  border-radius: 16px;
}
.mt_primelink-settings-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 16px;
}

/* FTP fields alignment */
.mt_primelink-settings-row .mt_primelink-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.mt_primelink-settings-row .mt_primelink-form-row input[type="text"],
.mt_primelink-settings-row .mt_primelink-form-row input[type="password"],
.mt_primelink-settings-row .mt_primelink-form-row input[type="number"],
.mt_primelink-settings-row .mt_primelink-form-row select {
  height: 38px;
  box-sizing: border-box;
  width: 100%;
}

/* FTP protocol, host, and port - better sizing */
.mt_primelink-settings-row > label:has(#mt_primelink-ftp-protocol),
.mt_primelink-settings-row > label:has(#mt_primelink-ftp-host) {
  flex: 0 0 auto;
  min-width: 180px;
  max-width: 180px;
}

.mt_primelink-settings-row > label:has(#mt_primelink-ftp-port) {
  flex: 0 0 auto;
  min-width: 100px;
  max-width: 120px;
}

/* Fallback for browsers that don't support :has() */
.mt_primelink-settings-row > label:first-of-type {
  flex: 0 0 auto;
  min-width: 180px;
  max-width: 180px;
}

.mt_primelink-settings-row > label:nth-of-type(2) {
  flex: 0 0 auto;
  min-width: 180px;
  max-width: 180px;
}

.mt_primelink-settings-row > label:nth-of-type(3) {
  flex: 0 0 auto;
  min-width: 100px;
  max-width: 120px;
}

#mt_primelink-ftp-protocol,
#mt_primelink-ftp-host {
  width: 100%;
  box-sizing: border-box;
}

/* Username and Password - equal width */
.mt_primelink-settings-row > label:has(#mt_primelink-ftp-user),
.mt_primelink-settings-row > label:has(#mt_primelink-ftp-pass) {
  flex: 1 1 0;
  min-width: 200px;
}

/* Root folder and File path - equal width */
.mt_primelink-settings-row > label:has(#mt_primelink-ftp-root),
.mt_primelink-settings-row > label:has(#mt_primelink-ftp-file) {
  flex: 1 1 0;
  min-width: 250px;
}

.mt_primelink-settings-row .mt_primelink-form-row .description {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #666;
}

.mt_primelink-settings-row .mt_primelink-input-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.mt_primelink-settings-row .mt_primelink-check {
  align-self: flex-end;
  margin-bottom: 0;
}
.mt_primelink-tab-panel{ display:none; }
.mt_primelink-tab-panel.is-active{ display:block; }

/* Category toggle (WooCommerce / WooCommerce) */
.mt_primelink-category-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
  padding: 0;
  position: relative;
}

.mt_primelink-category-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 4px;
  gap: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mt_primelink-category-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #1d2327;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mt_primelink-category-tab-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  color: inherit;
}

.mt_primelink-category-tab-btn:hover {
  color: #2271b1;
  background: rgba(0, 0, 0, 0.03);
}

.mt_primelink-category-tab-btn.is-active {
  background: rgba(0, 0, 0, 0.08);
  color: #2271b1;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Refresh button in header actions */
.mt_primelink-dashboard__actions .mt_primelink-imports-refresh,
.mt_primelink-dashboard__actions .mt_primelink-exports-refresh {
  padding: 8px 10px;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mt_primelink-dashboard__actions .mt_primelink-imports-refresh .dashicons,
.mt_primelink-dashboard__actions .mt_primelink-exports-refresh .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
}

.mt_primelink-category-content {
  display: none;
}

.mt_primelink-category-content.is-active {
  display: block;
}

.mt_primelink-settings-tabs {
  margin-bottom: 20px;
}

/* Add space before the first tab panel (cards) after category content */
.mt-primelink-wrap .mt_primelink-category-content ~ .mt_primelink-tab-panel[data-category="woocommerce"]:first-of-type,
.mt-primelink-wrap .mt_primelink-category-content ~ .mt_primelink-tab-panel[data-category="WooCommerce"]:first-of-type {
  margin-top: 20px;
}

/* Refresh button is now positioned absolutely in toggle wrapper */

.mt_primelink-dash-panel h3 {
  margin: 4px 0 0;
}

.mt_primelink-import-section {
  margin-bottom: 24px;
}

.mt_primelink-import-section h4 {
  margin: 0 0 12px;
}

.mt_primelink-import-section-scheduled h4 {
  margin: 24px 0 12px;
}

.mt_primelink-imports-table th.mt_primelink-checkbox-col {
  width: 80px;
  text-align: center;
}

.mt_primelink-imports-table label.mt_primelink-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.mt_primelink-imports-table td.mt_primelink-checkbox-cell {
  text-align: center;
}
#mt_primelink-settings-notice{
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

/* System Status */
.mt_primelink-system-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.mt_primelink-system-card{
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Accordion groups */
.mt_primelink-accordion{
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 8px;
  overflow: hidden;
}
.mt_primelink-accordion-title{
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.mt_primelink-accordion-title::before{
  content: '▸';
  margin-right: 4px;
  transition: transform .15s ease;
}
.mt_primelink-accordion[open] .mt_primelink-accordion-title::before{
  content: '▾';
  transform: rotate(0deg);
}
.mt_primelink-accordion[open] .mt_primelink-accordion-title{
  background: rgba(255,255,255,0.04);
}
.mt_primelink-accordion-body{
  padding: 8px 10px 10px 10px;
  display: grid;
  gap: 6px;
}

/* Map slots */
.mt_primelink-map-slot{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.mt_primelink-map-label{
  font-weight: 600;
  font-size: 12.5px;
  opacity: .9;
}
.mt_primelink-map-drop{
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
  border: 1px dashed rgba(255,255,255,0.25);
  transition: background .12s ease, outline .12s ease;
}

.mt_primelink-muted{
  opacity: .6;
  font-size: 12px;
}

/* Drop hover */
.mt-map-slot__drop.is-over{
  outline: 2px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.14);
}

/* Selected chip in slot */
.mt_primelink-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 12px;
}
.mt_primelink-chip-remove{
  text-decoration: none;
  font-weight: 700;
  opacity: .9;
}
.mt_primelink-chip {
  position: relative;
}
.mt_primelink-chip .mt_primelink-chip-edit-label{
  display: none;
  margin-left: 6px;
  font-size: 11px;
  color: #2563eb;
  font-weight: 600;
}
.mt_primelink-chip:hover .mt_primelink-chip-edit-label{
  display: inline;
}

/* Custom fields row */
.mt_primelink-custom-field{
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.mt_primelink-custom-key{ 
  width: 100%; 
  border-radius: 10px; 
}
.mt_primelink-custom-field .mt_primelink-map-slot{
  width: 100%;
  min-width: 0; /* Allow flex shrinking */
  display: flex;
  flex-direction: column;
}
.mt_primelink-custom-field .mt_primelink-map-drop{
  width: 100%;
  min-height: 36px;
  flex: 1;
  box-sizing: border-box;
}

/* Mobile responsive for custom fields */
@media (max-width: 768px) {
  .mt_primelink-custom-field{
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .mt_primelink-custom-key{
    width: 100%;
  }
  .mt_primelink-custom-field .mt_primelink-map-slot{
    width: 100%;
  }
  .mt_primelink-custom-field .mt_primelink-map-drop{
    width: 100%;
  }
  .mt_primelink-custom-remove{
    justify-self: flex-start;
  }
}

/* ACF fields row - mirror custom fields layout */
.mt_primelink-acf-field{
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.mt_primelink-acf-row{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mt_primelink-acf-label,
.mt_primelink-acf-key{
  width: 100%;
  border-radius: 10px;
}
.mt_primelink-acf-field .mt_primelink-map-slot{
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mt_primelink-acf-field .mt_primelink-map-drop{
  width: 100%;
  min-height: 36px;
  flex: 1;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .mt_primelink-acf-field{
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .mt_primelink-acf-label,
  .mt_primelink-acf-key{
    width: 100%;
  }
  .mt_primelink-acf-field .mt_primelink-map-slot{
    width: 100%;
  }
  .mt_primelink-acf-field .mt_primelink-map-drop{
    width: 100%;
  }
  .mt_primelink-acf-remove{
    justify-self: flex-start;
  }
}

.mt_primelink-radio, .mt_primelink-check{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
  font-size:13px;
}
.mt_primelink-form-row{
  display:grid;
  gap:6px;
  margin-top:6px;
}
.mt_primelink-field-group-header{
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.mt_primelink-field-group-header:before{
  content:'▸';
  font-size:12px;
  transition: transform 0.2s ease;
}
.mt_primelink-field-group-header.is-open:before{
  transform: rotate(90deg);
}
.mt_primelink-field-group-children{
  margin-left: 10px;
  position: relative;
}

.mt_primelink-file-field--group{
  position: relative;
}

.mt_primelink-tree-connector{
  pointer-events: none;
  z-index: 0;
}

.mt_primelink-tree-connector-h{
  pointer-events: none;
  z-index: 0;
}

.mt_primelink-tree-branch{
  font-family: 'Courier New', monospace;
  line-height: 1;
  user-select: none;
  z-index: 1;
  display: inline-block;
}
.mt_primelink-helper-row{
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap:10px;
  margin-bottom:10px;
}
.mt_primelink-helper-card{
  padding:12px;
  border-radius:12px;
  background: rgba(255,255,255,0.75);
  border:1px solid rgba(0,0,0,0.05);
}
.mt_primelink-helper-head{
  font-weight:600;
  margin-bottom:6px;
}
.mt_primelink-helper-status{
  font-size:13px;
  margin-bottom:6px;
}
.mt_primelink-helper-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:6px;
}
.mt_primelink-helper-pill{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border-radius:10px;
  background: rgba(0,0,0,0.04);
  font-size:13px;
}
.mt_primelink-helper-pill.ok{
  background: rgba(16,185,129,0.12);
}

/* Statistics Dashboard */
.mt_primelink-statistics__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mt_primelink-statistics__header-main {
  flex: 1;
  min-width: 0;
}

.mt_primelink-statistics__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mt_primelink-statistics__charts,
.mt_primelink-statistics__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.mt_primelink-statistics__overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.mt_primelink-stat-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mt_primelink-stat-metric:last-child {
  border-bottom: none;
}

.mt_primelink-stat-metric__label {
  font-size: 13px;
  opacity: 0.8;
}

.mt_primelink-stat-metric__value {
  font-weight: 600;
  font-size: 14px;
}

.mt_primelink-stat-table {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mt_primelink-stat-table table {
  min-width: 600px;
  width: 100%;
}

.mt_primelink-stat-table::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.mt_primelink-stat-table::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.mt_primelink-stat-table::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.mt_primelink-stat-table::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.mt_primelink-helper-pill.missing{
  background: rgba(239,68,68,0.12);
  color:#b91c1c;
}
.mt_primelink-suggestion-action{
  margin-left:auto;
}
.mt_primelink-suggestion-clear{
  margin-left:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background: rgba(0,0,0,0.06);
  color:#555;
  text-decoration:none;
  font-weight:700;
  line-height:1;
}
.mt_primelink-suggestion-clear:hover{
  background: rgba(0,0,0,0.12);
}
.mt_primelink-filter-outcome{
  font-size:12px;
  color:#555;
  margin-top:4px;
}
.mt_primelink-filter-inline{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:6px;
}
.mt_primelink-price-adjust-row{
  border:1px dashed rgba(0,0,0,0.06);
  padding:10px;
  border-radius:10px;
  background: rgba(0,0,0,0.02);
}

/* Import Type Selection Grid */
.mt_primelink-import-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.mt_primelink-import-type-card {
  display: flex;
  align-items: center;
  padding: 24px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  width: 100%;
  box-sizing: border-box;
}

.mt_primelink-import-type-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.90);
}

.mt_primelink-import-type-card__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255,0.70);
  border-radius: 12px;
  margin-right: 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(44, 158, 197, 0.2);
}

.mt_primelink-import-type-card__icon .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: #1d2327;
}

.mt_primelink-import-type-card__content {
  flex: 1;
}

.mt_primelink-import-type-card__title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1d2327;
}

.mt_primelink-import-type-card__desc {
  margin: 0;
  font-size: 14px;
  color: #646970;
  line-height: 1.5;
  opacity: 0.8;
}

.mt_primelink-import-type-card__arrow {
  margin-left: 16px;
  color: #646970;
  transition: transform .12s ease, color .12s ease;
  opacity: 0.6;
}

.mt_primelink-import-type-card:hover .mt_primelink-import-type-card__arrow {
  transform: translateX(4px);
  color: #2193b0;
  opacity: 1;
}

.mt_primelink-import-type-card__arrow .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

/* Responsive */
@media (max-width: 1024px){
  .mt_primelink-mapping-shell{
    grid-template-columns: 1fr;
  }
  .mt_primelink-fields-panel{
    position: relative;
    top: 0;
    max-height: 400px;
  }
}

@media (max-width: 768px){
  .mt_primelink-import-type-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .mt_primelink-import-type-card {
    width: 100%;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .mt_primelink-import-type-card__icon {
    margin-right: 0;
    width: 56px;
    height: 56px;
  }
  .mt_primelink-import-type-card__icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }
  .mt_primelink-import-type-card__arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    margin-left: 0;
  }
  .mt_primelink-import-type-card__content {
    width: 100%;
  }

  .mt_primelink-mapping-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mt_primelink-fields-panel {
    position: relative;
    top: 0;
    max-height: 350px;
  }

  .mt_primelink-template-row--actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .mt_primelink-template-row--actions input,
  .mt_primelink-template-row--actions select,
  .mt_primelink-template-row--actions .button {
    width: 100%;
    flex: 1;
  }

  .mt_primelink-template-row--actions select#mt_primelink-load-template {
    flex: 1;
  }

  .mt_primelink-map-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .mt_primelink-map-actions .button {
    flex: 1;
    min-width: calc(50% - 3px);
  }

  .mt_primelink-fields-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .mt_primelink-fields-header h3 {
    line-height: 1.4;
    height: auto;
    margin-bottom: 0;
  }

  #mt_primelink-field-search {
    width: 100%;
  }

  .mt_primelink-pd-layout {
    grid-template-columns: 1fr;
  }

  .mt_primelink-pd-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mt_primelink-pd-tabs {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    gap: 4px;
  }

  .mt_primelink-pd-tabs::-webkit-scrollbar {
    height: 4px;
  }

  .mt_primelink-pd-tab {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 7px 10px;
  }

  .mt_primelink-pd-panels {
    padding: 10px;
  }

  .mt_primelink-product-type-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mt_primelink-product-type-wrap {
    width: 100%;
  }

  .mt_primelink-product-type-wrap select {
    width: 100%;
    min-width: 100%;
  }

  .mt_primelink-attr-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mt_primelink-attr-actions .button {
    width: 100%;
  }

  .mt_primelink-create-variations {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .mt_primelink-import-type-card {
    padding: 16px;
  }

  .mt_primelink-import-type-card__title {
    font-size: 16px;
  }

  .mt_primelink-import-type-card__desc {
    font-size: 13px;
  }

  .mt_primelink-mapping-shell {
    gap: 10px;
  }

  .mt_primelink-fields-panel {
    max-height: 300px;
  }

  .mt_primelink-field-list {
    max-height: 280px;
  }

  .mt_primelink-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mt_primelink-card-header > div:first-child {
    width: 100%;
  }

  .mt_primelink-map-actions {
    flex-direction: column;
  }

  .mt_primelink-map-actions .button {
    width: 100%;
    min-width: 100%;
  }

  .mt_primelink-template-row {
    grid-template-columns: 1fr;
  }
}

/* Template Manager Styles */
.mt-primelink-template-manager {
  margin-top: 20px;
}

.mt-primelink-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.mt-primelink-toolbar__left {
  flex: 1;
  max-width: 400px;
}

.mt-primelink-toolbar__right {
  display: flex;
  gap: 8px;
}

.mt-primelink-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
}

.mt-primelink-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.mt-primelink-template-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mt-primelink-template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.mt-primelink-template-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mt-primelink-template-card__body {
  flex: 1;
  margin-bottom: 12px;
}

.mt-primelink-template-card__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1d2327;
}

.mt-primelink-template-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.mt-primelink-template-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.mt-primelink-template-card__actions .button {
  flex: 1;
  min-width: 80px;
  font-size: 12px;
  padding: 6px 10px;
}

.mt-primelink-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mt-primelink-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mt-primelink-sort-select {
  padding: 6px 10px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  font-size: 13px;
}

.mt-primelink-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Modal Styles */
.mt-primelink-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mt-primelink-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.mt-primelink-modal__content {
  position: relative;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1;
  padding: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.mt-primelink-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.mt-primelink-modal__header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #1d2327;
}

.mt-primelink-modal__close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.70);
  color: #1d2327;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  min-width: auto;
}

.mt-primelink-modal__close:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.90);
  color: #1d2327;
}

.mt-primelink-modal__header .mt-primelink-modal__close {
  padding: 8px 12px;
  font-size: 24px;
  line-height: 1;
  width: auto;
  height: auto;
  min-width: 40px;
}

.mt-primelink-modal__body {
  padding: 28px;
  background: #ffffff;
  color: #1d2327;
  line-height: 1.6;
}

.mt-primelink-modal__footer {
  padding: 20px 28px;
  border-top: 2px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.mt-primelink-modal__footer .button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.70);
  color: #1d2327;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  min-width: auto;
}

.mt-primelink-modal__footer .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.90);
}

.mt-primelink-modal__footer .button-primary {
  color: #0b2035;
  border-color: rgba(0,0,0,0.12);
  background: #FFFFFF;
  box-shadow: 0 12px 26px rgba(44, 158, 197, 0.24);
}

.mt-primelink-modal__footer .button-primary:hover {
  background: #FFFFFF;
  color: #0b2035;
}

/* Anomalies Modal */
.mt-primelink-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Better mobile / small-screen behavior for anomalies modal */
@media (max-width: 782px) {
  .mt-primelink-modal-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
    overflow-y: auto;
  }

  #mt-primelink-anomalies-modal .mt-primelink-modal {
    width: 100%;
    max-width: 100%;
    margin-top: 40px;
    max-height: none;
  }

  #mt-primelink-anomalies-modal .mt-primelink-modal__body {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
}

/* Anomalies review modal – layout */
#mt-primelink-anomalies-modal .mt-primelink-modal {
  max-width: 960px;
  width: 90vw;
  margin: 40px auto;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#mt-primelink-anomalies-modal .mt-primelink-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e4e7;
  box-sizing: border-box;
  width: 100%;
  flex-shrink: 0;
  gap: 12px;
}

#mt-primelink-anomalies-modal .mt-primelink-modal__header > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

#mt-primelink-anomalies-modal .mt-primelink-modal__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

/* Anomalies Export Dropdown */
.mt-primelink-anomalies-export-wrapper {
  position: relative;
}

.mt-primelink-dropdown {
  position: relative;
  display: inline-block;
}

.mt-primelink-export-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mt-primelink-export-button .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 1;
}

.mt-primelink-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 160px;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 4px 0;
  margin: 4px 0 0;
  z-index: 1000;
}

.mt-primelink-dropdown.open .mt-primelink-dropdown-menu {
  display: block;
}

.mt-primelink-dropdown-menu li {
  margin: 0;
  padding: 0;
}

.mt-primelink-dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: #2c3338;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.5;
  transition: background 0.15s ease;
}

.mt-primelink-dropdown-menu li a:hover {
  background: #f0f0f1;
  color: #2271b1;
}

#mt-primelink-anomalies-modal .mt-primelink-modal__close {
  border: none;
  background: #f0f0f1;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#mt-primelink-anomalies-modal .mt-primelink-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

#mt-primelink-anomalies-modal .mt-primelink-modal__footer {
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px;
  border-top: 1px solid #ddd;
}

.mt-primelink-anomalies-summary {
  margin-bottom: 20px;
  padding: 15px 18px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 8px;
}

.mt-primelink-anomaly-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.mt-primelink-anomaly-badge.critical {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.mt-primelink-anomaly-badge.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.mt-primelink-anomaly-badge.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Table layout for anomalies */
.mt-primelink-anomalies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mt-primelink-anomalies-table thead th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e4e7;
  background: #f6f7f7;
  font-weight: 600;
  color: #1d2327;
}

.mt-primelink-anomalies-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.mt-primelink-anomalies-table tbody tr:nth-child(even) {
  background: #fbfbfb;
}

.mt-primelink-anomaly-col-row {
  width: 60px;
  color: #50575e;
}

.mt-primelink-anomaly-col-item {
  width: 25%;
  font-weight: 500;
}

.mt-primelink-anomaly-item-link {
  color: #2271b1;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}

.mt-primelink-anomaly-item-link:hover {
  color: #135e96;
  text-decoration: underline;
}

.mt-primelink-anomaly-col-level {
  width: 110px;
}

.mt-primelink-anomaly-col-type {
  width: 18%;
  color: #50575e;
}

.mt-primelink-anomaly-col-message {
  word-break: break-word;
}

.mt-primelink-template-preview-details {
  color: #1d2327;
}

.mt-primelink-template-preview-details h3 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
  color: #0a4b78;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(10,75,120,0.15);
}

.mt-primelink-template-preview-details h4 {
  margin-top: 28px;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mt-primelink-template-preview-details h4:first-of-type {
  margin-top: 0;
}

.mt-primelink-preview-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: grid;
  gap: 8px;
}

.mt-primelink-preview-list li {
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  font-size: 14px;
  color: #1d2327;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mt-primelink-preview-list li:hover {
  background: #f1f3f5;
  border-color: rgba(0,0,0,0.12);
}

.mt-primelink-preview-list li strong {
  color: #0a4b78;
  font-weight: 600;
  display: inline-block;
  min-width: 140px;
  margin-right: 8px;
}

.mt-primelink-preview-list li:empty {
  display: none;
}

.mt-primelink-template-preview-details .error {
  color: #d63638;
  background: #fef7f7;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d63638;
  margin: 0;
}

/* ============================================
   Table Scroll Wrapper
   ============================================ */
.mt_primelink-table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
}

.mt_primelink-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.mt_primelink-table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.mt_primelink-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.mt_primelink-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.mt_primelink-table-wrapper .mt_primelink-dash-table {
  min-width: 800px;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Mobile (< 480px) */
@media (max-width: 479px) {
  /* Toast Notifications */
  .mt_primelink-toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  /* Dashboard Header */
  .mt_primelink-dashboard__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
  }

  .mt_primelink-dashboard__header-main {
    width: 100%;
  }

  .mt_primelink-dashboard__actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .mt_primelink-dashboard__actions .button {
    width: 100%;
    justify-content: center;
  }

  /* Category Toggle */
  .mt_primelink-category-toggle-wrapper {
    margin: 16px 0;
    gap: 8px;
  }

  .mt_primelink-category-toggle {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Tabs */
  .mt_primelink-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mt_primelink-tab-button,
  .mt_primelink-tab-btn {
    flex: 1;
    min-width: calc(50% - 4px);
    font-size: 12px;
    padding: 8px 10px;
  }

  /* Tables */
  .mt_primelink-table-wrapper {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .mt_primelink-dash-table {
    font-size: 12px;
  }

  .mt_primelink-dash-table th,
  .mt_primelink-dash-table td {
    padding: 8px 10px;
  }

  .mt_primelink-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .mt_primelink-import-actions .button {
    font-size: 11px;
    padding: 6px 8px;
    flex: 1;
    min-width: calc(50% - 2px);
  }

  /* Cards */
  .mt_primelink-card,
  .mt_primelink-dash-panel {
    padding: 16px;
  }

  .mt_primelink-card-header h3 {
    font-size: 16px;
  }

  /* Forms */
  .mt_primelink-form-row {
    flex-direction: column;
    gap: 8px;
  }

  .mt_primelink-form-row label,
  .mt_primelink-form-row .mt_primelink-form-label {
    width: 100%;
    margin-bottom: 0;
  }

  .mt_primelink-form-row .mt_primelink-form-input {
    width: 100%;
  }

  /* Modal */
  .mt-primelink-modal {
    padding: 10px;
  }

  .mt-primelink-modal__content {
    max-height: 90vh;
  }

  .mt-primelink-modal__header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mt-primelink-modal__header h2 {
    font-size: 18px;
  }

  .mt-primelink-modal__body {
    padding: 16px;
  }

  .mt-primelink-modal__footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .mt-primelink-modal__footer .button {
    width: 100%;
  }

  /* Statistics */
  .mt_primelink-statistics__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .mt_primelink-statistics__header-main {
    width: 100%;
  }

  .mt_primelink-statistics__actions {
    width: 100%;
  }

  .mt_primelink-statistics__overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .mt_primelink-statistics__charts,
  .mt_primelink-statistics__details {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .mt_primelink-statistics__charts > *,
  .mt_primelink-statistics__details > * {
    min-width: 100%;
  }

  /* Statistics form filters */
  .mt_primelink-card-body .mt_primelink-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mt_primelink-card-body .mt_primelink-form-row > div {
    width: 100%;
  }

  .mt_primelink-card-body .mt_primelink-form-row .button {
    width: 100%;
  }

  /* Statistics Grid */
  .mt_primelink-statistics__tables {
    grid-template-columns: 1fr !important;
  }

  .mt_primelink-stat-table {
    max-height: 300px;
  }

  .mt_primelink-stat-table table {
    min-width: 500px;
  }

  .mt_primelink-dash-card {
    padding: 12px;
  }

  .mt_primelink-dash-value {
    font-size: 24px;
  }

  .mt_primelink-stat-metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 0;
  }

  .mt_primelink-stat-metric__value {
    width: 100%;
    text-align: left;
  }

  /* Settings Grid */
  .mt_primelink-settings-grid {
    grid-template-columns: 1fr !important;
  }

  /* System Grid */
  .mt_primelink-system-grid {
    grid-template-columns: 1fr !important;
  }

  /* Buttons */
  .button {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Progress Bars */
  .mt_primelink-dash-progress {
    margin-bottom: 4px;
  }
}

/* Tablet (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  /* Dashboard Header */
  .mt_primelink-dashboard__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .mt_primelink-dashboard__actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mt_primelink-dashboard__actions .button {
    flex: 1;
    min-width: calc(50% - 4px);
  }

  /* Category Toggle */
  .mt_primelink-category-toggle-wrapper {
    gap: 12px;
  }

  /* Tables */
  .mt_primelink-table-wrapper .mt_primelink-dash-table {
    min-width: 900px;
  }

  .mt_primelink-dash-table th,
  .mt_primelink-dash-table td {
    padding: 10px 12px;
  }

  .mt_primelink-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mt_primelink-import-actions .button {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Cards */
  .mt_primelink-card,
  .mt_primelink-dash-panel {
    padding: 18px;
  }

  /* Modal */
  .mt-primelink-modal {
    padding: 15px;
  }

  .mt-primelink-modal__content {
    max-width: 95%;
  }

  /* Statistics */
  .mt_primelink-statistics__overview {
    grid-template-columns: repeat(3, 1fr);
  }

  .mt_primelink-statistics__charts,
  .mt_primelink-statistics__details {
    grid-template-columns: 1fr !important;
  }

  /* Statistics form filters */
  .mt_primelink-card-body .mt_primelink-form-row {
    flex-wrap: wrap;
  }

  .mt_primelink-card-body .mt_primelink-form-row > div {
    flex: 1;
    min-width: 150px;
  }

  /* Statistics Grid */
  .mt_primelink-statistics__tables {
    grid-template-columns: 1fr !important;
  }

  .mt_primelink-stat-table {
    max-height: 350px;
  }

  .mt_primelink-stat-table table {
    min-width: 550px;
  }

  /* Settings Grid */
  .mt_primelink-settings-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Small Desktop (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Dashboard Header */
  .mt_primelink-dashboard__header {
    flex-wrap: wrap;
  }

  .mt_primelink-dashboard__actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Tables */
  .mt_primelink-table-wrapper .mt_primelink-dash-table {
    min-width: 1000px;
  }

  .mt_primelink-import-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Statistics */
  .mt_primelink-statistics__overview {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .mt_primelink-statistics__charts,
  .mt_primelink-statistics__details {
    grid-template-columns: 1fr !important;
  }

  /* Statistics Grid */
  .mt_primelink-statistics__tables {
    grid-template-columns: 1fr !important;
  }

  .mt_primelink-stat-table {
    max-height: 350px;
  }

  .mt_primelink-stat-table table {
    min-width: 600px;
  }

  /* Settings Grid */
  .mt_primelink-settings-grid {
    grid-template-columns: 1fr !important;
  }

  /* System Grid */
  .mt_primelink-system-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  }
}

/* Tablet and below (< 768px) - Common adjustments */
@media (max-width: 767px) {
  /* Toast Notifications */
  .mt_primelink-toast-container {
    top: 46px; /* WooCommerce mobile admin bar */
  }

  /* Template Grid */
  .mt-primelink-template-grid {
    grid-template-columns: 1fr;
  }
  
  /* Toolbar */
  .mt-primelink-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .mt-primelink-toolbar__left {
    max-width: 100%;
  }

  .mt-primelink-toolbar__right {
    width: 100%;
  }
  
  /* Panel Header */
  .mt-primelink-panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .mt-primelink-panel-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  /* Mapping UI */
  .mt-map-group {
    grid-template-columns: 1fr;
  }

  .mt-primelink-fields .mt-field-list {
    grid-template-columns: 1fr;
  }

  /* Settings Tabs */
  .mt_primelink-settings-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mt_primelink-settings-tabs .mt_primelink-tab-btn {
    flex: 1;
    min-width: calc(50% - 4px);
  }

  /* Category Tabs Content */
  .mt_primelink-category-content .mt_primelink-tabs {
    flex-wrap: wrap;
  }

  .mt_primelink-category-content .mt_primelink-tab-button {
    flex: 1;
    min-width: calc(50% - 4px);
  }
}

/* Large Desktop (1024px+) - Optimizations */
@media (min-width: 1024px) {
  /* Tables - no scroll needed on large screens if table fits */
  .mt_primelink-table-wrapper .mt_primelink-dash-table {
    min-width: auto;
  }

  /* Statistics Grid */
  .mt_primelink-statistics__tables {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  }
}

/* ============================================
   Step 2 - Source Selection Responsive
   ============================================ */
@media (max-width: 1024px) {
  /* Source panels and grids */
  .mt-primelink-source-panels {
    gap: 12px;
  }

  .mt-panel[data-panel] {
    padding: 16px;
  }

  .mt_primelink-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mt_primelink-input-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mt_primelink-input-actions select,
  .mt_primelink-input-actions .button {
    flex: 1;
    min-width: calc(50% - 4px);
  }

  .mt_primelink-settings-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mt-primelink-dropzone {
    padding: 24px 16px;
  }

  .mt-primelink-dropzone-content {
    gap: 12px;
  }

  .mt-primelink-dropzone-icon {
    width: 64px;
    height: 64px;
  }

  .mt-primelink-dropzone-icon .dashicons {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  /* Step 2 - Source selection grid */
  .mt-primelink-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mt-primelink-choice {
    padding: 14px;
    font-size: 14px;
  }

  .mt-panel[data-panel] {
    padding: 14px;
  }

  .mt-panel[data-panel] h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .mt_primelink-input-actions {
    flex-direction: column;
  }

  .mt_primelink-input-actions select,
  .mt_primelink-input-actions .button {
    width: 100%;
    min-width: 100%;
  }

  .mt_primelink-settings-row {
    gap: 10px;
  }

  .mt-primelink-dropzone {
    padding: 20px 12px;
    min-height: 200px;
  }

  .mt-primelink-dropzone-text {
    font-size: 14px;
  }

  .mt-primelink-dropzone-hint {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Step 2 - Source selection grid */
  .mt-primelink-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mt-primelink-choice {
    padding: 12px;
    font-size: 13px;
  }

  .mt-panel[data-panel] {
    padding: 12px;
  }

  .mt-primelink-dropzone {
    padding: 16px 10px;
    min-height: 180px;
  }

  .mt-primelink-dropzone-icon {
    width: 56px;
    height: 56px;
  }

  .mt-primelink-dropzone-icon .dashicons {
    font-size: 28px;
  }
}

/* ============================================
   Step 3 - Import Options Responsive
   ============================================ */
@media (max-width: 768px) {
  .mt-primelink-stack {
    gap: 10px;
  }

  .mt-primelink-choice-row {
    padding: 14px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .mt-primelink-choice-row {
    padding: 12px;
    font-size: 13px;
  }

  .mt-primelink-choice-row strong {
    font-size: 14px;
  }
}

/* ============================================
   Step 4 - Filters & Preview Responsive
   ============================================ */
@media (max-width: 1024px) {
  .mt-primelink-two-col,
  .mt_primelink-filters-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mt_primelink-filters-card {
    order: 1;
  }

  .mt-primelink-two-col .col:last-child {
    order: 2;
  }

  .mt_primelink-preview-controls {
    flex-wrap: wrap;
    gap: 10px;
  }

  .mt_primelink-preview-pages {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mt_primelink-preview-limit {
    flex: 1;
    min-width: 80px;
  }

  .mt_primelink-preview-limit input {
    width: 100%;
  }

  .mt_primelink-filter-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .mt_primelink-filter-actions select,
  .mt_primelink-filter-actions .button {
    flex: 1;
    min-width: calc(50% - 3px);
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .mt_primelink-filters-shell {
    gap: 12px;
  }

  .mt_primelink-preview-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .mt_primelink-preview-pages {
    flex-direction: column;
  }

  .mt_primelink-preview-pages .button {
    width: 100%;
  }

  .mt_primelink-filter-builder__header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mt_primelink-filter-actions {
    flex-direction: column;
  }

  .mt_primelink-filter-actions select,
  .mt_primelink-filter-actions .button {
    width: 100%;
    min-width: 100%;
  }

  .mt_primelink-xml-root-row {
    flex-direction: column;
    gap: 8px;
  }

  .mt_primelink-xml-root-row .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .mt_primelink-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mt_primelink-preview-controls {
    gap: 8px;
  }

  .mt_primelink-preview-page-label {
    font-size: 12px;
  }
}

/* ============================================
   Step 6 - Import Options & Scheduling Responsive
   ============================================ */
@media (max-width: 768px) {
  .mt_primelink-duplicate-strategy-wrap {
    margin-top: 12px;
  }

  .mt_primelink-duplicate-field {
    display: block;
    margin-bottom: 8px;
  }

  .mt_primelink-update-choose-wrap {
    margin-top: 12px;
  }

  .mt_primelink-update-field {
    display: block;
    margin-bottom: 8px;
  }

  .mt_primelink-incremental-options,
  .mt_primelink-test-mode-options {
    padding-top: 16px;
    margin-top: 16px;
  }

  .mt_primelink-incremental-field {
    display: block;
    margin-bottom: 8px;
  }

  .mt_primelink-schedule-wrap {
    margin-top: 16px;
  }

  .mt_primelink-schedule-type-wrap {
    margin-top: 12px;
  }

  .mt_primelink-schedule-weekly-options .mt_primelink-schedule-day {
    font-size: 11px;
  }

  .mt_primelink-schedule-time-row {
    grid-template-columns: 1fr !important;
  }

  .mt_primelink-schedule-time-remove {
    width: 100%;
    margin-top: 4px;
  }

  .mt_primelink-run-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .mt_primelink-run-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .mt_primelink-run-actions .button {
    flex: 1;
    min-width: calc(50% - 4px);
  }
}

@media (max-width: 480px) {
  .mt_primelink-run-actions {
    flex-direction: column;
  }

  .mt_primelink-run-actions .button {
    width: 100%;
    min-width: 100%;
  }

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

  .mt_primelink-run-stat {
    padding: 14px;
  }

  .mt_primelink-schedule-weekly-options {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .mt_primelink-schedule-day {
    font-size: 10px;
    padding: 6px 4px;
  }
}

/* ============================================
   Step 7 - Review Responsive
   ============================================ */
@media (max-width: 768px) {
  .mt_primelink-summary-accordion {
    gap: 8px;
  }

  .mt_primelink-summary-panel summary {
    padding: 10px 12px;
    font-size: 13px;
  }

  .mt_primelink-summary-step {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .mt_primelink-summary-panel__body {
    padding: 10px 12px 12px 12px;
  }

  .mt_primelink-summary-grid {
    grid-template-columns: 1fr;
  }

  .mt_primelink-summary-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mt_primelink-summary-card {
    padding: 10px;
  }

  .mt_primelink-summary-meta {
    padding: 8px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .mt_primelink-summary-panel summary {
    padding: 8px 10px;
    font-size: 12px;
  }

  .mt_primelink-summary-step {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .mt_primelink-summary-stat-grid {
    grid-template-columns: 1fr;
  }

  .mt_primelink-stat-value {
    font-size: 16px;
  }

  .mt_primelink-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .mt_primelink-summary-value {
    text-align: left;
  }
}

/* ============================================
   Step 8 - Run Import Responsive
   ============================================ */
@media (max-width: 768px) {
  .mt_primelink-run-shell {
    margin-top: 16px;
  }

  .mt_primelink-progress-wrap {
    margin-bottom: 16px;
  }

  .mt_primelink-progress-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mt_primelink-progress-pill {
    font-size: 11px;
    padding: 4px 8px;
  }

  .mt_primelink-run-log {
    margin-top: 16px;
    max-height: 400px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .mt_primelink-run-status {
    font-size: 12px;
    padding: 6px 10px;
  }

  .mt_primelink-progress-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .mt_primelink-progress-pill {
    width: 100%;
    text-align: center;
  }

  .mt_primelink-run-log {
    font-size: 11px;
    padding: 12px;
  }

  .mt_primelink-run-stat {
    padding: 12px;
  }

  .mt_primelink-stat-label {
    font-size: 11px;
  }

  .mt_primelink-stat-value {
    font-size: 20px;
  }
}

/* ============================================
   Additional Step Components Responsive
   ============================================ */
@media (max-width: 768px) {
  /* Helper rows */
  .mt_primelink-helper-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mt_primelink-helper-card {
    padding: 12px;
  }

  /* Product data tabs */
  .mt_primelink-pd-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    gap: 4px;
  }

  .mt_primelink-pd-tabs::-webkit-scrollbar {
    height: 3px;
  }

  .mt_primelink-pd-tab {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Accordions */
  .mt_primelink-accordion-title {
    font-size: 14px;
    padding: 10px 12px;
  }

  .mt_primelink-accordion-body {
    padding: 12px;
  }

  /* Form rows in steps */
  .mt_primelink-form-row {
    gap: 8px;
  }

  .mt_primelink-form-row input,
  .mt_primelink-form-row select,
  .mt_primelink-form-row textarea {
    font-size: 14px;
    padding: 8px 10px;
  }

  /* Template row */
  .mt_primelink-template-row {
    flex-direction: column;
    gap: 10px;
  }

  .mt_primelink-template-row input,
  .mt_primelink-template-row .button {
    width: 100%;
  }

  /* Alias card */
  .mt_primelink-alias-card .mt_primelink-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mt_primelink-alias-card .mt_primelink-card-header .button {
    width: 100%;
  }

  /* Groups card */
  .mt_primelink-groups-card .mt_primelink-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mt_primelink-map-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .mt_primelink-map-actions .button {
    flex: 1;
    min-width: calc(50% - 3px);
  }
}

@media (max-width: 480px) {
  .mt_primelink-pd-layout {
    gap: 10px;
  }

  .mt_primelink-pd-tabs {
    gap: 3px;
    padding-bottom: 6px;
  }

  .mt_primelink-pd-tab {
    font-size: 11px;
    padding: 6px 8px;
    min-width: auto;
  }

  .mt_primelink-pd-panels {
    padding: 8px;
    border-radius: 6px;
  }

  .mt_primelink-product-type-row {
    gap: 10px;
  }

  .mt_primelink-accordion-title {
    font-size: 13px;
    padding: 8px 10px;
  }

  .mt_primelink-accordion-body {
    padding: 10px;
  }

  .mt_primelink-map-actions {
    flex-direction: column;
  }

  .mt_primelink-map-actions .button {
    width: 100%;
    min-width: 100%;
  }

  .mt_primelink-template-row {
    gap: 8px;
  }
}

/* WooCommerce Admin Bar Adjustments */
@media screen and (max-width: 782px) {
  .mt_primelink-toast-container {
    top: 46px;
  }
}

/* ============================================
   Live Feed Tables - Custom Styling
   ============================================ */

/* Override WordPress default table styles for Live Feed tables */
.mt-primelink-live-feed-container .wp-list-table,
.mt_primelink-card .wp-list-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border: none;
  margin: 0;
  font-size: 13px;
}

.mt-primelink-live-feed-container .wp-list-table thead,
.mt_primelink-card .wp-list-table thead {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mt-primelink-live-feed-container .wp-list-table thead th,
.mt_primelink-card .wp-list-table thead th {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0f172a;
  opacity: 0.9;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  background: transparent;
}

.mt-primelink-live-feed-container .wp-list-table tbody,
.mt_primelink-card .wp-list-table tbody {
  background: transparent;
}

.mt-primelink-live-feed-container .wp-list-table tbody tr,
.mt_primelink-card .wp-list-table tbody tr {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s ease;
}

.mt-primelink-live-feed-container .wp-list-table tbody tr:hover,
.mt_primelink-card .wp-list-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mt-primelink-live-feed-container .wp-list-table tbody tr:nth-child(even),
.mt_primelink-card .wp-list-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.mt-primelink-live-feed-container .wp-list-table tbody tr:nth-child(even):hover,
.mt_primelink-card .wp-list-table tbody tr:nth-child(even):hover {
  background: rgba(255, 255, 255, 0.08);
}

.mt-primelink-live-feed-container .wp-list-table tbody td,
.mt_primelink-card .wp-list-table tbody td {
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #0f172a;
  vertical-align: middle;
  background: transparent;
}

.mt-primelink-live-feed-container .wp-list-table tbody td strong,
.mt_primelink-card .wp-list-table tbody td strong {
  font-weight: 600;
  color: #0f172a;
}

.mt-primelink-live-feed-container .wp-list-table tbody td code,
.mt_primelink-card .wp-list-table tbody td code {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: #0f172a;
  word-break: break-all;
}

/* Status badges */
.mt-primelink-live-feed-container .status-active,
.mt_primelink-card .status-active {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.mt-primelink-live-feed-container .status-revoked,
.mt_primelink-card .status-revoked,
.mt-primelink-live-feed-container .status-inactive,
.mt_primelink-card .status-inactive {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Buttons in tables */
.mt-primelink-live-feed-container .wp-list-table .button,
.mt_primelink-card .wp-list-table .button {
  margin: 0 4px 0 0;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  transition: all 0.2s ease;
}

.mt-primelink-live-feed-container .wp-list-table .button:hover,
.mt_primelink-card .wp-list-table .button:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mt-primelink-live-feed-container .wp-list-table .button:active,
.mt_primelink-card .wp-list-table .button:active {
  transform: translateY(0);
}

.mt-primelink-live-feed-container .wp-list-table .button:disabled,
.mt_primelink-card .wp-list-table .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mt-primelink-live-feed-container .wp-list-table .button.button-small,
.mt_primelink-card .wp-list-table .button.button-small {
  padding: 4px 10px;
  font-size: 11.5px;
  min-height: 28px;
}

/* Responsive tables */
@media (max-width: 782px) {
  .mt-primelink-live-feed-container .wp-list-table,
  .mt_primelink-card .wp-list-table {
    font-size: 12px;
  }

  .mt-primelink-live-feed-container .wp-list-table thead th,
  .mt_primelink-card .wp-list-table thead th {
    padding: 10px 12px;
    font-size: 11px;
  }

  .mt-primelink-live-feed-container .wp-list-table tbody td,
  .mt_primelink-card .wp-list-table tbody td {
    padding: 12px;
  }

  .mt-primelink-live-feed-container .wp-list-table .button,
  .mt_primelink-card .wp-list-table .button {
    padding: 5px 10px;
    font-size: 11px;
    margin: 2px;
  }
}

/* ============================================
   License Test Result Messages
   ============================================ */
#mt-primelink-license-test-result {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  border-left: 4px solid #dc3545;
  font-size: 14px;
  line-height: 1.5;
}

#mt-primelink-license-test-result.success {
  background-color: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

#mt-primelink-license-test-result.error {
  background-color: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

#mt-primelink-license-test-result strong {
  font-weight: 600;
  margin-right: 8px;
}
