/* ═══════════════════════════════════════════════════════════
   ShopUS Admin — Shopify-exact design system
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --sa-bg:           #f1f2f4;
  --sa-surface:      #ffffff;
  --sa-border:       #e3e5e7;
  --sa-border-focus: #458fff;
  --sa-text:         #1a1a1a;
  --sa-muted:        #6d7175;
  --sa-primary:      #008060;
  --sa-primary-dk:   #006e52;
  --sa-primary-bg:   #e3f1ec;
  --sa-danger:       #d72c0d;
  --sa-danger-bg:    #fbeae5;
  --sa-warn-bg:      #fff5ea;
  --sa-warn:         #916a00;
  --sa-sidebar-bg:   #1a1c1d;
  --sa-sidebar-w:    240px;
  --sa-topbar-h:     56px;
  --sa-radius-sm:    6px;
  --sa-radius:       8px;
  --sa-radius-lg:    12px;
  --sa-shadow-sm:    0 1px 2px rgba(0,0,0,.07);
  --sa-shadow:       0 1px 0 rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.07);
  --sa-font:         'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.sa-body {
  margin: 0;
  font-family: var(--sa-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--sa-text);
  background: var(--sa-bg);
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════
   SHELL
   ════════════════════════════════════════ */
.sa-shell { display: flex; min-height: 100vh; }

/* ════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════ */
.sa-sidebar {
  width: var(--sa-sidebar-w);
  background: var(--sa-sidebar-bg);
  color: #e3e5e7;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  height: 100vh;
  z-index: 50;
  overflow: hidden;
}

