/**
 * Shois Chat Button — Admin Styles
 *
 * Modern admin panel with left sidebar navigation and gradient brand colors.
 *
 * @package ShoisChatButton
 */

/* ─── Design Tokens ─────────────────────────────────── */
:root {
	--scb-primary: #5170ff;
	--scb-primary-hover: #330066;
	--scb-primary-light: rgba(81, 112, 255, 0.08);
	--scb-primary-ring: rgba(81, 112, 255, 0.2);
	--scb-gradient: linear-gradient(135deg, #330066, #5170ff);
	--scb-gradient-hover: linear-gradient(135deg, #220044, #3d5ce6);
	--scb-text: #1e293b;
	--scb-text-secondary: #64748b;
	--scb-text-muted: #94a3b8;
	--scb-bg: #f1f5f9;
	--scb-bg-card: #ffffff;
	--scb-border: #e2e8f0;
	--scb-border-hover: #cbd5e1;
	--scb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
	--scb-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
	--scb-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
	--scb-radius: 12px;
	--scb-radius-sm: 8px;
	--scb-radius-xs: 6px;
	--scb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	--scb-transition: 200ms ease;
	--scb-sidebar-width: 250px;
}

/* ─── Admin Wrapper (inside WP content area) ────────── */
.shcb-admin-wrapper {
	margin: 0;
	padding: 0;
}

.shcb-admin-app {
	display: flex;
	min-height: calc(100vh - 32px);
	font-family: var(--scb-font);
	color: var(--scb-text);
	-webkit-font-smoothing: antialiased;
	background: var(--scb-bg);
}

/* ─── Sidebar ───────────────────────────────────────── */
.shcb-sidebar {
	width: var(--scb-sidebar-width);
	min-width: var(--scb-sidebar-width);
	background: var(--scb-bg-card);
	border-right: 1px solid var(--scb-border);
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 32px);
}

/* Brand / Logo area */
.shcb-sidebar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 20px 16px;
	border-bottom: 1px solid var(--scb-border);
}

.shcb-sidebar-logo {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--scb-gradient);
	border-radius: 10px;
	color: #ffffff;
	flex-shrink: 0;
}

.shcb-sidebar-logo svg {
	width: 20px;
	height: 20px;
}

.shcb-sidebar-brand-text {
	display: flex;
	flex-direction: column;
}

.shcb-sidebar-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--scb-text);
	line-height: 1.2;
}

.shcb-sidebar-subtitle {
	font-size: 10px;
	font-weight: 600;
	color: var(--scb-text-muted);
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-top: 2px;
}

/* Navigation items */
.shcb-sidebar-nav {
	flex: 1;
	padding: 12px 10px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.shcb-sidebar-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 500;
	color: var(--scb-text-secondary);
	background: transparent;
	border: none;
	border-radius: var(--scb-radius-sm);
	cursor: pointer;
	transition: var(--scb-transition);
	text-align: left;
	width: 100%;
	position: relative;
}

.shcb-sidebar-item:hover {
	color: var(--scb-text);
	background: var(--scb-bg);
}

.shcb-sidebar-item-active {
	color: var(--scb-primary);
	font-weight: 600;
	background: var(--scb-primary-light);
}

.shcb-sidebar-item-active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 6px;
	bottom: 6px;
	width: 3px;
	background: var(--scb-gradient);
	border-radius: 0 4px 4px 0;
}

.shcb-sidebar-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.shcb-sidebar-icon svg {
	width: 18px;
	height: 18px;
}

.shcb-sidebar-label {
	line-height: 1;
}

/* Footer */
.shcb-sidebar-footer {
	padding: 16px 20px;
	border-top: 1px solid var(--scb-border);
}

.shcb-sidebar-version {
	font-size: 11px;
	color: var(--scb-text-muted);
	font-weight: 500;
}

/* ─── Main Column ───────────────────────────────────── */
.shcb-main-column {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* ─── Top Bar ───────────────────────────────────────── */
.shcb-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 28px;
	background: var(--scb-bg-card);
	border-bottom: 1px solid var(--scb-border);
}

.shcb-topbar-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--scb-text);
	margin: 0;
	padding: 0;
}

