.invalid-feedback
{
	    font-size: .675em;
}

.sortable-shadow
{
	background:#f5f7fa;
	border:2px dashed #b8c2cc;
	box-shadow:inset 0 0 0 2px rgba(0,0,0,0.05);
}

.sortable-shadow td
{
	padding:0;
}

.modal-fullscreen
{
	width: 100% !important;
	max-width: 100% !important;
	min-width:100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height:100% !important;
	margin:0 !important;
}
.modal-noaction .modal-footer
{
	display: none !important;
}

.lead-attribute-value
{
	font-size: 14px;
	font-weight: 500;
}

.pipeline-steps
{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 10px 0;
}

.pipeline-step
{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 80px;
}

.pipeline-step-indicator
{
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: #94a3b8;
	transition: all 0.2s ease;
}

.pipeline-step.active .pipeline-step-indicator
{
	background: var(--primary, #3b82f6);
	border-color: var(--primary, #3b82f6);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.pipeline-step.completed .pipeline-step-indicator
{
	background: #22c55e;
	border-color: #22c55e;
	color: #fff;
}

.pipeline-step-label
{
	font-size: 12px;
	font-weight: 500;
	color: #64748b;
	text-align: center;
	white-space: nowrap;
}

.pipeline-step.active .pipeline-step-label
{
	color: var(--primary, #3b82f6);
	font-weight: 600;
}

.pipeline-step.completed .pipeline-step-label
{
	color: #22c55e;
}

.pipeline-step-connector
{
	flex: 1;
	height: 2px;
	background: #e2e8f0;
	min-width: 30px;
	max-width: 60px;
	margin-bottom: 28px;
}

.pipeline-step-connector.completed
{
	background: #22c55e;
}

@media (max-width: 768px)
{
	.pipeline-steps
	{
		flex-wrap: wrap;
		gap: 10px;
	}

	.pipeline-step
	{
		min-width: 60px;
	}

	.pipeline-step-connector
	{
		display: none;
	}

	.pipeline-step-label
	{
		font-size: 10px;
	}
}

.sidebar-note-item
{
	padding: 10px;
	background: var(--gray-50, #f8fafc);
	border-radius: 8px;
	margin-bottom: 10px;
}

.sidebar-note-item.pinned
{
	background: #eff6ff;
	border-left: 3px solid var(--primary, #3b82f6);
}

.sidebar-note-header
{
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.sidebar-note-author
{
	font-size: 12px;
	font-weight: 600;
	color: var(--gray-700, #334155);
}

.sidebar-note-time
{
	font-size: 11px;
	color: var(--gray-400, #94a3b8);
	margin-left: auto;
}

.sidebar-note-content
{
	font-size: 13px;
	color: var(--gray-600, #475569);
	line-height: 1.5;
}

.detail-tab-trigger
{
	cursor: pointer;
}

.lead-attributes-grid
{
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
} 

@media (max-width: 576px)
{
	.lead-attributes-grid
	{
		grid-template-columns: 1fr;
	}
} 

.badge-selector
{
	padding: 0;
	background: transparent;
	border-radius: 0;
}

.badge-selector-label
{
	font-size: 11px;
	font-weight: 600;
	color: var(--gray-400, #94a3b8);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.badge-selector-dropdown
{
	display: block;
	width: 100%;
}

.badge-selector-btn
{
	width: 100%;
	padding: 10px 14px;
	border-radius: 10px;
	border: none;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.badge-selector-btn:hover
{
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.badge-selector-btn:active
{
	transform: translateY(0);
}

.badge-selector-btn::after
{
	border: none;
	content: "\F282";
	font-family: "bootstrap-icons";
	font-size: 10px;
	opacity: 0.7;
	margin: 0;
}

.badge-selector-btn.show::after
{
	content: "\F286";
}

.badge-selector-dropdown .dropdown-menu
{
	width: 100%;
	min-width: 200px;
	padding: 8px;
	border-radius: 12px;
	border: none;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	margin-top: 4px;
}

.badge-selector-dropdown .dropdown-item
{
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--gray-700, #334155);
	transition: all 0.15s ease;
}

.badge-selector-dropdown .dropdown-item:hover
{
	background: var(--gray-50, #f8fafc);
	transform: translateX(2px);
}

.badge-selector-dropdown .dropdown-item.active
{
	background: var(--gray-100, #f1f5f9);
	font-weight: 600;
}

.badge-selector-dropdown .dropdown-item.active::after
{
	content: "\F26B";
	font-family: "bootstrap-icons";
	font-size: 12px;
	margin-left: auto;
	color: var(--success, #22c55e);
}

.badge-selector-color-dot
{
	width: 12px;
	height: 12px;
	border-radius: 4px;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

 
 
.controller-tasks-list .app-content
{
	padding: 0px;
}

.controller-tasks-list .page-header
{
	display:none;
}

.controller-procedures-list .page-header
{
	display:none;
}

/* ========================================
   Settings Page Styles
   ======================================== */

.settings-nav-item.active
{
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.settings-nav-item.active i
{
	color: #ffffff;
}

@media (max-width: 768px)
{
	.settings-nav-wrapper
	{
		position: static;
	}
}

/* ========================================
   Calendar Page Enhancements
   ======================================== */

.schedule-actions
{
	display: flex;
	gap: 4px;
	margin-top: 6px;
}

.schedule-actions .btn
{
	padding: 2px 6px;
	font-size: 11px;
}

.day-event
{
	cursor: pointer;
}

.day-event:hover
{
	opacity: 0.8;
}

.calendar-day-cell
{
	cursor: pointer;
}

/* ========================================
   Calendar Day View
   ======================================== */

.calendar-day-view
{
	max-width: 1000px;
	margin: 0 auto;
}

.day-view-header
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.5rem;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	margin-bottom: 1.5rem;
}

.day-nav-group
{
	display: flex;
	align-items: center;
	gap: 1rem;
}

.day-title
{
	text-align: center;
	min-width: 200px;
}

.day-name
{
	display: block;
	font-size: 0.875rem;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.day-date
{
	display: block;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1e293b;
}

.day-actions
{
	display: flex;
	gap: 0.5rem;
}

.day-view-content
{
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	overflow: hidden;
}

.day-timeline
{
	padding: 0;
}

.timeline-row
{
	display: flex;
	border-bottom: 1px solid #f1f5f9;
	min-height: 60px;
}

.timeline-row:last-child
{
	border-bottom: none;
}

.timeline-row.has-events
{
	background: #fafbfc;
}

.timeline-hour
{
	width: 70px;
	padding: 0.75rem 1rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #64748b;
	border-right: 1px solid #f1f5f9;
	flex-shrink: 0;
}

.timeline-events
{
	flex: 1;
	padding: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.timeline-empty
{
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.timeline-empty:hover
{
	background: #f1f5f9;
}

.timeline-empty .add-event-hint
{
	font-size: 0.8125rem;
	color: #94a3b8;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.timeline-empty:hover .add-event-hint
{
	opacity: 1;
}

.timeline-event
{
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: #fff;
	border-radius: 8px;
	border-left: 3px solid #3b82f6;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.timeline-event.call
{
	border-left-color: #10b981;
}

.timeline-event.email
{
	border-left-color: #8b5cf6;
}

.timeline-event.meeting
{
	border-left-color: #3b82f6;
}

.timeline-event.task
{
	border-left-color: #f59e0b;
}

.timeline-event.reminder
{
	border-left-color: #ec4899;
}

.timeline-event.deadline
{
	border-left-color: #ef4444;
}

.timeline-event.completed
{
	opacity: 0.6;
	background: #f8fafc;
}

.timeline-event.completed .event-title
{
	text-decoration: line-through;
}

/* Drag & drop */
.timeline-event-placeholder
{
	background: #e0f2fe;
	border: 2px dashed #38bdf8;
	border-radius: 8px;
	min-height: 50px;
	margin: 0.25rem 0;
}

.timeline-row.drag-over
{
	background: #f0f9ff;
}

.timeline-event.ui-sortable-helper
{
	transform: rotate(1deg) scale(1.02);
	box-shadow: 0 12px 28px rgba(0,0,0,0.15);
	z-index: 1000;
	opacity: 0.95;
}

.event-info
{
	cursor: grab;
}

.event-info:active
{
	cursor: grabbing;
}

.event-time
{
	font-size: 0.875rem;
	font-weight: 600;
	color: #475569;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.event-time i
{
	font-size: 1rem;
	color: #64748b;
}

.event-info
{
	flex: 1;
	min-width: 0;
}

.event-title
{
	font-size: 0.9375rem;
	font-weight: 500;
	color: #1e293b;
	margin-bottom: 0.25rem;
}

.event-meta
{
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.75rem;
	color: #64748b;
}

.event-type-label
{
	background: #f1f5f9;
	padding: 0.125rem 0.5rem;
	border-radius: 4px;
}

.event-actions
{
	display: flex;
	gap: 0.25rem;
	flex-shrink: 0;
}

.day-summary
{
	padding: 1.25rem 1.5rem;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.summary-title
{
	font-size: 0.8125rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.75rem;
}

.summary-stats
{
	display: flex;
	gap: 2rem;
}

.summary-stat
{
	text-align: center;
}

.stat-value
{
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
}

.stat-label
{
	font-size: 0.75rem;
	color: #64748b;
}

@media (max-width: 768px)
{
	.day-view-header
	{
		flex-direction: column;
		gap: 1rem;
	}

	.day-actions
	{
		width: 100%;
		justify-content: center;
	}

	.timeline-hour
	{
		width: 50px;
		padding: 0.5rem;
		font-size: 0.75rem;
	}

	.timeline-event
	{
		flex-wrap: wrap;
	}

	.event-actions
	{
		width: 100%;
		justify-content: flex-end;
		margin-top: 0.5rem;
	}

	.summary-stats
	{
		justify-content: space-around;
	}
}

/* Flatpickr custom styles */
.flatpickr-calendar
{
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	border: 1px solid #e2e8f0;
	font-family: 'Inter', sans-serif;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after
{
	display: none;
}

.flatpickr-months
{
	padding: 12px 8px 8px;
}

.flatpickr-months .flatpickr-month
{
	height: 36px;
}

.flatpickr-current-month
{
	font-size: 1rem;
	font-weight: 600;
	color: #1e293b;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month
{
	padding: 8px;
	border-radius: 8px;
	transition: background-color 0.2s;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover
{
	background: #f1f5f9;
}

.flatpickr-weekdays
{
	background: transparent;
	padding: 0 12px;
}

.flatpickr-weekday
{
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
}

.flatpickr-days
{
	padding: 0 8px 8px;
}

.flatpickr-day
{
	border-radius: 8px;
	font-weight: 500;
	color: #334155;
	transition: all 0.2s;
}

.flatpickr-day:hover
{
	background: #f1f5f9;
	border-color: #f1f5f9;
}

.flatpickr-day.today
{
	border-color: var(--primary-color, #3b82f6);
	background: transparent;
	color: var(--primary-color, #3b82f6);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover
{
	background: var(--primary-color, #3b82f6);
	border-color: var(--primary-color, #3b82f6);
	color: #fff;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay
{
	color: #cbd5e1;
}

.flatpickr-time
{
	border-top: 1px solid #e2e8f0;
	padding: 12px;
	max-height: none;
	height: auto;
}

.flatpickr-time input
{
	font-size: 1.25rem;
	font-weight: 600;
	color: #1e293b;
}

.flatpickr-time .flatpickr-time-separator
{
	font-size: 1.25rem;
	font-weight: 600;
	color: #64748b;
}

.flatpickr-time .numInputWrapper:hover
{
	background: #f1f5f9;
	border-radius: 8px;
}

.flatpickr-time .numInputWrapper span.arrowUp,
.flatpickr-time .numInputWrapper span.arrowDown
{
	border: none;
	opacity: 0;
}

.flatpickr-time .numInputWrapper:hover span.arrowUp,
.flatpickr-time .numInputWrapper:hover span.arrowDown
{
	opacity: 1;
}

.flatpickr-input.form-control[readonly]
{
	background-color: #fff;
	cursor: pointer;
}

.flatpickr-input + .form-control
{
	cursor: pointer;
}

/* Wide modal for procedure editor */
.modal-content.modal-wide {
	max-width: 800px;
	width: 90%;
}

/* ========================================
   Dashboard Quick Stat Icon Colors
   ======================================== */
.quick-stat-icon.blue {
	background: rgba(59, 130, 246, 0.1);
	color: #3b82f6;
}

.quick-stat-icon.green {
	background: rgba(16, 185, 129, 0.1);
	color: #10b981;
}

.quick-stat-icon.orange {
	background: rgba(245, 158, 11, 0.1);
	color: #f59e0b;
}

.quick-stat-icon.purple {
	background: rgba(139, 92, 246, 0.1);
	color: #8b5cf6;
}

.quick-stat-icon.red {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
}

/* ========================================
   Empty State Small
   ======================================== */
.empty-state-sm {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	text-align: center;
}

.empty-state-sm i {
	font-size: 2rem;
	color: #cbd5e1;
	margin-bottom: 0.75rem;
}

.empty-state-sm p {
	font-size: 0.875rem;
	color: #94a3b8;
	margin: 0;
}

/* ========================================
   Column Customizer
   ======================================== */

.col-hidden {
	display: none !important;
}

.btn-table-columns {
	font-size: 0.8125rem;
	font-weight: 500;
	padding: 4px 12px;
	border-radius: 6px;
	gap: 6px;
	display: inline-flex;
	align-items: center;
}

.btn-table-columns i {
	font-size: 14px;
}

.col-customizer-wrap {
	position: relative;
	display: inline-block;
}

.col-customizer-panel {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 1050;
	width: 280px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	margin-top: 6px;
	overflow: hidden;
}

.col-customizer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #f1f5f9;
}

.col-customizer-header span {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #1e293b;
}

.col-customizer-reset {
	font-size: 0.75rem;
	color: #64748b;
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px 8px;
	border-radius: 4px;
	transition: all 0.15s ease;
}

.col-customizer-reset:hover {
	color: #ef4444;
	background: #fef2f2;
}

.col-customizer-list {
	list-style: none;
	margin: 0;
	padding: 8px;
	max-height: 320px;
	overflow-y: auto;
}

.col-customizer-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	transition: background 0.15s ease;
	cursor: default;
}

.col-customizer-item:hover {
	background: #f8fafc;
}

.col-customizer-item label {
	flex: 1;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #334155;
	cursor: pointer;
	margin: 0;
	user-select: none;
}

.col-customizer-item input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #3b82f6;
	cursor: pointer;
	flex-shrink: 0;
}

.col-drag-handle {
	cursor: grab;
	color: #94a3b8;
	font-size: 14px;
	flex-shrink: 0;
	padding: 0 2px;
	line-height: 1;
}

.col-drag-handle:active {
	cursor: grabbing;
}

.col-item-locked {
	opacity: 0.5;
}

.col-item-locked .col-drag-handle {
	cursor: default;
	visibility: hidden;
}

.col-item-locked label {
	cursor: default;
}

.col-item-locked input[type="checkbox"] {
	pointer-events: none;
}

.col-sortable-placeholder {
	border: 2px dashed #93c5fd;
	border-radius: 8px;
	background: #eff6ff;
	height: 38px;
	list-style: none;
	margin: 2px 0;
}

.col-lock-icon {
	font-size: 11px;
	color: #94a3b8;
}

@media (max-width: 576px) {
	.col-customizer-panel {
		width: calc(100vw - 32px);
		right: -8px;
	}
}

/* ========================================
   Sortable Table Headers
   ======================================== */

th[data-sort-column] {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	position: relative;
}

th[data-sort-column]:hover {
	background: rgba(0, 0, 0, 0.03);
}

th[data-sort-column]::after {
	font-family: "bootstrap-icons";
	font-size: 0.75em;
	margin-left: 4px;
	opacity: 0;
	transition: opacity 0.15s ease;
	content: "\F127";
}

th[data-sort-column]:hover::after {
	opacity: 0.4;
}

th.sort-asc::after {
	content: "\F148";
	opacity: 1 !important;
	color: var(--primary, #3b82f6);
}

th.sort-desc::after {
	content: "\F128";
	opacity: 1 !important;
	color: var(--primary, #3b82f6);
}

/* ========================================
   XTrack - Position Badges
   ======================================== */

.position-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	min-width: 44px;
}

.position-badge.top-3 {
	background: rgba(16, 185, 129, 0.15);
	color: #059669;
}

.position-badge.top-10 {
	background: rgba(59, 130, 246, 0.15);
	color: #2563eb;
}

.position-badge.top-30 {
	background: rgba(245, 158, 11, 0.15);
	color: #d97706;
}

.position-badge.top-100 {
	background: rgba(107, 114, 128, 0.15);
	color: #4b5563;
}

/* ========================================
   XTrack - Keyword Table
   ======================================== */

.kw-table {
	border-collapse: separate;
	border-spacing: 0;
}

.kw-table thead th {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
	padding: 14px 16px;
	border-bottom: 2px solid #e2e8f0;
	white-space: nowrap;
}

.kw-table .kw-row {
	transition: background 0.15s ease;
}

.kw-table .kw-row:hover {
	background: #f8fafc;
}

.kw-table .kw-row td {
	padding: 16px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f5f9;
}

.kw-col-keyword {
	min-width: 250px;
}

.kw-col-volume,
.kw-col-rank,
.kw-col-best,
.kw-col-change,
.kw-col-cpc {
	width: 100px;
}

.kw-col-tracked {
	width: 130px;
}

.kw-col-actions {
	width: 130px;
}

.kw-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.kw-name {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #1e293b;
	text-decoration: none;
	transition: color 0.15s ease;
}

.kw-name:hover {
	color: #3b82f6;
}

.kw-url {
	font-size: 0.75rem;
	color: #94a3b8;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 350px;
}

.kw-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9375rem;
	font-weight: 700;
	min-width: 48px;
	padding: 6px 12px;
	border-radius: 8px;
}

.kw-rank.rank-top3 {
	background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.06));
	color: #059669;
}

.kw-rank.rank-top10 {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.06));
	color: #2563eb;
}

.kw-rank.rank-top30 {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
	color: #d97706;
}

.kw-rank.rank-top100 {
	background: linear-gradient(135deg, rgba(107, 114, 128, 0.12), rgba(107, 114, 128, 0.06));
	color: #4b5563;
}

.kw-rank.rank-none {
	color: #cbd5e1;
	font-weight: 400;
}

.kw-best {
	font-size: 0.875rem;
	font-weight: 600;
	color: #10b981;
}

.kw-change {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 6px;
}

.kw-change.up {
	color: #059669;
	background: rgba(16, 185, 129, 0.08);
}

.kw-change.down {
	color: #dc2626;
	background: rgba(239, 68, 68, 0.08);
}

.kw-change.neutral {
	color: #cbd5e1;
	background: none;
}

.kw-volume {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #1e293b;
}

.kw-cpc {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #64748b;
}

.kw-comp {
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
	display: inline-block;
}
.kw-comp.comp-low {
	background: #dcfce7;
	color: #15803d;
}
.kw-comp.comp-medium {
	background: #fef3c7;
	color: #b45309;
}
.kw-comp.comp-high {
	background: #fee2e2;
	color: #dc2626;
}

.kw-country {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	background: #f1f5f9;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.kw-tracked {
	font-size: 0.8125rem;
	color: #94a3b8;
}

.kw-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.kw-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #64748b;
	cursor: pointer;
	transition: all 0.15s ease;
	text-decoration: none;
	font-size: 0.875rem;
}

.kw-action-btn:hover {
	background: #f1f5f9;
	color: #3b82f6;
	border-color: #3b82f6;
}

.kw-action-btn.kw-action-delete:hover {
	background: #fef2f2;
	color: #ef4444;
	border-color: #ef4444;
}

.kw-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 2rem 0;
}

.kw-empty p {
	color: #94a3b8;
	font-size: 0.875rem;
	margin: 0;
}

@media (max-width: 768px) {
	.kw-table .kw-row td {
		padding: 12px 10px;
	}

	.kw-col-keyword {
		min-width: 180px;
	}

	.kw-url {
		max-width: 200px;
	}

	.kw-rank {
		font-size: 0.8125rem;
		padding: 4px 8px;
		min-width: 40px;
	}
}

.link-unstyled
{
	text-decoration: none;
	color: inherit;
}

.table-scroll
{
	overflow-x: auto;
}

.col-w-80
{
	width: 80px;
}

.col-w-100
{
	width: 100px;
}

.col-w-120
{
	width: 120px;
}

.col-w-140
{
	width: 140px;
}

.product-view-img
{
	max-width: 100%;
	max-height: 300px;
	object-fit: contain;
}

.product-thumb
{
	border-radius: 4px;
	object-fit: cover;
	width: 40px;
	height: 40px;
}

.creative-thumb
{
	max-height: 200px;
	object-fit: cover;
}

.input-code
{
	font-family: monospace;
	font-size: 0.8125rem;
}

.select-max-sm
{
	max-width: 200px;
}

.select-max-md
{
	max-width: 400px;
}

.empty-state-icon
{
	font-size: 3rem;
	color: #94a3b8;
}

.dot-unread
{
	font-size: 0.5rem;
}

.header-site-indicator
{
	display: flex;
	align-items: center;
}

.header-site-indicator .btn
{
	font-size: 0.8125rem;
	white-space: nowrap;
}

.site-picker-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.site-picker-card
{
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 12px;
	padding: 28px 20px;
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 16px;
	text-decoration: none;
	color: inherit;
	transition: all 0.2s ease;
}

.site-picker-card:hover
{
	border-color: #3b82f6;
	box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
	transform: translateY(-4px);
	color: inherit;
	text-decoration: none;
}

.site-picker-logo
{
	width: 64px;
	height: 64px;
}

.site-picker-logo img
{
	width: 64px;
	height: 64px;
	border-radius: 14px;
	object-fit: cover;
}

.site-picker-initials
{
	width: 64px;
	height: 64px;
	border-radius: 14px;
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.375rem;
	font-weight: 700;
}

.site-picker-name
{
	font-size: 1rem;
	font-weight: 600;
	color: #1e293b;
	margin: 0;
}

.site-picker-url
{
	font-size: 0.8125rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.site-picker-status
{
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

.site-picker-page
{
	min-height: 100vh;
	background: #f8fafc;
}

.site-picker-topbar
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 32px;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
}

.site-picker-brand-logo
{
	height: 32px;
}

.site-picker-content
{
	max-width: 800px;
	margin: 0 auto;
	padding: 40px 24px;
}

@media (max-width: 576px)
{
	.site-picker-grid
	{
		grid-template-columns: 1fr;
	}

	.site-picker-status
	{
		display: none;
	}

	.site-picker-topbar
	{
		padding: 12px 16px;
	}

	.site-picker-content
	{
		padding: 24px 16px;
	}
}

.header-badge
{
	position: absolute;
	top: -2px;
	right: -2px;
	font-size: 0.6rem;
	padding: 2px 4px;
}

.login-as-banner
{
	background: #fef3c7;
	border: 1px solid #fbbf24;
	border-radius: 8px;
	padding: 10px 16px;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.875rem;
}

.feed-link-btn
{
	font-size: 0.7rem;
}

.user-avatar-lg
{
	width: 64px;
	height: 64px;
	font-size: 1.5rem;
	margin: 0 auto 1rem;
}

.card-footer-meta
{
	font-size: 0.8125rem;
	color: #64748b;
}

.billing-card-body
{
	font-size: 0.8125rem;
}

.auth-notification
{
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 1.25rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.auth-notification-error
{
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.auth-notification-success
{
	background: #f0fdf4;
	color: #16a34a;
	border: 1px solid #bbf7d0;
}

.search-placeholder
{
	color: #94a3b8;
}

.client-logo-sm
{
	width: 32px;
	height: 32px;
	border-radius: 6px;
	object-fit: cover;
}

.client-logo-preview
{
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid #e2e8f0;
}

.client-logo-placeholder
{
	width: 32px;
	height: 32px;
	border-radius: 6px;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	font-size: 14px;
}

.oauth-page
{
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
	padding: 2rem;
}

.oauth-container
{
	max-width: 480px;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	padding: 2.5rem;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.oauth-header
{
	text-align: center;
	margin-bottom: 2rem;
}

.oauth-logo
{
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
}

.oauth-header h2
{
	font-size: 1.5rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0.5rem;
}

.oauth-accounts-list
{
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.oauth-account-option
{
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s;
}

.oauth-account-option:hover
{
	border-color: #cbd5e1;
	background: #f8fafc;
}

.oauth-account-option:has(input:checked)
{
	border-color: #3b82f6;
	background: rgba(59, 130, 246, 0.04);
}

.oauth-account-option input[type="radio"]
{
	accent-color: #3b82f6;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.oauth-account-info
{
	flex: 1;
	min-width: 0;
}

.oauth-success-icon,
.oauth-error-icon
{
	font-size: 3rem;
	line-height: 1;
}

/* ============================================================================
   CarStorming · Phase 2
   Frontend top bar, catalog, car detail. Uses warm-paper light theme.
   ============================================================================ */

:root
{
	/* CarStorming brand v1.0 (May 2026) — warm palette: warm black + burnt
	   orange + cream paper. See docs/CARSTORMING_BRAND_GUIDELINES.md §4. */

	--cs-bg-base:          #FAF7F2;   /* Cream paper */
	--cs-bg-elevated:      #FDFBF7;   /* Warm white — card surfaces */
	--cs-bg-sunken:        #F2EDE2;
	--cs-bg-zebra:         #F6F2E8;
	--cs-bg-hover:         rgba(200, 116, 26, 0.06);   /* burnt-orange tint */

	--cs-text-strong:      #1A1612;   /* Warm black */
	--cs-text-body:        #3A342C;
	--cs-text-muted:       #7A7268;
	--cs-text-subtle:      #A89E91;

	--cs-border-strong:    rgba(26, 22, 18, 0.18);
	--cs-border-medium:    #D4CCBA;
	--cs-border-subtle:    #E6DFD0;

	--cs-accent:           #C8741A;   /* Burnt orange */
	--cs-accent-hover:     #A85F12;
	--cs-accent-bg:        rgba(200, 116, 26, 0.08);
	--cs-accent-bg-strong: rgba(200, 116, 26, 0.18);

	--cs-success:          #7A8C5C;   /* Credible (per brand guide §4.4) */
	--cs-success-bg:       rgba(122, 140, 92, 0.12);
	--cs-warn:             #C8741A;   /* Reuses brand orange (Preliminary) */
	--cs-warn-bg:          rgba(200, 116, 26, 0.10);
	--cs-danger:           #C44A3A;
	--cs-community:        #7A8C5C;
	--cs-community-bg:     rgba(122, 140, 92, 0.12);

	--cs-shadow-sm:        0 1px 2px rgba(26, 22, 18, 0.05), 0 1px 1px rgba(26, 22, 18, 0.04);
	--cs-shadow-md:        0 4px 8px -2px rgba(26, 22, 18, 0.07), 0 12px 24px -4px rgba(26, 22, 18, 0.10);
	--cs-shadow-lg:        0 8px 16px -4px rgba(26, 22, 18, 0.09), 0 24px 48px -8px rgba(26, 22, 18, 0.13);
}

body.cs-frontend
{
	background: var(--cs-bg-base);
	color: var(--cs-text-strong);
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-feature-settings: 'cv11', 'ss01', 'ss03', 'tnum' 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	letter-spacing: -0.005em;
}

.cs-frontend .ff-mono
{
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
	font-feature-settings: 'tnum' 1, 'zero' 1;
}

.cs-frontend .ff-display
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 700;
	letter-spacing: -0.025em;
}

.cs-unit
{
	color: var(--cs-text-muted);
	font-weight: 400;
}

/* ----- Top bar -------------------------------------------------------------- */

.cs-topbar
{
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(250, 246, 238, 0.92);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--cs-border-medium);
}

.cs-topbar-inner
{
	max-width: 1480px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 32px;
}

.cs-brand-link
{
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--cs-text-strong);
}

img.cs-brand-mark
{
	display: block;
	height: 44px;       /* desktop: full lockup, brand-readable */
	width: auto;
}

@media (max-width: 640px)
{
	/* On mobile, the <picture> swaps to the square mark-only SVG. Size it as
	   a topbar icon — slightly smaller height since it's just the octagon. */
	img.cs-brand-mark { height: 38px; }
}

.cs-topnav
{
	display: flex;
	gap: 4px;
	flex: 1;
}

.cs-topnav-link
{
	padding: 8px 14px;
	color: var(--cs-text-body);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 500;
	font-size: 14px;
	transition: background 120ms ease, color 120ms ease;
}

.cs-topnav-link:hover
{
	background: var(--cs-bg-elevated);
	color: var(--cs-text-strong);
}

.cs-topnav-link.active
{
	background: var(--cs-accent-bg);
	color: var(--cs-accent);
}

.cs-topbar-actions
{
	display: flex;
	align-items: center;
	gap: 12px;
}

.cs-topbar-greeting
{
	font-size: 13px;
	color: var(--cs-text-muted);
}

.cs-frontend .btn-outline-primary
{
	color: var(--cs-accent);
	border-color: var(--cs-accent);
}

.cs-frontend .btn-outline-primary:hover
{
	background: var(--cs-accent);
	border-color: var(--cs-accent);
	color: #fff;
}

.cs-frontend .btn-primary
{
	background: var(--cs-accent);
	border-color: var(--cs-accent);
}

.cs-frontend .btn-primary:hover
{
	background: var(--cs-accent-hover);
	border-color: var(--cs-accent-hover);
}

/* ----- Main / page header --------------------------------------------------- */

.cs-main
{
	max-width: 1480px;
	margin: 0 auto;
	padding: 32px 24px 80px;
	min-height: calc(100vh - 64px - 100px);
}

.cs-page-header
{
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.cs-page-title
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.1;
	margin: 0;
	letter-spacing: -0.03em;
	font-feature-settings: 'cv11', 'ss01', 'ss03';
}

.cs-page-actions
{
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* ----- Catalog -------------------------------------------------------------- */

.cs-catalog-card
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--cs-shadow-sm);
}

.cs-table-scroll
{
	overflow-x: auto;
}

.cs-cars-table
{
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	min-width: 1100px;
}

.cs-cars-table thead th
{
	position: sticky;
	top: 0;
	background: var(--cs-bg-elevated);
	border-bottom: 2px solid var(--cs-border-medium);
	color: var(--cs-text-muted);
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 14px 12px;
	text-align: left;
	white-space: nowrap;
}

.cs-cars-table thead th.text-end
{
	text-align: right;
}

.cs-cars-table tbody tr
{
	border-bottom: 1px solid var(--cs-border-subtle);
	transition: background 80ms ease;
	cursor: pointer;
}

.cs-cars-table tbody tr:nth-child(even)
{
	background: var(--cs-bg-zebra);
}

.cs-cars-table tbody tr:hover
{
	background: var(--cs-bg-hover);
}

.cs-cars-table tbody td
{
	padding: 12px;
	vertical-align: middle;
	white-space: nowrap;
}

.cs-cars-table tbody td.text-end
{
	text-align: right;
}

.cs-col-name { min-width: 240px; }
.cs-col-pt   { min-width: 110px; }
.cs-col-etalon { min-width: 150px; }

.cs-cars-table .cell-main
{
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--cs-text-strong);
	text-decoration: none;
}

.cs-cars-table .cell-avatar
{
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--cs-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 15px;
	flex-shrink: 0;
}

.cs-cars-table .cell-info h4
{
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--cs-text-strong);
	line-height: 1.3;
}

.cs-cars-table .cell-info p
{
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--cs-text-muted);
	line-height: 1.3;
}

.cs-catalog-footer
{
	border-top: 1px solid var(--cs-border-medium);
	padding: 12px 16px;
	background: var(--cs-bg-base);
}

.cs-pagination
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.cs-pagination-info
{
	font-size: 13px;
	color: var(--cs-text-muted);
}

/* Powertrain chips ----------------------------------------------------------- */

.cs-pt-chip
{
	display: inline-block;
	padding: 3px 9px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	font-family: 'JetBrains Mono', monospace;
}

.cs-pt-bev   { background: rgba(42, 126, 124, 0.12);  color: var(--cs-community); }
.cs-pt-phev  { background: rgba(199, 120, 0, 0.12);   color: var(--cs-accent); }
.cs-pt-erev  { background: rgba(199, 120, 0, 0.12);   color: var(--cs-accent); }
.cs-pt-hev   { background: rgba(45, 125, 95, 0.12);   color: var(--cs-success); }
.cs-pt-ice   { background: rgba(75, 60, 40, 0.10);    color: var(--cs-text-body); }
.cs-pt-fcev  { background: rgba(75, 100, 180, 0.12);  color: #4b64b4; }

/* Etalon @ 130 cell --------------------------------------------------------- */

.cs-etalon-cell
{
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	color: var(--cs-accent);
	font-weight: 600;
}

.cs-etalon-value
{
	font-size: 16px;
}

.cs-etalon-unit
{
	font-size: 11px;
	color: var(--cs-text-muted);
	font-weight: 400;
}

/* Credibility chips */

.cs-cred
{
	display: inline-block;
	padding: 2px 7px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-top: 4px;
}

.cs-cred-none   { background: rgba(75, 60, 40, 0.06); color: var(--cs-text-subtle); }
.cs-cred-low    { background: var(--cs-warn-bg);      color: var(--cs-warn); }
.cs-cred-prelim { background: var(--cs-accent-bg);    color: var(--cs-accent); }
.cs-cred-mod    { background: var(--cs-community-bg); color: var(--cs-community); }
.cs-cred-high   { background: var(--cs-success-bg);   color: var(--cs-success); }

/* ----- Car detail ---------------------------------------------------------- */

.cs-hero
{
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 32px;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	padding: 28px 32px;
	margin-bottom: 24px;
	box-shadow: var(--cs-shadow-sm);
	align-items: center;
}

.cs-hero-name
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 38px;
	line-height: 1.1;
	margin: 8px 0 4px;
	letter-spacing: -0.01em;
}

.cs-hero-meta
{
	color: var(--cs-text-muted);
	font-size: 14px;
	margin: 0;
}

.cs-etalon-hero
{
	background: var(--cs-bg-base);
	border: 1px solid var(--cs-accent-bg-strong);
	border-radius: 8px;
	padding: 16px 24px;
	min-width: 260px;
	text-align: right;
}

.cs-etalon-hero-empty
{
	border-color: var(--cs-border-subtle);
}

.cs-etalon-hero-label
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	font-weight: 600;
}

.cs-etalon-hero-value
{
	font-size: 36px;
	font-weight: 600;
	color: var(--cs-accent);
	line-height: 1.1;
	margin-top: 6px;
}

.cs-etalon-hero-empty .cs-etalon-hero-value
{
	color: var(--cs-text-subtle);
}

.cs-etalon-hero-unit
{
	font-size: 14px;
	color: var(--cs-text-muted);
	font-weight: 400;
	margin-left: 4px;
}

/* Tabs ---------------------------------------------------------------------- */

.cs-tabs
{
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--cs-border-medium);
	margin-bottom: 24px;
}

.cs-tab
{
	padding: 12px 18px;
	color: var(--cs-text-muted);
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	border-bottom: 2px solid transparent;
	transition: color 120ms ease, border-color 120ms ease;
}

.cs-tab:hover
{
	color: var(--cs-text-strong);
}

.cs-tab.active
{
	color: var(--cs-accent);
	border-bottom-color: var(--cs-accent);
}

.cs-tab-count
{
	display: inline-block;
	background: var(--cs-bg-sunken);
	color: var(--cs-text-muted);
	font-size: 11px;
	padding: 1px 7px;
	border-radius: 10px;
	margin-left: 4px;
	font-weight: 500;
}

.cs-tab-panel
{
	display: none;
}

.cs-tab-panel.active
{
	display: block;
}

/* Spec grid ----------------------------------------------------------------- */

.cs-spec-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

.cs-spec-group
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	padding: 20px 24px;
}

.cs-spec-group-title
{
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	margin: 0 0 12px;
}

.cs-spec-list
{
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cs-spec-row
{
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 1px solid var(--cs-border-subtle);
}

.cs-spec-row:last-child
{
	border-bottom: none;
}

.cs-spec-row dt
{
	font-size: 13px;
	color: var(--cs-text-muted);
	font-weight: 400;
}

.cs-spec-row dd
{
	margin: 0;
	font-size: 14px;
	color: var(--cs-text-strong);
	font-weight: 500;
}

/* Submissions tab ----------------------------------------------------------- */

.cs-stat-row
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.cs-stat
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	padding: 14px 18px;
}

.cs-stat-label
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	font-weight: 600;
}

.cs-stat-value
{
	font-size: 22px;
	font-weight: 600;
	color: var(--cs-text-strong);
	margin-top: 4px;
}

.cs-stat-unit
{
	font-size: 13px;
	color: var(--cs-text-muted);
	font-weight: 400;
}

.cs-submissions-table
{
	width: 100%;
	border-collapse: collapse;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	overflow: hidden;
}

.cs-submissions-table thead th
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-muted);
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid var(--cs-border-medium);
}

.cs-submissions-table thead th.text-end
{
	text-align: right;
}

.cs-submissions-table tbody td
{
	padding: 10px 12px;
	border-bottom: 1px solid var(--cs-border-subtle);
	font-size: 13px;
}

.cs-submissions-table tbody td.text-end
{
	text-align: right;
}

.cs-submissions-table tbody tr:last-child td
{
	border-bottom: none;
}

.cs-cond
{
	display: inline-block;
	padding: 2px 7px;
	background: var(--cs-bg-sunken);
	color: var(--cs-text-body);
	border-radius: 3px;
	font-size: 11px;
	margin-right: 4px;
}

/* Empty state --------------------------------------------------------------- */

.cs-empty-state
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	padding: 48px 24px;
	text-align: center;
}

.cs-empty-icon
{
	font-size: 40px;
	color: var(--cs-text-subtle);
	margin-bottom: 12px;
	display: block;
}

.cs-empty-state h3
{
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 6px;
}

/* Footer -------------------------------------------------------------------- */

.cs-footer
{
	border-top: 1px solid var(--cs-border-medium);
	padding: 24px;
	margin-top: 40px;
	background: var(--cs-bg-base);
}

.cs-footer-inner
{
	max-width: 1480px;
	margin: 0 auto;
	display: flex;
	gap: 16px;
	align-items: baseline;
	font-size: 13px;
	color: var(--cs-text-muted);
}

.cs-footer-brand
{
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 18px;
	color: var(--cs-text-strong);
}

/* Mobile -------------------------------------------------------------------- */

@media (max-width: 768px)
{
	.cs-topbar-inner    { padding: 12px 16px; gap: 16px; }
	.cs-topnav          { display: none; }
	.cs-main            { padding: 20px 16px 60px; }
	.cs-page-title      { font-size: 30px; }
	.cs-page-header     { flex-direction: column; align-items: flex-start; }

	.cs-hero            { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
	.cs-etalon-hero     { text-align: left; min-width: 0; }
	.cs-hero-name       { font-size: 28px; }
	.cs-etalon-hero-value { font-size: 30px; }

	.cs-tabs            { overflow-x: auto; }
	.cs-tab             { white-space: nowrap; }
}

/* ============================================================================
   CarStorming · Phase 3 — auth + profile
   ============================================================================ */

.cs-auth-card
{
	max-width: 460px;
	margin: 32px auto;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	padding: 36px;
	box-shadow: var(--cs-shadow-md);
}

.cs-auth-form
{
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cs-auth-title
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 30px;
	margin: 0 0 4px;
	letter-spacing: -0.01em;
}

.cs-auth-subtitle
{
	color: var(--cs-text-muted);
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.5;
}

.cs-auth-meta
{
	margin-top: 12px;
	font-size: 13px;
	color: var(--cs-text-muted);
	text-align: center;
}

.cs-auth-meta-sep
{
	margin: 0 6px;
	color: var(--cs-text-subtle);
}

.cs-auth-link
{
	color: var(--cs-accent);
	text-decoration: none;
	font-weight: 500;
}

.cs-auth-link:hover
{
	text-decoration: underline;
}

.cs-auth-state
{
	background: transparent;
	border: none;
	padding: 12px 0;
	box-shadow: none;
}

.cs-form-group
{
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cs-form-label
{
	font-size: 13px;
	font-weight: 600;
	color: var(--cs-text-body);
}

.cs-form-input
{
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	background: var(--cs-bg-base);
	color: var(--cs-text-strong);
	border: 1px solid var(--cs-border-strong);
	border-radius: 6px;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.cs-form-input:focus
{
	outline: none;
	border-color: var(--cs-accent);
	box-shadow: 0 0 0 3px var(--cs-accent-bg);
}

.cs-form-input:disabled
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-muted);
	cursor: not-allowed;
}

.cs-form-hint
{
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--cs-text-muted);
}

/* Profile layout */

.cs-profile
{
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 720px;
}

.cs-profile-section
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	padding: 28px 32px;
	box-shadow: var(--cs-shadow-sm);
}

.cs-profile-section-head
{
	margin-bottom: 20px;
}

.cs-profile-section-title
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 22px;
	margin: 0;
}

.cs-profile-section-sub
{
	color: var(--cs-text-muted);
	font-size: 13px;
	margin: 4px 0 0;
}

.cs-form-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}

/* User trigger in top bar */

.cs-user-trigger
{
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	border: 1px solid var(--cs-border-medium);
	border-radius: 6px;
	padding: 6px 12px;
	color: var(--cs-text-strong);
	font-size: 13px;
	cursor: pointer;
	transition: background 120ms ease;
}

.cs-user-trigger:hover
{
	background: var(--cs-bg-elevated);
}

.cs-avatar
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--cs-accent);
	color: #fff;
	font-weight: 600;
	font-size: 12px;
}

@media (max-width: 768px)
{
	.cs-auth-card     { margin: 16px; padding: 24px; }
	.cs-profile-section { padding: 20px; }
	.cs-form-grid     { grid-template-columns: 1fr; }
}

/* ============================================================================
   CarStorming · Phase 4 — submission form, outliers, my-submissions
   ============================================================================ */

.cs-submit-form
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 28px;
	box-shadow: var(--cs-shadow-sm);
}

.cs-submit-head
{
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.cs-submit-title
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 22px;
	margin: 0;
}

.cs-submit-sub
{
	color: var(--cs-text-muted);
	font-size: 13px;
	margin: 4px 0 0;
}

.cs-submit-quota
{
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	background: var(--cs-bg-base);
	border: 1px solid var(--cs-border-medium);
	padding: 4px 9px;
	border-radius: 4px;
	white-space: nowrap;
	flex-shrink: 0;
}

.cs-submit-extra
{
	margin: 12px 0 18px;
	border-top: 1px solid var(--cs-border-subtle);
	padding-top: 12px;
}

.cs-submit-extra summary
{
	cursor: pointer;
	color: var(--cs-text-muted);
	font-size: 13px;
	font-weight: 500;
	padding: 6px 0;
	user-select: none;
}

.cs-submit-extra summary:hover
{
	color: var(--cs-text-strong);
}

.cs-input-with-unit
{
	position: relative;
	display: flex;
	align-items: center;
}

.cs-input-with-unit .cs-form-input
{
	padding-right: 64px;
}

.cs-input-unit
{
	position: absolute;
	right: 12px;
	font-size: 12px;
	color: var(--cs-text-muted);
	pointer-events: none;
	font-family: 'JetBrains Mono', monospace;
}

.cs-radio-row
{
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	padding: 6px 0;
}

.cs-radio
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 13px;
	color: var(--cs-text-body);
}

.cs-radio input[type="radio"]
{
	accent-color: var(--cs-accent);
	cursor: pointer;
}

.cs-radio small
{
	color: var(--cs-text-muted);
	margin-left: 2px;
}

/* Info banners */

.cs-info-banner
{
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--cs-accent-bg);
	border: 1px solid var(--cs-accent-bg-strong);
	color: var(--cs-text-body);
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 24px;
	font-size: 14px;
}

.cs-info-banner i
{
	color: var(--cs-accent);
	font-size: 18px;
	flex-shrink: 0;
}

.cs-info-banner-cta
{
	background: var(--cs-bg-elevated);
	border-color: var(--cs-border-medium);
}

/* Section headings */

.cs-list-heading
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 22px;
	margin: 28px 0 14px;
	color: var(--cs-text-strong);
}

/* Wider readings table */

.cs-submissions-table-wide
{
	min-width: 900px;
}

/* Excluded outliers section */

.cs-outliers
{
	margin-top: 24px;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	padding: 16px 20px;
}

.cs-outliers > summary
{
	cursor: pointer;
	font-weight: 500;
	color: var(--cs-text-body);
	user-select: none;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cs-outliers > summary:hover
{
	color: var(--cs-text-strong);
}

.cs-outliers-count
{
	background: var(--cs-warn-bg);
	color: var(--cs-warn);
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 10px;
	font-weight: 600;
}

.cs-outliers-note
{
	color: var(--cs-text-muted);
	font-size: 13px;
	margin: 12px 0 16px;
	line-height: 1.5;
}

.cs-submissions-table-muted tbody td
{
	color: var(--cs-text-muted);
}

/* My submissions */

.cs-mine
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: var(--cs-shadow-sm);
}

.cs-mine .cs-empty-state
{
	background: transparent;
	border: none;
	box-shadow: none;
}

.cs-mine .cs-submissions-table
{
	border: none;
	border-radius: 0;
	background: transparent;
}

.cs-mine .cell-main
{
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--cs-text-strong);
	text-decoration: none;
}

.cs-mine .cell-avatar
{
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--cs-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 13px;
	flex-shrink: 0;
}

.cs-mine .cell-info h4
{
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.cs-mine .cell-info p
{
	margin: 0;
	font-size: 11px;
	color: var(--cs-text-muted);
	font-family: 'JetBrains Mono', monospace;
}

/* ============================================================================
   CarStorming · Phase 5 — corrections, voting, diff display
   ============================================================================ */

.cs-corr-form
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 28px;
	box-shadow: var(--cs-shadow-sm);
}

.cs-corr-list
{
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cs-corr-card
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 8px;
	padding: 18px 20px;
}

.cs-corr-card-applied
{
	border-color: var(--cs-success-bg);
	background: rgba(45, 125, 95, 0.04);
}

.cs-corr-card-rejected
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-muted);
}

.cs-corr-head
{
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.cs-corr-field
{
	font-weight: 600;
	font-size: 15px;
	color: var(--cs-text-strong);
}

.cs-corr-meta
{
	font-size: 12px;
	color: var(--cs-text-muted);
}

.cs-corr-diff
{
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 8px;
}

.cs-corr-diff-row
{
	display: flex;
	align-items: baseline;
	gap: 12px;
	font-size: 14px;
}

.cs-corr-diff-label
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	font-weight: 600;
	min-width: 64px;
}

.cs-corr-diff-value
{
	font-family: 'JetBrains Mono', monospace;
	font-weight: 500;
	color: var(--cs-text-strong);
}

.cs-corr-diff-current
{
	color: var(--cs-text-muted);
}

.cs-corr-diff-strike
{
	text-decoration: line-through;
	color: var(--cs-text-muted);
}

.cs-corr-diff-proposed
{
	color: var(--cs-accent);
	font-weight: 600;
}

.cs-corr-note
{
	margin: 8px 0;
	color: var(--cs-text-body);
	font-size: 13px;
	font-style: italic;
	background: var(--cs-bg-base);
	padding: 8px 12px;
	border-left: 3px solid var(--cs-border-strong);
	border-radius: 0 4px 4px 0;
}

.cs-corr-source
{
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--cs-accent);
	text-decoration: none;
	margin-bottom: 8px;
}

.cs-corr-source:hover
{
	text-decoration: underline;
}

.cs-corr-footer
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--cs-border-subtle);
}

.cs-corr-tally
{
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	color: var(--cs-text-muted);
	font-family: 'JetBrains Mono', monospace;
}

.cs-corr-tally-confirm
{
	color: var(--cs-success);
}

.cs-corr-tally-dispute
{
	color: var(--cs-danger);
}

.cs-corr-tally-net
{
	font-size: 11px;
	padding: 2px 8px;
	background: var(--cs-bg-base);
	border-radius: 10px;
	border: 1px solid var(--cs-border-medium);
}

.cs-corr-actions
{
	display: flex;
	gap: 6px;
}

.cs-corr-self
{
	font-size: 12px;
	color: var(--cs-text-muted);
	font-style: italic;
}

.cs-frontend .btn-outline-success
{
	color: var(--cs-success);
	border-color: var(--cs-success);
}

.cs-frontend .btn-outline-success:hover,
.cs-frontend .btn-success
{
	background: var(--cs-success);
	border-color: var(--cs-success);
	color: #fff;
}

.cs-frontend .btn-outline-danger
{
	color: var(--cs-danger);
	border-color: var(--cs-danger);
}

.cs-frontend .btn-outline-danger:hover,
.cs-frontend .btn-danger
{
	background: var(--cs-danger);
	border-color: var(--cs-danger);
	color: #fff;
}

@media (max-width: 768px)
{
	.cs-corr-head    { flex-direction: column; align-items: flex-start; gap: 4px; }
	.cs-corr-footer  { flex-direction: column; align-items: flex-start; }
	.cs-corr-actions { width: 100%; }
}

/* ============================================================================
   CarStorming · Phase 6 — multi-select compare bar + side-by-side compare
   ============================================================================ */

/* Catalog row selection */

.cs-col-select
{
	width: 38px;
	padding: 12px 6px 12px 14px !important;
}

.cs-row-check
{
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin: 0;
}

.cs-row-check input[type="checkbox"]
{
	width: 16px;
	height: 16px;
	accent-color: var(--cs-accent);
	cursor: pointer;
	margin: 0;
}

.cs-cars-table tbody tr.cs-row-selected
{
	background: var(--cs-accent-bg) !important;
}

.cs-cars-table tbody tr.cs-row-selected:hover
{
	background: var(--cs-accent-bg-strong) !important;
}

/* Compare bar */

.cs-compare-bar
{
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	background: var(--cs-bg-elevated);
	border-top: 1px solid var(--cs-border-strong);
	box-shadow: 0 -8px 24px rgba(60, 45, 20, 0.10);
	padding: 12px 24px;
}

.cs-compare-bar[hidden]
{
	display: none;
}

.cs-compare-bar-inner
{
	max-width: 1480px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.cs-compare-bar-text
{
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 14px;
	color: var(--cs-text-body);
}

.cs-compare-bar-count
{
	font-size: 22px;
	font-weight: 700;
	color: var(--cs-accent);
	font-family: 'JetBrains Mono', monospace;
}

.cs-compare-bar-label
{
	color: var(--cs-text-body);
}

.cs-compare-bar-cap
{
	font-size: 12px;
	color: var(--cs-text-muted);
}

.cs-compare-bar-actions
{
	display: flex;
	gap: 8px;
	align-items: center;
}

.cs-compare-bar-actions .btn.disabled,
.cs-compare-bar-actions .btn[aria-disabled="true"]
{
	opacity: 0.5;
	pointer-events: none;
}

/* Compare page */

.cs-compare-card
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: var(--cs-shadow-sm);
}

.cs-compare-scroll
{
	overflow-x: auto;
}

.cs-compare-table
{
	width: 100%;
	border-collapse: collapse;
	min-width: 720px;
}

.cs-compare-label-col
{
	width: 220px;
}

.cs-compare-label
{
	font-size: 13px;
	font-weight: 500;
	color: var(--cs-text-muted);
	padding: 12px 16px;
	text-align: left;
	background: var(--cs-bg-elevated);
	position: sticky;
	left: 0;
	z-index: 1;
	border-bottom: 1px solid var(--cs-border-subtle);
	border-right: 1px solid var(--cs-border-medium);
	white-space: nowrap;
}

.cs-compare-cell
{
	padding: 12px 18px;
	font-size: 14px;
	text-align: right;
	border-bottom: 1px solid var(--cs-border-subtle);
	background: var(--cs-bg-base);
	min-width: 160px;
	white-space: nowrap;
}

.cs-compare-cell-hero
{
	background: var(--cs-bg-elevated);
}

.cs-compare-cell.cs-best
{
	background: var(--cs-success-bg);
	color: var(--cs-success);
	font-weight: 600;
}

.cs-compare-cell.cs-worst
{
	background: rgba(184, 58, 46, 0.08);
	color: var(--cs-text-muted);
}

.cs-compare-section-row th
{
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	position: static !important;
}

.cs-compare-section
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	font-weight: 600;
	padding: 24px 16px 8px !important;
	text-align: left !important;
	background: transparent !important;
	border-bottom: 2px solid var(--cs-border-medium) !important;
	border-right: none !important;
	position: static !important;
}

/* Car-card header cells */

.cs-compare-car-head
{
	background: var(--cs-bg-sunken);
	padding: 18px 16px;
	text-align: left;
	border-bottom: 2px solid var(--cs-border-medium);
	min-width: 200px;
	position: relative;
}

.cs-compare-car-link
{
	display: block;
	color: var(--cs-text-strong);
	text-decoration: none;
}

.cs-compare-car-link:hover .cs-compare-car-name
{
	color: var(--cs-accent);
}

.cs-compare-car-pt
{
	margin-bottom: 6px;
}

.cs-compare-car-name
{
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.cs-compare-car-meta
{
	font-size: 12px;
	color: var(--cs-text-muted);
	margin-top: 2px;
}

.cs-compare-remove
{
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 4px;
	color: var(--cs-text-muted);
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	background: transparent;
	transition: background 120ms ease, color 120ms ease;
}

.cs-compare-remove:hover
{
	background: var(--cs-bg-base);
	color: var(--cs-danger);
}

.cs-compare-legend
{
	padding: 12px 20px 16px;
	font-size: 12px;
	color: var(--cs-text-muted);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.cs-legend-best,
.cs-legend-worst
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 600;
}

.cs-legend-best
{
	background: var(--cs-success-bg);
	color: var(--cs-success);
}

.cs-legend-worst
{
	background: rgba(184, 58, 46, 0.08);
	color: var(--cs-text-muted);
}

@media (max-width: 768px)
{
	.cs-compare-label-col   { width: 140px; }
	.cs-compare-label       { padding: 10px 12px; font-size: 12px; }
	.cs-compare-cell        { padding: 10px 12px; min-width: 130px; }
	.cs-compare-car-head    { padding: 14px 12px; min-width: 160px; }
	.cs-compare-car-name    { font-size: 16px; }
	.cs-compare-bar         { padding: 10px 16px; }
	.cs-compare-bar-cap     { display: none; }
}

/* ============================================================================
   CarStorming · Phase 9 — polish, mobile, a11y, dark theme
   ============================================================================ */

/* Topbar height — sticky catalog header reads from this. */
:root
{
	--cs-topbar-height: 64px;
}

/* Skip link — visible only when focused (a11y) */

.cs-skip-link
{
	position: absolute;
	left: 8px;
	top: -40px;
	background: var(--cs-accent);
	color: #fff;
	padding: 8px 14px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	z-index: 200;
	transition: top 120ms ease;
}

.cs-skip-link:focus
{
	top: 8px;
}

/* Universal focus ring — replaces the default browser blue with our accent */

.cs-frontend a:focus-visible,
.cs-frontend button:focus-visible,
.cs-frontend input:focus-visible,
.cs-frontend select:focus-visible,
.cs-frontend textarea:focus-visible
{
	outline: 2px solid var(--cs-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Theme toggle button */

.cs-theme-toggle
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--cs-border-medium);
	border-radius: 6px;
	background: transparent;
	color: var(--cs-text-body);
	cursor: pointer;
	font-size: 14px;
	padding: 0;
}

.cs-theme-toggle:hover
{
	background: var(--cs-bg-elevated);
	color: var(--cs-text-strong);
}

.cs-theme-icon-light
{
	display: none;
}

.cs-theme-icon-dark
{
	display: inline-block;
}

[data-theme="dark"] .cs-theme-icon-light
{
	display: inline-block;
}

[data-theme="dark"] .cs-theme-icon-dark
{
	display: none;
}

/* ============================================================================
   STICKY catalog table header
   ============================================================================ */

.cs-cars-table thead th
{
	z-index: 5;
}

/* ============================================================================
   FILTER BAR
   ============================================================================ */

/* ============================================================================
   Search filter bar (refactored). Clear hierarchy:
   Row 1 — Search + Search button + More filters + Columns + Clear
   Row 2 — Make + Model (always-visible, primary)
   Row 3 — Powertrain pills (always-visible)
   Panel — Quality, Fuel, Region, Ranges (collapsed by default)
   ============================================================================ */
.cs-filter-bar
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 14px;
	padding: 16px 20px;
	margin-bottom: 18px;
	box-shadow: var(--cs-shadow-sm);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cs-filter-row
{
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* Search row — flex with the search input expanding */
.cs-filter-row-search { gap: 8px; }
.cs-filter-row-search .cs-filter-apply { flex: 0 0 auto; }

.cs-filter-search
{
	flex: 1;
	min-width: 220px;
	position: relative;
	display: flex;
	align-items: center;
}

.cs-filter-search i
{
	position: absolute;
	left: 14px;
	color: var(--cs-text-muted);
	pointer-events: none;
}

.cs-filter-search input
{
	width: 100%;
	padding: 11px 14px 11px 40px;
	background: var(--cs-bg-base);
	border: 1px solid var(--cs-border-medium);
	border-radius: 10px;
	color: var(--cs-text-strong);
	font-size: 14px;
	line-height: 1.4;
}

.cs-filter-search input:focus
{
	outline: none;
	border-color: var(--cs-accent);
	box-shadow: 0 0 0 3px var(--cs-accent-bg);
}

.cs-filter-toggle
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cs-filter-count
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--cs-accent);
	color: #FDFBF7;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.cs-filter-clear
{
	font-size: 13px;
	color: var(--cs-text-muted);
	text-decoration: none;
	padding: 4px 8px;
	margin-left: auto;
}

.cs-filter-clear:hover
{
	color: var(--cs-danger);
	text-decoration: underline;
}

/* Row 2 — Make + Model side by side */
.cs-filter-row-mm
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}

.cs-filter-field
{
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.cs-filter-field-label
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	font-weight: 600;
}

.cs-filter-inline-label
{
	flex: 0 0 auto;
	align-self: center;
}

/* Row 3 — Powertrain inline */
.cs-filter-row-pt
{
	gap: 14px;
}
.cs-filter-row-pt .cs-pill-row
{
	flex: 1 1 auto;
}

/* Panel — drops below when the toggle is open */
.cs-filter-panel
{
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 4px;
	padding-top: 14px;
	border-top: 1px solid var(--cs-border-subtle);
}
.cs-filter-panel[hidden]
{
	display: none;
}

.cs-filter-section
{
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
.cs-filter-section-ranges
{
	margin-top: 4px;
}

/* Mobile rearrangement */
@media (max-width: 640px)
{
	.cs-filter-bar { padding: 14px; gap: 12px; }
	.cs-filter-row-mm { grid-template-columns: 1fr; }
	.cs-filter-row-search { gap: 6px; }
	.cs-filter-row-search .cs-filter-apply { width: 100%; order: 5; }
	.cs-filter-clear { margin-left: 0; }
}

/* Legacy fieldset selectors — keep so any other page still using them is unaffected */
.cs-filter-group
{
	border: none;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.cs-filter-group legend
{
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	font-weight: 600;
	padding: 0;
	margin-bottom: 8px;
	width: auto;
}

/* Pill toggles (powertrain, region) */

.cs-pill-row
{
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cs-pill
{
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

.cs-pill input
{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cs-pill span
{
	padding: 5px 11px;
	border: 1px solid var(--cs-border-medium);
	border-radius: 14px;
	background: var(--cs-bg-base);
	color: var(--cs-text-body);
	font-size: 12px;
	font-weight: 500;
	transition: background 100ms, color 100ms, border-color 100ms;
}

.cs-pill:hover span
{
	border-color: var(--cs-accent);
}

.cs-pill input:checked + span
{
	background: var(--cs-accent);
	border-color: var(--cs-accent);
	color: #fff;
}

.cs-pill input:focus-visible + span
{
	outline: 2px solid var(--cs-accent);
	outline-offset: 2px;
}

/* Checkbox grid (brand) */

.cs-checkbox-row
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 4px 12px;
	max-height: 180px;
	overflow-y: auto;
}

.cs-check
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--cs-text-body);
	cursor: pointer;
	padding: 2px 0;
}

.cs-check input
{
	accent-color: var(--cs-accent);
}

/* Range pairs */

.cs-range-grid
{
	display: grid;
	/* Four columns on desktop (the four current sliders fit on one line),
	   stepping down to 2 columns on tablets and 1 column on phones. Big gap
	   so adjacent thumbs and value labels never touch. */
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 28px;
	row-gap: 18px;
}

@media (max-width: 960px)
{
	.cs-range-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px)
{
	.cs-range-grid { grid-template-columns: 1fr; }
}

/* Wrapper added in cars/list to let JS show/hide individual sliders by
   powertrain context. Prevents grid blowout when the slider's children
   are technically wider than their 1fr column. */
.cs-range-slot
{
	min-width: 0;
}

/* The slider partial fills its slot. Bottom padding gives the value labels
   under the track breathing room before the next slider's title in row 2. */
.cs-range
{
	padding-bottom: 4px;
}

.cs-range label
{
	display: block;
	font-size: 12px;
	color: var(--cs-text-body);
	font-weight: 500;
	margin-bottom: 4px;
}

.cs-range label small
{
	color: var(--cs-text-muted);
	font-weight: 400;
}

.cs-range-inputs
{
	display: flex;
	align-items: center;
	gap: 4px;
}

.cs-range-inputs input
{
	width: 100%;
	min-width: 0;
	padding: 6px 8px;
	background: var(--cs-bg-base);
	border: 1px solid var(--cs-border-medium);
	border-radius: 4px;
	font-size: 12px;
	font-family: 'JetBrains Mono', monospace;
	color: var(--cs-text-strong);
}

.cs-range-sep
{
	color: var(--cs-text-muted);
	font-weight: 600;
}

/* ============================================================================
   MOBILE — catalog table → vertical cards under 768px
   ============================================================================ */

@media (max-width: 768px)
{
	.cs-cars-table
	{
		display: block;
		min-width: 0;
	}

	.cs-cars-table thead
	{
		display: none;
	}

	.cs-cars-table tbody
	{
		display: block;
	}

	.cs-cars-table tbody tr
	{
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 8px 12px;
		background: var(--cs-bg-elevated);
		border: 1px solid var(--cs-border-medium);
		border-radius: 8px;
		padding: 14px 16px;
		margin-bottom: 10px;
	}

	.cs-cars-table tbody tr.cs-row-selected
	{
		border-color: var(--cs-accent);
		box-shadow: 0 0 0 2px var(--cs-accent-bg);
	}

	.cs-cars-table tbody td
	{
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		padding: 0;
		border: none;
		font-size: 12.5px;
		min-height: 22px;
		white-space: normal;
	}

	.cs-cars-table tbody td::before
	{
		content: attr(data-label);
		font-size: 10px;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: var(--cs-text-muted);
		font-weight: 600;
		margin-right: 8px;
		flex-shrink: 0;
	}

	.cs-cars-table tbody td.cs-col-name,
	.cs-cars-table tbody td.cs-col-etalon
	{
		grid-column: 1 / -1;
		flex-direction: column;
		align-items: stretch;
	}

	.cs-cars-table tbody td.cs-col-name::before,
	.cs-cars-table tbody td.cs-col-etalon::before
	{
		display: none;
	}

	.cs-cars-table tbody td.cs-col-name
	{
		padding-bottom: 6px;
		border-bottom: 1px solid var(--cs-border-subtle);
	}

	.cs-cars-table tbody td.cs-col-etalon
	{
		text-align: left;
		padding-top: 6px;
		border-top: 1px solid var(--cs-border-subtle);
	}

	.cs-cars-table tbody td.cs-col-select
	{
		grid-column: 2 / 3;
		justify-content: flex-end;
	}

	.cs-cars-table tbody td.cs-col-select::before
	{
		display: none;
	}

	.cs-filter-search { min-width: 100%; flex: 1 0 100%; }
	.cs-filter-toggle { flex: 1; }
	.cs-filter-apply  { flex: 1; }
}

/* ============================================================================
   DARK THEME — overrides for the warm-paper variables
   ============================================================================ */

[data-theme="dark"]
{
	/* Dark mode: warm-black backgrounds, cream text, brighter orange accent.
	   See docs/CARSTORMING_BRAND_GUIDELINES.md §4.3. */

	--cs-bg-base:          #1A1612;   /* Warm black */
	--cs-bg-elevated:      #241F1A;   /* Card dark */
	--cs-bg-sunken:        #14110D;
	--cs-bg-zebra:         #1F1A15;
	--cs-bg-hover:         rgba(232, 138, 44, 0.08);

	--cs-text-strong:      #FAF7F2;   /* Cream paper */
	--cs-text-body:        #D8D2C5;
	--cs-text-muted:       #A89E91;
	--cs-text-subtle:      #7A7268;

	--cs-border-strong:    rgba(250, 247, 242, 0.15);
	--cs-border-medium:    rgba(250, 247, 242, 0.09);
	--cs-border-subtle:    rgba(250, 247, 242, 0.05);

	--cs-accent:           #E88A2C;   /* Orange dark — brighter for dark bg */
	--cs-accent-hover:     #F0A04A;
	--cs-accent-bg:        rgba(232, 138, 44, 0.14);
	--cs-accent-bg-strong: rgba(232, 138, 44, 0.22);

	--cs-success:          #95A971;
	--cs-success-bg:       rgba(149, 169, 113, 0.14);
	--cs-warn:             #E88A2C;
	--cs-warn-bg:          rgba(232, 138, 44, 0.14);
	--cs-danger:           #E8755F;
	--cs-community:        #95A971;
	--cs-community-bg:     rgba(149, 169, 113, 0.14);

	--cs-shadow-sm:        0 1px 2px rgba(0, 0, 0, 0.40);
	--cs-shadow-md:        0 4px 8px -2px rgba(0, 0, 0, 0.40), 0 12px 24px -4px rgba(0, 0, 0, 0.55);
	--cs-shadow-lg:        0 8px 16px -4px rgba(0, 0, 0, 0.50), 0 24px 48px -8px rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .cs-topbar
{
	background: rgba(11, 12, 14, 0.92);
}

[data-theme="dark"] .cs-cars-table tbody tr:nth-child(even)
{
	background: var(--cs-bg-zebra);
}

[data-theme="dark"] .cs-pt-bev   { background: rgba(125, 211, 192, 0.14); color: var(--cs-community); }
[data-theme="dark"] .cs-pt-phev,
[data-theme="dark"] .cs-pt-erev  { background: rgba(255, 181, 71, 0.14);  color: var(--cs-accent); }
[data-theme="dark"] .cs-pt-hev   { background: rgba(74, 222, 128, 0.14);  color: var(--cs-success); }
[data-theme="dark"] .cs-pt-ice   { background: rgba(255, 255, 255, 0.06); color: var(--cs-text-body); }
[data-theme="dark"] .cs-pt-fcev  { background: rgba(125, 144, 220, 0.14); color: #97a8e3; }

[data-theme="dark"] .cs-cred-prelim { background: var(--cs-accent-bg); color: var(--cs-accent); }
[data-theme="dark"] .cs-corr-card-applied { background: rgba(74, 222, 128, 0.06); }
[data-theme="dark"] .cs-import-row { background: var(--cs-bg-sunken); color: var(--cs-text-body); }

/* Bootstrap defaults that need taming under dark theme */

[data-theme="dark"] .cs-frontend .btn-outline-secondary
{
	color: var(--cs-text-body);
	border-color: var(--cs-border-strong);
}

[data-theme="dark"] .cs-frontend .btn-outline-secondary:hover
{
	background: var(--cs-bg-elevated);
	color: var(--cs-text-strong);
}

[data-theme="dark"] .cs-form-input,
[data-theme="dark"] .cs-filter-search input,
[data-theme="dark"] .cs-range-inputs input
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-strong);
}

/* ============================================================================
   CarStorming · 2026 refresh — surfaces, radii, shadows, focus
   Overrides the older Phase 0–9 surface treatments. Keep this block last so
   cascade wins. To revert the refresh, delete from this comment to EOF.
   ============================================================================ */

/* Topbar — cleaner, no warm tint blur */
.cs-frontend .cs-topbar
{
	background: color-mix(in oklab, var(--cs-bg-base) 88%, transparent);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--cs-border-medium);
}
[data-theme="dark"] .cs-frontend .cs-topbar
{
	background: color-mix(in oklab, var(--cs-bg-base) 88%, transparent);
}

/* Surfaces — larger radii, soft multi-layer shadow, hairline border */
.cs-frontend .cs-catalog-card,
.cs-frontend .cs-spec-group,
.cs-frontend .cs-stat,
.cs-frontend .cs-corr-form,
.cs-frontend .cs-corr-card,
.cs-frontend .cs-submissions-table,
.cs-frontend .cs-filter-bar,
.cs-frontend .cs-compare-card
{
	border-radius: 14px;
	border: 1px solid var(--cs-border-medium);
	background: var(--cs-bg-elevated);
	box-shadow: var(--cs-shadow-sm);
}

/* Slight lift on hover for stat tiles + spec groups (subtle, not bouncy) */
.cs-frontend .cs-stat,
.cs-frontend .cs-spec-group
{
	transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.cs-frontend .cs-stat:hover,
.cs-frontend .cs-spec-group:hover
{
	box-shadow: var(--cs-shadow-md);
	border-color: var(--cs-border-strong);
}

/* Inputs — softer corners, better focus ring */
.cs-frontend .cs-form-input,
.cs-frontend .cs-filter-search input,
.cs-frontend .cs-range-inputs input,
.cs-frontend select.cs-form-input
{
	border-radius: 10px;
	border: 1px solid var(--cs-border-medium);
	background: var(--cs-bg-elevated);
	color: var(--cs-text-strong);
	transition: border-color 120ms ease, box-shadow 120ms ease;
}
.cs-frontend .cs-form-input:focus,
.cs-frontend .cs-filter-search input:focus,
.cs-frontend .cs-range-inputs input:focus,
.cs-frontend select.cs-form-input:focus
{
	border-color: var(--cs-accent);
	box-shadow: 0 0 0 4px var(--cs-accent-bg);
	outline: none;
}

/* Buttons — sharper, modern */
.cs-frontend .btn
{
	border-radius: 10px;
	font-weight: 500;
	letter-spacing: -0.005em;
	transition: background 120ms ease, border-color 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}
.cs-frontend .btn-primary
{
	background: var(--cs-accent);
	border-color: var(--cs-accent);
	box-shadow: 0 1px 2px rgba(15, 18, 23, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.cs-frontend .btn-primary:hover
{
	background: var(--cs-accent-hover);
	border-color: var(--cs-accent-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 255, 0.20);
}
[data-theme="dark"] .cs-frontend .btn-primary:hover
{
	box-shadow: 0 4px 12px rgba(92, 139, 255, 0.30);
}
.cs-frontend .btn-primary:active
{
	transform: translateY(0);
}
.cs-frontend .btn-outline-secondary
{
	border-color: var(--cs-border-strong);
	color: var(--cs-text-body);
	background: transparent;
}
.cs-frontend .btn-outline-secondary:hover
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-strong);
	border-color: var(--cs-border-strong);
}

/* Pills (filter chips) */
.cs-frontend .cs-pill,
.cs-frontend .cs-check
{
	border-radius: 999px;
}

/* Powertrain chips — remap to new accent system */
.cs-frontend .cs-pt-chip
{
	border-radius: 999px;
	padding: 4px 10px;
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.02em;
}
.cs-frontend .cs-pt-bev   { background: var(--cs-accent-bg);    color: var(--cs-accent); }
.cs-frontend .cs-pt-phev  { background: var(--cs-community-bg); color: var(--cs-community); }
.cs-frontend .cs-pt-erev  { background: var(--cs-community-bg); color: var(--cs-community); }
.cs-frontend .cs-pt-hev   { background: var(--cs-success-bg);   color: var(--cs-success); }
.cs-frontend .cs-pt-ice   { background: rgba(15, 18, 23, 0.06); color: var(--cs-text-body); }
.cs-frontend .cs-pt-fcev  { background: rgba(124, 58, 237, 0.10); color: #6D28D9; }

[data-theme="dark"] .cs-frontend .cs-pt-bev   { background: var(--cs-accent-bg);    color: var(--cs-accent); }
[data-theme="dark"] .cs-frontend .cs-pt-phev,
[data-theme="dark"] .cs-frontend .cs-pt-erev  { background: var(--cs-community-bg); color: var(--cs-community); }
[data-theme="dark"] .cs-frontend .cs-pt-hev   { background: var(--cs-success-bg);   color: var(--cs-success); }
[data-theme="dark"] .cs-frontend .cs-pt-ice   { background: rgba(255, 255, 255, 0.06); color: var(--cs-text-body); }
[data-theme="dark"] .cs-frontend .cs-pt-fcev  { background: rgba(167, 139, 250, 0.14); color: #C4B5FD; }

/* Credibility tier badges — pill shape, refined contrast */
.cs-frontend .cs-cred
{
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

/* Etalon hero — make the value count.  Mono is right but wants more presence. */
.cs-frontend .cs-stat-value
{
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.02em;
}
.cs-frontend .cs-etalon-value
{
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Tabs — cleaner with a subtle bottom border for the rail */
.cs-frontend .cs-tabs
{
	gap: 2px;
	border-bottom: 1px solid var(--cs-border-medium);
}
.cs-frontend .cs-tab
{
	border-radius: 8px 8px 0 0;
	padding: 14px 18px;
	margin-bottom: -1px;
}
.cs-frontend .cs-tab:hover
{
	color: var(--cs-text-strong);
	background: var(--cs-bg-sunken);
}
.cs-frontend .cs-tab.active
{
	color: var(--cs-accent);
	border-bottom: 2px solid var(--cs-accent);
	background: transparent;
}
.cs-frontend .cs-tab-count
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-muted);
	border-radius: 999px;
}
.cs-frontend .cs-tab.active .cs-tab-count
{
	background: var(--cs-accent-bg);
	color: var(--cs-accent);
}

/* Spec rows — slightly more breathing room */
.cs-frontend .cs-spec-group
{
	padding: 22px 24px;
}
.cs-frontend .cs-spec-row
{
	padding: 10px 0;
}

/* Cars table — quieter zebra, snappier row hover */
.cs-frontend .cs-cars-table tbody tr
{
	transition: background 120ms ease;
}
.cs-frontend .cs-cars-table tbody tr:nth-child(even)
{
	background: var(--cs-bg-zebra);
}
.cs-frontend .cs-cars-table tbody tr:hover
{
	background: var(--cs-bg-hover);
}
.cs-frontend .cs-cars-table thead th
{
	background: var(--cs-bg-elevated);
	border-bottom: 1px solid var(--cs-border-medium);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--cs-text-muted);
}

/* Focus rings — match the new accent */
.cs-frontend a:focus-visible,
.cs-frontend button:focus-visible,
.cs-frontend input:focus-visible,
.cs-frontend select:focus-visible,
.cs-frontend textarea:focus-visible
{
	outline: 2px solid var(--cs-accent);
	outline-offset: 2px;
}

/* Compare bar — modern dock style */
.cs-frontend .cs-compare-bar
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 16px;
	box-shadow: var(--cs-shadow-lg);
}

/* Page title spacing — give the new larger size room */
.cs-frontend .cs-page-header
{
	margin-bottom: 32px;
}

/* Stat row — give cards more presence */
.cs-frontend .cs-stat-row
{
	gap: 16px;
	margin-bottom: 28px;
}
.cs-frontend .cs-stat
{
	padding: 18px 20px;
}

/* Submissions table — nest cleanly inside the panel without double-card */
.cs-frontend .cs-tab-panel .cs-submissions-table
{
	border-radius: 14px;
	overflow: hidden;
}

/* Subtle — corrections section refinements */
.cs-frontend .cs-corr-card
{
	padding: 20px 22px;
}
.cs-frontend .cs-corr-form
{
	padding: 24px 26px;
}

/* Forms grid spacing */
.cs-frontend .cs-form-grid
{
	gap: 18px;
}

/* Sticky thead inside a `border-collapse: collapse` table fails to paint
   borders correctly across browsers — collapsed borders belong to the table
   grid, and sticky cells lose them. Switch to separate borders so the thead
   carries its own bottom border cleanly. */
.cs-frontend .cs-cars-table
{
	border-collapse: separate;
	border-spacing: 0;
}
.cs-frontend .cs-cars-table thead th
{
	box-shadow: inset 0 -1px 0 var(--cs-border-medium);
	border-bottom: none;
}
.cs-frontend .cs-cars-table tbody td
{
	border-bottom: 1px solid var(--cs-border-subtle);
}
.cs-frontend .cs-cars-table tbody tr:last-child td
{
	border-bottom: none;
}

/* ============================================================================
   Profile page — 2026 refresh
   ============================================================================ */

.cs-profile-shell
{
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 36px;
	max-width: 1080px;
	align-items: start;
	margin: 0 auto;
}

/* Sidebar nav */
.cs-profile-nav
{
	position: sticky;
	top: calc(var(--cs-topbar-height, 64px) + 24px);
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 14px;
	box-shadow: var(--cs-shadow-sm);
}
.cs-profile-nav a
{
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--cs-text-muted);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: background 120ms ease, color 120ms ease;
}
.cs-profile-nav a:hover
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-strong);
}
.cs-profile-nav a.active
{
	background: var(--cs-accent-bg);
	color: var(--cs-accent);
}
.cs-profile-nav a i
{
	font-size: 15px;
	width: 18px;
	text-align: center;
}

