/* ── Wrap & Title ──────────────────────────────────────────────────────────── */
.qc-admin-wrap {
	max-width: 1400px;
	margin: 20px 0;
}

.qc-main-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 26px;
	margin-bottom: 20px;
	color: #1d2327;
}

.qc-title-icon {
	font-size: 28px;
}

.qc-version-badge {
	font-size: 13px;
	font-weight: 500;
	background: #e5f1ff;
	color: #2271b1;
	padding: 2px 10px;
	border-radius: 20px;
	border: 1px solid #bfdbfe;
	margin-left: 4px;
}

/* ── Header Bar ───────────────────────────────────────────────────────────── */
.qc-header-bar {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	background: #fff;
	border-bottom: 2px solid #c3c4c7;
}

.qc-header-logo {
	height: 48px;
	width: auto;
	margin: auto 16px;
	opacity: .85;
}

/* ── Tab Navigation ───────────────────────────────────────────────────────── */
.qc-nav-tabs {
	margin: 0;
	border-bottom: none;
	background: transparent;
	padding: 0 4px;
	display: flex;
}

.qc-nav-tabs .nav-tab {
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 500;
	border: none;
	border-bottom: 3px solid transparent;
	background: transparent;
	margin-bottom: -2px;
}

.qc-nav-tabs .nav-tab:hover {
	background: #f6f7f7;
	border-bottom-color: #8c8f94;
}

.qc-nav-tabs .nav-tab-active,
.qc-nav-tabs .nav-tab-active:hover {
	border-bottom-color: #2271b1;
	color: #2271b1;
	background: transparent;
}

/* ── Tab Content Container ────────────────────────────────────────────────── */
.qc-tab-content {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-top: none;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.qc-tab-panel {
	padding: 22px 26px;
}

/* ── Panel Header ─────────────────────────────────────────────────────────── */
.qc-panel-header {
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 2px solid #f0f0f1;
}

.qc-panel-header h2 {
	margin: 0 0 4px;
	font-size: 18px;
	color: #1d2327;
}

.qc-panel-header .description {
	margin: 0;
	font-size: 13px;
	color: #50575e;
}

/* ── Section Title ────────────────────────────────────────────────────────── */
.qc-section-title {
	font-size: 13px;
	font-weight: 700;
	color: #2271b1;
	margin: 0 0 0;
	padding: 13px 18px;
	background: #f0f6ff;
	border-bottom: 1px solid #dce8f8;
	text-transform: uppercase;
	letter-spacing: .5px;
	border-radius: 6px 6px 0 0;
}

/* ── Section Card ─────────────────────────────────────────────────────────── */
.qc-section-card {
	border: 1px solid #dce8f8;
	border-radius: 6px;
	margin-bottom: 20px;
	overflow: hidden;
}

.qc-section-card .qc-advanced-row {
	padding: 18px 18px 10px;
	margin-bottom: 0;
}

.qc-section-card .qc-shortcode-box {
	margin: 0;
	border: none;
	border-radius: 0;
	background: #fff;
	padding: 18px 18px;
}

/* ── Form Table ───────────────────────────────────────────────────────────── */
.qc-tab-panel .form-table th {
	padding: 10px 15px 10px 0;
	width: 210px;
	font-weight: 600;
	vertical-align: top;
	font-size: 13px;
}

.qc-tab-panel .form-table td {
	padding: 8px 0;
}

/* ── Styling Tab: 2-column layout ─────────────────────────────────────────── */
.qc-styling-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 30px;
	align-items: flex-start;
}

.qc-styling-form {}

/* ── 2-column field grid (within styling form) ────────────────────────────── */
.qc-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: #e2e4e7;
	border: 1px solid #e2e4e7;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 20px;
}

.qc-field-card {
	background: #fff;
	padding: 13px 16px;
}

.qc-field-card.qc-field-full {
	grid-column: 1 / -1;
}

.qc-field-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #3c434a;
	margin: 0 0 6px;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.qc-field-card select,
.qc-field-card input[type="text"] {
	max-width: 100%;
}

/* ── Range Slider ─────────────────────────────────────────────────────────── */
.qc-range-slider {
	width: 140px;
	vertical-align: middle;
}

.qc-range-value {
	margin-left: 8px;
	font-weight: 600;
	color: #2271b1;
	font-size: 13px;
}

/* ── Live Preview Panel ───────────────────────────────────────────────────── */
.qc-live-preview-panel {
	background: #f8fafc;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 20px;
	position: sticky;
	top: 32px;
}

.qc-preview-header h3 {
	margin: 0 0 4px;
	font-size: 16px;
	color: #1d2327;
}

