/* Extracted from templates/index.html */
:root{
  --bg:#0b1220; --card:#121a2b; --muted:#8aa0c2; --text:#e9f0ff;
  --accent:#4da3ff; --ok:#16c784; --warn:#ffae42; --danger:#ff5d5d;
  --pill:#2a3550; --pill-ring:#3c4a6e;
  --btn:#1a2641; --btn-br:#233053; --btn-h:#2a3b68;
  --btn-ghost:#15213b; --btn-ghost-br:#25345a;
  --btn-danger:#3a1e28; --btn-danger-br:#5a2b3b;
  --btn-primary1:#3e7aff; --btn-primary2:#2d69f2; --btn-primary-br:#2958c7;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1600px; margin:24px auto; padding:0 16px}
.grid{display:grid; grid-template-columns: 280px 1fr; gap:20px}
.grid.has-right-sidebar{grid-template-columns: 280px 1fr 300px}
.sidebar{
  position:fixed;
  top:0;
  left:0;
  width:296px;
  z-index:20;
  align-self:start;
  height:100vh;
  max-height:100vh;
  overflow:auto;
  margin-top:0;
  padding:0;
  scrollbar-width:thin;
  transition:transform 180ms ease;
}
.main-content{min-width:0; grid-column:2; width:100%}
.right-sidebar{grid-column:3; min-width:0; position:sticky; top:24px; align-self:start}

body.settings-sidebar-collapsed .sidebar{
  transform:translateX(-100%);
}

body.settings-sidebar-collapsed .grid{
  grid-template-columns:1fr;
}

body.settings-sidebar-collapsed .grid.has-right-sidebar{
  grid-template-columns:1fr 300px;
}

body.settings-sidebar-collapsed .main-content{
  grid-column:1;
}

body.settings-sidebar-collapsed .right-sidebar{
  grid-column:2;
}

.settings-sidebar-toggle{
  position:fixed;
  top:50%;
  left:295px;
  z-index:25;
  width:28px;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #26395e;
  border-left:0;
  border-radius:0 10px 10px 0;
  background:#101a2c;
  color:#dce9ff;
  cursor:pointer;
  transform:translateY(-50%);
  transition:left 180ms ease, background 120ms ease, border-color 120ms ease;
}

.settings-sidebar-toggle:hover{
  background:#152642;
  border-color:#3c5f95;
}

.settings-sidebar-toggle span{
  display:block;
  font-size:24px;
  line-height:1;
  transform:rotate(180deg);
  transition:transform 180ms ease;
}

body.settings-sidebar-collapsed .settings-sidebar-toggle{
  left:0;
}

body.settings-sidebar-collapsed .settings-sidebar-toggle span{
  transform:rotate(0deg);
}

/* Mapping Editor Styles */
.mapping-field{
  margin-bottom:14px;
}
.mapping-label{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:6px;
}
.mapping-title{
  font-size:13px;
  font-weight:600;
  color:var(--text);
}
.mapping-input{
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
  border-radius:8px;
  padding:8px 10px;
  width:100%;
  outline:none;
  font-family:inherit;
  font-size:12px;
  resize:vertical;
  line-height:1.4;
}
.mapping-input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(77,163,255,0.1);
}
.mapping-input::placeholder{
  color:var(--muted);
  opacity:0.6;
}

.card{
  background:var(--card); border:1px solid #1b2742; border-radius:14px; padding:16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.settings-sidebar-panel{
  background:linear-gradient(180deg,rgba(18,26,43,.62),rgba(11,18,32,0));
  border-right:1px solid #1b2742;
  padding:34px 14px 18px 18px;
  min-height:100vh;
}

.settings-sidebar-panel > div:first-child{
  margin-bottom:14px !important;
  padding-bottom:13px;
  border-bottom:1px solid #1b2742;
}

.settings-sidebar-panel h2{
  font-size:15px;
  font-weight:800;
}

.settings-sidebar-panel h3{
  margin-bottom:10px !important;
  font-size:11px !important;
  line-height:1;
  color:var(--muted);
  text-transform:uppercase;
  opacity:1 !important;
}

.settings-sidebar-section{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 0 16px !important;
  margin:0 0 16px !important;
  border-bottom:1px solid #1b2742 !important;
}

.settings-sidebar-panel .field.compact{
  margin-bottom:12px;
}

.settings-sidebar-panel label{
  font-size:11px;
  font-weight:700;
}

.settings-sidebar-panel input[type=text],
.settings-sidebar-panel input[type=password],
.settings-sidebar-panel input[type=number],
.settings-sidebar-panel select{
  border-radius:8px;
  padding:8px 10px;
}

.settings-time-section{
  gap:4px;
}

.settings-sidebar-footer{
  border-top:1px solid #1b2742 !important;
  margin-top:14px !important;
  padding-top:14px !important;
}

.workspace-switcher-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 14px;
  padding:2px 0 10px;
  border-bottom:1px solid #1b2742;
}

.workspace-tool-nav,
.workspace-data-nav,
.workspace-view-nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.workspace-data-nav{
  margin-left:auto;
  justify-content:center;
}

.workspace-view-nav{
  justify-content:flex-end;
}

.workspace-tool-btn{
  appearance:none;
  border:1px solid #243658;
  border-radius:8px;
  background:#0d1728;
  color:#cfe0fb;
  padding:7px 10px;
  font:inherit;
  font-size:12px;
  line-height:1;
  font-weight:800;
  cursor:pointer;
}

.workspace-tool-btn:hover{
  color:#f0f6ff;
  background:#13223b;
  border-color:#36598b;
}

.workspace-nav-btn{
  position:relative;
  appearance:none;
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px 2px 10px;
  min-width:132px;
  font:inherit;
  font-size:14px;
  line-height:1.1;
  font-weight:800;
  text-align:center;
  cursor:pointer;
}

.workspace-nav-btn::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:0;
  height:2px;
  border-radius:999px;
  background:var(--accent);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform 140ms ease;
}

.workspace-nav-btn:hover{
  color:var(--text);
}

.workspace-nav-btn.is-active{
  color:var(--text);
}

.workspace-nav-btn.is-active::after{
  transform:scaleX(1);
}

h2{margin:0 0 12px 0; font-size:18px}
.row{display:flex; gap:8px; align-items:center}
.right{margin-left:auto}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:12px}
.field.compact{margin-bottom:14px}
label{font-size:12px; color:var(--muted)}
input[type=text], input[type=password]{
  background:#0f1727; border:1px solid #1e2a45; color:var(--text);
  border-radius:10px; padding:10px 12px; width:100%; outline:none;
}
input[type=text]:focus, input[type=password]:focus, select:focus{
  border-color:var(--accent); box-shadow:0 0 0 3px rgba(77,163,255,0.1);
}
select{
  background:#0f1727; border:1px solid #1e2a45; color:var(--text);
  border-radius:10px; padding:10px 12px; width:100%; outline:none;
}
input[type=file]{color:var(--muted)}
.muted{color:var(--muted)}
.muted-sm{font-size:12px; color:var(--muted)}
.sp{height:8px}

/* Upload Card Sections */
.divider{
  height:1px; background:linear-gradient(90deg, transparent, #1e2a45 20%, #1e2a45 80%, transparent);
  margin:20px 0;
}

.section-header{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:14px;
}
.section-title{
  font-size:14px; font-weight:600; color:var(--text);
}

/* File Upload Section */
.upload-section .file-upload-area{
  background:#0a1018; border:2px dashed #1e2a45; border-radius:10px;
  padding:32px 20px; text-align:center; transition:all 0.2s; cursor:pointer;
  position:relative;
}
.upload-section .file-upload-area:hover{
  border-color:var(--accent); background:#0d1420;
}
.upload-section .file-upload-area.drag-over{
  border-color:var(--ok); background:#0d1a20; border-style:solid;
  box-shadow:0 0 0 3px rgba(22, 199, 132, 0.1);
}
.file-upload-content{
  display:flex; flex-direction:column; align-items:center; gap:12px;
}
.file-upload-icon{
  font-size:48px; opacity:0.5;
}
.file-upload-title{
  font-size:16px; font-weight:600; color:var(--text);
}
.file-upload-subtitle{
  font-size:14px; color:var(--muted);
}
.file-upload-link{
  color:var(--accent); text-decoration:underline; cursor:pointer;
}
.file-upload-link:hover{
  color:var(--btn-primary1);
}
.file-upload-hint{
  margin-top:8px;
}
.file-selected{
  background:#0a1018; border:2px solid var(--ok); border-radius:10px;
  padding:20px; text-align:left;
}

/* Mode Selection */
.mode-options{
  display:flex; flex-direction:column; gap:10px;
}
.mode-options-row{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:10px;
}
.mode-option{
  display:flex; align-items:flex-start; gap:12px;
  background:#0a1018; border:2px solid #1a2538; border-radius:10px;
  padding:14px; cursor:pointer; transition:all 0.2s;
}
.mode-option:hover{
  border-color:var(--accent); background:#0d1420;
}
.mode-option input[type=radio]{
  margin-top:4px; width:18px; height:18px; cursor:pointer; flex-shrink:0;
}
.mode-option input[type=radio]:checked{
  accent-color:var(--accent);
}
.mode-content{
  flex:1; min-width:0;
}
.mode-label{
  font-weight:600; color:var(--text); margin-bottom:4px; font-size:13px;
}
.mode-desc{
  font-size:11px; color:var(--muted); line-height:1.3;
}

/* Checkbox Option */
.checkbox-option{
  display:flex; align-items:flex-start; gap:12px;
  background:#0a1018; border:1px solid #1a2538; border-radius:10px;
  padding:14px; cursor:pointer; transition:all 0.2s;
}
.checkbox-option:hover{
  border-color:var(--accent); background:#0d1420;
}
.checkbox-option input[type=checkbox]{
  margin-top:2px; width:18px; height:18px; cursor:pointer;
}
.checkbox-option input[type=checkbox]:checked{
  accent-color:var(--accent);
}
.checkbox-content{
  flex:1;
}
.checkbox-label{
  font-weight:600; color:var(--text); margin-bottom:4px;
}
.checkbox-desc{
  font-size:12px; color:var(--muted);
}

/* Action Section */
.action-section{
  display:flex; justify-content:center; padding-top:10px;
}
.btn.large{
  padding:12px 32px; font-size:15px; font-weight:600;
}

.btn{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--btn); border:1px solid var(--btn-br); color:var(--text);
  border-radius:10px; padding:6px 10px; cursor:pointer; text-decoration:none; white-space:nowrap;
  line-height:1.1; font-size:13px;
}
.btn:hover{background:var(--btn-h)}
.btn[disabled]{opacity:.5; cursor:not-allowed}
.btn.primary{background:linear-gradient(180deg,var(--btn-primary1),var(--btn-primary2)); border-color:var(--btn-primary-br)}
.btn.ghost{background:var(--btn-ghost); border-color:var(--btn-ghost-br)}
.btn.danger{background:var(--btn-danger); border-color:var(--btn-danger-br)}
.btnbar{display:inline-flex; gap:8px; flex-wrap:nowrap}
.actions{white-space:nowrap}