/* Right column */
.cs-profile-content
{
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Identity header */
.cs-profile-identity
{
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 26px;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 14px;
	box-shadow: var(--cs-shadow-sm);
}
.cs-profile-identity-avatar
{
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--cs-accent), var(--cs-accent-hover));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	flex-shrink: 0;
}
.cs-profile-identity-text
{
	min-width: 0;
}
.cs-profile-identity-name
{
	font-size: 18px;
	font-weight: 600;
	color: var(--cs-text-strong);
	letter-spacing: -0.01em;
}
.cs-profile-identity-meta
{
	display: flex;
	gap: 6px;
	margin-top: 4px;
	font-size: 13px;
	color: var(--cs-text-muted);
	flex-wrap: wrap;
	align-items: center;
}
.cs-profile-identity-meta .cs-dot
{
	color: var(--cs-text-subtle);
}

/* Section override (modernize the older .cs-profile-section) */
.cs-frontend .cs-profile-section
{
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 14px;
	box-shadow: var(--cs-shadow-sm);
	padding: 26px 28px;
}
.cs-profile-section-head
{
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--cs-border-subtle);
}
.cs-profile-section-title
{
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 600;
	font-size: 18px;
	letter-spacing: -0.015em;
	margin: 0;
	color: var(--cs-text-strong);
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.cs-profile-section-title i
{
	color: var(--cs-accent);
	font-size: 16px;
}
.cs-profile-section-sub
{
	color: var(--cs-text-muted);
	font-size: 13.5px;
	margin: 6px 0 0;
	line-height: 1.5;
}
.cs-profile-section-foot
{
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--cs-border-subtle);
}