.qc-preview-header .description {
	margin: 0 0 12px;
	font-size: 12px;
	color: #646970;
}

.qc-preview-container {
	background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
	border: 2px dashed #c3c4c7;
	border-radius: 8px;
	padding: 40px 20px;
	text-align: center;
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.qc-preview-button {
	font-weight: 600;
	cursor: default;
	text-decoration: none;
	transition: all .3s ease;
	white-space: nowrap;
	font-family: inherit;
}

.qc-preview-tip {
	margin-top: 14px;
	padding: 12px 14px;
	background: #eff6ff;
	border-left: 3px solid #2271b1;
	border-radius: 4px;
	font-size: 12px;
	color: #374151;
	line-height: 1.5;
}

/* ── Analytics ────────────────────────────────────────────────────────────── */
.qc-analytics-filter {
	background: #f6f7f7;
	padding: 14px 18px;
	border-radius: 4px;
	margin-bottom: 22px;
}

.qc-analytics-filter select {
	min-width: 180px;
}

.qc-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
	margin-bottom: 28px;
}

.qc-stat-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 22px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 18px;
	color: #fff;
	box-shadow: 0 4px 6px rgba(0,0,0,.1);
	transition: transform .2s;
}

.qc-stat-card:nth-child(2) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.qc-stat-card:nth-child(3) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.qc-stat-card:hover { transform: translateY(-3px); }

.qc-stat-icon { font-size: 42px; opacity: .9; }
.qc-stat-value { font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 2px; }
.qc-stat-label { font-size: 13px; opacity: .9; }

.qc-top-products { margin-top: 28px; }
.qc-top-products h3 { font-size: 16px; margin-bottom: 12px; }

.qc-empty-state { text-align: center; padding: 50px 20px; color: #50575e; }
.qc-empty-icon { font-size: 56px; display: block; margin-bottom: 12px; }
.qc-empty-state h3 { font-size: 18px; margin: 0 0 8px; color: #1d2327; }

/* ── Support ──────────────────────────────────────────────────────────────── */
.qc-support-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 28px;
}

.qc-support-card {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 22px;
	transition: all .25s;
}

.qc-support-card:hover {
	border-color: #2271b1;
	box-shadow: 0 4px 8px rgba(0,0,0,.08);
	transform: translateY(-2px);
}

.qc-support-icon { font-size: 36px; display: block; margin-bottom: 12px; }
.qc-support-card h3 { font-size: 16px; margin: 0 0 8px; color: #1d2327; }
.qc-support-card p { color: #50575e; margin: 0 0 14px; font-size: 13px; }

.qc-system-info { margin-top: 28px; }
.qc-system-info h3 { font-size: 16px; margin-bottom: 10px; }
.qc-system-info td { padding: 10px 12px; }

/* ── Shortcode Box ────────────────────────────────────────────────────────── */
.qc-shortcode-box {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 16px 20px;
	margin: 0 0 20px;
}

.qc-shortcode {
	display: block;
	background: #1d2327;
	color: #f0f0f1;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 13px;
	margin: 10px 0;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}


/* ── Advanced Tab: Settings + Preview rows ────────────────────────────────── */
.qc-advanced-row {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 24px;
	align-items: start;
	margin-bottom: 6px;
}

.qc-advanced-settings .form-table {
	margin: 0;
}

.qc-advanced-preview {
	position: sticky;
	top: 32px;
}

.qc-preview-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #8c8f94;
	margin: 0 0 6px;
}

.qc-adv-preview-box {
	background: #f8fafc;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 20px;
	min-height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 1100px) {
	.qc-advanced-row {
		grid-template-columns: 1fr;
	}
	.qc-advanced-preview {
		position: static;
	}
}

/* ── Category Select2 ─────────────────────────────────────────────────────── */
.select2-container--default .select2-selection--multiple {
	border-color: #c3c4c7;
	border-radius: 4px;
	min-height: 36px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
	background: #2271b1;
	border: none;
	border-radius: 3px;
	color: #fff;
	padding: 2px 8px;
	font-size: 12px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	color: rgba(255,255,255,.7);
	margin-right: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
	color: #fff;
}

.select2-dropdown {
	border-color: #2271b1;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	z-index: 99999;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background: #2271b1;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
	.qc-styling-layout {
		grid-template-columns: 1fr;
	}
	.qc-live-preview-panel {
		position: static;
		order: -1;
	}
}

@media (max-width: 1100px) {
	.qc-field-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	.qc-stats-grid,
	.qc-support-grid {
		grid-template-columns: 1fr;
	}
	.qc-tab-panel {
		padding: 16px;
	}
	.qc-nav-tabs {
		padding: 0 8px;
	}
}