table{width:100%; border-collapse:collapse}
th,td{padding:10px 8px; border-bottom:1px solid #1b2742; font-size:14px}
th{color:var(--muted); font-weight:600; text-align:left}
.pill{
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px;
  background:var(--pill); border:1px solid var(--pill-ring); color:var(--text); font-size:12px;
}
.pill-pending{background:#24304e}
.pill-running{background:#2b3a62; border-color:#3f5491}
.pill-done{background:#193a2d; border-color:#1f6b50}
.pill-failed{background:#3a1a1a; border-color:#7b3131}
.pill-cancelled{background:#2a2f3a; border-color:#3d4659}

.bundle-cache-status-btn{
  height:28px;
  min-width:0;
  padding:0 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  pointer-events:none;
}

.workspace-data-refresh-btn{
  height:28px;
  padding:0 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
}

.bundle-cache-status-btn.cache{
  background:#132b22;
  border-color:#1f6d53;
  color:#88f5c8;
}

.bundle-cache-status-btn.shopify{
  background:#1f2d4e;
  border-color:#3e5f9a;
  color:#a8c9ff;
}

.bundle-cache-status-btn.syncing{
  background:#2f3a5c;
  border-color:#6b83b9;
  color:#d9e4ff;
}

.bundle-cache-status-btn.sync{
  background:#2f3a5c;
  border-color:#6b83b9;
  color:#d9e4ff;
}

.bundle-cache-status-btn.error{
  background:#3a1a1a;
  border-color:#7b3131;
  color:#ffb3b3;
}

.bundle-cache-status-btn.idle{
  background:var(--pill);
  border-color:var(--pill-ring);
  color:var(--muted);
}

.topbar{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px}
.topbar .tools{display:flex; gap:8px; align-items:center}

.highlight{
  background:#0f1a31; border:1px solid #264279; border-radius:12px; padding:12px; margin-bottom:14px;
}
.highlight .row{justify-content:space-between}

.downloads a{margin-right:14px}

.bundle-apply-toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.bundle-apply-summary{
  margin-top:10px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #1a2538;
  background:#0a1018;
}

.bundle-apply-summary.ok{
  border-color:#1f6b50;
  background:#0d1d17;
  color:#8fe0be;
}

.bundle-apply-summary.warn{
  border-color:#7b3131;
  background:#241114;
  color:#ffc2c2;
}

.bundle-workspace-empty-state{
  display:flex;
  align-items:center;
  gap:18px;
  padding:22px;
  border:1px dashed #28405f;
  border-radius:14px;
  background:linear-gradient(180deg,#0a1018,#0d1520);
}

.bundle-workspace-empty-state .file-upload-icon{
  flex-shrink:0;
}

.bundle-workspace-empty-state p{
  margin:6px 0 0;
  color:var(--muted);
}

.bundle-upload-modal{
  width:min(720px,92vw);
}

.bundle-meta-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.bundle-meta-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.bundle-meta-toolbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:-2px 0 12px;
  padding-bottom:10px;
  border-bottom:1px solid #1b2742;
}

.bundle-meta-search{
  flex:1 1 320px;
  max-width:520px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.bundle-meta-search span{
  font-size:11px;
  color:var(--muted);
  font-weight:800;
}

.bundle-meta-search input{
  width:100%;
  border:1px solid #213456;
  border-radius:8px;
  background:#0b1424;
  color:var(--text);
  padding:8px 10px;
  outline:none;
  font:inherit;
  font-size:12px;
}

.bundle-meta-search input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(77,163,255,.1);
}

.bundle-meta-filter-tabs{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex:1 1 360px;
  flex-wrap:wrap;
}

.bundle-meta-filter-tab{
  appearance:none;
  border:1px solid #243658;
  border-radius:999px;
  background:#0d1728;
  color:#9fb8e1;
  padding:6px 10px;
  font:inherit;
  font-size:11px;
  line-height:1;
  font-weight:800;
  cursor:pointer;
}

.bundle-meta-filter-tab:hover{
  color:var(--text);
  border-color:#36598b;
}

.bundle-meta-filter-tab.is-active{
  color:#eaf3ff;
  background:#17345e;
  border-color:#4d83cb;
}

.bundle-inline-loading{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:24px;
  padding:3px 8px;
  border:1px solid #263b62;
  border-radius:999px;
  background:#0b1526;
  color:#9fb8e1;
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}

.bundle-inline-loading[hidden]{
  display:none;
}

.bundle-inline-spinner{
  width:12px;
  height:12px;
  border-radius:50%;
  border:2px solid #2a4674;
  border-top-color:#8fb7ff;
  animation:bundleInlineSpin 700ms linear infinite;
  flex:0 0 auto;
}

@keyframes bundleInlineSpin{
  to{ transform:rotate(360deg); }
}

.bundle-meta-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:10px;
}

.bundle-meta-no-results{
  grid-column:1 / -1;
  min-height:90px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #2a3d62;
  border-radius:8px;
  background:#0b1424;
}

.bundle-meta-card{
  position:relative;
  border:1px solid #233458;
  border-radius:8px;
  background:linear-gradient(180deg,#0d1728 0%,#0a111e 100%);
  padding:12px;
  cursor:pointer;
  transition:border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  overflow:hidden;
}

.bundle-meta-card:hover{
  border-color:#3e5f95;
  transform:translateY(-1px);
  box-shadow:0 8px 22px rgba(0,0,0,.22);
}

.bundle-meta-card.has-update{
  border-color:#5f4a1f;
}

.bundle-meta-card.has-danger{
  border-color:#72313a;
}

.bundle-meta-card.has-unsaved{
  border-color:#514189;
}

.bundle-meta-card.is-clean{
  border-color:#25435e;
}

.bundle-meta-corner-tag{
  position:absolute;
  top:0;
  right:0;
  min-width:62px;
  padding:4px 8px 5px;
  text-align:center;
  font-size:9px;
  line-height:1;
  font-weight:900;
  letter-spacing:0;
  color:#eaf2ff;
  background:#1e3559;
  border-left:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
  border-bottom-left-radius:8px;
}

.bundle-meta-card.has-update .bundle-meta-corner-tag{
  color:#ffe0a6;
  background:#4a3511;
}

.bundle-meta-card.has-danger .bundle-meta-corner-tag{
  color:#ffd1d1;
  background:#4a171d;
}

.bundle-meta-card.has-unsaved .bundle-meta-corner-tag{
  color:#e1d7ff;
  background:#2e2455;
}

.bundle-meta-card.is-clean .bundle-meta-corner-tag{
  color:#aef0c5;
  background:#173826;
}

.bundle-create-picker-modal{
  width:min(560px,94vw);
  max-height:88vh;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.bundle-create-editor-modal{
  width:min(1060px,96vw);
  max-height:88vh;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.bundle-create-variant-modal{
  width:min(1180px,96vw);
  max-height:88vh;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.bundle-create-sku-modal{
  width:min(620px,94vw);
  max-height:88vh;
  min-height:0;
  display:flex;
  flex-direction:column;
}

@media (min-width: 981px){
  body.bundle-create-sku-side-by-side{
    --bndl-create-editor-panel: min(860px, calc((100vw - 72px) * .66));
    --bndl-create-sku-panel: min(420px, calc((100vw - 72px) * .36));
    --bndl-create-sku-gap:28px;
  }

  body.bundle-create-sku-side-by-side #bndlCreateEditorModal.show{
    align-items:center;
    justify-content:center;
    padding:16px calc(var(--bndl-create-sku-panel) + var(--bndl-create-sku-gap)) 16px 18px;
  }

  body.bundle-create-sku-side-by-side #bndlCreateEditorModal .bundle-create-editor-modal{
    width:var(--bndl-create-editor-panel);
    max-height:88vh;
  }

  body.bundle-create-sku-side-by-side #bndlCreateSkuModal.show{
    align-items:center;
    background:transparent;
    justify-content:center;
    padding:16px 18px 16px calc(var(--bndl-create-editor-panel) + var(--bndl-create-sku-gap));
    pointer-events:none;
  }

  body.bundle-create-sku-side-by-side #bndlCreateSkuModal .bundle-create-sku-modal{
    width:var(--bndl-create-sku-panel);
    max-height:88vh;
    pointer-events:auto;
    box-shadow:none;
  }

  body.bundle-meta-sku-side-by-side{
    --bndl-meta-panel-height:min(88vh, calc(100vh - 32px));
    --bndl-meta-browser-panel:min(1440px, calc(100vw - 48px));
    overflow:hidden;
  }

  body.bundle-meta-sku-side-by-side #bndlMetaBrowserModal.show{
    align-items:center;
    justify-content:center;
    padding:16px 24px;
  }

  body.bundle-meta-sku-side-by-side #bndlMetaBrowserModal .bundle-meta-browser-wrap{
    width:var(--bndl-meta-browser-panel);
    height:var(--bndl-meta-panel-height);
    max-height:var(--bndl-meta-panel-height);
  }

}

.bundle-create-meta-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.bundle-create-meta-row .bundle-inline-loading{
  margin-left:auto;
}

.bundle-create-product-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-height:0;
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
  padding-bottom:12px;
  scrollbar-gutter:stable;
}

.bundle-create-product-card{
  display:block;
  width:100%;
  text-align:left;
  color:var(--text);
  font:inherit;
  border:1px solid #233458;
  border-radius:9px;
  background:#0b1526;
  padding:9px;
  cursor:pointer;
  transition:border-color 120ms ease, transform 120ms ease;
}

.bundle-create-product-card:hover{
  border-color:#3e5f95;
  transform:translateY(-1px);
}

.bundle-create-product-card.active{
  border-color:#4a78ba;
  background:#10203a;
}

.bundle-create-product-card .title{
  font-size:12px;
  font-weight:700;
  margin-bottom:3px;
  color:#e5efff;
}

.status-badge{
  display:inline-block;
  font-size:9px;
  font-weight:600;
  padding:1px 5px;
  border-radius:3px;
  vertical-align:middle;
  text-transform:uppercase;
  letter-spacing:0.04em;
}
.status-badge.draft{
  background:#3a3320;
  color:#c8a84b;
  border:1px solid #6b5a1e;
}

.bundle-create-product-card .meta,
.bundle-create-product-card .sku{
  font-size:10px;
  color:#9fb8e1;
  line-height:1.35;
}

.bundle-create-selected-header{
  align-items:flex-start;
  display:flex;
  gap:10px;
  justify-content:space-between;
  margin-bottom:8px;
}

.bundle-create-selected-header > div{
  min-width:0;
}

.bundle-create-editor-layout{
  display:grid;
  grid-template-columns:minmax(210px,260px) minmax(0,1fr);
  gap:12px;
  min-height:0;
  flex:1 1 auto;
}

.bundle-create-editor-rail{
  border:1px solid #233458;
  border-radius:9px;
  background:#0a111e;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.bundle-create-editor-rail-head{
  padding:9px 10px;
  border-bottom:1px solid #1b2a48;
}

.bundle-create-editor-rail-head .label{
  color:#e5efff;
  font-size:12px;
  font-weight:700;
}

.bundle-create-editor-variant-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:0;
  overflow:auto;
  padding:8px;
}

.bundle-create-editor-variant-item{
  position:relative;
  width:100%;
  border:1px solid #203252;
  border-radius:8px;
  background:#0d1728;
  color:var(--text);
  cursor:pointer;
  font:inherit;
  padding:8px;
  text-align:left;
  transition:border-color 120ms ease, background 120ms ease;
}

.bundle-create-editor-variant-item:hover{
  border-color:#3e5f95;
  background:#101f38;
}

.bundle-create-editor-variant-item.active{
  border-color:#4a78ba;
  background:#112441;
}

.bundle-create-editor-variant-top{
  display:block;
  margin-bottom:4px;
  padding-right:58px;
}

.bundle-create-editor-variant-item .title{
  display:block;
  color:#e5efff;
  font-size:12px;
  font-weight:700;
  line-height:1.25;
  min-width:0;
  overflow-wrap:anywhere;
}

.bundle-create-editor-variant-item .meta,
.bundle-create-editor-variant-empty{
  color:#9fb8e1;
  font-size:10px;
  line-height:1.35;
}

.bundle-create-editor-variant-item .status{
  position:absolute;
  top:0;
  right:0;
  display:block;
  max-width:70px;
  border-radius:0 7px 0 7px;
  border:0;
  border-left:1px solid #2b4270;
  border-bottom:1px solid #2b4270;
  color:#bcd4fb;
  font-size:9px;
  font-weight:700;
  line-height:1.05;
  overflow:hidden;
  padding:4px 6px;
  text-align:center;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.bundle-create-editor-variant-item .status.new{
  border-color:#5a4b24;
  color:#ffd17b;
}

.bundle-create-editor-variant-item .status.existing{
  border-color:#285b47;
  color:#8ee6b3;
}

.bundle-create-editor-variant-item .status.edited{
  border-color:#6f5a1d;
  color:#f7ca5b;
}

.bundle-create-editor-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  min-height:0;
}

.bundle-create-hidden-select{
  display:none;
}

.bundle-create-selected-card{
  border:1px solid #233458;
  border-radius:9px;
  background:linear-gradient(180deg,#0d1728,#0a111e);
  padding:10px;
  margin-bottom:10px;
}

.bundle-create-selected-empty{
  font-size:11px;
  color:#9fb8e1;
  line-height:1.35;
}

.bundle-create-variant-layout{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(300px,0.8fr);
  gap:12px;
  align-items:start;
}

.bundle-create-variant-pane{
  min-width:0;
}

.bundle-create-variant-preview-card{
  margin-top:0;
  margin-bottom:0;
  position:sticky;
  top:0;
}

.bundle-create-variant-preview-list{
  max-height:52vh;
}

.bundle-create-variant-preview-item{
  padding:8px;
}

.bundle-create-variant-preview-item.existing{
  border-color:#285b47;
}

.bundle-create-variant-preview-item.new{
  border-color:#5a4b24;
}

.bundle-create-variant-preview-top{
  align-items:flex-start;
  display:flex;
  gap:8px;
  justify-content:space-between;
  margin-bottom:3px;
}

.bundle-create-variant-preview-top .title{
  min-width:0;
  overflow-wrap:anywhere;
}

.bundle-create-variant-preview-badge{
  border:1px solid #2b4270;
  border-radius:999px;
  color:#bcd4fb;
  flex:0 0 auto;
  font-size:9px;
  font-weight:700;
  line-height:1;
  padding:4px 6px;
}

.bundle-create-variant-preview-badge.existing{
  border-color:#285b47;
  color:#8ee6b3;
}

.bundle-create-variant-preview-badge.new{
  border-color:#5a4b24;
  color:#ffd17b;
}

.bundle-create-variant-options{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.bundle-create-variant-options-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:8px;
  flex-wrap:wrap;
}

.bundle-variant-new-option-group{
  border:1px solid #233458;
  border-radius:10px;
  background:linear-gradient(180deg,#0d1728,#0a111e);
  padding:8px 9px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.bundle-variant-group-topline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.bundle-variant-new-option-group.is-option-structure-locked .bundle-variant-drag-handle-group{
  display:none;
}

.bundle-variant-new-option-group.is-option-structure-locked .bundle-variant-group-name-input{
  color:#9fb8e1;
  cursor:default;
}

.bundle-variant-group-titlewrap{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.bundle-variant-group-heading{
  min-width:0;
  flex:1 1 auto;
}

.bundle-variant-group-titleline{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.bundle-variant-group-label{
  font-size:11px;
  font-weight:700;
  color:#e5efff;
  flex:0 0 auto;
}

.bundle-variant-group-meta{
  font-size:10px;
  color:#8faad3;
  line-height:1.35;
}

.bundle-variant-group-name-input{
  flex:1 1 220px;
  min-width:120px;
  background:#101b30;
  border:1px solid #28406b;
  color:var(--text);
  border-radius:999px;
  padding:6px 12px;
  font-size:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}

.bundle-variant-group-name-input:focus{
  outline:none;
  border-color:#4da3ff;
  box-shadow:0 0 0 2px rgba(77,163,255,0.16);
}

.bundle-variant-name-field,
.bundle-variant-value-field{
  margin:0;
}

.bundle-variant-value-field{
  min-width:0;
}

.bundle-variant-values-label{
  font-size:10px;
  color:#8faad3;
  line-height:1.2;
  margin-top:2px;
}

.bundle-variant-name-field span,
.bundle-variant-value-field span{
  font-size:10px;
  display:block;
  min-height:12px;
}

.bundle-variant-new-option-values{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-left:6px;
}

.bundle-variant-new-option-value{
  display:grid;
  grid-template-columns:18px 28px minmax(0,1fr) auto;
  gap:6px;
  align-items:center;
  padding:2px 0;
  background:transparent;
  position:relative;
}

.bundle-variant-value-branch{
  position:relative;
  width:18px;
  height:100%;
  min-height:32px;
}

.bundle-variant-value-branch::before,
.bundle-variant-value-branch::after{
  content:'';
  position:absolute;
  background:#2e4d80;
}

.bundle-variant-value-branch::before{
  left:8px;
  top:-6px;
  bottom:-6px;
  width:1px;
}

.bundle-variant-value-branch::after{
  left:8px;
  top:50%;
  width:10px;
  height:1px;
}

.bundle-variant-new-option-value.is-last .bundle-variant-value-branch::before{
  bottom:50%;
}

.bundle-variant-new-option-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}

.bundle-variant-inline-actions{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:0;
  align-self:center;
}

.bundle-variant-inline-actions-top{
  justify-content:flex-end;
  flex-wrap:wrap;
}

.bundle-variant-action-spacer{
  display:block;
  width:1px;
  height:28px;
}

.bundle-variant-drag-column{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
}

.bundle-variant-drag-handle{
  width:22px;
  min-width:22px;
  height:30px;
  border:1px solid #2a4674;
  border-radius:8px;
  background:#0f1c33;
  color:#9fb8e1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:grab;
  user-select:none;
  letter-spacing:-1px;
  font-size:14px;
}

.bundle-variant-drag-handle-group{
  height:32px;
}

.bundle-variant-new-option-group.is-dragging,
.bundle-variant-new-option-value.is-dragging{
  opacity:0.5;
}

.bundle-variant-new-option-group.is-drop-target,
.bundle-variant-new-option-value.is-drop-target{
  border-color:#4a78ba;
  box-shadow:0 0 0 1px rgba(74,120,186,0.35) inset;
}

.bundle-variant-new-option-group .field input[type=text],
.bundle-variant-new-option-value .field input[type=text]{
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
  border-radius:8px;
  padding:7px 9px;
}

.bundle-variant-value-field input[type=text]{
  display:block;
  width:100%;
  margin:0;
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
  border-radius:8px;
  padding:7px 9px;
}

.bundle-create-component-head{
  margin-top:4px;
}

.bundle-create-component-list{
  min-height:0;
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
  padding-bottom:12px;
  scrollbar-gutter:stable;
}

.bundle-create-product-list::-webkit-scrollbar,
.bundle-create-component-list::-webkit-scrollbar,
.bundle-meta-modal-list::-webkit-scrollbar,
.bundle-meta-component-list::-webkit-scrollbar{
  width:10px;
  height:10px;
}

.bundle-create-product-list::-webkit-scrollbar-thumb,
.bundle-create-component-list::-webkit-scrollbar-thumb,
.bundle-meta-modal-list::-webkit-scrollbar-thumb,
.bundle-meta-component-list::-webkit-scrollbar-thumb{
  background:#2a4674;
  border-radius:999px;
  border:2px solid #0b1526;
}

.bundle-create-product-list::-webkit-scrollbar-track,
.bundle-create-component-list::-webkit-scrollbar-track,
.bundle-meta-modal-list::-webkit-scrollbar-track,
.bundle-meta-component-list::-webkit-scrollbar-track{
  background:#0a1018;
  border-radius:999px;
}

.bundle-create-product-list,
.bundle-create-component-list,
.bundle-meta-modal-list,
.bundle-meta-component-list{
  scrollbar-width:thin;
  scrollbar-color:#2a4674 #0a1018;
}

.bundle-create-variant-modal,
.bundle-create-editor-modal,
.bundle-create-sku-modal{
  scrollbar-width:thin;
  scrollbar-color:#2a4674 #0a1018;
}

.bundle-create-variant-modal::-webkit-scrollbar,
.bundle-create-editor-modal::-webkit-scrollbar,
.bundle-create-sku-modal::-webkit-scrollbar{
  width:10px;
  height:10px;
}

.bundle-create-variant-modal::-webkit-scrollbar-thumb,
.bundle-create-editor-modal::-webkit-scrollbar-thumb,
.bundle-create-sku-modal::-webkit-scrollbar-thumb{
  background:#2a4674;
  border-radius:999px;
  border:2px solid #0b1526;
}

.bundle-create-variant-modal::-webkit-scrollbar-track,
.bundle-create-editor-modal::-webkit-scrollbar-track,
.bundle-create-sku-modal::-webkit-scrollbar-track{
  background:#0a1018;
  border-radius:999px;
}

.bundle-create-component-row{
  align-items:start;
}

.bundle-create-component-input-wrap{
  min-width:0;
}

.bundle-create-suggestions{
  display:none;
  margin-top:4px;
  border:1px solid #243b63;
  border-radius:8px;
  background:#0b1526;
  overflow:hidden;
}

.bundle-create-suggestion{
  display:block;
  width:100%;
  text-align:left;
  color:var(--text);
  font:inherit;
  background:transparent;
  border:0;
  border-top:1px solid #1c2d4c;
  padding:7px 8px;
  cursor:pointer;
}

.bundle-create-suggestion:first-child{
  border-top:0;
}

.bundle-create-suggestion:hover{
  background:#10203a;
}

.bundle-create-suggestion .label{
  font-size:11px;
  font-weight:700;
  color:#e5efff;
}

.bundle-create-suggestion .subtitle,
.bundle-create-suggestion-empty{
  font-size:10px;
  color:#9fb8e1;
  line-height:1.3;
}

#bndlCreateSaveMsg.ok{ color:#8ee6a8; }
#bndlCreateSaveMsg.warn{ color:#ffb3b3; }
#bndlCreateVariantSkuWarn{ color:#ffbf8a; }

.bundle-meta-card .title{
  font-size:13px;
  font-weight:700;
  color:#e5efff;
  margin:0 76px 4px 0;
  line-height:1.3;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.bundle-meta-card .sku{
  font-size:11px;
  color:#9fb8e1;
  margin:0 0 9px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.bundle-meta-card-head{
  min-width:0;
}

.bundle-meta-metric-strip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin:8px 0 7px;
}

.bundle-meta-metric{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid #203556;
  background:#0c182b;
  border-radius:6px;
  padding:6px 8px;
}

.bundle-meta-metric .label{
  display:inline-block;
  flex:0 0 auto;
  font-size:9px;
  line-height:1;
  color:#8fa8ce;
  font-weight:800;
  text-transform:uppercase;
  margin:0;
}

.bundle-meta-metric .value{
  display:inline-block;
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  line-height:1.1;
  color:#f0f6ff;
  font-weight:900;
  text-align:right;
}

.bundle-meta-metric .value.positive{
  color:#8ee6a8;
}

.bundle-meta-metric .value.negative{
  color:#ffb3b3;
}

.bundle-meta-metric .value.neutral{
  color:#d9e7ff;
}

.bundle-meta-attention{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin:2px 0 0;
}

.bundle-meta-attention.ok{
  color:#8ee6a8;
  font-size:10px;
  font-weight:700;
}

.bundle-meta-attention-dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:#47d67f;
  box-shadow:0 0 0 3px rgba(71,214,127,.12);
}

.bundle-meta-attention-pill{
  font-size:10px;
  font-weight:800;
  border-radius:6px;
  padding:3px 6px;
  line-height:1;
}

.bundle-meta-attention-pill.warn{
  color:#ffd99a;
  background:#3a2b10;
  border:1px solid #735221;
}

.bundle-meta-attention-pill.danger{
  color:#ffc2c2;
  background:#3a1519;
  border:1px solid #7b3038;
}

.bundle-meta-attention-pill.unsaved{
  color:#d9ccff;
  background:#24183f;
  border:1px solid #4c3a80;
}

.bundle-meta-card .stats{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:9px;
}

.bundle-meta-stat-pill{
  font-size:10px;
  line-height:1.2;
  font-weight:700;
  color:#d9e7ff;
  background:#12213a;
  border:1px solid #2a4674;
  border-radius:999px;
  padding:3px 7px;
}

.bundle-meta-stat-pill.warn{
  color:#ffd99a;
  background:#31240f;
  border-color:#6c4e21;
}

.bundle-meta-stat-pill.accent{
  color:#bcd7ff;
  background:#10233e;
  border-color:#335584;
}

.bundle-meta-browser-wrap{
  width:min(1180px,97vw);
  height:min(88vh, calc(100vh - 32px));
  max-height:min(88vh, calc(100vh - 32px));
  display:grid;
  grid-template-columns:minmax(280px,0.9fr) minmax(360px,1.2fr);
  gap:10px;
  overflow:hidden;
}

.bundle-meta-browser-wrap.has-sku-selector{
  grid-template-columns:minmax(430px,.9fr) minmax(500px,1.14fr) minmax(300px,.66fr);
  align-items:stretch;
}

.bundle-meta-browser-wrap.has-sku-selector > .modal{
  height:100%;
  max-height:none;
  box-sizing:border-box;
}

.bundle-meta-browser-wrap.has-sku-selector .bundle-create-sku-modal{
  width:100%;
  max-width:none;
  height:100%;
  max-height:none;
  min-height:0;
  align-self:stretch;
  box-sizing:border-box;
  box-shadow:none;
}

.bundle-meta-left-modal,
.bundle-meta-right-modal{
  max-height:none;
  min-height:0;
  overflow:hidden;
}

.bundle-meta-left-modal{
  position:relative;
  display:flex;
  flex-direction:column;
}

.bundle-meta-right-modal{
  overflow-y:auto;
  overflow-x:hidden;
}

.bundle-meta-left-modal > .row:first-child{
  display:flex;
  flex-direction:column;
  align-items:stretch !important;
  justify-content:flex-start !important;
  gap:10px;
  margin-bottom:8px !important;
  padding-right:0;
}

.bundle-meta-left-modal > .row:first-child > div:first-child{
  min-width:0;
  padding-right:42px;
}

.bundle-meta-modal-actions{
  display:grid;
  grid-template-columns:105px repeat(4,max-content);
  align-items:center;
  justify-content:stretch;
  gap:6px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  overflow:visible;
}

.bundle-meta-apply-margin-control{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  width:105px;
  height:30px;
  padding:0 5px 0 8px;
  background:#0f1727;
  border:1px solid #1e2a45;
  border-radius:7px;
}

.bundle-meta-apply-margin-label{
  flex:0 0 auto;
  color:#9fb8e1;
  font-size:9.5px;
  font-weight:700;
}

.bundle-meta-apply-margin-control input{
  width:65px;
  min-width:0;
  height:26px;
  padding:3px 4px;
  text-align:right;
  background:transparent;
  border:0;
  color:var(--text);
  outline:0;
}

.bundle-meta-apply-margin-control input::-webkit-outer-spin-button,
.bundle-meta-apply-margin-control input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

.bundle-meta-apply-margin-control input[type=number]{
  -moz-appearance:textfield;
}

.bundle-meta-modal-actions .btn{
  min-height:30px;
  padding:6px 7px;
  border-radius:7px;
  font-size:10px;
  line-height:1;
  white-space:nowrap;
}

#bndlSaveAllMetaBtn{
  min-width:54px;
}

#bndlSyncAllPriceBtn{
  grid-column:auto;
  justify-self:auto;
}

#bndlUndoAllMetaChangesBtn{
  min-width:44px;
  justify-self:end;
}

#bndlUndoAllMetaChangesBtn:disabled{
  opacity:0.42;
}

#bndlMetaModalClose{
  position:absolute;
  top:12px;
  right:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  min-width:30px;
  height:30px;
  padding:0;
  line-height:1;
  box-sizing:border-box;
}