/* Form rows: label-left, control-right */
.cs-form-stack
{
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.cs-form-row
{
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 24px;
	align-items: start;
}
.cs-form-row .cs-form-label
{
	font-size: 13.5px;
	font-weight: 500;
	color: var(--cs-text-strong);
	padding-top: 9px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.cs-form-label-hint
{
	color: var(--cs-text-muted);
	font-weight: 400;
	font-size: 11.5px;
}
.cs-form-control
{
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.cs-form-input-narrow
{
	max-width: 220px;
}
.cs-form-hint
{
	color: var(--cs-text-muted);
	font-size: 12.5px;
	margin: 2px 0 0;
	line-height: 1.4;
}
.cs-form-subhead
{
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cs-text-muted);
	margin: 4px 0 12px;
}
.cs-form-subhead:not(:first-of-type)
{
	margin-top: 22px;
}

/* Toggle switch (replaces the old checkbox-in-a-form-group) */
.cs-form-row-toggle
{
	grid-template-columns: 1fr;
}
.cs-toggle
{
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}
.cs-toggle input
{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.cs-toggle-track
{
	position: relative;
	width: 38px;
	height: 22px;
	background: var(--cs-bg-sunken);
	border: 1px solid var(--cs-border-medium);
	border-radius: 999px;
	transition: background 120ms ease, border-color 120ms ease;
	flex-shrink: 0;
}
.cs-toggle-thumb
{
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.15);
	transition: transform 160ms ease;
}
.cs-toggle input:checked + .cs-toggle-track
{
	background: var(--cs-accent);
	border-color: var(--cs-accent);
}
.cs-toggle input:checked + .cs-toggle-track .cs-toggle-thumb
{
	transform: translateX(16px);
}
.cs-toggle input:focus-visible + .cs-toggle-track
{
	box-shadow: 0 0 0 3px var(--cs-accent-bg);
}
.cs-toggle-label
{
	font-size: 14px;
	color: var(--cs-text-strong);
	font-weight: 500;
}

/* Mobile: stack everything, sidebar becomes a horizontal scroll strip */
@media (max-width: 768px)
{
	.cs-profile-shell
	{
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.cs-profile-nav
	{
		position: static;
		flex-direction: row;
		overflow-x: auto;
		gap: 4px;
		padding: 6px;
		-webkit-overflow-scrolling: touch;
	}
	.cs-profile-nav a
	{
		flex-shrink: 0;
	}
	.cs-frontend .cs-profile-section
	{
		padding: 22px 20px;
	}
	.cs-form-row
	{
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.cs-form-row .cs-form-label
	{
		padding-top: 0;
	}
	.cs-form-input-narrow
	{
		max-width: 100%;
	}
	.cs-profile-identity
	{
		padding: 18px 20px;
	}
	.cs-profile-identity-avatar
	{
		width: 48px;
		height: 48px;
		font-size: 18px;
	}
}

/* Etalon-only filter pill — distinct from powertrain/region pills */
.cs-frontend .cs-pill.cs-pill-special:has(input:checked),
.cs-frontend .cs-pill.cs-pill-special input:checked + span
{
	color: var(--cs-success);
}
.cs-frontend .cs-pill.cs-pill-special
{
	border-style: dashed;
}

/* Column picker — dropdown next to filter button */
.cs-col-picker
{
	position: relative;
	display: inline-block;
}
.cs-col-picker-menu
{
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 50;
	min-width: 220px;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 12px;
	box-shadow: var(--cs-shadow-md);
	padding: 6px;
	max-height: 70vh;
	overflow-y: auto;
}
.cs-col-picker-item
{
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	color: var(--cs-text-body);
	user-select: none;
}
.cs-col-picker-item:hover
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-strong);
}
.cs-col-picker-item input
{
	accent-color: var(--cs-accent);
}

/* Radio rows used in profile display section */
.cs-radio-row
{
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.cs-radio
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--cs-border-medium);
	border-radius: 999px;
	cursor: pointer;
	user-select: none;
	font-size: 13.5px;
	color: var(--cs-text-body);
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.cs-radio:hover
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-strong);
}
.cs-radio input
{
	accent-color: var(--cs-accent);
}
.cs-radio:has(input:checked)
{
	border-color: var(--cs-accent);
	background: var(--cs-accent-bg);
	color: var(--cs-accent);
}