/* Brand / store switcher */
.sa-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.sa-brand:hover { background: rgba(255,255,255,.05); }
.sa-brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--sa-primary);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.sa-brand-info { min-width: 0; flex: 1; }
.sa-brand strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.sa-brand small  { font-size: 11px; color: #8c9196; }
.sa-brand-caret  { color: #6d7175; flex-shrink: 0; }

/* Nav scroll area */
.sa-nav {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sa-nav::-webkit-scrollbar { width: 4px; }
.sa-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Section labels */
.sa-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6d7175;
  padding: 14px 10px 4px;
  user-select: none;
}

/* Nav items */
.sa-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--sa-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: #b5babe;
  text-decoration: none;
  transition: background .12s, color .12s;
  line-height: 1.4;
}
.sa-nav-item svg { flex-shrink: 0; opacity: .75; }
.sa-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sa-nav-item:hover svg { opacity: 1; }
.sa-nav-item.active, .sa-nav-item.is-active {
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 600;
}
.sa-nav-item.active svg { opacity: 1; }

/* Sidebar footer */
.sa-sidebar-foot {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 10px 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sa-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #3a3d40;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
  text-decoration: none; overflow: hidden;
}
a.sa-user-avatar:hover { opacity: .9; }
.sa-user-info { flex: 1; min-width: 0; }
.sa-user-name {
  display: block;
  font-size: 12px; font-weight: 600; color: #e3e5e7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
a.sa-user-name:hover { color: #fff; }
.sa-logout { font-size: 11px; color: #6d7175; text-decoration: none; }
.sa-logout:hover { color: #b5babe; }

/* ════════════════════════════════════════
   MAIN + TOPBAR
   ════════════════════════════════════════ */
.sa-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sa-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sa-topbar {
  height: var(--sa-topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--sa-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.sa-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sa-topbar-titles { min-width: 0; }
.sa-topbar-title { font-size: 15px; font-weight: 600; color: var(--sa-text); white-space: nowrap; }
.sa-topbar-sub  { font-size: 12px; color: var(--sa-muted); margin: 2px 0 0; line-height: 1.3; }
.sa-topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* breadcrumb-style back */
.sa-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sa-breadcrumb a { color: var(--sa-muted); text-decoration: none; }
.sa-breadcrumb a:hover { color: var(--sa-text); }
.sa-breadcrumb span { color: var(--sa-muted); }
.sa-breadcrumb strong { color: var(--sa-text); font-weight: 600; }

/* h1 in topbar */
.sa-topbar h1 { margin: 0; font-size: 15px; font-weight: 600; color: var(--sa-text); }

/* ════════════════════════════════════════
   CONTENT AREA
   ════════════════════════════════════════ */
.sa-content { padding: 20px 24px 48px; flex: 1; }

/* ════════════════════════════════════════
   ALERTS / FLASH
   ════════════════════════════════════════ */
.sa-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin: 0 24px 0; border-radius: var(--sa-radius);
  font-size: 13px; line-height: 1.5; border: 1px solid transparent;
}
.sa-alert-success { background: var(--sa-primary-bg); color: #0c5132; border-color: #b7dece; }
.sa-alert-error, .sa-alert-danger { background: var(--sa-danger-bg); color: #8e1f0b; border-color: #f7b8ac; }
.sa-alert-warning { background: var(--sa-warn-bg); color: var(--sa-warn); border-color: #ffd470; }
.sa-alert-info { background: #e8f4fd; color: #0c3b6e; border-color: #b3d7f5; }

/* ════════════════════════════════════════
   CARDS
   ════════════════════════════════════════ */
.sa-card {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.sa-card > h2, .sa-card > h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; }

.sa-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--sa-border);
}
.sa-card-head h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--sa-text); }
.sa-card-head small { font-size: 12px; color: var(--sa-muted); }

/* ════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════ */
.sa-page-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.sa-h2 { margin: 0; font-size: 20px; font-weight: 700; }
.sa-muted { color: var(--sa-muted); font-size: 13px; margin: 2px 0 0; }

/* ════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════ */
.sa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--sa-radius-sm);
  border: 1px solid transparent;
  padding: 7px 14px;
  font-family: var(--sa-font);
  font-weight: 600; font-size: 13px;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  line-height: 1.4;
}
.sa-btn:focus-visible { outline: 2px solid var(--sa-border-focus); outline-offset: 2px; }

.sa-btn-primary {
  background: var(--sa-primary); color: #fff; border-color: var(--sa-primary);
  box-shadow: 0 1px 0 rgba(0,0,0,.08) inset, 0 -1px 0 rgba(0,0,0,.12) inset;
}
.sa-btn-primary:hover { background: var(--sa-primary-dk); border-color: var(--sa-primary-dk); color: #fff; }

.sa-btn-secondary {
  background: #fff; color: var(--sa-text); border-color: var(--sa-border);
  box-shadow: 0 1px 0 rgba(0,0,0,.05) inset;
}
.sa-btn-secondary:hover { background: #f6f6f7; border-color: #c9cccf; color: var(--sa-text); }

.sa-btn-danger {
  background: #fff; color: var(--sa-danger); border-color: #f1b7ac;
}
.sa-btn-danger:hover { background: var(--sa-danger-bg); border-color: #e8a49a; }

.sa-btn-plain {
  background: transparent; color: var(--sa-muted); border-color: transparent; padding: 7px 10px;
}
.sa-btn-plain:hover { background: #f1f2f4; color: var(--sa-text); }

.sa-btn-sm { padding: 5px 10px; font-size: 12px; }
.sa-btn-icon { padding: 7px; border-radius: var(--sa-radius-sm); }

/* ════════════════════════════════════════
   FORMS / FIELDS
   ════════════════════════════════════════ */
.sa-field { margin-bottom: 14px; }
.sa-field:last-child { margin-bottom: 0; }
.sa-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--sa-text); margin-bottom: 5px;
}
.sa-field input,
.sa-field select,
.sa-field textarea,
.form-control {
  width: 100%;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius-sm);
  padding: 8px 12px;
  font-family: var(--sa-font); font-size: 13px;
  background: #fff; color: var(--sa-text);
  transition: border-color .12s, box-shadow .12s;
  line-height: 1.5;
  min-height: 36px;
  -webkit-appearance: none;
  appearance: none;
}
.sa-field input:focus,
.sa-field select:focus,
.sa-field textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--sa-border-focus);
  box-shadow: 0 0 0 3px rgba(69,143,255,.18);
}
.sa-field textarea { min-height: 80px; resize: vertical; }
.sa-field small { display: block; font-size: 12px; color: var(--sa-muted); margin-top: 4px; }

/* Grid helpers */
.sa-form-grid   { display: grid; gap: 14px; }
.sa-form-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.sa-form-grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
@media (max-width: 768px) {
  .sa-form-grid-2, .sa-form-grid-3 { grid-template-columns: 1fr; }
}

/* Select override */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236d7175' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* ════════════════════════════════════════
   TABLE
   ════════════════════════════════════════ */
.sa-table {
  width: 100%; border-collapse: collapse;
}
.sa-table th {
  text-align: left; padding: 10px 12px;
  font-size: 12px; font-weight: 600; color: var(--sa-muted);
  border-bottom: 1px solid var(--sa-border);
  background: #fafbfb;
  white-space: nowrap;
}
.sa-table td {
  padding: 12px 12px; border-bottom: 1px solid var(--sa-border);
  font-size: 13px; color: var(--sa-text); vertical-align: middle;
}
.sa-table tbody tr:last-child td { border-bottom: none; }
.sa-table tbody tr:hover td { background: #fafbfb; }

/* ════════════════════════════════════════
   BADGES
   ════════════════════════════════════════ */
.sa-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
  background: var(--sa-primary-bg); color: #0c5132;
}
.sa-badge.is-active  { background: var(--sa-primary-bg); color: #0c5132; }
.sa-badge.is-draft   { background: #f1f2f4; color: #6d7175; }
.sa-badge.is-paused  { background: var(--sa-warn-bg); color: var(--sa-warn); }
.sa-badge.is-danger  { background: var(--sa-danger-bg); color: var(--sa-danger); }

/* ════════════════════════════════════════
   PRODUCT CELL (table)
   ════════════════════════════════════════ */
.sa-product-cell { display: flex; align-items: center; gap: 12px; }
.sa-product-cell img {
  width: 40px; height: 40px; object-fit: cover;
  border-radius: var(--sa-radius-sm); border: 1px solid var(--sa-border); flex-shrink: 0; background: #fafafa;
}
.sa-product-cell strong { display: block; font-size: 13px; font-weight: 600; }
.sa-product-cell span   { font-size: 12px; color: var(--sa-muted); }

/* ════════════════════════════════════════
   TOGGLE SWITCH
   ════════════════════════════════════════ */
.sa-switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; flex-shrink: 0; }
.sa-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.sa-switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #babfc3; border-radius: 999px; transition: .2s;
}
.sa-switch-slider::before {
  content: ""; position: absolute;
  height: 16px; width: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.sa-switch input:checked + .sa-switch-slider { background: var(--sa-primary); }
.sa-switch input:checked + .sa-switch-slider::before { transform: translateX(18px); }

/* ════════════════════════════════════════
   AUTH
   ════════════════════════════════════════ */
.sa-auth {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, #f1f2f4, #eef2f0); padding: 24px;
}
.sa-auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid var(--sa-border); border-radius: 16px; padding: 32px;
  box-shadow: var(--sa-shadow);
}
.sa-auth-card h1 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.sa-auth-card p  { margin: 0 0 20px; color: var(--sa-muted); font-size: 13px; }

/* ════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════ */
.sa-grid   { display: grid; gap: 16px; }
.sa-grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.sa-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 960px) { .sa-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 540px)  { .sa-grid-4, .sa-grid-2 { grid-template-columns: 1fr; } }

.sa-stat { padding: 0; }
.sa-stat .label { font-size: 12px; font-weight: 600; color: var(--sa-muted); text-transform: uppercase; letter-spacing: .04em; }
.sa-stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.sa-stat-link { text-decoration: none; color: inherit; display: block; }
.sa-stat-link:hover { border-color: #c9cccf; }

/* ════════════════════════════════════════
   SECTION TITLE (within forms)
   ════════════════════════════════════════ */
.sa-section-title { font-size: 13px; font-weight: 700; margin: 20px 0 10px; }

/* ════════════════════════════════════════
   BACK LINK
   ════════════════════════════════════════ */
.sa-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--sa-muted); text-decoration: none;
  font-size: 13px; font-weight: 500; margin-bottom: 14px;
}
.sa-back-link:hover { color: var(--sa-primary); }

/* ════════════════════════════════════════
   HINT BANNER
   ════════════════════════════════════════ */
.sa-hint {
  background: var(--sa-primary-bg); border: 1px solid #b7dece; color: #0c5132;
  border-radius: var(--sa-radius); padding: 10px 14px; margin-bottom: 16px; font-size: 13px;
}

/* ════════════════════════════════════════
   PRODUCT FORM (tabs, media, flags)
   ════════════════════════════════════════ */
.sa-product-form .sa-card { margin-bottom: 16px; }
.sa-product-form .form-control,
.sa-product-form .bootstrap-tagsinput,
.sa-product-form .select2-container { width: 100% !important; }
.sa-product-form .bootstrap-tagsinput {
  border: 1px solid var(--sa-border); border-radius: var(--sa-radius-sm);
  min-height: 36px; padding: 4px 8px; font-size: 13px;
}
.sa-product-form .note-editor { border-radius: var(--sa-radius-sm) !important; border-color: var(--sa-border) !important; }
.sa-product-form .note-toolbar { background: #fafbfb !important; border-bottom: 1px solid var(--sa-border) !important; }
.note-editable { min-height: 180px !important; }

.sa-media-drop {
  border: 2px dashed var(--sa-border); border-radius: var(--sa-radius);
  padding: 24px 16px; text-align: center; background: #fafbfb;
  transition: border-color .15s, background .15s;
}
.sa-media-drop:hover { border-color: var(--sa-primary); background: #f2faf7; }
.sa-media-preview img {
  max-width: 140px; height: 140px; object-fit: cover;
  border-radius: var(--sa-radius); border: 1px solid var(--sa-border); margin-top: 10px;
}

.sa-gallery-zone {
  border: 1px solid var(--sa-border); border-radius: var(--sa-radius);
  min-height: 120px; padding: 8px; background: #fafbfb; overflow: auto;
}
.sa-gallery-zone::after { content: ""; display: table; clear: both; }
.sa-gallery-zone > .preview-image:first-child { height: 120px; width: 120px; }
.sa-gallery-zone > .preview-image {
  height: 80px; width: 80px; float: left; margin: 0 8px 8px 0;
  position: relative; border-radius: var(--sa-radius-sm); overflow: hidden;
}
.sa-gallery-zone > .preview-image > .image-zone { width: 100%; height: 100%; }
.sa-gallery-zone > .preview-image > .image-zone > img { width: 100%; height: 100%; object-fit: cover; }
.sa-gallery-zone > .preview-image > .image-cancel {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; font-size: 13px;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  z-index: 2; line-height: 20px; text-align: center;
}
.sa-gallery-zone > .preview-image > .image-cancel a { color: #fff; text-decoration: none; }
.sa-gallery-zone > .preview-image:hover .image-cancel { display: flex; }
.sa-gallery-zone > .preview-image:hover .image-zone { opacity: .8; cursor: move; }

.sa-flag-list { display: flex; flex-direction: column; gap: 8px; }
.sa-flag {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius-sm); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 500; margin: 0; transition: border-color .12s, background .12s;
}
.sa-flag:hover { border-color: #c9cccf; background: #fafbfb; }
.sa-flag input { width: 15px; height: 15px; accent-color: var(--sa-primary); margin: 0; cursor: pointer; }

.sa-form-footer {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 0 4px; border-top: 1px solid var(--sa-border); margin-top: 8px;
}
.sa-form-footer .sa-muted { margin: 0; flex: 1; }

.sa-readonly-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; background: #f1f2f4; border-radius: var(--sa-radius-sm);
  font-size: 13px; color: var(--sa-muted); width: 100%;
}
.sa-readonly-pill strong { color: var(--sa-text); font-size: 18px; }

/* Product form tabs */
.pf-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--sa-border); margin-bottom: 20px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.pf-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  color: var(--sa-muted); background: none; cursor: pointer;
  border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: color .12s, border-color .12s;
}
.pf-tab:hover { color: var(--sa-text); }
.pf-tab.is-active { color: var(--sa-primary); border-bottom-color: var(--sa-primary); }
.pf-pane { display: none; }
.pf-pane.is-active { display: block; }

.sa-settings-wrap {
  max-width: 720px;
}
.sa-settings-wrap.is-form {
  max-width: 920px;
}
.sa-settings-intro {
  margin: 0 0 14px;
  color: var(--sa-muted);
  font-size: 13px;
  line-height: 1.5;
}
.sa-settings-list {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow-sm);
  overflow: hidden;
}
a.sa-settings-item,
.sa-settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  text-decoration: none !important;
  color: var(--sa-text) !important;
  border-bottom: 1px solid var(--sa-border);
  transition: background .12s;
  background: #fff;
}
a.sa-settings-item:hover,
a.sa-settings-item:focus,
.sa-settings-item:hover {
  background: #f7f8f9 !important;
  color: var(--sa-text) !important;
  text-decoration: none !important;
}
.sa-settings-item:last-child { border-bottom: none; }
.sa-settings-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: #f1f2f4; color: #4a4a4a;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sa-settings-copy { flex: 1; min-width: 0; }
.sa-settings-copy strong {
  display: block; font-size: 14px; font-weight: 600; color: var(--sa-text); margin: 0 0 2px;
}
.sa-settings-copy small {
  display: block; font-size: 12px; color: var(--sa-muted); line-height: 1.4;
  font-weight: 400;
}
.sa-settings-chevron {
  color: #8c9196;
  flex-shrink: 0;
}
.sa-color-swatch {
  height: 40px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sa-logo-upload img.setting-preview {
  border-radius: 8px; border: 1px solid var(--sa-border); object-fit: contain;
}
.sa-settings-wrap.is-form .sa-form-footer {
  position: sticky;
  bottom: 0;
  background: rgba(241,242,244,.92);
  backdrop-filter: blur(6px);
  margin: 8px -4px 0;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--sa-border);
  z-index: 5;
}
.sa-field input[type="color"] {
  padding: 4px;
  min-height: 40px;
  max-width: 120px;
  cursor: pointer;
}
.sa-field input[type="file"] {
  padding: 7px 10px;
  background: #fafbfb;
}