.bundle-meta-modal-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1 1 auto;
  min-height:180px;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:2px;
}

.bundle-meta-list-item{
  display:block;
  width:100%;
  text-align:left;
  color:var(--text);
  font:inherit;
  border:1px solid #233458;
  border-radius:10px;
  background:#0b1526;
  padding:12px 12px 10px;
  cursor:pointer;
}

.bundle-meta-list-item.active{
  border-color:#4a78ba;
  background:#10203a;
}

.bundle-meta-list-item.unsaved{
  border-color:#5f4a95;
  box-shadow:inset 3px 0 0 #8f7dff;
}

.bundle-meta-list-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.bundle-meta-list-tag {
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.bundle-meta-list-meta {
  font-size:10px;
  color:#9fb8e1;
  margin-bottom:8px;
}

.bundle-meta-price-row {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:8px;
}

.bundle-meta-price-col {
  background:#09111f;
  border:1px solid #1e3358;
  border-radius:8px;
  padding:8px;
}

.bundle-meta-price-label {
  font-size:10px;
  color:#9fb8e1;
  margin-bottom:4px;
}

.bundle-meta-price-value {
  font-size:13px;
  font-weight:700;
  color:#e5efff;
}

.bundle-meta-price-delta {
  font-size:11px;
  color:#a6c8ff;
  margin-left:6px;
}

.bundle-meta-list-footer {
  font-size:10px;
  color:#9fb8e1;
  border-top:1px solid #15223f;
  padding-top:8px;
}

.bundle-meta-editor-summary{
  margin:6px 0 10px;
  font-size:11px;
  color:#c8d8f0;
}

.bundle-meta-editor-actions{
  display:flex;
  gap:8px;
  align-items:center;
  margin:0 0 8px;
}

.bundle-meta-price-badge{
  display:inline-block;
  font-size:10px;
  font-weight:700;
  padding:2px 6px;
  border-radius:999px;
  color:#eff8ff;
  margin-left:4px;
}

.bundle-meta-price-badge.mismatch{
  background:#8f3d3d;
  border:1px solid #a96a6a;
}

.bundle-meta-price-badge.on-target{
  background:#2e5d3a;
  border:1px solid #5a8a61;
}

.bundle-meta-price-badge.unavailable{
  background:#5a4f35;
  border:1px solid #8a7b5a;
}

.bundle-meta-price-badge.unsaved{
  background:#32205c;
  border:1px solid #6e5fba;
  color:#efe9ff;
}

.bundle-meta-editor-form .field input[type=text]{
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
  border-radius:8px;
  padding:8px 10px;
}

#bndlEditorSaveMsg{
  margin-bottom:8px;
}