.shcb-topbar-actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

/* Status pill */
.shcb-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 20px;
	line-height: 1;
}

.shcb-status-pill-active {
	color: #5170ff;
	background: rgba(81, 112, 255, 0.08);
}

.shcb-status-pill-inactive {
	color: #dc2626;
	background: rgba(220, 38, 38, 0.08);
}

.shcb-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	display: inline-block;
}

.shcb-status-pill-active .shcb-status-dot {
	background: #5170ff;
	box-shadow: 0 0 0 3px rgba(81, 112, 255, 0.2);
	animation: shcb-pulse-dot 2s infinite;
}

.shcb-status-pill-inactive .shcb-status-dot {
	background: #dc2626;
}

@keyframes shcb-pulse-dot {
	0%, 100% { box-shadow: 0 0 0 3px rgba(81, 112, 255, 0.2); }
	50% { box-shadow: 0 0 0 6px rgba(81, 112, 255, 0.06); }
}

/* Master toggle */
.shcb-master-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	cursor: pointer;
}

.shcb-master-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.shcb-toggle-slider {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: #cbd5e1;
	border-radius: 24px;
	transition: var(--scb-transition);
}

.shcb-toggle-slider::before {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: var(--scb-transition);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.shcb-master-toggle input:checked + .shcb-toggle-slider {
	background: var(--scb-primary);
}

.shcb-master-toggle input:checked + .shcb-toggle-slider::before {
	transform: translateX(20px);
}

.shcb-master-toggle input:focus-visible + .shcb-toggle-slider {
	box-shadow: 0 0 0 3px var(--scb-primary-ring);
}

/* View Site button */
.shcb-topbar-view-site {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--scb-text-secondary);
	background: var(--scb-bg);
	border: 1px solid var(--scb-border);
	border-radius: var(--scb-radius-xs);
	text-decoration: none;
	transition: var(--scb-transition);
	cursor: pointer;
}

.shcb-topbar-view-site:hover {
	border-color: var(--scb-border-hover);
	background: #e2e8f0;
	color: var(--scb-text);
}

/* ─── Content Area ──────────────────────────────────── */
.shcb-admin-content {
	flex: 1;
	padding: 24px 28px;
	animation: scb-fade-in 300ms ease;
}

@keyframes scb-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ─── Dashboard v2 ────────────────────────────────────── */
.shcb-dashboard-v2 {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 24px;
}

/* Header Section */
.shcb-dash-header-section {
    margin-bottom: 24px;
}
.shcb-dash-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}
.shcb-dash-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--scb-text);
    margin: 0;
}
.shcb-dash-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--scb-text-secondary);
    margin: 0;
}

/* Common Section */
.shcb-dash-section {
    margin: 0;
}
.shcb-dash-section-title {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 16px;
}

/* Grids */
.shcb-dash-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) {
    .shcb-dash-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}
.shcb-dash-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 1024px) {
    .shcb-dash-grid-1-2 {
        grid-template-columns: 1fr 2fr;
    }
}

/* Grid columns inner */
.shcb-dash-col-left, .shcb-dash-col-right {
    display: flex;
    flex-direction: column;
}
.shcb-dash-col-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards */
.shcb-dash-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.shcb-dash-card-hover:hover {
    border-color: rgba(81, 112, 255, 0.2);
}
.shcb-dash-card-plugin {
    background: #f8fafc;
    border: 1px solid transparent;
}
.shcb-dash-card-plugin:hover {
    border-color: rgba(81, 112, 255, 0.2);
}

.shcb-dash-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
}
.shcb-dash-card:hover .group-hover-scale {
    transform: scale(1.1);
}

