/* =====================================================================
   Super Worker — Modern Admin UI
   Design system: CSS custom properties, soft shadows, gradients.
   Scoped under #sw-app so it never fights with WP core admin styles.
   ===================================================================== */

:root {
	--sw-bg: #f6f7fb;
	--sw-surface: #ffffff;
	--sw-surface-2: #f4f5fa;
	--sw-border: #dfe2ee;
	--sw-text: #131829;
	--sw-muted: #565e7a;
	--sw-faint: #7c8398;
	--sw-primary: #6c4ce0;
	--sw-primary-600: #5736c6;
	--sw-primary-50: #efeafe;
	--sw-grad: linear-gradient(135deg, #6c4ce0 0%, #8b5cf6 50%, #b06ab3 100%);
	--sw-grad-soft: linear-gradient(135deg, #7c5cf0 0%, #9d6bff 100%);
	--sw-hot: #ef4444;
	--sw-hot-bg: #fee2e2;
	--sw-warm: #f59e0b;
	--sw-warm-bg: #fef3c7;
	--sw-cold: #3b82f6;
	--sw-cold-bg: #dbeafe;
	--sw-green: #16a34a;
	--sw-green-bg: #dcfce7;
	--sw-radius: 16px;
	--sw-radius-sm: 10px;
	--sw-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
	--sw-shadow-lg: 0 12px 40px rgba(76,40,180,.18);
	--sw-sidebar-w: 248px;
}

#sw-app * { box-sizing: border-box; }
#sw-app {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
	color: var(--sw-text);
	background: var(--sw-bg);
	margin: 0;
	padding: 0 16px 24px 0;
	width: 100%;
	max-width: 100%;
	min-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}
#sw-app a { color: var(--sw-primary); text-decoration: none; }
#sw-app a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Sidebar */
.sw-sidebar {
	background: var(--sw-sidebar-bg, #15132b);
	background-image: radial-gradient(1200px 400px at -10% -10%, rgba(108,76,224,.35), transparent 60%);
	color: #cdd2e6;
	padding: 22px 16px;
	position: sticky;
	top: 32px;
	align-self: start;
	height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sw-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.sw-brand-logo {
	width: 38px; height: 38px; border-radius: 11px;
	background: var(--sw-grad);
	display: grid; place-items: center;
	color: #fff; font-weight: 800; font-size: 18px;
	box-shadow: 0 6px 18px rgba(108,76,224,.5);
}
.sw-brand-name { font-weight: 700; color: #fff; font-size: 15px; line-height: 1.1; }
.sw-brand-by { font-size: 11px; color: #8b90ad; }

.sw-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sw-nav-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6a6f8d; padding: 14px 10px 6px; }
#sw-app .sw-nav-item {
	display: flex; align-items: center; gap: 11px;
	padding: 10px 12px; border-radius: 11px;
	color: #c3c8de; font-weight: 500; cursor: pointer;
	transition: background .15s, color .15s;
}
#sw-app .sw-nav-item:hover {
	background: rgba(255,255,255,.14);
	color: #ffffff !important;
	text-decoration: none;
}
#sw-app .sw-nav-item:hover span,
#sw-app .sw-nav-item:hover .dashicons {
	color: #ffffff !important;
}
#sw-app .sw-nav-item.active {
	background: var(--sw-grad-soft);
	color: #ffffff !important;
	box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
#sw-app .sw-nav-item.active span,
#sw-app .sw-nav-item.active .dashicons {
	color: #ffffff !important;
}
.sw-nav-item .dashicons { font-size: 18px; width: 18px; height: 18px; }
.sw-nav-foot { font-size: 11px; color: #6a6f8d; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------------------------------------------------------------- Main */
.sw-main { min-width: 0; display: flex; flex-direction: column; }
.sw-topbar {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 30px; background: var(--sw-surface);
	border-bottom: 1px solid var(--sw-border);
	position: sticky; top: 32px; z-index: 5;
}
.sw-topbar h1 { font-size: 20px; margin: 0; font-weight: 700; }
.sw-topbar .sw-sub { color: var(--sw-muted); font-size: 13px; margin: 2px 0 0; }
.sw-pill {
	display: inline-flex; align-items: center; gap: 7px;
	background: var(--sw-primary-50); color: var(--sw-primary-600);
	padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.sw-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sw-green); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.sw-pill.warn { background: #fff3e0; color: #b45309; }
.sw-pill.warn .dot { background: var(--sw-warm); box-shadow: 0 0 0 3px rgba(245,158,11,.18); }

.sw-content { padding: 28px 30px; }

/* ---------------------------------------------------------------- Cards / KPIs */
.sw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.sw-kpi {
	background: var(--sw-surface); border: 1px solid var(--sw-border);
	border-radius: var(--sw-radius); padding: 18px 20px;
	box-shadow: var(--sw-shadow); position: relative; overflow: hidden;
}
.sw-kpi::after { content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--sw-primary-50); opacity: .6; }
.sw-kpi .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; position: relative; z-index: 1; }
.sw-kpi .ico .dashicons { font-size: 21px; width: 21px; height: 21px; color: #fff; }
.sw-kpi .num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; position: relative; z-index: 1; }
.sw-kpi .lbl { color: var(--sw-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; position: relative; z-index: 1; }
.ico.grad { background: var(--sw-grad); }
.ico.hot { background: linear-gradient(135deg,#f87171,#ef4444); }
.ico.warm { background: linear-gradient(135deg,#fbbf24,#f59e0b); }
.ico.cold { background: linear-gradient(135deg,#60a5fa,#3b82f6); }
.ico.green { background: linear-gradient(135deg,#34d399,#16a34a); }

/* ---------------------------------------------------------------- Panels */
.sw-panel { background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-radius); padding: 22px; box-shadow: var(--sw-shadow); margin-bottom: 20px; }
.sw-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sw-panel h2 { font-size: 16px; margin: 0; font-weight: 700; }
.sw-panel h3 { font-size: 14px; margin: 0 0 8px; }
.sw-grid-2, #sw-app .sw-grid-2 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; width: 100% !important; box-sizing: border-box !important; }
.sw-grid-3, #sw-app .sw-grid-3 { display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important; gap: 20px !important; width: 100% !important; box-sizing: border-box !important; }
.sw-kpis, #sw-app .sw-kpis { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; gap: 16px !important; margin-bottom: 24px !important; width: 100% !important; box-sizing: border-box !important; }
@media (max-width: 768px) { .sw-grid-2, #sw-app .sw-grid-2, .sw-grid-3, #sw-app .sw-grid-3 { grid-template-columns: 1fr !important; } }

/* ---------------------------------------------------------------- Forms */
.sw-form { display: flex; flex-direction: column; gap: 14px; }
.sw-field { display: flex; flex-direction: column; gap: 6px; }
.sw-field label { font-weight: 600; font-size: 12.5px; color: var(--sw-muted); }
#sw-app input[type=text], #sw-app input[type=email], #sw-app input[type=number],
#sw-app input[type=password], #sw-app input[type=search], #sw-app select, #sw-app textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--sw-border);
	border-radius: var(--sw-radius-sm); background: var(--sw-surface-2);
	font-size: 13.5px; color: var(--sw-text); transition: border .15s, box-shadow .15s; line-height: 1.4;
	box-sizing: border-box;
}
#sw-app input:focus, #sw-app select:focus, #sw-app textarea:focus {
	outline: none; border-color: var(--sw-primary); background: #fff;
	box-shadow: 0 0 0 4px var(--sw-primary-50);
}
.sw-form-grid, #sw-app .sw-form-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; gap: 12px !important; width: 100% !important; box-sizing: border-box !important; }

/* Buttons */
.sw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--sw-grad); color: #fff !important; border: none;
	padding: 11px 18px; border-radius: var(--sw-radius-sm); font-weight: 650;
	font-size: 13.5px; cursor: pointer; box-shadow: 0 8px 20px rgba(108,76,224,.28);
	transition: transform .12s, box-shadow .12s; text-decoration: none !important;
}
.sw-btn:hover { transform: translateY(-1px); box-shadow: var(--sw-shadow-lg); color: #fff; }
.sw-btn:active { transform: translateY(0); }
.sw-btn.ghost { background: var(--sw-surface); color: var(--sw-primary-600) !important; border: 1px solid var(--sw-border); box-shadow: none; }
.sw-btn.ghost:hover { background: var(--sw-primary-50); }
.sw-btn.sm { padding: 7px 12px; font-size: 12px; }

/* ---------------------------------------------------------------- Badges */
.sw-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 11px; text-transform: capitalize; }
.sw-badge.hot { background: var(--sw-hot-bg); color: #b91c1c; }
.sw-badge.warm { background: var(--sw-warm-bg); color: #b45309; }
.sw-badge.cold { background: var(--sw-cold-bg); color: #1d4ed8; }
.sw-badge.none { background: #f1f2f6; color: var(--sw-faint); }
.sw-score { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 8px; font-weight: 800; font-size: 12px; background: var(--sw-primary-50); color: var(--sw-primary-600); }

/* ---------------------------------------------------------------- Table */
.sw-table-wrap { overflow-x: auto; border-radius: var(--sw-radius-sm); border: 1px solid var(--sw-border); }
table.sw-table { width: 100%; border-collapse: collapse; background: var(--sw-surface); }
table.sw-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--sw-faint); padding: 12px 14px; background: var(--sw-surface-2); border-bottom: 1px solid var(--sw-border); white-space: nowrap; }
table.sw-table td { padding: 13px 14px; border-bottom: 1px solid var(--sw-border); font-size: 13.5px; }
table.sw-table tr:last-child td { border-bottom: none; }
table.sw-table tbody tr { transition: background .12s; }
table.sw-table tbody tr:hover { background: var(--sw-primary-50); }
.sw-avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--sw-grad); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; margin-right: 9px; vertical-align: middle; }
.sw-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.sw-toolbar .grow { flex: 1; min-width: 180px; }

/* ---------------------------------------------------------------- Pipeline board */
.sw-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 14px; }
.sw-column { flex: 0 0 250px; background: var(--sw-surface-2); border: 1px solid var(--sw-border); border-radius: var(--sw-radius); padding: 12px; }
.sw-column-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.sw-column-head .title { font-weight: 700; font-size: 13px; }
.sw-column-head .count { background: var(--sw-grad); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.sw-lead-card { background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--sw-shadow); transition: transform .12s, box-shadow .12s; }
.sw-lead-card:hover { transform: translateY(-2px); box-shadow: var(--sw-shadow-lg); }
.sw-lead-card .nm { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.sw-lead-card .meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sw-lead-card select { font-size: 11.5px; padding: 6px 8px; }

/* ---------------------------------------------------------------- Quote packages */
.sw-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .sw-packages { grid-template-columns: 1fr; } }
.sw-pkg { border: 1px solid var(--sw-border); border-radius: var(--sw-radius); padding: 18px; background: var(--sw-surface); position: relative; transition: transform .12s; }
.sw-pkg:hover { transform: translateY(-3px); box-shadow: var(--sw-shadow-lg); }
.sw-pkg.better { border: 2px solid var(--sw-primary); box-shadow: 0 12px 34px rgba(108,76,224,.18); }
.sw-pkg.better::before { content: "Most popular"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--sw-grad); color: #fff; font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; }
.sw-pkg .tier { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--sw-muted); }
.sw-pkg .price { font-size: 30px; font-weight: 800; color: var(--sw-text); margin: 6px 0; letter-spacing: -.02em; }
.sw-pkg .price small { font-size: 13px; color: var(--sw-faint); font-weight: 600; }
.sw-pkg .blurb { font-style: italic; color: var(--sw-muted); font-size: 12.5px; min-height: 34px; }
.sw-pkg ul { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--sw-border); font-size: 12.5px; color: var(--sw-muted); }
.sw-pkg li { padding: 4px 0 4px 22px; position: relative; }
.sw-pkg li::before { content: "✓"; position: absolute; left: 0; color: var(--sw-green); font-weight: 800; }

/* ---------------------------------------------------------------- Modules grid */
.sw-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sw-module-card { background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-radius); padding: 18px; cursor: pointer; transition: border .15s, box-shadow .15s, transform .12s; position: relative; display: block; }
.sw-module-card:hover { transform: translateY(-2px); box-shadow: var(--sw-shadow-lg); }
.sw-module-card input { position: absolute; opacity: 0; }
.sw-module-card .sw-switch { position: absolute; top: 16px; right: 16px; width: 42px; height: 24px; border-radius: 999px; background: #d7dae6; transition: background .18s; }
.sw-module-card .sw-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s; }
.sw-module-card input:checked ~ .sw-switch { background: var(--sw-grad); }
.sw-module-card input:checked ~ .sw-switch::after { left: 21px; }
.sw-module-card.on { border-color: var(--sw-primary); }
.sw-module-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--sw-primary-50); display: grid; place-items: center; margin-bottom: 12px; }
.sw-module-ico .dashicons { color: var(--sw-primary); font-size: 22px; width: 22px; height: 22px; }
.sw-module-name { font-weight: 700; font-size: 14.5px; display: block; margin-bottom: 4px; }
.sw-module-desc { color: var(--sw-muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- Settings rows */
.sw-setting-row { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--sw-border); align-items: start; }
.sw-setting-row:last-child { border-bottom: none; }
.sw-setting-row .lbl { font-weight: 700; }
.sw-setting-row .lbl small { display: block; font-weight: 500; color: var(--sw-faint); margin-top: 3px; }
.sw-provider-stack { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 700px) { .sw-setting-row { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Misc */
.sw-quickstart ol { margin: 0; padding-left: 20px; }
.sw-quickstart li { padding: 6px 0; color: var(--sw-muted); }
.sw-notice { background: var(--sw-green-bg); color: #166534; border-radius: var(--sw-radius-sm); padding: 12px 16px; margin-bottom: 16px; font-weight: 600; font-size: 13px; }
.sw-empty { text-align: center; padding: 40px 20px; color: var(--sw-faint); }
.sw-empty .dashicons { font-size: 40px; width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }
.sw-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--sw-primary-50); border-top-color: var(--sw-primary); border-radius: 50%; animation: sw-rot .7s linear infinite; vertical-align: middle; }
@keyframes sw-rot { to { transform: rotate(360deg); } }

/* =====================================================================
   Clearer interactive states (text / hover / buttons)
   ===================================================================== */
.sw-nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.sw-nav-item:focus-visible { outline: 2px solid #b8a4ff; outline-offset: 2px; }
.sw-btn:focus-visible, .sw-module-card:focus-within { outline: 3px solid var(--sw-primary-50); outline-offset: 2px; }
.sw-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.sw-btn.ghost { color: var(--sw-primary-600) !important; border: 1.5px solid #cfc4f4; font-weight: 700; }
.sw-btn.ghost:hover { background: var(--sw-primary-50); border-color: var(--sw-primary); }
.sw-btn.danger { background: linear-gradient(135deg,#f87171,#ef4444); box-shadow: 0 8px 20px rgba(239,68,68,.28); }
.sw-btn.success { background: linear-gradient(135deg,#34d399,#16a34a); box-shadow: 0 8px 20px rgba(22,163,74,.28); }
.sw-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
table.sw-table tbody tr:hover { background: #f3effe; }
.sw-panel { transition: box-shadow .15s; }

/* Status chips (jobs / portal) */
.sw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-weight: 700; font-size: 11.5px; text-transform: capitalize; line-height: 1; }
.sw-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sw-chip.estimate    { background: #eef2ff; color: #4338ca; }
.sw-chip.scheduled   { background: var(--sw-cold-bg); color: #1d4ed8; }
.sw-chip.in_progress { background: var(--sw-warm-bg); color: #b45309; }
.sw-chip.completed   { background: var(--sw-green-bg); color: #15803d; }
.sw-chip.on_hold     { background: #f3f4f6; color: #4b5563; }
.sw-chip.cancelled   { background: var(--sw-hot-bg); color: #b91c1c; }
.sw-chip.paid        { background: var(--sw-green-bg); color: #15803d; }
.sw-chip.deposit     { background: #eef2ff; color: #4338ca; }
.sw-chip.unpaid      { background: var(--sw-hot-bg); color: #b91c1c; }

/* Progress bar */
.sw-progress { height: 8px; border-radius: 999px; background: #e9ebf3; overflow: hidden; }
.sw-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--sw-grad); transition: width .4s ease; }
.sw-progress-row { display: flex; align-items: center; gap: 10px; }
.sw-progress-row .pct { font-weight: 800; font-size: 12px; color: var(--sw-primary-600); min-width: 36px; text-align: right; }

/* Tabs */
.sw-tabs { display: flex; gap: 4px; background: var(--sw-surface-2); padding: 4px; border-radius: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sw-tab { padding: 9px 16px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--sw-muted); cursor: pointer; border: none; background: transparent; transition: background .15s, color .15s; }
.sw-tab:hover { color: var(--sw-text); background: rgba(108,76,224,.06); }
.sw-tab.active { background: var(--sw-surface); color: var(--sw-primary-600); box-shadow: var(--sw-shadow); }

/* Job / detail meta grid */
.sw-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.sw-meta-item .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--sw-faint); font-weight: 700; }
.sw-meta-item .v { font-size: 15px; font-weight: 700; color: var(--sw-text); margin-top: 3px; }

/* Timeline / steps */
.sw-steps { list-style: none; margin: 0; padding: 0; }
.sw-steps li { position: relative; padding: 0 0 18px 28px; }
.sw-steps li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--sw-border); }
.sw-steps li:last-child::before { display: none; }
.sw-steps li .dot { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--sw-border); }
.sw-steps li.done .dot { background: var(--sw-grad); border-color: transparent; }
.sw-steps li.current .dot { border-color: var(--sw-primary); box-shadow: 0 0 0 4px var(--sw-primary-50); }
.sw-steps li .st-title { font-weight: 700; font-size: 13.5px; }
.sw-steps li .st-meta { font-size: 12px; color: var(--sw-faint); }

/* Portal preview frame */
.sw-portal { max-width: 720px; margin: 0 auto; }
.sw-portal-card { background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-radius); box-shadow: var(--sw-shadow); overflow: hidden; }
.sw-portal-hero { background: var(--sw-grad); color: #fff; padding: 26px 28px; }
.sw-portal-hero h2 { color: #fff; margin: 0 0 4px; font-size: 19px; }
.sw-portal-hero p { margin: 0; opacity: .92; font-size: 13px; }
.sw-portal-body { padding: 24px 28px; }
.sw-portal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Copy field */
.sw-copy { display: flex; gap: 8px; }
.sw-copy input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* Job photos */
.sw-photo-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--sw-faint); margin: 0 0 6px; }
.sw-photo-label.before { color: #b45309; }
.sw-photo-label.after { color: #15803d; }
.sw-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 8px; }
.sw-photo { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--sw-border); }
.sw-photo img { width: 100%; height: 80px; object-fit: cover; display: block; }
.sw-photo-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(17,24,41,.7); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.sw-photo-del:hover { background: var(--sw-hot); }

/* Payment gateway fieldsets */
.sw-gateway { border: 1px solid var(--sw-border); border-radius: var(--sw-radius-sm); padding: 14px 16px 6px; margin: 0 0 16px; }
.sw-gateway legend { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--sw-primary); padding: 0 8px; }

/* Generic stat / chart blocks (Analytics, Marketing, Referrals) */
.sw-stat { background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-radius-sm); padding: 16px 18px; }
.sw-stat .k { color: var(--sw-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sw-stat .v { font-size: 26px; font-weight: 800; color: var(--sw-text); margin-top: 4px; line-height: 1.1; }
.sw-stat .d { font-size: 12px; color: var(--sw-faint); margin-top: 2px; }
.sw-bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 8px 0; }
.sw-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: flex-end; height: 100%; }
.sw-bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: var(--sw-grad-soft); min-height: 4px; transition: height .3s ease; }
.sw-bar-label { font-size: 11px; color: var(--sw-muted); font-weight: 600; }
.sw-bar-val { font-size: 11px; color: var(--sw-text); font-weight: 700; }
.sw-funnel { display: flex; flex-direction: column; gap: 8px; }
.sw-funnel-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 12px; align-items: center; }
.sw-funnel-bar { height: 26px; border-radius: 6px; background: var(--sw-grad-soft); min-width: 4px; }
.sw-funnel-row .lbl { font-weight: 600; color: var(--sw-text); }
.sw-funnel-row .num { text-align: right; font-weight: 800; color: var(--sw-text); }

/* AI chatbot widget (front-end) */
.sw-chat-launcher { position: fixed; right: 22px; bottom: 22px; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; background: var(--sw-grad, linear-gradient(135deg, var(--pri, #7c3aed) 0%, var(--pri-accent, #a855f7) 100%)) !important; color: #ffffff !important; font-size: 26px; box-shadow: var(--sw-shadow-lg); z-index: 99999; display: grid; place-items: center; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.sw-chat-launcher:hover { transform: scale(1.05); }
.sw-chat-panel { position: fixed; right: 22px; bottom: 92px; width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 120px); background: #ffffff !important; border-radius: 18px; box-shadow: 0 20px 60px rgba(16,24,40,.25); display: none; flex-direction: column; overflow: hidden; z-index: 99999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; border: 1px solid var(--sw-border, #e2e8f0); }
.sw-chat-panel.open { display: flex; }
.sw-chat-head { background: var(--sw-grad, linear-gradient(135deg, var(--pri, #7c3aed) 0%, var(--pri-accent, #a855f7) 100%)) !important; color: #ffffff !important; padding: 16px 18px; }
.sw-chat-head h4 { margin: 0; font-size: 15px; color: #ffffff !important; font-weight: 700; }
.sw-chat-head p { margin: 2px 0 0; font-size: 12px; opacity: .9; color: #ffffff !important; }
.sw-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f6f7fb; }
.sw-chat-msg { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.sw-chat-msg.bot { align-self: flex-start; background: #ffffff !important; border: 1px solid #e6e8f0; color: #131829 !important; border-bottom-left-radius: 4px; }
.sw-chat-msg.me { align-self: flex-end; background: var(--sw-primary, var(--pri, #7c3aed)) !important; color: #ffffff !important; border-bottom-right-radius: 4px; }
.sw-chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e6e8f0; background: #ffffff !important; }
.sw-chat-input input { flex: 1; border: 1px solid #d7dae6; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.sw-chat-input input:focus { outline: none; border-color: var(--sw-primary, var(--pri, #7c3aed)) !important; box-shadow: 0 0 0 3px var(--sw-primary-50, rgba(124,58,237,0.15)) !important; }
.sw-chat-input button { border: none; background: var(--sw-primary, var(--pri, #7c3aed)) !important; color: #ffffff !important; border-radius: 10px; padding: 0 16px; font-weight: 700; cursor: pointer; transition: opacity 0.2s ease; }
.sw-chat-input button:hover { opacity: 0.9; }

/* AI Business Intelligence narrative panel */
.sw-bi { border: 1px solid var(--sw-primary-50); background: linear-gradient(180deg, #faf8ff 0%, #ffffff 60%); }
.sw-bi .sw-panel-head h2 .dashicons { color: var(--sw-primary); vertical-align: middle; }
.sw-bi-headline { font-size: 20px; font-weight: 800; color: var(--sw-text); margin: 4px 0 6px; line-height: 1.25; }
.sw-bi-summary { color: var(--sw-muted); margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; }
.sw-bi-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sw-bi-col { background: var(--sw-surface); border: 1px solid #eceef5; border-radius: 12px; padding: 14px 16px; }
.sw-bi-col-head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.sw-bi-col-head.good { color: #1f9d57; }
.sw-bi-col-head.bad { color: #d4493f; }
.sw-bi-col-head.act { color: var(--sw-primary-600); }
.sw-bi-list { margin: 0; padding-left: 18px; color: var(--sw-text); line-height: 1.6; font-size: 13.5px; }
.sw-bi-list li { margin-bottom: 6px; }

/* In-admin documentation */
#sw-app code { background: var(--sw-surface-2); border: 1px solid #e6e8f0; border-radius: 5px; padding: 1px 6px; font-size: 12.5px; color: var(--sw-primary-600); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#sw-app [data-panel] .sw-panel { margin-bottom: 16px; }
#sw-app [data-panel] ol, #sw-app [data-panel] ul { color: var(--sw-text); }

/* Appointment Booking widget & status badges */
.sw-slot-pill:hover { border-color: var(--pri, #6c4ce0) !important; background: rgba(108,76,224,.06) !important; transform: translateY(-1px); }
.sw-svc-card:hover { border-color: var(--pri, #6c4ce0) !important; box-shadow: 0 4px 12px rgba(108,76,224,.1); }
.sw-bk-status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.sw-bk-status.confirmed { background: #dcfce7; color: #15803d; }
.sw-bk-status.pending { background: #fef3c7; color: #b45309; }
.sw-bk-status.cancelled { background: #fee2e2; color: #b91c1c; }