#bndlEditorSaveMsg.ok{ color:#8ee6a8; }
#bndlEditorSaveMsg.warn{ color:#ffb3b3; }
#bndlApplyMarginMsg.ok{ color:#8ee6a8; }
#bndlApplyMarginMsg.warn{ color:#ffb3b3; }

.bundle-meta-editor-form input[type=number]{
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
  border-radius:8px;
  padding:8px 10px;
  width:min(170px,100%);
}

.bundle-meta-component-head,
.bundle-meta-component-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 90px 88px;
  gap:10px;
  align-items:center;
}

.bundle-meta-editor-form .bundle-meta-component-head,
.bundle-meta-editor-form .bundle-meta-component-row{
  grid-template-columns:minmax(0,1fr) 76px 126px 82px;
}

.bundle-meta-component-head{
  font-size:10px;
  color:#8faad3;
  margin-bottom:4px;
  padding:0 4px;
}

.bundle-meta-component-list{
  display:flex;
  flex-direction:column;
  gap:5px;
  max-height:52vh;
  overflow:auto;
}

.bundle-meta-component-row{
  border:1px solid #1b2742;
  border-radius:8px;
  background:#0a1018;
  padding:6px;
}

.bundle-meta-component-row .sku{
  font-size:11px;
  color:#d6e6ff;
  font-weight:600;
  line-height:1.25;
}