.bg-primary-light { background: rgba(81, 112, 255, 0.05); }
.text-primary { color: var(--scb-primary); }
.bg-indigo { background: #6366F1; }
.bg-red-500 { background: #ef4444; }
.bg-amber-500 { background: #f59e0b; }

.shcb-dash-icon-square {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.shcb-dash-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--scb-text);
    margin: 0 0 8px;
}
.shcb-dash-card-title-sm {
    font-size: 14px;
    font-weight: 700;
    color: var(--scb-text);
    margin: 0 0 4px;
}
.shcb-dash-card-desc {
    font-size: 14px;
    color: var(--scb-text-secondary);
    margin: 0;
}
.shcb-dash-card-desc-xs {
    font-size: 11px;
    color: var(--scb-text-secondary);
    margin: 0 0 16px;
}
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-auto { margin-bottom: auto; }

.shcb-dash-link-btn {
    font-size: 14px;
    font-weight: 700;
    color: var(--scb-primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
    margin-top: auto;
}
.shcb-dash-link-btn:hover {
    gap: 8px;
}
.shcb-dash-link-btn:focus {
    outline: none;
}
.shcb-dash-link-btn-sm {
    font-size: 10px;
    font-weight: 700;
    color: var(--scb-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
}
.shcb-dash-card:hover .group-hover-underline {
    text-decoration: underline;
}

/* Plugin Action Buttons */
.shcb-plugin-action-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.shcb-plugin-action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.shcb-plugin-install {
    background: #f1f5f9;
    color: var(--scb-text);
    border-color: #cbd5e1;
}
.shcb-plugin-install:hover:not(:disabled) {
    background: #e2e8f0;
}

.shcb-plugin-activate {
    background: var(--scb-primary);
    color: #fff;
}
.shcb-plugin-activate:hover:not(:disabled) {
    background: var(--scb-primary-hover);
}

.shcb-plugin-status-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #10b981;
}

/* Horizontal Cards */
.shcb-dash-card-horizontal {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.shcb-dash-icon-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bg-gray {
    background: #e2e8f0;
}
.text-slate-600 {
    color: #475569;
}
.shcb-dash-btn-outline {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    color: var(--scb-text);
    text-decoration: none;
    transition: background 0.2s ease;
}
.shcb-dash-btn-outline:hover {
    background: #ffffff;
}

/* Premium Banner */
.shcb-dash-premium-banner {
    position: relative;
    border-radius: 16px;
    background: var(--scb-gradient);
    padding: 24px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(51, 0, 102, 0.2);
    overflow: hidden;
    margin-top: 16px;
}

.shcb-dash-banner-inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (min-width: 768px) {
    .shcb-dash-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.shcb-dash-banner-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
@media (min-width: 768px) {
    .shcb-dash-banner-content {
        flex-direction: row;
        align-items: center;
    }
}

.shcb-dash-banner-text {
    max-width: 320px;
    text-align: center;
}
@media (min-width: 768px) {
    .shcb-dash-banner-text {
        text-align: left;
    }
}

.shcb-dash-banner-title {
    font-size: 20px;
    font-weight: 900;
    color: #ffffff !important;
    margin: 0 0 4px;
}
.shcb-dash-banner-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.shcb-dash-banner-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
}
@media (min-width: 640px) {
    .shcb-dash-banner-features {
        grid-template-columns: repeat(4, 1fr);
    }
}

.shcb-dash-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shcb-dash-btn-white {
    display: inline-block;
    padding: 12px 32px;
    background: #ffffff;
    color: var(--scb-primary);
    font-size: 14px;
    font-weight: 900;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}
.shcb-dash-btn-white:hover {
    transform: scale(1.05);
}

.shcb-dash-banner-glow {
    position: absolute;
    right: -4rem;
    top: -4rem;
    width: 12rem;
    height: 12rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

/* ─── Common Card Style ─────────────────────────────── */
.shcb-modern-card {
	background: var(--scb-bg-card);
	border: 1px solid var(--scb-border);
	border-radius: var(--scb-radius);
	box-shadow: var(--scb-shadow-sm);
	padding: 24px;
}

.shcb-modern-card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.shcb-modern-card-header h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--scb-text);
	margin: 0;
}

/* ─── Form Inputs ───────────────────────────────────── */
.shcb-admin-app .shcb-input {
	width: 100%;
	padding: 12px 16px;
	font-size: 14px;
	font-family: var(--scb-font);
	color: var(--scb-text);
	background: #f8fafc;
	border: 1px solid var(--scb-border);
	border-radius: 10px;
	transition: all 0.2s ease;
	outline: none;
	box-sizing: border-box;
}

.shcb-admin-app .shcb-input:focus {
	border-color: #5170ff;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(81, 112, 255, 0.1);
}

.shcb-admin-app select.shcb-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    padding-right: 40px !important;
}

.shcb-admin-app .shcb-input::placeholder {
	color: var(--scb-text-muted);
}

/* ─── Buttons ───────────────────────────────────────── */
.shcb-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	font-family: var(--scb-font);
	border: none;
	border-radius: var(--scb-radius-xs);
	cursor: pointer;
	transition: var(--scb-transition);
	line-height: 1;
}

.shcb-btn-primary {
	color: #ffffff;
	background: var(--scb-gradient);
}

.shcb-btn-primary:hover {
	background: var(--scb-gradient-hover);
	box-shadow: 0 4px 12px rgba(51, 0, 102, 0.25);
}

.shcb-btn-secondary {
	color: var(--scb-text);
	background: var(--scb-bg);
	border: 1px solid var(--scb-border);
}

.shcb-btn-secondary:hover {
	background: #e2e8f0;
	border-color: var(--scb-border-hover);
}

/* ─── Settings Inner Tabs ───────────────────────────── */
.shcb-settings-tabs-nav {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--scb-border);
	padding-bottom: 2px;
}