/* ============================================================================
   Dual-handle range slider (.cs-slider)
   - HTML pattern: a wrapper with data-min/max/step + two hidden inputs.
     JS hydrates two thumbs and a fill bar. Native inputs are the source of
     truth so server validation + form submit work without JS.
   ============================================================================ */
.cs-slider
{
	position: relative;
	height: 36px;
	padding: 14px 10px 0;
	user-select: none;
	touch-action: none;
}
.cs-slider-track
{
	position: relative;
	height: 4px;
	background: var(--cs-bg-sunken);
	border-radius: 999px;
}
.cs-slider-range
{
	position: absolute;
	top: 0;
	bottom: 0;
	background: var(--cs-accent);
	border-radius: 999px;
}
.cs-slider-thumb
{
	position: absolute;
	top: 50%;
	width: 18px;
	height: 18px;
	background: #fff;
	border: 2px solid var(--cs-accent);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	cursor: grab;
	transition: transform 80ms ease, box-shadow 120ms ease;
	box-shadow: var(--cs-shadow-sm);
}
.cs-slider-thumb:hover
{
	transform: translate(-50%, -50%) scale(1.1);
}
.cs-slider-thumb:active,
.cs-slider-thumb.cs-slider-thumb-dragging
{
	cursor: grabbing;
	box-shadow: 0 0 0 5px var(--cs-accent-bg), var(--cs-shadow-sm);
}
.cs-slider-thumb:focus-visible
{
	outline: none;
	box-shadow: 0 0 0 4px var(--cs-accent-bg), var(--cs-shadow-sm);
}
.cs-slider-labels
{
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
	font-size: 12px;
	color: var(--cs-text-muted);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.cs-slider-label-current
{
	color: var(--cs-text-strong);
	font-weight: 500;
}

/* ============================================================================
   Per-column filter popovers
   ============================================================================ */
.cs-col-filter-btn
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-left: 4px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: var(--cs-text-subtle);
	cursor: pointer;
	font-size: 12px;
	transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
	vertical-align: middle;
}
.cs-col-filter-btn:hover
{
	background: var(--cs-bg-sunken);
	color: var(--cs-text-strong);
}
.cs-col-filter-btn.cs-col-filter-active
{
	background: var(--cs-accent-bg);
	border-color: var(--cs-accent);
	color: var(--cs-accent);
}