.bundle-meta-component-row .sku-input{
  width:100%;
  min-width:0;
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
  border-radius:8px;
  padding:8px 10px;
}

.bundle-meta-component-row .sku-input.has-error,
.bundle-meta-component-row input[type=number].has-error{
  border-color:#c05050;
}

.bundle-meta-component-row .remove-row-btn{
  width:100%;
  min-width:0;
}

.bundle-meta-component-cost{
  min-height:38px;
  border:1px solid #1e2a45;
  border-radius:8px;
  background:#08111f;
  padding:6px 8px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
}

.bundle-meta-component-cost .value{
  color:#d9e8ff;
  font-size:12px;
  font-weight:700;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.bundle-meta-component-cost .detail{
  color:#8faad3;
  font-size:10px;
  line-height:1.1;
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.bundle-meta-component-row input[type=number]{
  width:100%;
  text-align:center;
}

@media (max-width: 980px){
  .bundle-meta-browser-wrap{
    width:min(96vw,760px);
    grid-template-columns:1fr;
    height:min(88vh, calc(100vh - 24px));
  }

  .bundle-meta-left-modal,
  .bundle-meta-right-modal{
    max-height:none;
  }

  .bundle-create-picker-modal,
  .bundle-create-variant-modal,
  .bundle-create-editor-modal,
  .bundle-create-sku-modal{
    max-height:40vh;
  }

  .bundle-meta-modal-actions{
    grid-template-columns:1fr 1fr;
    justify-content:flex-start;
    width:100%;
  }

  .bundle-meta-apply-margin-control{
    width:50%;
    grid-column:1 / -1;
  }

  .bundle-meta-browser-wrap.has-sku-selector{
    grid-template-columns:1fr;
  }

  .bundle-meta-apply-margin-control input{
    flex:0 0 65px;
  }

  .bundle-create-variant-layout{
    grid-template-columns:1fr;
  }

  .bundle-create-editor-layout{
    grid-template-columns:1fr;
  }

  .bundle-create-editor-variant-list{
    max-height:180px;
  }

  .bundle-meta-editor-form .bundle-meta-component-head,
  .bundle-meta-editor-form .bundle-meta-component-row{
    grid-template-columns:minmax(0,1fr) 68px 112px 76px;
    gap:7px;
  }

  .bundle-create-variant-preview-card{
    position:static;
  }

  .bundle-variant-group-topline{
    flex-direction:column;
    align-items:stretch;
  }

  .bundle-variant-group-titleline{
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }

  .bundle-variant-group-name-input{
    min-width:0;
    width:100%;
  }

  .bundle-variant-inline-actions-top{
    justify-content:flex-start;
  }

  .bundle-variant-new-option-value{
    grid-template-columns:24px minmax(0,1fr);
  }

  .bundle-variant-new-option-value .bundle-variant-inline-actions{
    grid-column:2;
    min-height:0;
  }
}

.logs{
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background:#0a0f1f; border:1px solid #1b2742; border-radius:10px;
  padding:12px; height:320px; overflow:auto; white-space:pre-wrap;
}

.modal-backdrop{position:fixed; inset:0; background:rgba(0,0,0,.5);
  display:flex; align-items:center; justify-content:center; z-index:50;
  opacity:0; visibility:hidden; transition:opacity 220ms linear, visibility 0ms linear 220ms}
.modal-backdrop.show{ opacity:1; visibility:visible; transition-delay:0s }
#bndlCreateSkuModal.show{ z-index:56; }
.modal{background:var(--card); border:1px solid #1b2742; border-radius:12px; padding:14px;
  max-width:90vw; max-height:80vh; overflow:auto}

/* Settings Guide Styles */
.guide-content{
  display:flex; flex-direction:column; gap:20px;
}
.guide-section{
  border-bottom:1px solid #1a2538; padding-bottom:16px;
}
.guide-section:last-of-type{
  border-bottom:none;
}
.guide-title{
  font-size:16px; font-weight:600; color:var(--text); margin-bottom:4px;
}
.guide-desc{
  font-size:13px; color:var(--muted); margin-bottom:12px;
}
.guide-steps{
  display:flex; flex-direction:column; gap:12px;
}
.guide-step{
  display:flex; gap:12px; align-items:start;
}
.step-number{
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:50%;
  background:linear-gradient(180deg,var(--btn-primary1),var(--btn-primary2));
  color:#fff; font-weight:600; font-size:13px; flex-shrink:0;
}
.step-text{
  font-size:14px; color:var(--text); margin-bottom:4px;
}
.step-sub{
  font-size:12px; color:var(--muted); line-height:1.4;
}
.step-sub code, .step-text code{
  background:#0a1018; border:1px solid #1a2538; padding:2px 6px;
  border-radius:4px; font-size:12px; color:var(--accent);
}

/* When modal is open, prevent body scrolling and confine scroll to modal */
.modal-open{overflow:hidden;}
.modal-backdrop{align-items:center; justify-content:center}
.modal{max-height:86vh; overflow:auto}

/* modal-local import log styling inside add schedule modal */
#addSchedLog{ background:#071024; border:1px solid #1b2742; border-radius:8px; padding:10px; color:var(--muted); }
#addSchedLog[hidden]{ display:none }

/* When any modal is visible, reduce the main logs height to avoid double scrollbars */
.modal-open .logs{ height:180px }

/* modal content animation */
.modal.fade-in{ animation: modalFadeIn 220ms ease-out; }
.modal.fade-out{ animation: modalFadeOut 220ms ease-in forwards; }
@keyframes modalFadeIn{ from{ transform: translateY(-6px) scale(.995); opacity:0 } to{ transform: translateY(0) scale(1); opacity:1 } }
@keyframes modalFadeOut{ from{ transform: translateY(0) scale(1); opacity:1 } to{ transform: translateY(-6px) scale(.995); opacity:0 } }

/* Scan loading modal */
.scan-spinner{
  width:52px; height:52px; margin:0 auto;
  border-radius:50%;
  border:4px solid #1a2538;
  border-top-color:var(--accent,#3be8ad);
  animation:scanSpin 0.9s linear infinite;
}
@keyframes scanSpin{ to{ transform:rotate(360deg) } }
.scan-progress-bar{
  height:100%; width:30%;
  background:linear-gradient(90deg,var(--btn-primary1,#3be8ad),var(--btn-primary2,#1bcfff));
  border-radius:8px;
  animation:scanSlide 1.5s ease-in-out infinite;
}
.scan-progress-track{ position:relative; }
#scanLoadingModal.determinate .scan-progress-bar{
  width:0%;
  animation:none;
  transform:none;
  transition:width 180ms linear;
}
@keyframes scanSlide{
  0%  { transform:translateX(-100%) }
  50% { transform:translateX(250%) }
  100%{ transform:translateX(-100%) }
}
#scanLoadingModal{ z-index:9999; }

.table-scroll{max-height:60vh; overflow:auto; border:1px solid #1b2742; border-radius:8px}

.bundle-preview-modal{width:min(1240px, 96vw)}
.bundle-preview-topbar{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.bundle-preview-title-block{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  min-width:0;
  padding-top:0;
}
.bundle-preview-close-btn{
  flex:0 0 auto;
  min-width:38px;
  min-height:34px;
}
.bundle-preview-toolbar-table{
  display:grid;
  grid-template-columns:minmax(220px, 300px) minmax(260px, 320px) minmax(260px, 1fr) max-content;
  gap:10px;
  align-items:end;
  width:100%;
  min-width:0;
  padding-top:2px;
}
.bundle-preview-toolbar-table *,
.bundle-preview-toolbar-table *::before,
.bundle-preview-toolbar-table *::after{
  box-sizing:border-box;
}
.bundle-preview-control-cell{
  display:grid;
  grid-template-rows:14px 32px;
  gap:4px;
  align-items:end;
  min-width:0;
  width:100%;
}
.bundle-preview-control-label{
  color:#9fb8e1;
  font-size:11px;
  font-weight:700;
  line-height:14px;
}
.bundle-preview-toolbar-table select,
.bundle-preview-toolbar-table input,
.bundle-preview-actions-row .btn{
  height:32px;
  min-height:32px;
}
.bundle-preview-toolbar-table select,
.bundle-preview-toolbar-table input{
  width:100%;
  min-width:0;
  padding:0 10px;
  border-radius:8px;
  font-size:12px;
  line-height:30px;
}
.bundle-preview-toolbar-table select{
  background:#0f1727;
  border:1px solid #1e2a45;
  color:var(--text);
}
.bundle-preview-toolbar-table input{
  background:var(--input-bg, #0b1220);
  border:1px solid #223553;
  color:var(--text);
  outline:0;
  text-align:right;
}
.bundle-preview-inline-control{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:8px;
  align-items:center;
  min-width:0;
}
.bundle-preview-actions-row{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  min-height:32px;
  padding-top:0;
  width:max-content;
}
.bundle-preview-inline-control .btn,
#bndlLoadMetadataBackupBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  line-height:1;
  white-space:nowrap;
}
#bndlCommitApply{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  line-height:1;
  white-space:nowrap;
}
.bundle-migration-mode-help{
  margin-top:2px;
  min-height:16px;
  color:#9fb8e1;
}
#bndlPreviewMarginMsg.ok{ color:#8ee6a8; }
#bndlPreviewMarginMsg.warn{ color:#ffb3b3; }

@media (max-width: 1180px){
  .bundle-preview-toolbar-table{
    grid-template-columns:minmax(220px, 1fr) minmax(260px, 1fr);
  }
  .bundle-preview-actions-row{
    justify-content:flex-start;
    width:auto;
  }
}

@media (max-width: 640px){
  .bundle-preview-toolbar-table{
    grid-template-columns:1fr;
  }
  .bundle-preview-actions-row{
    min-height:32px;
    padding-top:0;
    justify-content:stretch;
  }
  .bundle-preview-actions-row .btn{
    flex:1 1 0;
    min-width:0;
  }
}

.bundle-ui-dialog-backdrop{
  z-index:10020;
  background:rgba(3,7,18,.68);
}

.bundle-ui-dialog{
  width:min(440px,92vw);
  max-height:min(82vh,520px);
  overflow:hidden;
  padding:18px;
  border-radius:12px;
  box-shadow:0 24px 70px rgba(0,0,0,.46);
}

.bundle-ui-dialog-title{
  font-size:16px;
  font-weight:800;
  color:#e5efff;
  margin-bottom:8px;
}

.bundle-ui-dialog-message{
  color:#b9c9e6;
  font-size:13px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
}

.bundle-ui-dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
  flex-wrap:wrap;
}

.bundle-ui-dialog-actions .btn{
  min-width:92px;
}
.bundle-preview-tabs{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.bundle-preview-tab{
  appearance:none;
  border:1px solid #2a3f66;
  background:#0f1a2c;
  color:#b8cff2;
  border-radius:999px;
  padding:6px 12px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.bundle-preview-tab .count{opacity:.85; margin-left:4px; font-weight:600}
.bundle-preview-tab.active{
  background:#173257;
  border-color:#3f6ca6;
  color:#e6f1ff;
}
.bundle-preview-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(420px,1fr)); gap:14px}
.bundle-preview-card{
  background:#0b1526;
  border:1px solid #233458;
  border-radius:12px;
  padding:14px;
}
.bundle-preview-head{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}
.bundle-preview-card h3{margin:0; font-size:14px; color:var(--text); word-break:break-word}
.bundle-preview-card .sku-link{color:inherit; text-decoration:underline; text-decoration-color:#4f78b8; text-underline-offset:2px}
.bundle-preview-card .sku-link:hover{color:#e7f2ff; text-decoration-color:#8bb7ff}
.bundle-preview-head .head-main{width:100%; display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.bundle-preview-head .head-badges{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end}
.bundle-preview-metrics{
  width:100%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.bundle-preview-metrics .metric-block{
  background:#0a1018;
  border:1px solid #1b2742;
  border-radius:8px;
  padding:7px 8px;
}
.bundle-preview-metrics .metric-block .k{font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em}
.bundle-preview-metrics .metric-block .v{font-size:13px; font-weight:700; color:#d6e6ff; margin-top:2px}
.bundle-preview-head .cmp-update{
  display:inline-flex;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  border:1px solid #2b3f67;
  background:#12203a;
  color:#b9d2ff;
}
.bundle-preview-head .cmp-update.needs_update{background:#2f210f; border-color:#8f6220; color:#ffd089}
.bundle-preview-head .cmp-update.on_target{background:#10281e; border-color:#1f6b50; color:#5ad4a3}
.bundle-preview-head .cmp-update.unknown{background:#1f1f2f; border-color:#4b4b6f; color:#c6c6e6}
.bundle-preview-head .cmp-rename{
  display:inline-flex;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  border:1px solid #2b3f67;
  background:#12203a;
  color:#b9d2ff;
}
.bundle-preview-head .cmp-rename.rename-needed{background:#2f210f; border-color:#8f6220; color:#ffd089}
.bundle-preview-head .cmp-rename.rename-skipped{background:#172538; border-color:#36547e; color:#cfe4ff}
.bundle-preview-head .cmp-status{
  display:inline-flex;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  border:1px solid #2b3f67;
  background:#12203a;
  color:#b9d2ff;
}
.bundle-preview-head .cmp-status.profit{background:#10281e; border-color:#1f6b50; color:#5ad4a3}
.bundle-preview-head .cmp-status.loss{background:#2e1717; border-color:#6e2b2b; color:#ff9090}
.bundle-preview-head .cmp-status.break_even{background:#2b2614; border-color:#7d6a2a; color:#f0d37a}
.bundle-preview-head .cmp-status.price_unavailable{background:#1f1f2f; border-color:#4b4b6f; color:#c6c6e6}
.bundle-preview-summary{margin:8px 0 6px 0; font-size:11px; color:var(--muted)}
.bundle-preview-table-head,
.bundle-preview-list .bundle-preview-item{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) 52px minmax(95px,0.95fr) minmax(105px,1fr) 120px;
  gap:10px;
  align-items:center;
}
.bundle-preview-table-head{
  font-size:10px;
  color:#8faad3;
  text-transform:uppercase;
  letter-spacing:.03em;
  padding:0 10px 6px 10px;
}
.bundle-preview-table-head .cell{text-align:center}
.bundle-preview-list{display:flex; flex-direction:column; gap:6px}
.bundle-preview-item{
  background:#0a1018;
  border:1px solid #1b2742;
  border-radius:8px;
  padding:9px 10px;
  font-size:12px;
}
.bundle-preview-item .cell{min-width:0}
.bundle-preview-item .sku-cell{word-break:break-word; font-weight:700; color:#d6e6ff; line-height:1.28; text-align:center}
.bundle-preview-item .sku-cell .sku-link{color:#d6e6ff}
.bundle-preview-item .qty-cell{text-align:center; color:#c9d9f2; font-weight:700}
.bundle-preview-item .money-cell{text-align:center; white-space:nowrap; color:#c9d9f2}
.bundle-preview-item .status-cell{display:flex; justify-content:center}
.bundle-preview-item .status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
  padding:2px 7px;
  border-radius:999px;
  border:1px solid #2b3f67;
  background:#12203a;
  color:#b9d2ff;
  white-space:nowrap;
}
.bundle-preview-item .status.found{background:#10281e; border-color:#1f6b50; color:#5ad4a3}
.bundle-preview-item .status.found_no_cost{background:#2b2614; border-color:#7d6a2a; color:#f0d37a}
.bundle-preview-item .status.not_found{background:#2e1717; border-color:#6e2b2b; color:#ff9090}
.bundle-preview-item .status.lookup_error,
.bundle-preview-item .status.lookup_unavailable{background:#1f1f2f; border-color:#4b4b6f; color:#c6c6e6}
.bundle-preview-item.bundle-preview-total-row{
  background:#11223a;
  border-color:#2d4a75;
}
.bundle-preview-item.bundle-preview-total-row .sku-cell{font-weight:800; letter-spacing:.03em}
.bundle-preview-item.bundle-preview-total-row .total-cost-cell{font-weight:800; color:#f4fbff}

@media (max-width: 700px){
  .bundle-preview-head .head-main{flex-direction:column; align-items:flex-start}
  .bundle-preview-head .head-badges{justify-content:flex-start}
  .bundle-preview-metrics{grid-template-columns:1fr}
  .bundle-preview-cards{grid-template-columns:1fr}
  .bundle-preview-table-head{display:none}
  .bundle-preview-list .bundle-preview-item{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .bundle-preview-item .sku-cell{grid-column:1/-1; text-align:center}
  .bundle-preview-item .qty-cell{text-align:center}
  .bundle-preview-item .money-cell{text-align:center}
  .bundle-preview-item .status-cell{grid-column:1/-1; justify-content:center}
  .bundle-preview-item.bundle-preview-total-row .sku-cell{grid-column:1/2}
  .bundle-preview-item.bundle-preview-total-row .total-cost-cell{grid-column:2/3}
}

#archiveModal{ z-index:55; }
#previewModal{ z-index:60; }
#jobLogModal { z-index:70; }

@media (max-width:920px){ .grid{grid-template-columns:1fr} }

/* Inline admin inside the upload card */
.upload-admin{display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-bottom:12px}
.upload-admin .field{margin-bottom:0}
.upload-admin input{padding:9px 10px; border-radius:8px}

@media (max-width:920px){
  .upload-admin{flex-direction:column; align-items:stretch}
}

/* compact admin layout for full-width upload card */
.upload-admin .field{flex:1; min-width:180px}
.upload-admin label{font-size:12px; color:var(--muted); margin-bottom:6px}
.upload-admin input{padding:8px 10px; font-size:14px}
.upload-admin > div[style*="display:flex"]{align-items:center}
.upload-admin .muted{margin-left:6px}

/* Inline admin in the top of upload card */
.upload-card-top{gap:18px}
.upload-admin-inline{display:flex; gap:12px; align-items:flex-start}
.upload-admin-inline .field{display:flex; flex-direction:column; margin-bottom:0}
.upload-admin-inline label{font-size:12px; color:var(--muted); margin-bottom:6px}
.upload-admin-inline input{padding:8px 10px; font-size:13px}
@media (max-width:980px){
  .upload-card-top{flex-direction:column; align-items:stretch}
  .upload-admin-inline{flex-wrap:wrap}
}

/* Align save button with inputs */
.upload-admin-inline{align-items:flex-end}
.upload-admin-inline input{height:36px}
.save-admin-actions{display:flex; align-items:center; gap:8px}
.save-admin-actions .btn{padding:6px 10px; height:36px}

/* Add Schedule modal: limit rows visible to ~5 and make the table area scrollable */
#addScheduleModal .table-scroll{ max-height: 210px; overflow:auto; border-radius:8px; padding:6px; background:rgba(255,255,255,0.01); }
#addScheduleModal table th, #addScheduleModal table td{ padding:8px 10px; }

/* Ensure the modal-local log is visible and scrollable */
#addSchedLog{ display:block; max-height:180px; overflow:auto }

/* Keep main logs visible always (do not hide) but allow reduced height when modal open */
.logs{ transition:height 180ms ease }

/* Compact modal labeled log wrapper */
.modal-log-wrap{ margin-top:8px; display:flex; flex-direction:column; gap:8px }
.modal-log-label{ align-self:flex-start; background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); color:var(--muted); font-weight:600; font-size:12px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,0.03) }
.modal-log-wrap pre#addSchedLog{ margin:0; background:linear-gradient(180deg,#071224,#071224); border:1px solid rgba(255,255,255,0.03); border-radius:8px; padding:10px; color:var(--muted); font-size:13px; line-height:1.4 }

/* Responsive Design */
@media (max-width: 1400px) {
  .grid{
    grid-template-columns: 280px 1fr 250px;
  }
}

/* Driver.js Custom Theme */
.driver-popover {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid #1b2742 !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset, 0 10px 40px rgba(0,0,0,0.5) !important;
  border-radius: 12px !important;
}

.driver-popover-title {
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  background: transparent !important;
  border-bottom: 1px solid #1a2538 !important;
  padding: 14px 16px !important;
}

.driver-popover-description {
  color: var(--muted) !important;
  background: transparent !important;
  padding: 14px 16px !important;
  font-size: 13px !important;
}

.driver-popover-description code {
  background: #0a1018 !important;
  border: 1px solid #1a2538 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
}

.driver-popover-footer {
  background: transparent !important;
  border-top: 1px solid #1a2538 !important;
  padding: 12px 16px !important;
}

.driver-popover-prev-btn,
.driver-popover-next-btn,
.driver-popover-close-btn {
  background: var(--btn) !important;
  border: 1px solid var(--btn-br) !important;
  color: var(--text) !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.driver-popover-next-btn {
  background: linear-gradient(180deg,var(--btn-primary1),var(--btn-primary2)) !important;
  border-color: var(--btn-primary-br) !important;
}

.driver-popover-prev-btn:hover,
.driver-popover-next-btn:hover,
.driver-popover-close-btn:hover {
  background: var(--btn-h) !important;
}

.driver-popover-next-btn:hover {
  background: linear-gradient(180deg,#4e87ff,var(--btn-primary1)) !important;
}

.driver-popover-progress-text {
  color: var(--muted) !important;
  font-size: 12px !important;
}

.driver-active-element {
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.3) !important;
  border-radius: 10px !important;
}

@media (max-width: 1400px) {
  .grid{
    grid-template-columns: 280px 1fr 250px;
  }
}

@media (max-width: 1200px) {
  .grid{
    grid-template-columns: 260px 1fr;
  }
  .main-content{
    grid-column:2;
  }
  .right-sidebar{
    display:none;
  }
}

@media (max-width: 1024px) {
  .grid{
    grid-template-columns: 1fr;
  }
  .sidebar{
    position:relative;
    top:0;
    left:auto;
    width:auto;
    z-index:auto;
    height:auto;
    max-height:none;
    overflow:visible;
    margin-top:0;
    padding:0;
    transform:none !important;
  }
  .settings-sidebar-toggle{
    top:auto;
    left:auto !important;
    right:14px;
    bottom:14px;
    border-left:1px solid #26395e;
    border-radius:999px;
    width:42px;
    height:42px;
    transform:none;
  }
  .settings-sidebar-toggle span{
    transform:rotate(90deg);
  }
  body.settings-sidebar-collapsed .settings-sidebar-toggle span{
    transform:rotate(-90deg);
  }
  body.settings-sidebar-collapsed .settings-sidebar-panel{
    display:none;
  }
  .settings-sidebar-panel{
    min-height:0;
    padding:14px;
    border:1px solid #1b2742;
    border-radius:12px;
    background:var(--card);
  }
  .main-content{
    grid-column:1;
  }
  .right-sidebar{
    display:none;
  }
  .mode-options-row{
    grid-template-columns:1fr;
  }
  .bundle-meta-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .bundle-meta-search{
    max-width:none;
  }
  .bundle-meta-filter-tabs{
    justify-content:flex-start;
  }
  .workspace-switcher-nav{
    align-items:stretch;
    flex-direction:column;
  }
  .workspace-tool-nav,
  .workspace-data-nav,
  .workspace-view-nav{
    justify-content:center;
    margin-left:0;
  }
}

@media (max-width: 640px) {
  .container{
    padding:0 12px;
  }
  .mode-option{
    padding:12px;
  }
}

/* =====================================================
   Upload Preview Modal (Dry-Run Confirmation UI)
   ===================================================== */
#uploadPreviewModal { z-index:65; }

.upm-modal {
  width: min(94vw, 1100px);
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.upm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #1b2742;
  flex-shrink: 0;
}
.upm-title { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.upm-subtitle { font-size: 12px; color: var(--muted); }

.upm-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #1b2742;
  flex-shrink: 0;
  background: rgba(255,255,255,0.01);
}
.upm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
}
.upm-pill-update { background: #112a1e; border-color: #1f6b50; color: #3be8ad; }
.upm-pill-skip   { background: #1c2440; border-color: #2d3d6e; color: #8aa0c2; }
.upm-pill-block  { background: #2e1a1a; border-color: #6b2828; color: #ff8080; }
.upm-pill-nf     { background: #211e10; border-color: #5a4c10; color: #e0c060; }
.upm-pill-dup    { background: #2a2010; border-color: #7a5500; color: #ffb347; }
.upm-pill-total  { background: #141e35; border-color: #233060; color: var(--text); }
.upm-pill-time   { background: #121a2b; border-color: #1e2845; color: var(--muted); font-weight: 400; }

.upm-promo {
  padding: 10px 20px;
  border-bottom: 1px solid #1b2742;
  background: rgba(0, 180, 100, 0.04);
  flex-shrink: 0;
}
.upm-promo-title { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.upm-promo-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.upm-promo-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 6px;
  background: #0d2018;
  border: 1px solid #1a5c3a;
  font-size: 12px;
  font-weight: 600;
  color: #3be8ad;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.upm-promo-chip:hover { background: #122d20; border-color: #28a06a; }
.upm-promo-chip.active { background: #1a5c3a; border-color: #3be8ad; color: #fff; box-shadow: 0 0 0 2px rgba(59,232,173,0.25); }
.upm-promo-chip-clear {
  background: transparent;
  border-color: #2a3550;
  color: var(--muted);
  font-weight: 400;
}
.upm-promo-chip-clear:hover { background: #1a2440; border-color: #4a5a80; color: var(--text); }

.upm-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 20px 8px;
  border-bottom: 1px solid #1b2742;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.upm-tab {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #233060;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.upm-tab:hover { background: #1a2a50; color: var(--text); }
.upm-tab.active {
  background: linear-gradient(180deg, var(--btn-primary1), var(--btn-primary2));
  border-color: var(--btn-primary-br);
  color: #fff;
  font-weight: 600;
}

/* Preview modal status filter tabs */
.prev-tab {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid #233060;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.prev-tab:hover { background: #1a2a50; color: var(--text); }
.prev-tab.active {
  background: linear-gradient(180deg, var(--btn-primary1), var(--btn-primary2));
  border-color: var(--btn-primary-br);
  color: #fff;
  font-weight: 600;
}

.upm-table-wrap {
  flex: 1;
  overflow: auto;
  border: none;
  border-radius: 0;
  border-top: none;
  max-height: none;
}
#upmTable th, #upmTable td { padding: 9px 10px; font-size: 13px; }
#upmTable thead th { position: sticky; top: 0; background: var(--card); z-index: 2; }

.upm-cell-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.upm-old { color: var(--muted); text-decoration: line-through; }
.upm-no-change { color: var(--muted, #6b7a99); font-size: 11px; font-style: italic; }
.upm-arrow { color: var(--muted); font-size: 10px; }
.upm-new-up   { color: #ffae42; font-weight: 600; }
.upm-new-down { color: #3be8ad; font-weight: 600; }
.upm-new-same { color: var(--muted); }
.upm-unchanged { color: var(--muted); font-size: 12px; }

.upm-margin-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 118px;
}
.upm-margin-cell .upm-row-margin-input {
  width: 64px;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border, #2a3550);
  background: #0f1620;
  color: inherit;
  font-size: 11px;
  text-align: right;
  line-height: 1.1;
}

.upm-margin-current {
  font-size: 10px;
  color: var(--muted);
  text-align: left;
  line-height: 1.1;
  min-height: 11px;
  min-width: 42px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}
.upm-row-margin-input:hover + .upm-margin-current,
.upm-row-margin-input:focus + .upm-margin-current,
.upm-table-wrap tr:hover .upm-margin-current {
  opacity: 1;
  transform: translateY(0);
}

.upm-status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.upm-s-update { background: #112a1e; border: 1px solid #1f6b50; color: #3be8ad; }
.upm-s-skip   { background: #1c2440; border: 1px solid #2d3d6e; color: #8aa0c2; }
.upm-s-block  { background: #2e1a1a; border: 1px solid #6b2828; color: #ff8080; }
.upm-s-nf     { background: #211e10; border: 1px solid #5a4c10; color: #e0c060; }
.upm-s-fail   { background: #2e1a1a; border: 1px solid #6b2828; color: #ff5d5d; }
.upm-s-dup    { background: #2a2010; border: 1px solid #7a5500; color: #ffb347; }

.upm-pager { padding: 8px 20px; border-top: 1px solid #1b2742; flex-shrink: 0; }
.upm-actions {
  padding: 14px 20px;
  border-top: 1px solid #1b2742;
  flex-shrink: 0;
  background: rgba(255,255,255,0.01);
}
.upm-actions-warn {
  font-size: 12px;
  color: var(--warn);
  margin-bottom: 10px;
}

/* Product Search Tool */
.product-search-modal {
  width: min(94vw, 1040px);
  max-width: 1040px;
  height: min(88vh, 720px);
  max-height: 88vh;
  padding: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-search-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 92px 128px 68px 70px;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.product-search-toolbar input[type=text],
.product-search-toolbar select,
.product-search-moneybar input[type=text],
.product-search-moneybar select {
  height: 34px;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
}
.product-search-toolbar .btn {
  height: 34px;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 10px;
}
.product-search-moneybar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}
.ps-money-filter {
  display: grid;
  grid-template-columns: 44px 46px minmax(72px, 1fr);
  gap: 5px;
  align-items: center;
  background: #0a1018;
  border: 1px solid #1b2742;
  border-radius: 8px;
  padding: 5px;
}
.ps-money-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.ps-money-filter select {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}
.product-search-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.product-search-left,
.product-search-right {
  border: 1px solid #1b2742;
  border-radius: 8px;
  background: #0a1018;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.product-search-left-head,
.product-search-right-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 7px 9px;
  border-bottom: 1px solid #1b2742;
}
.product-search-vendor-tabs {
  display: flex;
  gap: 5px;
  margin: 5px 0 4px 0;
  min-height: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 3px 0;
  scrollbar-width: thin;
  scrollbar-color: #223a62 transparent;
}
.product-search-vendor-tabs:empty {
  display: none;
}
.product-search-vendor-tabs::-webkit-scrollbar {
  height: 5px;
}
.product-search-vendor-tabs::-webkit-scrollbar-thumb {
  background: #223a62;
  border-radius: 999px;
}
.product-search-vendor-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.ps-vendor-tab {
  appearance: none;
  border: 1px solid #223553;
  background: #0b1422;
  color: #b9c9e5;
  border-radius: 7px;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  max-width: 150px;
  min-height: 24px;
  overflow: hidden;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-vendor-tab span {
  color: var(--muted);
  font-weight: 800;
  margin-left: 4px;
}
.ps-vendor-tab:hover {
  border-color: #3e5f95;
  color: #e0ecff;
}
.ps-vendor-tab.active {
  background: #14233c;
  border-color: var(--accent);
  color: #f0f7ff;
  box-shadow: 0 0 0 2px rgba(77,163,255,.12);
}
.product-search-list,
.product-search-details {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #2a4674 #0a1018;
  scrollbar-gutter: stable;
}
.product-search-list::-webkit-scrollbar,
.product-search-details::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.product-search-list::-webkit-scrollbar-thumb,
.product-search-details::-webkit-scrollbar-thumb {
  background: #2a4674;
  border: 2px solid #0a1018;
  border-radius: 999px;
}
.product-search-list::-webkit-scrollbar-track,
.product-search-details::-webkit-scrollbar-track {
  background: #0a1018;
}
.ps-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  background: #10192a;
  border: 1px solid #23324f;
  color: var(--text);
  border-radius: 8px;
  padding: 7px 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.ps-item:hover { border-color: #3e5f95; }
.ps-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(77,163,255,.15);
}
.ps-sku {
  font-size: 12px;
  font-weight: 700;
  color: #dce8ff;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}
.ps-title {
  font-size: 12px;
  color: #c2d1ec;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ps-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.ps-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  background: #10192a;
  border: 1px solid #23324f;
  border-radius: 8px;
  padding: 8px;
}
.ps-detail-sku {
  color: #dce8ff;
  font-size: 14px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ps-detail-sku-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.ps-copy-sku-btn {
  appearance: none;
  border: 1px solid #2d4a75;
  background: #0d1a2d;
  color: #b8d7ff;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ps-copy-sku-btn:hover {
  border-color: #4d83c9;
  color: #e3f0ff;
}
.ps-copy-sku-btn.copied {
  border-color: #1f6b50;
  background: #10281e;
  color: #8ee6a8;
}
.ps-detail-title {
  color: #c2d1ec;
  font-size: 12px;
  margin-top: 3px;
}
.ps-detail-options,
.ps-context-line {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  word-break: break-word;
}
.ps-status-pill {
  flex: 0 0 auto;
  border: 1px solid #314a76;
  border-radius: 999px;
  color: #dce8ff;
  background: #172338;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
}
.ps-money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.ps-money-card {
  background: #0d1523;
  border: 1px solid #23324f;
  border-radius: 8px;
  padding: 7px 8px;
}
.ps-money-v {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  margin-top: 2px;
}
.ps-money-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.ps-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 6px;
}
.ps-kv-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ps-kv {
  background: #10192a;
  border: 1px solid #23324f;
  border-radius: 7px;
  padding: 5px 7px;
}
.ps-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.ps-v {
  font-size: 12px;
  color: var(--text);
  margin-top: 2px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ps-section {
  border-top: 1px solid #1b2742;
  padding-top: 8px;
}
.ps-section-title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ps-link-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ps-link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid #2a4270;
  background: #111d31;
  color: #dce8ff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  text-decoration: none;
}
.ps-link-btn:hover {
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .product-search-modal { height: min(92vh, 760px); }
  .product-search-toolbar { grid-template-columns: 1fr 1fr; }
  .product-search-toolbar input[type=text],
  .product-search-toolbar .btn { grid-column: 1 / -1; }
  .product-search-moneybar { grid-template-columns: 1fr; }
  .product-search-grid { grid-template-columns: 1fr; grid-template-rows: minmax(140px, 220px) minmax(0, 1fr); min-height: 0; }
  .product-search-left { max-height: 220px; }
  .ps-kv-grid { grid-template-columns: 1fr; }
  .ps-kv-grid-compact,
  .ps-money-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .product-search-toolbar { grid-template-columns: 1fr; }
  .product-search-toolbar input[type=text],
  .product-search-toolbar .btn { grid-column: auto; }
}


/* UPM utility classes */
.upm-na  { color: var(--muted, #6b7a99); font-size: 12px; }
.upm-sku { font-family: monospace; font-size: 12px; white-space: nowrap; }

/* Per-row promo window chips */
.upm-promo-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.upm-win-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: default;
}
.upm-win-active  { background: #112a1e; border-color: #1f6b50; color: #4ade80; }
.upm-win-future  { background: #0f1e40; border-color: #2a4a8e; color: #7eb3ff; }
.upm-win-expired { background: #1a0f0f; border-color: #4a1a1a; color: #555; text-decoration: line-through; }

/* Schedule-date preview column values */
.upm-sched-val        { color: #f0ad00; font-weight: 600; font-size: 12px; }
.upm-sched-promo      { color: #3be8ad; }   /* promo overrides base — highlight teal */
/* Event start / end sub-bar tabs */
.upm-event-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 6px;
  background: #0d1825;
  border: 1px solid #2a3550;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.upm-event-tab:hover { background: #1a2840; border-color: #4a6090; color: var(--text); }
.upm-event-tab#upmEventStartBtn.active,
.upm-event-tab#upmPickerStartBtn.active { background: #112a1e; border-color: #3be8ad; color: #3be8ad; }
.upm-event-tab#upmEventEndBtn.active,
.upm-event-tab#upmPickerEndBtn.active   { background: #2e1a1a; border-color: #ff8080; color: #ff8080; }

/* Mapping modal */
.mapping-dual-wrap {
  width: min(96vw, 1320px);
  max-width: 1320px;
  display: flex;
  flex-direction: row-reverse;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.mapping-dual-wrap.has-source {
  justify-content: center;
}

.mapping-modal {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.mapping-target-modal {
  width: min(42vw, 460px);
  min-width: 360px;
}

.mapping-source-modal {
  width: min(52vw, 760px);
  min-width: 420px;
  height: auto;
  max-height: min(90vh, 860px);
  flex-direction: column;
  overflow: hidden !important;
}

.mapping-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
}

.mapping-col {
  padding: 16px;
  border: 1px solid #1b2742;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
}

.mapping-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mapping-target-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mapping-target {
  border: 1px solid #2a3550;
  border-radius: 10px;
  padding: 12px;
  background: #0a1018;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.mapping-target:hover {
  border-color: #3a5d9c;
  transform: translateY(-1px);
}

.mapping-target.assigned {
  background: linear-gradient(180deg, #101c31, #0c1525);
  border-color: #38547e;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, 0.08) inset;
}

.mapping-target.assigned .mapping-target-value {
  color: #dbe9ff;
}

.mapping-target.active {
  border-color: #4da3ff;
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.22);
}

.mapping-target-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.mapping-target-hint {
  font-size: 11px;
  color: #7f94b6;
  margin-bottom: 8px;
}

.mapping-target-value {
  font-size: 12px;
  color: var(--muted);
  min-height: 22px;
}

.mapping-target-clear {
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 11px;
}

.mapping-source-body {
  flex: 0 1 auto;
  min-height: 80px;
  max-height: min(62vh, 560px);
  padding: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mapping-source-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mapping-sheet {
  border: 1px solid #2a3550;
  border-radius: 10px;
  background: #0b1322;
  overflow: hidden;
  margin-bottom: 10px;
}

.mapping-sheet-title {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #c7d8f5;
  border-bottom: 1px solid #223252;
  background: #101b31;
}

.mapping-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.mapping-source-card {
  border: 1px solid #2a3550;
  border-radius: 10px;
  background: #0d1424;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.mapping-source-card:hover {
  border-color: #3a5d9c;
}

.mapping-source-card.active {
  border-color: #4da3ff;
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.22);
  background: linear-gradient(180deg, #10203a, #0e1a2f);
}

.mapping-source-card.selected {
  border-color: #3be8ad;
  box-shadow: 0 0 0 2px rgba(59, 232, 173, 0.24);
}

.mapping-source-card.locked {
  opacity: 0.5;
  border-color: #4a556f;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.mapping-source-card.locked:hover {
  border-color: #4a556f;
}

.mapping-card-badge--warn {
  color: #f0a040;
  border-color: #7a4a10;
}

.mapping-card-rowcount {
  font-size: 11px;
  font-weight: 600;
  color: #4da3ff;
  margin-top: 5px;
  margin-bottom: 2px;
}

.sheet-locked-out .mapping-sheet-title {
  opacity: 0.6;
}

.mapping-card-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.mapping-card-source,
.mapping-card-sample,
.mapping-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}

.mapping-card-badge {
  display: inline-flex;
  margin-top: 6px;
  font-size: 10px;
  color: #76d9a8;
  border: 1px solid #2f8f63;
  border-radius: 999px;
  padding: 2px 8px;
}

@media (max-width: 1100px) {
  .mapping-dual-wrap {
    flex-direction: column;
    width: min(96vw, 920px);
  }

  .mapping-target-modal,
  .mapping-source-modal {
    width: 100%;
    min-width: 0;
  }
}