.shcb-settings-nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--scb-text-secondary);
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -4px;
	cursor: pointer;
	transition: var(--scb-transition);
}

.shcb-settings-nav-btn:hover {
	color: var(--scb-text);
}

.shcb-settings-nav-btn.active {
	color: var(--scb-primary);
	border-bottom-color: var(--scb-primary);
}

.shcb-nested-page {
	animation: scb-fade-in 300ms ease;
}

/* ─── Placeholder Page ──────────────────────────────── */
.shcb-placeholder-page {
	display: flex;
	justify-content: center;
	padding: 60px 0;
}

.shcb-placeholder-card {
	text-align: center;
	padding: 48px 40px;
	background: var(--scb-bg-card);
	border: 1px solid var(--scb-border);
	border-radius: var(--scb-radius);
	box-shadow: var(--scb-shadow);
	max-width: 400px;
}

.shcb-placeholder-card h2 {
	font-size: 20px;
	font-weight: 700;
	color: var(--scb-text);
	margin: 0 0 8px;
}

.shcb-placeholder-card p {
	font-size: 14px;
	color: var(--scb-text-secondary);
	margin: 0;
}

/* ─── PRO Badge (cosmetic only) ─────────────────────── */
.shcb-badge-pro {
	display: inline-flex;
	align-items: center;
	padding: 2px 7px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #ffffff;
	background: var(--scb-gradient);
	border-radius: 4px;
	line-height: 1.4;
	vertical-align: middle;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 960px) {
	.shcb-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 782px) {
	.shcb-sidebar {
		position: fixed;
		left: -260px;
		top: 46px; /* WP mobile admin bar */
		height: calc(100vh - 46px);
		transition: left 0.3s ease;
		box-shadow: var(--scb-shadow-lg);
		z-index: 999;
	}

	.shcb-sidebar.shcb-sidebar-open {
		left: 0;
	}

	.shcb-admin-app {
		flex-direction: column;
	}

	.shcb-topbar {
		top: 46px;
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px 16px;
	}

	.shcb-admin-content {
		padding: 16px;
	}

	.shcb-kpi-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ─── Custom Select (Premium) ────────────────────────── */
.shcb-custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.shcb-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid var(--scb-border);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--scb-text);
}

.shcb-custom-select-wrapper.is-open .shcb-custom-select-trigger {
    border-color: #5170ff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(81, 112, 255, 0.1);
}

.shcb-trigger-arrow {
    transition: transform 0.2s ease;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shcb-custom-select-wrapper.is-open .shcb-trigger-arrow {
    transform: rotate(180deg);
    color: #5170ff;
}

.shcb-custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    animation: scb-slide-down 0.2s ease-out;
}

.shcb-custom-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    transition: all 0.15s ease;
}

.shcb-custom-select-option:hover {
    background: #f1f5f9;
}

.shcb-custom-select-option.active {
    background: var(--scb-primary-light) !important;
    color: var(--scb-primary);
    font-weight: 600;
}

.shcb-option-check {
    color: var(--scb-primary);
    flex-shrink: 0;
}