/* The popover floats above everything via fixed positioning + high z-index,
   per brief §6: "must use position: fixed with calculated coordinates from
   getBoundingClientRect() to escape table stacking context." */
.cs-col-popover
{
	position: fixed;
	z-index: 1000;
	min-width: 240px;
	max-width: 320px;
	background: var(--cs-bg-elevated);
	border: 1px solid var(--cs-border-medium);
	border-radius: 12px;
	box-shadow: var(--cs-shadow-md);
	padding: 14px;
	font-size: 13.5px;
}
.cs-col-popover-head
{
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--cs-text-muted);
	margin-bottom: 10px;
}
.cs-col-popover-body
{
	margin-bottom: 12px;
}
.cs-col-popover-foot
{
	display: flex;
	gap: 6px;
	justify-content: flex-end;
	border-top: 1px solid var(--cs-border-subtle);
	padding-top: 10px;
}
.cs-col-popover-options
{
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.cs-col-popover-options label
{
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 6px;
	border-radius: 6px;
	cursor: pointer;
	user-select: none;
}
.cs-col-popover-options label:hover
{
	background: var(--cs-bg-sunken);
}
.cs-col-popover-options input
{
	accent-color: var(--cs-accent);
}

/* Column reorder drag affordances */
.cs-cars-table thead th[draggable="true"]
{
	cursor: grab;
}
.cs-cars-table thead th.cs-th-dragging
{
	opacity: 0.4;
	cursor: grabbing;
}
.cs-cars-table thead th.cs-th-drop-target
{
	outline: 2px dashed var(--cs-accent);
	outline-offset: -2px;
}

/* ========================================================================
   Autodb cascading combobox picker (Phase 13)
   ======================================================================== */
.cs-autodb-picker
{
    background: var(--cs-surface-alt, #f7f7f5);
    border: 1px solid var(--cs-border, #e5e5e0);
    border-radius: 12px;
    padding: 16px;
}

.cs-autodb-row
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px)
{
    .cs-autodb-row { grid-template-columns: 1fr; }
}

.cs-combo
{
    position: relative;
}

.cs-combo > label
{
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cs-muted, #6b6b6b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.cs-combo-input
{
    width: 100%;
    padding-right: 32px;  /* room for clear ✕ */
}

.cs-combo-input:disabled
{
    background: rgba(0,0,0,0.03);
    color: var(--cs-muted, #888);
    cursor: not-allowed;
}

.cs-combo-clear
{
    position: absolute;
    right: 8px;
    top: 27px;             /* aligns with input center after the label */
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--cs-muted, #888);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.cs-combo-clear:hover
{
    background: rgba(0,0,0,0.05);
    color: var(--cs-text, #111);
}

.cs-combo-list
{
    position: absolute;
    z-index: 50;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: var(--cs-surface, #fff);
    border: 1px solid var(--cs-border, #e5e5e0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    list-style: none;
    margin: 0;
    padding: 4px;
}

.cs-combo-list li
{
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.3;
    user-select: none;
}
.cs-combo-list li:hover,
.cs-combo-list li:focus
{
    background: var(--cs-accent-soft, rgba(37,99,255,0.08));
    color: var(--cs-text, #111);
}
.cs-combo-list li small
{
    color: var(--cs-muted, #888);
    font-size: 11px;
    margin-left: 6px;
}

/* Brief flash when a field gets prefilled by the catalog picker */
.cs-prefilled
{
    background: var(--cs-accent-soft, rgba(37,99,255,0.10)) !important;
    transition: background 1.2s ease;
}

.cs-autodb-status
{
    color: var(--cs-accent, #2563FF);
    font-weight: 500;
}

/* ========================================================================
   Add-vehicle wizard (Phase 13b) — 3-step guided flow
   ======================================================================== */
.cs-add-wizard
{
    width: 100%;
}

.cs-step
{
    background: var(--cs-surface, #fff);
    border: 1px solid var(--cs-border, #e5e5e0);
    border-radius: 14px;
    margin-bottom: 16px;
    /* No overflow:hidden — combobox dropdowns need to escape this card. */
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.cs-step-active
{
    border-color: var(--cs-accent, #2563FF);
    box-shadow: 0 0 0 3px rgba(37,99,255,0.10);
}

.cs-step-locked
{
    opacity: 0.55;
    pointer-events: none;
}

.cs-step-done
{
    background: var(--cs-surface-alt, #f7f7f5);
}

.cs-step-header
{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

.cs-step-num
{
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cs-surface-alt, #f0f0eb);
    color: var(--cs-muted, #6b6b6b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

.cs-step-active .cs-step-num
{
    background: var(--cs-accent, #2563FF);
    color: #fff;
}

.cs-step-done .cs-step-num
{
    background: var(--cs-accent-soft, rgba(37,99,255,0.12));
    color: var(--cs-accent, #2563FF);
}
.cs-step-done .cs-step-num::before
{
    content: '\2713'; /* check mark */
    font-size: 16px;
}
.cs-step-done .cs-step-num
{
    font-size: 0; /* hide the number */
}

.cs-step-titles
{
    flex: 1 1 auto;
    min-width: 0;
}

.cs-step-title
{
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-text, #111);
}

.cs-step-summary
{
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--cs-muted, #6b6b6b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-step-edit
{
    flex: 0 0 auto;
}

.cs-step-body
{
    padding: 0 20px 20px;
}

/* Mode tabs (catalog / manual) */
.cs-mode-tabs
{
    display: inline-flex;
    background: var(--cs-surface-alt, #f0f0eb);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
}

.cs-mode-tab
{
    border: 0;
    background: transparent;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cs-muted, #6b6b6b);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.cs-mode-tab-active
{
    background: var(--cs-surface, #fff);
    color: var(--cs-text, #111);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Identity override disclosure inside step 3 */
.cs-spec-disclosure
{
    background: var(--cs-surface-alt, #f7f7f5);
    border: 1px solid var(--cs-border, #e5e5e0);
    border-radius: 10px;
    padding: 12px 16px;
}

.cs-spec-disclosure > summary
{
    cursor: pointer;
    font-weight: 500;
    color: var(--cs-text, #111);
    font-size: 14px;
    list-style: none;
    user-select: none;
}

.cs-spec-disclosure > summary::before
{
    content: '\203A'; /* ‹ */
    display: inline-block;
    margin-right: 8px;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}

.cs-spec-disclosure[open] > summary::before
{
    transform: rotate(90deg);
}

/* Richer two-line layout for trim items in the picker dropdown so the user
   can disambiguate variants (e.g. 231hp manual vs 286hp automatic). */
.cs-combo-list li:has(.cs-combo-trim-engine)
{
    display: block;
    padding: 8px 12px;
    line-height: 1.35;
}
.cs-combo-trim-engine
{
    color: var(--cs-text, #111);
    font-weight: 500;
}
.cs-combo-trim-meta
{
    color: var(--cs-muted, #6b6b6b);
    font-size: 12px;
    margin-top: 2px;
}
.cs-combo-trim-meta strong
{
    color: var(--cs-text, #111);
    font-weight: 600;
}

/* Brand-logo avatar — used in cars/list and other places where the brand
   has a downloaded logo file. Falls back to the letter avatar when none. */
.cell-avatar.cs-brand-logo
{
    background: #ffffff;
    border: 1px solid var(--cs-border, #e5e5e5);
    padding: 4px;
    color: transparent;        /* hide any text content */
}

.cell-avatar.cs-brand-logo img
{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Dark theme — most logos are dark on transparent. Keep the light avatar
   background so they stay legible. */
[data-theme="dark"] .cell-avatar.cs-brand-logo
{
    background: #f5f5f0;
    border-color: rgba(255,255,255,0.08);
}

/* Brand logo to the left of the page title (cars/show). */
.cs-page-logo
{
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--cs-border, #e5e5e5);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.cs-page-logo img
{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

[data-theme="dark"] .cs-page-logo
{
    background: #f5f5f0;
    border-color: rgba(255,255,255,0.08);
}

@media (max-width: 480px)
{
    .cs-page-logo { width: 44px; height: 44px; margin-right: 12px; padding: 4px; }
}

/* ========================================================================
   Brand v1.0 typography (May 2026) — Montserrat for display, Inter for
   running text (already in use), JetBrains Mono for tabular numeric data.
   See docs/CARSTORMING_BRAND_GUIDELINES.md §5.
   ======================================================================== */
.cs-page-title,
.cs-spec-group-title,
h1.cs-page-title,
.cs-content h1,
.cs-content h2,
.cs-content h3,
.cs-step-title
{
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.02em;
}

/* Hero / display only */
.cs-page-title
{
    font-weight: 700;
}

/* Numeric / data — applied where tables and stat values render. The brand
   guide explicitly requires JetBrains Mono for all numeric columns and
   spec values. We wire it via a utility class plus targeted selectors. */
.cs-num,
.cs-cars-table td.text-end,
.cs-cars-table td[data-col="power"],
.cs-cars-table td[data-col="battery"],
.cs-cars-table td[data-col="wltp"],
.cs-cars-table td[data-col="etalon"],
.cs-cars-table td[data-col="cost"],
.cs-cars-table td[data-col="dc_peak"],
.cs-cars-table td[data-col="dc_10_80"],
.cs-cars-table td[data-col="ac_max"],
.cs-cars-table td[data-col="weight"],
.cs-cars-table td[data-col="trunk"],
.cs-cars-table td[data-col="cd"],
.cs-cars-table td[data-col="accel_0_100"],
.cs-cars-table td[data-col="torque"],
.cs-stat-value,
.cs-spec-value
{
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* ========================================================================
   Power Radar (CarStorming brand v1.0 §6.2)
   ======================================================================== */
.cs-radar-card
{
    background: var(--cs-bg-elevated);
    border: 1px solid var(--cs-border-subtle);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--cs-shadow-sm);
}

.cs-radar-card-header
{
    margin-bottom: 8px;
}

.cs-radar
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cs-radar-svg
{
    width: 100%;
    max-width: 480px;
    height: auto;
    display: block;
}

.cs-radar-axis-label
{
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 500;
    fill: var(--cs-text-strong);
}

.cs-radar-axis-value
{
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    fill: var(--cs-text-muted);
    font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .cs-radar-axis-label
{
    fill: var(--cs-text-strong);
}

[data-theme="dark"] .cs-radar-axis-value
{
    fill: var(--cs-text-muted);
}

.cs-radar-legend
{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
    font-size: 13px;
}

.cs-radar-legend li
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cs-text-strong);
}

.cs-radar-swatch
{
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex: 0 0 auto;
}

/* ========================================================================
   Variants in catalog — list of every autodb trim for this car's model
   ======================================================================== */
.cs-variants-section
{
    background: var(--cs-bg-elevated);
    border: 1px solid var(--cs-border-subtle);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--cs-shadow-sm);
}

.cs-variants-header
{
    margin-bottom: 12px;
}

.cs-variants-scroll
{
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px;
}

.cs-variants-table
{
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cs-variants-table th
{
    text-align: left;
    font-weight: 600;
    color: var(--cs-text-muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 8px 8px;
    border-bottom: 1px solid var(--cs-border-medium);
    white-space: nowrap;
}

.cs-variants-table th.text-end
{
    text-align: right;
}

.cs-variants-table td
{
    padding: 10px 8px;
    border-bottom: 1px solid var(--cs-border-subtle);
    vertical-align: top;
    color: var(--cs-text-body);
}

.cs-variants-table tbody tr:hover
{
    background: var(--cs-bg-hover);
}

.cs-variants-table tr.cs-variants-match
{
    background: var(--cs-accent-bg);
    box-shadow: inset 3px 0 0 0 var(--cs-accent);
}

.cs-variants-table tr.cs-variants-match td:first-child
{
    padding-left: 11px;
}

.cs-vt-year   { white-space: nowrap; color: var(--cs-text-strong); }
.cs-vt-engine { min-width: 240px; color: var(--cs-text-strong); }
.cs-vt-engine small { font-size: 11px; }
.cs-vt-hp, .cs-vt-batt, .cs-vt-range { white-space: nowrap; }
.cs-vt-drive, .cs-vt-trans { white-space: nowrap; }
.cs-vt-trans small { font-size: 12px; }

/* Powertrain pill — small variant for the table */
.cs-pt-badge
{
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--cs-bg-sunken);
    color: var(--cs-text-strong);
}
.cs-pt-bev   { background: rgba(122,140,92,0.15);  color: #5d6e44; }
.cs-pt-phev  { background: rgba(200,116,26,0.15);  color: #C8741A; }
.cs-pt-erev  { background: rgba(200,116,26,0.15);  color: #C8741A; }
.cs-pt-hev   { background: rgba(232,138,44,0.15);  color: #B85A3A; }
.cs-pt-ice   { background: rgba(26,22,18,0.08);    color: #1A1612; }
.cs-pt-fcev  { background: rgba(92,122,140,0.15);  color: #5C7A8C; }

[data-theme="dark"] .cs-pt-bev   { color: #95A971; }
[data-theme="dark"] .cs-pt-phev,
[data-theme="dark"] .cs-pt-erev  { color: #E88A2C; }
[data-theme="dark"] .cs-pt-hev   { color: #E8755F; }
[data-theme="dark"] .cs-pt-ice   { color: var(--cs-text-body); background: rgba(250,247,242,0.10); }
[data-theme="dark"] .cs-pt-fcev  { color: #95B0BF; }

/* ========================================================================
   Cost breakdown popover — shows the exact math behind the displayed
   €/100km on cars/show, so suspicious values are auditable in one click.
   ======================================================================== */
.cs-stat-cost
{
    position: relative;
}

.cs-cost-info-toggle
{
    border: 0;
    background: transparent;
    color: var(--cs-text-muted);
    padding: 0 0 0 4px;
    cursor: pointer;
    line-height: 1;
    vertical-align: baseline;
}
.cs-cost-info-toggle:hover
{
    color: var(--cs-accent);
}

.cs-cost-breakdown
{
    margin-top: 8px;
}

.cs-cost-breakdown > summary
{
    display: none;
}

.cs-cost-breakdown[open] .cs-cost-breakdown-body
{
    display: block;
}

.cs-cost-breakdown-body
{
    display: none;
    background: var(--cs-bg-elevated);
    border: 1px solid var(--cs-border-medium);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 6px;
    box-shadow: var(--cs-shadow-md);
    max-width: 480px;
}

.cs-cost-breakdown-body h4
{
    font-size: 13px;
    font-weight: 600;
    color: var(--cs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
}

.cs-cost-breakdown-list
{
    list-style: decimal;
    padding-left: 22px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.7;
}

.cs-cost-breakdown-list li
{
    color: var(--cs-text-body);
}

.cs-cost-breakdown-list li b
{
    color: var(--cs-text-strong);
}

/* ========================================================================
   Speed curve — per-speed medians on cars/show, Submissions tab
   ======================================================================== */
.cs-speed-curve
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.cs-speed-bucket
{
    background: var(--cs-bg-elevated);
    border: 1px solid var(--cs-border-subtle);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
}

.cs-speed-bucket-etalon
{
    border-color: var(--cs-accent);
    background: var(--cs-accent-bg);
}

.cs-speed-bucket-label
{
    font-size: 11px;
    font-weight: 600;
    color: var(--cs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cs-speed-bucket-value
{
    font-size: 20px;
    font-weight: 700;
    color: var(--cs-text-strong);
    margin: 4px 0 2px;
}

.cs-speed-bucket-value .cs-unit
{
    font-size: 11px;
    font-weight: 500;
    color: var(--cs-text-muted);
}

.cs-speed-bucket-n
{
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: var(--cs-text-muted);
}

/* ========================================================================
   "Add your consumption" CTA — prominent banner above the tabs on cars/show
   ======================================================================== */
.cs-add-consumption-cta
{
    background: linear-gradient(135deg, var(--cs-accent-bg) 0%, var(--cs-bg-elevated) 100%);
    border: 1px solid var(--cs-border-medium);
    border-radius: 14px;
    padding: 20px 24px;
    margin: 24px 0 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cs-add-consumption-cta-text
{
    flex: 1 1 320px;
    min-width: 280px;
}

.cs-add-consumption-cta h3
{
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--cs-text-strong);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.cs-add-consumption-cta p
{
    margin: 0;
    color: var(--cs-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.cs-add-consumption-btn
{
    flex: 0 0 auto;
    padding: 12px 22px;
    font-weight: 600;
}

@media (max-width: 640px)
{
    .cs-add-consumption-cta { padding: 16px; }
    .cs-add-consumption-cta h3 { font-size: 16px; }
    .cs-add-consumption-btn { width: 100%; justify-content: center; }
}

/* Real-world data badge — appears next to car names in the catalog list when
   the car has at least one Etalon-window submission. */
.cs-realdata-badge
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 4px;
    color: var(--cs-accent);
    background: var(--cs-accent-bg);
    font-size: 11px;
    line-height: 1;
    vertical-align: 2px;
}

.cs-realdata-badge i
{
    display: block;
}

/* ========================================================================
   Vehicle proposal — public form for visitors to suggest a new vehicle.
   Anonymous-friendly, simpler than cars/add. Phase 18.
   ======================================================================== */
.cs-propose-card
{
    max-width: 720px;
}

/* Sits inside .cs-catalog-footer next to the pagination — a quiet ghost
   pill rather than a loose centered paragraph. Wraps onto its own row
   on narrow viewports. */
.cs-propose-link
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: transparent;
    color: var(--cs-text-muted);
    border: 1px dashed var(--cs-border-medium);
    font-size: 13px;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.cs-propose-link:hover,
.cs-propose-link:focus
{
    background: var(--cs-accent-bg);
    border-color: var(--cs-accent);
    color: var(--cs-text-strong);
}

.cs-propose-link i
{
    font-size: 15px;
    color: var(--cs-accent);
}

.cs-propose-link strong
{
    color: var(--cs-text-strong);
    font-weight: 600;
}

/* On a wide footer with pagination, push the propose link to the far right.
   On narrow viewports, wrap to a new row below pagination. */
.cs-catalog-footer
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.cs-catalog-footer > .cs-propose-link
{
    margin-left: auto;
}
@media (max-width: 640px)
{
    .cs-catalog-footer > .cs-propose-link
    {
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Honeypot input — visually hidden but still in the DOM so bots fill it.
   Don't use display:none / visibility:hidden — some bots skip those.
   off-screen positioning is the standard anti-spam pattern. */
.cs-honeypot
{
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ========================================================================
   Pagination — override the chassis blue with the brand warm palette.
   Tokens are used so dark mode picks up the variants automatically.
   ======================================================================== */
.pagination-info
{
    color: var(--cs-text-muted);
}

.pagination-btn
{
    border-color: var(--cs-border-medium);
    background: var(--cs-bg-elevated);
    color: var(--cs-text-muted);
}

.pagination-btn:hover:not(:disabled),
.pagination-btn:focus:not(:disabled)
{
    border-color: var(--cs-accent);
    color: var(--cs-accent);
    background: var(--cs-accent-bg);
}

.pagination-btn.active
{
    background: var(--cs-accent);
    border-color: var(--cs-accent);
    color: #FDFBF7;       /* warm white — readable on burnt-orange */
}

.pagination-btn.active:hover,
.pagination-btn.active:focus
{
    background: var(--cs-accent-hover);
    border-color: var(--cs-accent-hover);
    color: #FDFBF7;
}

/* Make + Model filter row — two searchable comboboxes side by side. The
   .cs-combo styles from cars/add are reused; this just lays them out. */
.cs-make-model-row
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

@media (max-width: 640px)
{
    .cs-make-model-row { grid-template-columns: 1fr; }
}

/* Filter-context tweaks for the combobox — slightly more compact than the
   add-vehicle wizard's version, and the clear (×) sits at top-7 since there
   is no label above the input (compared to the wizard's labelled combos). */
.cs-combo.cs-combo-filter
{
    position: relative;
}

.cs-combo.cs-combo-filter .cs-combo-clear
{
    top: 7px;
}