/* ════════════════════════════════════════
   IMPORT UI
   ════════════════════════════════════════ */
.imp-source-tabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.imp-source-tabs a {
  display: inline-flex; align-items: center; padding: 8px 16px;
  border-radius: 999px; background: #fff; border: 1px solid var(--sa-border);
  color: var(--sa-muted); text-decoration: none; font-size: 13px; font-weight: 600;
}
.imp-source-tabs a.on { background: var(--sa-primary-bg); border-color: var(--sa-primary); color: #0c5132; }
.imp-hero h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.imp-hero p  { color: var(--sa-muted); margin: 0 0 16px; font-size: 13px; }
.imp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.imp-meta { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.imp-meta span { display: block; color: var(--sa-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.imp-meta strong { font-size: 14px; font-weight: 700; }
.imp-steps { display: flex; gap: 6px; margin: 8px 0 16px; flex-wrap: wrap; }
.imp-steps span { padding: 5px 10px; border-radius: 999px; background: #eee; color: #6d7175; font-size: 12px; font-weight: 600; }
.imp-steps span.on { background: var(--sa-primary-bg); color: #0c5132; }
.imp-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.imp-map { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--sa-border); font-size: 13px; }
.imp-arrow { color: var(--sa-muted); text-align: center; }
.imp-bar { height: 8px; background: #eee; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.imp-bar span { display: block; height: 100%; background: var(--sa-primary); border-radius: 999px; }
.imp-progress { list-style: none; padding: 0; margin: 0; }
.imp-progress li { padding: 6px 0; border-bottom: 1px solid var(--sa-border); font-size: 13px; }
.imp-row-imported td:last-child, .imp-row-updated td:last-child { color: #0c5132; font-weight: 600; text-transform: capitalize; }
.imp-row-skipped td:last-child { color: #6d7175; text-transform: capitalize; }
.imp-row-failed td:last-child   { color: var(--sa-danger); font-weight: 600; text-transform: capitalize; }
.imp-howto { margin: 12px 0 0; padding-left: 20px; color: var(--sa-text); font-size: 13px; line-height: 1.65; }
.imp-howto li { margin: 0 0 8px; }
.imp-howto ul { margin: 6px 0 0; padding-left: 16px; }
.imp-howto code { background: #f1f2f4; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
@media (max-width: 800px) { .imp-meta, .imp-checks { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════
   LEGACY IBOX OVERRIDES (for non-converted pages)
   ════════════════════════════════════════ */
body.admin-shopify .wrapper-content,
body.admin-shopify #page-wrapper { background: var(--sa-bg) !important; }
body.admin-shopify .ibox {
  border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow-sm); overflow: hidden; margin-bottom: 16px; background: #fff;
}
body.admin-shopify .ibox-title {
  background: #fff; border-bottom: 1px solid var(--sa-border); padding: 13px 16px;
}
body.admin-shopify .ibox-title h5 { font-size: 14px; font-weight: 700; margin: 0; }
body.admin-shopify .ibox-content { background: #fff; padding: 16px; }
body.admin-shopify .btn { border-radius: var(--sa-radius-sm) !important; font-size: 13px !important; font-weight: 600 !important; }
body.admin-shopify .btn-primary { background: var(--sa-primary) !important; border-color: var(--sa-primary) !important; color: #fff !important; }
body.admin-shopify .btn-primary:hover { background: var(--sa-primary-dk) !important; border-color: var(--sa-primary-dk) !important; }
body.admin-shopify .btn-danger { background: #fff !important; border-color: #f1b7ac !important; color: var(--sa-danger) !important; }
body.admin-shopify .btn-default { background: #fff !important; border-color: var(--sa-border) !important; color: var(--sa-text) !important; }
body.admin-shopify .form-control {
  border-color: var(--sa-border) !important; border-radius: var(--sa-radius-sm) !important;
  font-size: 13px !important; min-height: 36px; padding: 7px 12px !important;
}
body.admin-shopify .form-control:focus { border-color: var(--sa-border-focus) !important; box-shadow: 0 0 0 3px rgba(69,143,255,.18) !important; }
body.admin-shopify table.table th { font-size: 12px; font-weight: 600; color: var(--sa-muted); background: #fafbfb; }
body.admin-shopify table.table td { font-size: 13px; vertical-align: middle; }
body.admin-shopify .panel, body.admin-shopify .panel-default {
  border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg); box-shadow: none;
}
body.admin-shopify .nav-tabs > li > a { font-size: 13px; font-weight: 600; color: var(--sa-muted); }
body.admin-shopify .nav-tabs > li.active > a,
body.admin-shopify .nav-tabs > li.active > a:focus,
body.admin-shopify .nav-tabs > li.active > a:hover { color: var(--sa-primary); border-bottom-color: var(--sa-primary); }
body.admin-shopify label { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
body.admin-shopify .form-group { margin-bottom: 14px; }
body.admin-shopify hr { border-color: var(--sa-border); }
body.admin-shopify .checkbox label, body.admin-shopify .radio label { font-weight: 400; }

/* on/off switch (legacy) */
.onoffswitch { position: relative; width: 40px; user-select: none; }
.onoffswitch-checkbox { display: none; }
.onoffswitch-label { display: block; overflow: hidden; cursor: pointer; border-radius: 999px; }
.onoffswitch-inner { display: block; width: 200%; margin-left: -100%; transition: .2s ease; }
.onoffswitch-inner::before,
.onoffswitch-inner::after { display: block; float: left; width: 50%; height: 22px; line-height: 22px; }
.onoffswitch-inner::before { content: ""; background: var(--sa-primary); }
.onoffswitch-inner::after  { content: ""; background: #babfc3; }
.onoffswitch-switch {
  display: block; width: 16px; height: 16px; background: #fff; border-radius: 50%;
  position: absolute; top: 3px; right: 21px; transition: .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { margin-left: 0; }
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { right: 3px; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .sa-shell { flex-direction: column; }
  .sa-sidebar { position: relative; width: 100%; height: auto; }
  .sa-main { margin-left: 0; }
  .sa-topbar { padding: 0 16px; }
  .sa-content { padding: 16px 16px 40px; }
}
