:root {
      --p-color-bg-app: #f6f6f7;
      --p-color-bg-surface: #ffffff;
      --p-color-border: #e1e3e5;
      --p-color-text: #202223;
      --p-color-text-secondary: #6d7175;
      --p-color-primary: #008060;
      --p-color-primary-hover: #006e52;
      --p-color-success: #108043;
      --p-color-critical: #d72c0d;
      --p-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      --p-border-radius: 8px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: var(--p-color-bg-app);
      color: var(--p-color-text);
      line-height: 1.5;
      padding: 24px;
    }

    .container {
      max-width: 960px;
      margin: 0 auto;
    }

    .header {
      margin-bottom: 24px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }

    .header h1 {
      font-size: 20px;
      font-weight: 600;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 24px;
      padding: 0 10px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 500;
      background-color: #e3f1df;
      color: var(--p-color-success);
      box-sizing: border-box;
    }

    .badge.disconnected {
      background-color: #fbeae5;
      color: var(--p-color-critical);
    }

    #billing-status {
      cursor: pointer;
      transition: opacity 0.15s ease, transform 0.1s ease;
      user-select: none;
    }
    #billing-status:hover {
      opacity: 0.85;
      transform: translateY(-1px);
    }
    #billing-status:active {
      transform: translateY(0);
    }

    /* Card Layout */
    .card {
      background: var(--p-color-bg-surface);
      border: 1px solid var(--p-color-border);
      border-radius: var(--p-border-radius);
      box-shadow: var(--p-shadow);
      padding: 24px;
      margin-bottom: 24px;
    }

    .card-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 16px;
    }

    /* Drag & Drop Zone */
    .dropzone {
      border: 2px dashed #b4b9be;
      border-radius: var(--p-border-radius);
      padding: 40px 20px;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s ease-in-out;
      background: #fafbfb;
    }

    .dropzone:hover, .dropzone.dragover {
      border-color: var(--p-color-primary);
      background-color: #f3faf7;
    }

    .dropzone-icon {
      font-size: 32px;
      margin-bottom: 12px;
      color: var(--p-color-text-secondary);
    }

    .dropzone-text {
      font-size: 14px;
      color: var(--p-color-text);
      font-weight: 500;
      margin-bottom: 4px;
    }

    .dropzone-subtext {
      font-size: 12px;
      color: var(--p-color-text-secondary);
    }

    /* File Info */
    .file-info {
      display: none;
      align-items: center;
      justify-content: space-between;
      padding: 12px;
      border: 1px solid var(--p-color-border);
      border-radius: 6px;
      background: #fafbfb;
      margin-top: 16px;
    }

    .file-name {
      font-weight: 500;
      font-size: 14px;
    }

    .btn-remove {
      background: none;
      border: none;
      color: var(--p-color-critical);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px;
      border-radius: 4px;
      transition: background-color 0.15s ease, opacity 0.15s ease;
    }
    .btn-remove:hover {
      background-color: #fbeae5;
      opacity: 0.85;
    }

    /* Column Mapping Grid */
    .mapping-grid {
      display: none;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
      margin-top: 20px;
      padding-top: 20px;
      border-top: 1px solid var(--p-color-border);
    }

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

    .form-group label {
      font-size: 13px;
      font-weight: 500;
      color: var(--p-color-text);
    }

    .form-control {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid var(--p-color-border);
      border-radius: 6px;
      font-size: 14px;
      background-color: white;
      outline: none;
    }

    .form-control:focus {
      border-color: var(--p-color-primary);
    }
    
    .lang-option-item:hover {
      background-color: #f6f6f7 !important;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 16px;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      border: 1px solid var(--p-color-border);
      background: white;
      color: var(--p-color-text);
      transition: background 0.1s;
    }

    .btn-primary {
      background: var(--p-color-primary);
      border-color: var(--p-color-primary);
      color: white;
    }

    .btn-primary:hover {
      background: var(--p-color-primary-hover);
    }

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

    .actions-bar {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 20px;
    }

    /* Progress bar */
    .progress-container {
      display: none;
      margin-top: 20px;
    }

    .progress-bar {
      width: 100%;
      height: 8px;
      background-color: var(--p-color-border);
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 8px;
    }

    .progress-fill {
      width: 0%;
      height: 100%;
      background-color: var(--p-color-primary);
      transition: width 0.1s ease;
    }

    .progress-status {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      color: var(--p-color-text-secondary);
    }

    /* Log Table */
    .log-container {
      display: none;
      margin-top: 24px;
    }

    .log-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      margin-top: 8px;
      font-size: 13px;
      border-left: 1px solid var(--p-color-border);
      border-top: 1px solid var(--p-color-border);
    }

    .log-table th, .log-table td {
      border-right: 1px solid var(--p-color-border);
      border-bottom: 1px solid var(--p-color-border);
      padding: 8px 12px;
      text-align: left;
    }


    .log-table th {
      background: #f1f2f4;
      font-weight: 600;
      position: sticky;
      top: -1px;
      z-index: 2;
    }

    .status-success {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background-color: #e3f1df;
      color: var(--p-color-success);
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
    }

    .status-failed {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background-color: #fbeae5;
      color: var(--p-color-critical);
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
    }

    .status-warning {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background-color: #fff8e6;
      color: #916a00;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid #ffe8b3;
    }

    /* Promo Banner */
    .promo-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #e7f4f0;
      border: 1px solid #b7dfd2;
      border-radius: var(--p-border-radius);
      padding: 16px;
      margin-bottom: 24px;
    }

    .promo-content h3 {
      font-size: 14px;
      font-weight: 600;
      color: var(--p-color-primary-hover);
    }

    .promo-content p {
      font-size: 13px;
      color: var(--p-color-text-secondary);
    }

    .promo-input-group {
      display: flex;
      gap: 8px;
    }

    /* Premium Dialog Modal */
    .dialog-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(11, 12, 16, 0.5);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      opacity: 0;
      transition: opacity 0.25s ease-out;
    }
    .dialog-box {
      background: var(--p-color-bg-surface);
      border: 1px solid var(--p-color-border);
      border-radius: 12px;
      width: 90%;
      max-width: 400px;
      padding: 24px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.12);
      transform: scale(0.9);
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      color: var(--p-color-text);
    }
    .dialog-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 8px;
    }
    .dialog-message {
      font-size: 14px;
      color: var(--p-color-text-secondary);
      margin-bottom: 24px;
      line-height: 1.5;
    }
    /* Custom Checkbox & Badge Styling */
    input[type="checkbox"].polaris-checkbox {
      -webkit-appearance: none;
      appearance: none;
      box-sizing: border-box;
      flex-shrink: 0;
      width: 16px;
      height: 16px;
      min-width: 16px;
      min-height: 16px;
      border: 1.5px solid #8c9196;
      border-radius: 4px;
      outline: none;
      cursor: pointer;
      display: inline-block;
      vertical-align: middle;
      position: relative;
      background-color: #fff;
      transition: background-color 0.1s ease, border-color 0.1s ease;
      margin: 0;
    }
    input[type="checkbox"].polaris-checkbox:hover {
      border-color: #4a4f54;
    }
    input[type="checkbox"].polaris-checkbox:checked {
      background-color: #008060;
      border-color: #008060;
    }
    input[type="checkbox"].polaris-checkbox:checked::after {
      content: "";
      position: absolute;
      left: 4.5px;
      top: 1px;
      width: 4px;
      height: 8px;
      border: solid #fff;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    input[type="checkbox"].polaris-checkbox:indeterminate {
      background-color: #008060;
      border-color: #008060;
    }
    input[type="checkbox"].polaris-checkbox:indeterminate::after {
      content: "";
      position: absolute;
      left: 3px;
      top: 5.5px;
      width: 7px;
      height: 2px;
      background-color: #fff;
    }
    input[type="checkbox"].polaris-checkbox:disabled {
      background-color: #f1f2f4;
      border-color: #d2d5d9;
      cursor: not-allowed;
    }
    input[type="checkbox"].polaris-checkbox:disabled:checked::after {
      border-color: #a6acb2;
    }
    .location-tag {
      display: inline-block;
      background-color: #e4e6eb;
      color: #32353a;
      border: 1px solid #d2d5d9;
      border-radius: 12px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 600;
      margin-right: 6px;
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .carrier-tag {
      display: inline-block;
      background-color: #e4e6eb;
      color: #32353a;
      border: 1px solid #d2d5d9;
      border-radius: 12px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 500;
    }
    .order-group {
      position: relative;
    }
    .sticky-parent {
      position: sticky !important;
      top: calc(var(--header-height, 36px) - 1px) !important;
      z-index: 1;
    }
    .sticky-parent td {
      background: #fcf8e3 !important;
      box-shadow: inset 0 -1px 0 var(--p-color-border), inset 0 1px 0 var(--p-color-border);
    }
    .col-line {
      width: 70px;
      min-width: 70px;
    }
    .col-order {
      width: 140px;
      min-width: 130px;
    }
    .col-items {
      min-width: 250px;
    }
    .col-tracking {
      width: 200px;
      min-width: 160px;
    }
    .col-carrier {
      width: 150px;
      min-width: 120px;
    }
    .col-url {
      width: 120px;
      min-width: 90px;
    }