.shcb-custom-select-group {
    margin-top: 8px;
}

.shcb-group-label {
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 800;
    color: #5170ff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes scb-slide-down {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* --- CUSTOM CSS Editor --- */
.shcb-css-editor-wrap { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.shcb-css-editor { position: relative; border: 1px solid var(--scb-border); border-radius: 8px; background: #1e1e1e; display: flex; overflow: hidden; height: 300px; }
.shcb-css-lines { padding: 16px 12px; margin: 0; color: #858585; background: #1e1e1e; font-family: monospace; font-size: 14px; line-height: 1.5; text-align: right; border-right: 1px solid #333; user-select: none; overflow: hidden; }
.shcb-css-textarea { flex: 1; padding: 16px; border: none; background: transparent; color: #d4d4d4; font-family: monospace; font-size: 14px; line-height: 1.5; resize: none; outline: none; white-space: pre; overflow: auto; }
.shcb-css-hints { background: var(--scb-card-bg); border: 1px solid var(--scb-border); padding: 16px; border-radius: 8px; }
.shcb-variables-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shcb-variable-tag { background: #f1f5f9; color: var(--scb-primary); padding: 4px 8px; border-radius: 4px; font-size: 12px; }

/* --- Template Library Grid -------------------------- */
.shcb-tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.shcb-tpl-card {
    background: #ffffff;
    border: 1px solid var(--scb-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.shcb-tpl-card:hover {
    transform: translateY(-4px);
    border-color: var(--scb-primary);
    box-shadow: 0 12px 24px -10px rgba(51, 112, 255, 0.15);
}

.shcb-tpl-card-preview {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f8fafc;
}

.shcb-tpl-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.shcb-tpl-card:hover .shcb-tpl-thumbnail-img {
    transform: scale(1.1); /* Halka Zoom */
}

.shcb-tpl-card-info {
    padding: 16px 20px 0;
}

.shcb-tpl-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--scb-text);
    margin: 0;
}

.shcb-tpl-card-actions {
    padding: 16px 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.shcb-tpl-btn-customize, .shcb-tpl-btn-activate {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.shcb-tpl-btn-customize {
    background: #f1f5f9;
    color: var(--scb-text-secondary);
    border: 1px solid #e2e8f0;
}

.shcb-tpl-btn-customize:hover {
    background: #e2e8f0;
    color: var(--scb-text);
}

.shcb-tpl-btn-activate {
    background: var(--scb-primary);
    color: #ffffff;
    border: none;
}

.shcb-tpl-btn-activate:hover {
    background: var(--scb-primary-hover);
    box-shadow: 0 4px 12px rgba(81, 112, 255, 0.2);
}

.shcb-tpl-active-status {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--scb-primary);
    background: var(--scb-primary-light);
    padding: 8px 6px;
    border-radius: 8px;
    white-space: nowrap;
    min-width: fit-content;
}

.shcb-tpl-active-status svg {
    width: 14px;
    height: 14px;
}
/* ─── PRO Badge Design ──────────────────────────────── */
.shcb-pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.2);
    vertical-align: middle;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* ─── PRO Inline Upsell Banner ───────────────────────── */
.shcb-pro-upsell-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: default;
}
.shcb-pro-upsell-inline strong {
    color: #a855f7;
}
/* ─── Toggle Control Wrap ────────────────────────────── */
.shcb-toggle-control-wrap {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.shcb-toggle-control-wrap input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: pointer;
    margin: 0;
}

.shcb-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: var(--scb-transition, 200ms ease);
}

.shcb-toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: var(--scb-transition, 200ms ease);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.shcb-toggle-control-wrap input:checked + .shcb-toggle-slider {
    background: var(--scb-primary, #5170ff);
}

.shcb-toggle-control-wrap input:checked + .shcb-toggle-slider::before {
    transform: translateX(20px);
}

.shcb-toggle-control-wrap input:disabled + .shcb-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Settings Page Specifics ───────────────────────── */
.shcb-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.shcb-field-toggle {
    border-bottom: 1px solid var(--scb-border, #e2e8f0);
}

.shcb-field-toggle:last-child {
    border-bottom: none;
}
