/* ============================================================
   Create / edit form
   ============================================================ */
.sqp-form { max-width: 660px; margin: 0 auto; }

/* ------------------------------------------------------------------
   App-style form sections (collapsible cards)
   ------------------------------------------------------------------ */
.sqp-form-head { margin: 0 0 16px; }
.sqp-form-head h2 { font-size: 22px; margin: 0 0 3px; }
.sqp-form-head p { color: #6b7280; font-size: 13.5px; margin: 0; }

.sqp-sec {
	background: #fff; border: 1px solid #e3e6ea; border-radius: 14px;
	margin: 0 0 12px; overflow: hidden;
}
.sqp-sec-head {
	display: flex; align-items: center; gap: 13px;
	padding: 15px 16px; cursor: pointer; list-style: none;
	transition: background .12s;
}
.sqp-sec-head::-webkit-details-marker { display: none; }
.sqp-sec-head:hover { background: #fafbfc; }
.sqp-sec-ico {
	flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
	background: #f2f5f8; display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.sqp-sec-text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sqp-sec-text strong { font-size: 15.5px; }
.sqp-sec-text em { font-style: normal; font-size: 12.5px; color: #6b7280; }
.sqp-sec-arrow { flex: 0 0 auto; color: #c3c7cd; font-size: 21px; line-height: 1; transition: transform .18s; }
.sqp-sec[open] > .sqp-sec-head { border-bottom: 1px solid #eef0f1; background: #fafbfc; }
.sqp-sec[open] > .sqp-sec-head .sqp-sec-arrow { transform: rotate(90deg); }
.sqp-sec-body { padding: 18px 16px 6px; }
.sqp-sec-body > .sqp-field:last-child,
.sqp-sec-body > .sqp-row:last-child { margin-bottom: 12px; }

/* ============================================================
   Offer banner (product page + cart)
   ============================================================ */
.sqp-offer {
	background: linear-gradient(135deg, #fff8e9, #fffdf7);
	border: 1.5px solid #f0d9a0; border-radius: 14px;
	padding: 15px 17px; margin: 0 0 18px;
}
.sqp-offer-cart { max-width: 100%; }
.sqp-offer-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.sqp-offer-ico { font-size: 20px; line-height: 1; }
.sqp-offer-head strong { font-size: 15.5px; color: #7a5c00; }
.sqp-offer-text { margin: 0 0 9px; font-size: 14px; line-height: 1.65; color: #4a3a00; }
.sqp-offer-btn {
	display: inline-flex; align-items: center; gap: 6px;
	background: #111827; color: #fff; text-decoration: none;
	padding: 10px 18px; border-radius: 999px;
	font-size: 13.5px; font-weight: 700; margin: 0 0 8px;
	transition: background .15s, transform .12s;
}
.sqp-offer-btn:hover { background: #000; color: #fff; transform: translateY(-1px); }
.sqp-offer-save { margin: 4px 0 0; font-size: 12.5px; color: #8a7330; }

@media (max-width: 600px) {
	.sqp-offer-btn { width: 100%; justify-content: center; }
}

/* Import steps + help table */
.sqp-steps { counter-reset: s; list-style: none; margin: 0 0 16px; padding: 0; }
.sqp-steps li {
	position: relative; counter-increment: s;
	padding: 0 46px 14px 0; margin: 0;
}
.sqp-steps li:before {
	content: counter(s);
	position: absolute; inset-inline-start: 0; top: 0;
	width: 32px; height: 32px; border-radius: 50%;
	background: #111827; color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 14px; font-weight: 700;
}
.sqp-steps li strong { display: block; font-size: 15px; margin-bottom: 2px; }
.sqp-steps li span { display: block; font-size: 13px; color: #6b7280; line-height: 1.6; }
.sqp-steps li .button { margin-top: 8px; }

.sqp-help-table { width: 100%; border-collapse: collapse; }
.sqp-help-table th, .sqp-help-table td { padding: 8px 10px; border-bottom: 1px solid #eef0f1; text-align: start; font-size: 13px; }
.sqp-help-table th { font-size: 11.5px; text-transform: uppercase; color: #9aa2a8; letter-spacing: .4px; }
.sqp-help-table code { background: #f2f5f8; padding: 2px 7px; border-radius: 5px; font-size: 12.5px; }

/* Sticky save bar */
.sqp-savebar {
	position: sticky; bottom: 0; z-index: 20;
	background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
	border-top: 1px solid #e3e6ea; padding: 12px 0; margin-top: 6px;
}
.sqp-savebar .sqp-submit { margin-top: 0; }

/* Back-to-dashboard link (top of every sub-page) */
.sqp-back { max-width: 660px; margin: 0 auto 14px; }
.sqp-back-link {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 9px 15px; border: 1px solid #d8dadd; border-radius: 999px;
	background: #fff; color: #333; text-decoration: none; font-weight: 600; font-size: 14px;
	transition: border-color .15s, background .15s;
}
.sqp-back-link:hover { border-color: #111; background: #f6f7f7; color: #111; }
.sqp-back-ico { font-size: 16px; line-height: 1; }

/* Success action buttons (after creating a product) */
.sqp-success-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.sqp-field { display: block; margin: 0 0 18px; }
.sqp-field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }

/* Image upload (custom button -> hidden native input; reliable tap target on mobile) */
.sqp-upload .sqp-file-input { display: none; }
.sqp-upload-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; box-sizing: border-box; min-height: 54px; padding: 14px 16px;
	border: 1.5px dashed #c3c7cd; border-radius: 12px; background: #fafafa;
	font-size: 15px; font-weight: 600; color: #333; cursor: pointer;
	-webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
	transition: border-color .15s, background .15s;
}
.sqp-upload-btn:hover { border-color: #111; }
.sqp-upload-btn:active { background: #f0f0f0; border-color: #111; }
.sqp-upload-ico { font-size: 18px; line-height: 1; }
.sqp-upload-name { display: block; color: #0a7d33; font-weight: 600; margin-top: 7px; font-size: 13px; word-break: break-word; }
.sqp-upload-name.sqp-upload-warn { color: #b26a00; }

/* Two ways to pick a file: device / media library */
.sqp-upload-choice { display: flex; gap: 8px; }
.sqp-upload-choice .sqp-upload-btn { flex: 1 1 0; min-width: 0; font-size: 14px; padding: 12px 10px; }
.sqp-lib-btn { border-style: solid; border-color: #d8dadd; background: #fff; }
.sqp-lib-btn:hover { border-color: #2271b1; color: #2271b1; }
@media (max-width: 480px) {
	.sqp-upload-choice { flex-direction: column; }
}

/* Attached images: thumbnails with a delete button */
.sqp-thumbs, .sqp-file-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sqp-file-preview:empty { margin-top: 0; }
.sqp-thumb {
	position: relative; width: 84px; height: 84px; border-radius: 10px;
	overflow: hidden; border: 1px solid #e3e6e8; background: #f6f7f7; flex: 0 0 auto;
}
.sqp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sqp-thumb .sqp-lib-file { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 26px; }
.sqp-thumb-new { border-color: #0a7d33; }
.sqp-thumb-del, .sqp-file-del {
	position: absolute; top: 3px; inset-inline-end: 3px;
	width: 26px; height: 26px; line-height: 1; padding: 0;
	border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(0,0,0,.68); color: #fff; font-size: 17px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.sqp-thumb-del:hover, .sqp-file-del:hover { background: #b32d2e; }

/* Preview of what was picked from the library */
.sqp-lib-preview { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 9px; }
.sqp-lib-preview:empty { margin-top: 0; }
.sqp-lib-item {
	display: flex; align-items: center; gap: 7px;
	background: #f6f7f7; border: 1px solid #e3e6e8; border-radius: 9px; padding: 5px 9px 5px 5px;
	font-size: 12px; max-width: 100%;
}
.sqp-lib-item img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; display: block; }
.sqp-lib-file { font-size: 20px; line-height: 1; width: 34px; text-align: center; }
.sqp-lib-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sqp-lib-clear {
	border: 1px solid #e3b7b7; background: #fff; color: #b32d2e;
	border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.sqp-lib-clear:hover { background: #fbeaea; }
.sqp-video-preview { width: 100%; max-height: 320px; border-radius: 12px; background: #000; display: block; }

/* Product video block — single product page only, above the gallery.
   Always shows the WHOLE video (letterboxed, never cropped) and adapts to the
   screen height so a tall portrait clip doesn't fill the whole page. */
.sqp-video-block {
	width: 100%; margin: 0 0 14px;
	background: #111; border-radius: 10px; overflow: hidden;
	line-height: 0; position: relative;
}
.sqp-video-block:before {
	content: attr(data-label);
	position: absolute; top: 8px; inset-inline-start: 10px; z-index: 2;
	background: rgba(0,0,0,.62); color: #fff;
	font: 600 11px/1 -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
	padding: 5px 9px; border-radius: 999px; pointer-events: none;
}
.sqp-main-video {
	display: block; width: 100%; height: auto;
	max-height: 60vh; object-fit: contain;
	background: #111;
}
/* On phones keep the video modest so it never swallows the screen and push
   the size/colour/add-on fields out of sight. */
@media (max-width: 768px) {
	.sqp-main-video { max-height: 42vh; }
}
.sqp-field input[type="text"],
.sqp-field input[type="number"],
.sqp-field input[type="search"],
.sqp-field textarea,
.sqp-field select {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #d8dadd;
	border-radius: 10px;
	font-size: 16px; /* avoids iOS zoom-on-focus */
	box-sizing: border-box;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.sqp-field input:focus,
.sqp-field textarea:focus,
.sqp-field select:focus {
	border-color: #111;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
/* Any native multi-select: force a proper scroll box so options never overflow the layout */
.sqp-field select[multiple] {
	height: auto !important;
	min-height: 120px;
	max-height: 240px;
	overflow-y: auto;
}

/* Tap-friendly checkbox list (coupon products / categories) */
.sqp-check-search { margin-bottom: 8px; }
.sqp-checklist {
	max-height: 260px; overflow-y: auto;
	border: 1px solid #d8dadd; border-radius: 10px; background: #fff;
	padding: 4px;
	-webkit-overflow-scrolling: touch;
}
.sqp-check {
	display: flex; align-items: center; gap: 10px;
	padding: 9px 11px; border-radius: 8px; cursor: pointer;
	font-size: 15px; font-weight: 400;
}
.sqp-check:hover { background: #f5f6f7; }
.sqp-check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.sqp-check > span { margin: 0; }

/* Region groups inside the shipping rule form */
.sqp-region-group + .sqp-region-group { border-top: 1px solid #eee; margin-top: 4px; padding-top: 4px; }
.sqp-region-group > strong { display: block; padding: 7px 9px; font-size: 12.5px; color: #6b7280; }

.sqp-field small { display: block; color: #777; margin-top: 5px; font-size: 12.5px; }
.sqp-field.sqp-inline { display: flex; align-items: center; gap: 8px; }
.sqp-field.sqp-inline > span { margin: 0; font-weight: 400; }

.sqp-row { display: flex; gap: 14px; }
.sqp-row .sqp-field { flex: 1; }

/* Preset picker on the product form */
.sqp-preset-box { background: #f5f9ff; border: 1px solid #d6e6f7; border-radius: 12px; padding: 14px 16px; }
.sqp-preset-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.sqp-preset-row select { flex: 1 1 180px; min-width: 0; }
@media (max-width: 600px) {
	.sqp-preset-row select,
	.sqp-preset-row .button { flex: 1 1 100%; }
}

.sqp-repeat { margin-top: 4px; }
.sqp-rep-row { display: flex; gap: 8px; margin: 0 0 8px; align-items: center; flex-wrap: wrap; }
.sqp-rep-row input[type="text"],
.sqp-rep-row input[type="number"] { flex: 1 1 42%; min-width: 0; }
/* On phones give each field a full-width line so both stay usable. */
@media (max-width: 600px) {
	.sqp-rep-row { gap: 6px; }
	.sqp-rep-row input[type="text"],
	.sqp-rep-row input[type="number"] { flex: 1 1 100%; }
	.sqp-rep-row input[type="color"] { flex: 0 0 auto; }
	.sqp-rep-remove { margin-inline-start: auto; }
}
.sqp-rep-row input[type="color"] {
	width: 46px; height: 44px; padding: 2px; border: 1px solid #d8dadd;
	border-radius: 10px; background: #fff; cursor: pointer; flex: 0 0 auto;
}
.sqp-rep-remove {
	border: 1px solid #d8dadd; background: #fff; border-radius: 10px;
	width: 44px; height: 44px; cursor: pointer; font-size: 18px; line-height: 1; flex: 0 0 auto;
}
.sqp-rep-add { margin-top: 2px; }

.sqp-submit { width: 100%; padding: 15px; font-size: 17px; margin-top: 10px; border-radius: 10px; }

.sqp-box { padding: 13px 16px; border-radius: 10px; margin: 0 auto 16px; max-width: 660px; }
.sqp-success { background: #edfaef; border: 1px solid #46b450; }
.sqp-error { background: #fbeaea; border: 1px solid #dc3232; }

/* ============================================================
   Manage list
   ============================================================ */
.sqp-manage-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.sqp-search { display: flex; gap: 8px; }
.sqp-search input { padding: 9px 12px; border: 1px solid #d8dadd; border-radius: 10px; }
.sqp-list { list-style: none; margin: 0; padding: 0; }
.sqp-list-item {
	display: flex; align-items: center; gap: 14px;
	padding: 12px; border: 1px solid #eee; border-radius: 12px; margin-bottom: 10px; background: #fff;
}
.sqp-list-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.sqp-list-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sqp-list-price { color: #111; }
.sqp-list-status { color: #888; font-size: 12px; }
.sqp-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.sqp-page { padding: 6px 12px; border: 1px solid #d8dadd; border-radius: 8px; text-decoration: none; }
.sqp-page.current { background: #111; color: #fff; border-color: #111; }

/* ============================================================
   Storefront product page
   ============================================================ */
.sqp-fields { margin: 0 0 18px; }
.sqp-group { margin: 0 0 22px; }
.sqp-group-title { display: block; font-weight: 600; margin-bottom: 10px; font-size: 14px; letter-spacing: .2px; }
.sqp-req { color: #dc3232; }

/* Pills (sizes + single-choice add-ons) — refined, professional */
.sqp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sqp-pill-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.sqp-pill {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; padding: 9px 16px;
	border: 1.5px solid #dcdcdc; border-radius: 8px;
	background: #fff; color: #222; cursor: pointer; user-select: none;
	font-size: 14px; line-height: 1.1; transition: border-color .15s, background .15s, color .15s;
}
.sqp-pill:hover { border-color: #111; }
.sqp-pill-input:checked + .sqp-pill { border-color: #111; background: #111; color: #fff; }

/* Optional add-ons: the "Without" choice + hint */
.sqp-pill-none { color: #777; border-style: dashed; }
.sqp-pill-input:checked + .sqp-pill-none { background: #6b7280; border-color: #6b7280; color: #fff; border-style: solid; }
.sqp-addon-hint { display: block; color: #888; margin-top: 8px; font-size: 12.5px; }
.sqp-pill-input:focus-visible + .sqp-pill { box-shadow: 0 0 0 3px rgba(0,0,0,.15); }

/* Color swatches (Shopify-style) */
.sqp-swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.sqp-swatch-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.sqp-swatch { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.sqp-swatch-dot {
	width: 32px; height: 32px; border-radius: 50%;
	border: 1px solid rgba(0,0,0,.18); display: block;
	transition: box-shadow .15s;
}
.sqp-swatch-name { font-size: 12px; color: #555; }
.sqp-swatch:hover .sqp-swatch-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #bbb; }
.sqp-swatch-input:checked + .sqp-swatch .sqp-swatch-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111; }
.sqp-swatch-input:checked + .sqp-swatch .sqp-swatch-name { color: #111; font-weight: 600; }
.sqp-swatch-input:focus-visible + .sqp-swatch .sqp-swatch-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111; }

/* Measurement inputs — compact, pill-shaped (rounded ends) */
.sqp-measure-grid { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.sqp-measure-item { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.sqp-measure-item label { font-size: 13px; color: #555; }
.sqp-measure-item input {
	width: 150px; max-width: 42vw; box-sizing: border-box;
	padding: 10px 16px; text-align: center;
	border: 1.5px solid #dcdcdc; border-radius: 999px; font-size: 15px; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.sqp-measure-item input:focus { border-color: #111; outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.sqp-measure-item input::-webkit-outer-spin-button,
.sqp-measure-item input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Customer notes box (storefront) */
.sqp-cust-note textarea {
	width: 100%; box-sizing: border-box; padding: 11px 13px;
	border: 1px solid #d8dadd; border-radius: 10px; font-size: 16px; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.sqp-cust-note textarea:focus { border-color: #111; outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,.08); }

/* Description under the image */
.sqp-product-description { margin: 22px 0 0; line-height: 1.75; }
.sqp-product-description img { max-width: 100%; height: auto; }

@media (max-width: 480px) {
	.sqp-row { flex-direction: column; gap: 0; }
}

/* ============================================================
   Sahla hub (front-end dashboard)
   ============================================================ */
.sqp-hub { max-width: 900px; margin: 0 auto; }

/* Header: greeting + primary action */
.sqp-hub-top {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	flex-wrap: wrap; margin-bottom: 16px;
}
.sqp-hub-greet { display: flex; flex-direction: column; line-height: 1.35; }
.sqp-hub-hi { font-size: 13px; color: #6b7280; }
.sqp-hub-greet strong { font-size: 21px; color: #111827; }
.sqp-hub-add {
	display: inline-flex; align-items: center; gap: 7px;
	background: #111827; color: #fff; text-decoration: none;
	padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
	transition: background .15s, transform .12s;
}
.sqp-hub-add:hover { background: #000; color: #fff; transform: translateY(-1px); }
.sqp-hub-add span { font-size: 18px; line-height: 1; }

/* Quick stats */
.sqp-hub-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.sqp-stat {
	background: #fff; border: 1px solid #e3e6ea; border-radius: 14px;
	padding: 15px 12px; text-align: center; text-decoration: none; color: #111827;
	display: flex; flex-direction: column; gap: 3px;
	transition: border-color .12s, transform .12s;
}
.sqp-stat:hover { border-color: #111827; color: #111827; transform: translateY(-2px); }
.sqp-stat-num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.sqp-stat-lbl { font-size: 11.5px; color: #6b7280; }
.sqp-stat-warn .sqp-stat-num { color: #b26a00; }

/* Section heading */
.sqp-hub-group {
	font-size: 12.5px; font-weight: 700; color: #9aa2a8; letter-spacing: .5px;
	text-transform: uppercase; margin: 26px 0 10px; padding: 0; border: 0;
}

/* App-style rows */
.sqp-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.sqp-hub-card {
	display: flex; align-items: center; gap: 14px;
	background: #fff; border: 1px solid #e3e6ea; border-radius: 14px;
	padding: 15px 16px; text-decoration: none; color: #1f2328;
	transition: border-color .12s, box-shadow .12s, transform .12s;
}
.sqp-hub-card:hover {
	border-color: #111827; color: #1f2328;
	box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px);
}
.sqp-hub-icon {
	flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
	background: #eef4fb; color: #2271b1;
	display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.sqp-hub-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sqp-hub-title { font-size: 15.5px; font-weight: 700; }
.sqp-hub-desc { font-size: 12.5px; color: #6b7280; line-height: 1.5; }
.sqp-hub-go { flex: 0 0 auto; color: #c3c7cd; font-size: 22px; line-height: 1; }
.sqp-hub-card:hover .sqp-hub-go { color: #111827; }

@media (max-width: 600px) {
	.sqp-hub-grid { grid-template-columns: 1fr; }
	.sqp-hub-add { flex: 1 1 100%; justify-content: center; }
	.sqp-stat-num { font-size: 20px; }
	.sqp-hub-desc { font-size: 12px; }
}

/* ============================================================
   Orders list
   ============================================================ */
.sqp-orders-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sqp-orders-filters select,
.sqp-orders-filters input { padding: 9px 12px; border: 1px solid #d8dadd; border-radius: 10px; }
.sqp-orders-table { width: 100%; border-collapse: collapse; }
.sqp-orders-table th, .sqp-orders-table td { padding: 11px 10px; border-bottom: 1px solid #eee; text-align: start; vertical-align: middle; }
.sqp-orders-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #888; }
.sqp-orders-actions { white-space: nowrap; }
.sqp-orders-actions .button { margin-inline-start: 4px; }
.sqp-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: #eef1f4; color: #333; }
.sqp-status-processing { background: #c6e1c6; color: #2c4700; }
.sqp-status-completed { background: #c8d7e1; color: #2e4453; }
.sqp-status-on-hold { background: #f8dda7; color: #573b00; }
.sqp-status-pending, .sqp-status-cancelled, .sqp-status-failed { background: #eba3a3; color: #5b1313; }
.sqp-order-actions { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 600px) {
	.sqp-orders-table thead { display: none; }
	.sqp-orders-table, .sqp-orders-table tbody, .sqp-orders-table tr, .sqp-orders-table td { display: block; width: 100%; box-sizing: border-box; }
	.sqp-orders-table tr { border: 1px solid #eee; border-radius: 12px; margin-bottom: 12px; padding: 8px; }
	.sqp-orders-table td { border: 0; padding: 6px 8px; }
}

/* ============================================================
   Invoice (on-page + standalone print document)
   ============================================================ */
.sqp-invoice-page { background: #f2f3f5; margin: 0; padding: 24px; font-family: -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; color: #222; }
.sqp-inv-toolbar { max-width: 820px; margin: 0 auto 14px; display: flex; gap: 8px; justify-content: flex-end; }
.sqp-inv-btn { background: #111; color: #fff; border: 0; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.sqp-inv-btn-light { background: #fff; color: #333; border: 1px solid #d0d0d0; }

.sqp-invoice {
	max-width: 820px; margin: 0 auto; background: #fff; padding: 40px;
	border-radius: 14px; box-shadow: 0 4px 24px rgba(0,0,0,.06); line-height: 1.55;
}
.sqp-inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 24px; border-bottom: 2px solid #111; margin-bottom: 24px; flex-wrap: wrap; }
.sqp-inv-logo { max-height: 70px; max-width: 220px; height: auto; width: auto; }
.sqp-inv-store { font-size: 22px; font-weight: 700; }
.sqp-inv-store-addr { color: #666; font-size: 13px; margin-top: 8px; }
.sqp-inv-meta { font-size: 13px; min-width: 230px; }
.sqp-inv-meta h1 { margin: 0 0 12px; font-size: 26px; letter-spacing: 2px; color: #111; }
.sqp-inv-meta-row { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; border-bottom: 1px dashed #eceff2; }
.sqp-inv-meta-row span { color: #6b7280; }
.sqp-inv-meta-row strong { color: #1f2328; }
.sqp-inv-status { background: #eef1ff; color: #3858e9; border-radius: 999px; padding: 1px 10px; font-size: 12px; }
.sqp-inv-meta-total { border-bottom: 0; margin-top: 4px; }
.sqp-inv-meta-total span, .sqp-inv-meta-total strong { font-size: 16px; font-weight: 700; color: #111; }
.sqp-inv-qr { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sqp-inv-qr img { width: 104px; height: 104px; border: 1px solid #eee; border-radius: 8px; padding: 4px; background: #fff; }
.sqp-inv-qr span { font-size: 11px; color: #8a9099; }

.sqp-inv-parties { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 26px; }
.sqp-inv-party { flex: 1; min-width: 200px; }
.sqp-inv-party h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #999; }

.sqp-inv-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.sqp-inv-table thead th { background: #f6f7f8; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #777; }
.sqp-inv-table tbody td { padding: 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
/* Per-column alignment (applies to both header and body) */
.sqp-inv-c-item { text-align: start; }
.sqp-inv-c-qty { text-align: center; white-space: nowrap; width: 70px; }
.sqp-inv-c-total { text-align: end; white-space: nowrap; width: 130px; }
.sqp-inv-itemcell { display: flex; gap: 12px; align-items: center; }
.sqp-inv-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid #eee; }
.sqp-inv-itembody { min-width: 0; }
.sqp-inv-name { font-weight: 600; }
.sqp-inv-itemmeta { color: #666; font-size: 12.5px; margin-top: 4px; }
.sqp-inv-itemmeta p { margin: 2px 0; }
.sqp-inv-prodnote { margin-top: 6px; font-size: 12px; color: #6b7280; background: #f6f7f8; border-inline-start: 3px solid #cbd2da; border-radius: 4px; padding: 5px 8px; }

.sqp-inv-totals { display: flex; justify-content: flex-end; }
.sqp-inv-totals table { min-width: 280px; border-collapse: collapse; }
.sqp-inv-totals th { text-align: start; padding: 7px 12px; color: #555; font-weight: 500; }
.sqp-inv-totals td { text-align: end; padding: 7px 12px; }
.sqp-inv-totals .sqp-inv-total-order_total th,
.sqp-inv-totals .sqp-inv-total-order_total td { border-top: 2px solid #111; font-weight: 700; font-size: 16px; color: #111; }

.sqp-inv-note { margin-top: 22px; padding: 12px 14px; background: #f6f7f8; border-radius: 10px; font-size: 13px; }
.sqp-inv-footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid #eee; text-align: center; color: #888; font-size: 13px; }

@media print {
	.no-print { display: none !important; }
	.sqp-invoice-page { background: #fff; padding: 0; }
	.sqp-invoice { box-shadow: none; border-radius: 0; max-width: none; padding: 0; }
	@page { margin: 16mm; }
}

/* ============================================================
   Checkout Field Editor (admin) — table + tabs + modal
   ============================================================ */
.sqp-cfe { max-width: 1100px; }
.sqp-cfe-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sqp-cfe-top h1 { margin: 0; }
.sqp-cfe-tabs { margin-top: 16px; border-bottom: 1px solid #dcdcde; }
.sqp-tab-panel { display: none; }
.sqp-tab-panel.active { display: block; }
.sqp-cfe-bar { margin: 14px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sqp-cfe-bar .sqp-bulk { display: flex; gap: 6px; }
.sqp-cfe-bar .sqp-add-field { background: #2271b1; color: #fff; border-color: #2271b1; }
.sqp-cfe-table .sqp-c-check { width: 34px; text-align: center; }

.sqp-cfe-table { background: #fff; border: 1px solid #e3e4e7; border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.sqp-cfe-table thead th { background: #f7f8fa; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; padding: 12px 14px; border-bottom: 1px solid #e3e4e7; }
.sqp-cfe-table td { padding: 12px 14px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
.sqp-cfe-table tbody tr:last-child td { border-bottom: 0; }
.sqp-cfe-table tbody tr:hover { background: #f9fbff; }
.sqp-cfe-table .sqp-c-drag { width: 34px; text-align: center; }
.sqp-cfe-table .sqp-c-req, .sqp-cfe-table .sqp-c-en { width: 84px; text-align: center; }
.sqp-cfe-table .sqp-c-edit { width: 110px; white-space: nowrap; }
.sqp-cfe-row.is-custom { background: #fbfdff; }
.sqp-drag { cursor: grab; color: #b3b8bf; font-size: 16px; user-select: none; }
.sqp-cell-name { background: #eef0f3; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #334155; }
.sqp-type-badge { display: inline-block; font-size: 11.5px; color: #3858e9; background: #eef1ff; padding: 3px 11px; border-radius: 999px; }
.sqp-mark { font-size: 15px; }
.sqp-cell-req .sqp-mark, .sqp-cell-en { color: #16a34a; }
.sqp-row-remove { color: #b32d2e; text-decoration: none; font-size: 17px; margin-inline-start: 8px; vertical-align: middle; }
.sqp-cfe-table .button.sqp-edit { border-radius: 7px; }
.ui-sortable-helper { display: table; box-shadow: 0 8px 24px rgba(0,0,0,.14); background: #fff; border-radius: 8px; }
.ui-sortable-placeholder { visibility: visible !important; background: #eef3fb; }
.ui-sortable-placeholder td { border-color: transparent !important; }

/* Modal */
.sqp-modal { display: none; position: fixed; inset: 0; z-index: 100000; }
.sqp-modal.open { display: block; }
.sqp-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sqp-modal-box {
	position: relative; z-index: 1; width: 560px; max-width: calc(100% - 32px);
	margin: 5vh auto; background: #fff; border-radius: 12px; max-height: 90vh; display: flex; flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.sqp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; }
.sqp-modal-head h2 { margin: 0; font-size: 17px; }
.sqp-modal-x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #777; }
.sqp-modal-body { padding: 18px 20px; overflow: auto; }
.sqp-m-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sqp-m-row > span { flex: 0 0 150px; text-align: end; color: #444; font-size: 13px; }
.sqp-m-row > span em { color: #d63638; font-style: normal; }
.sqp-m-row input[type="text"], .sqp-m-row select, .sqp-m-row textarea {
	flex: 1; padding: 9px 11px; border: 1px solid #d8dadd; border-radius: 8px; font-size: 14px;
}
.sqp-m-row[disabled] { opacity: .6; }
.sqp-m-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-inline-start: 162px; }
.sqp-m-checks label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sqp-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #eee; }

@media (max-width: 600px) {
	.sqp-m-row { flex-direction: column; align-items: stretch; gap: 4px; }
	.sqp-m-row > span { flex: none; text-align: start; }
	.sqp-m-checks { padding-inline-start: 0; }
	.sqp-cfe-table .sqp-c-ph, .sqp-cfe-table .sqp-c-val { display: none; }
}
