:root {
	--primary-color: #0ea5e9;
	--primary-hover: #0284c7;
	--primary-light: #e0f2fe;
	--secondary-color: #0f172a;
	--text-main: #334155;
	--text-muted: #64748b;
	--bg-main: #f8fafc;
	--bg-card: #ffffff;
	--border-color: #e2e8f0;

	--success-color: #10b981;
	--success-light: #d1fae5;
	--warning-color: #f59e0b;
	--warning-light: #fef3c7;
	--danger-color: #ef4444;
	--danger-light: #fee2e2;
	--info-color: #3b82f6;
	--info-light: #dbeafe;

	--sidebar-width: 280px;
	--sidebar-collapsed-width: 80px;
	--topbar-height: 64px;

	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

	--radius-sm: 0.25rem;
	--radius-md: 0.375rem;
	--radius-lg: 0.5rem;
	--radius-xl: 0.75rem;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', sans-serif;
	background-color: var(--bg-main);
	color: var(--text-main);
	display: flex;
	height: 100vh;
	overflow: hidden;
}

/* Sidebar */
.sidebar {
	width: var(--sidebar-width);
	background-color: var(--secondary-color);
	color: white;
	display: flex;
	flex-direction: column;
	transition: width 0.3s ease;
	z-index: 100;
	box-shadow: var(--shadow-md);
}

.sidebar.collapsed {
	width: var(--sidebar-collapsed-width);
}

.sidebar-header {
	height: var(--topbar-height);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	overflow: hidden;
}

.logo-icon {
	font-size: 1.5rem;
	color: var(--primary-color);
	min-width: 24px;
}

.logo-text {
	display: flex;
	flex-direction: column;
	white-space: nowrap;
}

.logo-name {
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: -0.025em;
}

.logo-sub {
	font-size: 0.7rem;
	color: #94a3b8;
}

.sidebar-toggle {
	background: none;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: var(--radius-md);
	transition: all 0.2s;
}

.sidebar-toggle:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: white;
}

/* Role Selector */
.sidebar-role-selector {
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.role-label {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.role-dropdown {
	position: relative;
}

.role-dropdown-btn {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-md);
	color: white;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.2s;
}

.role-dropdown-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.role-dropdown-btn span {
	flex: 1;
	text-align: left;
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.role-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 0.5rem;
	background-color: #1e293b;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	display: none;
	z-index: 101;
	max-height: 250px;
	overflow-y: auto;
}

.role-dropdown-menu.show {
	display: block;
}

.role-option {
	padding: 0.625rem 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.875rem;
	cursor: pointer;
	color: #cbd5e1;
	transition: all 0.2s;
}

.role-option:hover {
	background-color: rgba(255, 255, 255, 0.05);
	color: white;
}

.role-option.active {
	color: var(--primary-color);
	background-color: rgba(14, 165, 233, 0.1);
}

/* Collapse behavior */
.sidebar.collapsed .sidebar-header {
	justify-content: center;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .role-label,
.sidebar.collapsed .role-dropdown-btn span,
.sidebar.collapsed .role-chevron,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-info {
	display: none;
}

.sidebar.collapsed .sidebar-toggle i {
	transform: rotate(180deg);
}

.sidebar.collapsed .role-dropdown-btn {
	justify-content: center;
}

/* Nav */
.sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 0;
}

.sidebar-nav::-webkit-scrollbar {
	width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

.nav-section-label {
	padding: 1rem 1.5rem 0.5rem;
	font-size: 0.7rem;
	text-transform: uppercase;
	color: #64748b;
	font-weight: 600;
	letter-spacing: 0.05em;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 1.5rem;
	color: #cbd5e1;
	text-decoration: none;
	font-size: 0.875rem;
	transition: all 0.2s;
	position: relative;
}

.nav-item i {
	width: 20px;
	text-align: center;
	font-size: 1rem;
	opacity: 0.7;
}

.nav-item:hover {
	background-color: rgba(255, 255, 255, 0.05);
	color: white;
}

.nav-item:hover i {
	opacity: 1;
}

.nav-item.active {
	background-color: rgba(14, 165, 233, 0.1);
	color: white;
	border-right: 3px solid var(--primary-color);
}

.nav-item.active i {
	color: var(--primary-color);
	opacity: 1;
}

.nav-badge {
	margin-left: auto;
	background-color: var(--primary-color);
	color: white;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
}

.nav-badge.warning {
	background-color: var(--warning-color);
	color: #fff;
}

/* Sidebar Footer */
.sidebar-footer {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 1rem;
}

.sidebar-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	margin-top: 0.5rem;
}

.user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: var(--primary-color);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.8rem;
	color: white;
	flex-shrink: 0;
}

.user-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.user-name {
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.user-role {
	font-size: 0.75rem;
	color: #94a3b8;
}

.user-menu-btn {
	background: none;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	padding: 0.25rem;
}

.user-menu-btn:hover {
	color: white;
}

/* Main Content */
.main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Topbar */
.topbar {
	height: var(--topbar-height);
	background-color: white;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.5rem;
}

.topbar-left,
.topbar-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.mobile-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.25rem;
	color: var(--text-main);
	cursor: pointer;
}

.search-box {
	display: flex;
	align-items: center;
	background-color: var(--bg-main);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 0.5rem 0.75rem;
	width: 300px;
	transition: all 0.2s;
}

.search-box:focus-within {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px var(--primary-light);
	width: 350px;
}

.search-box i {
	color: var(--text-muted);
}

.search-box input {
	border: none;
	background: none;
	outline: none;
	padding: 0 0.5rem;
	flex: 1;
	font-family: inherit;
	font-size: 0.875rem;
}

.search-box kbd {
	font-size: 0.7rem;
	font-family: inherit;
	background-color: white;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	padding: 0.1rem 0.3rem;
	color: var(--text-muted);
}

.topbar-date {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-muted);
	font-size: 0.875rem;
	font-weight: 500;
	padding-right: 1.5rem;
	border-right: 1px solid var(--border-color);
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	position: relative;
}

.topbar-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
}

.topbar-btn:hover {
	background-color: var(--bg-main);
	color: var(--primary-color);
}

#quickAddBtn {
	background-color: var(--primary-color);
	color: white;
}

#quickAddBtn:hover {
	background-color: var(--primary-hover);
}

.notification-dot {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	background-color: var(--danger-color);
	border-radius: 50%;
	border: 2px solid white;
}

/* Notification Panel */
.notification-panel {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 0.5rem;
	width: 380px;
	background: white;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	z-index: 100;
	display: none;
}

.notification-panel.show {
	display: flex;
	flex-direction: column;
}

.notif-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.notif-header h3 {
	font-size: 1rem;
	font-weight: 600;
}

.notif-mark-all {
	background: none;
	border: none;
	color: var(--primary-color);
	font-size: 0.75rem;
	cursor: pointer;
}

.notif-tabs {
	display: flex;
	padding: 0 1rem;
	border-bottom: 1px solid var(--border-color);
}

.notif-tab {
	background: none;
	border: none;
	padding: 0.75rem 0.5rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-right: 1rem;
}

.notif-tab.active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

.notif-list {
	max-height: 350px;
	overflow-y: auto;
}

.notif-item {
	display: flex;
	padding: 1rem;
	gap: 1rem;
	border-bottom: 1px solid var(--border-color);
	transition: background-color 0.2s;
	cursor: pointer;
}

.notif-item:hover {
	background-color: var(--bg-main);
}

.notif-item.unread {
	background-color: var(--primary-light);
}

.notif-item.unread:hover {
	background-color: #d0eafc;
}

.notif-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1rem;
}

.notif-icon.warning {
	background: var(--warning-light);
	color: var(--warning-color);
}

.notif-icon.success {
	background: var(--success-light);
	color: var(--success-color);
}

.notif-icon.danger {
	background: var(--danger-light);
	color: var(--danger-color);
}

.notif-icon.info {
	background: var(--info-light);
	color: var(--info-color);
}

.notif-content p {
	font-size: 0.875rem;
	line-height: 1.4;
	margin-bottom: 0.25rem;
}

.notif-time {
	font-size: 0.75rem;
	color: var(--text-muted);
}

.notif-footer {
	text-align: center;
	padding: 0.75rem;
	border-top: 1px solid var(--border-color);
}

.notif-footer a {
	color: var(--primary-color);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
}

/* Content Area */
.content-area {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
	position: relative;
}

.feedback-page-header {
	margin-bottom: 1.75rem;
}

.feedback-demo-grid {
	display: grid;
	grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 1fr);
	gap: 1.5rem;
	align-items: start;
}

.feedback-demo-hero {
	background: linear-gradient(145deg, #fff 0%, #f0f9ff 100%);
	border-color: #bae6fd;
}

.feedback-demo-hero-body {
	display: grid;
	gap: 1rem;
}

.feedback-demo-step {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1rem;
	border-radius: var(--radius-lg);
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(14, 165, 233, 0.15);
}

.feedback-demo-step span:first-child {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--primary-color);
	color: white;
	font-weight: 700;
	flex-shrink: 0;
}

.feedback-demo-step strong,
.feedback-field-card strong {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--secondary-color);
}

.feedback-demo-step p,
.feedback-field-card p,
.feedback-draft-copy,
.feedback-blueprint-list li,
.feedback-empty-state p,
.feedback-empty-thread p {
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-muted);
}

.feedback-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
}

.feedback-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

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

.feedback-field span,
.feedback-form label span,
.feedback-reply-form label span {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
	color: var(--text-muted);
}

.feedback-field input,
.feedback-field textarea,
.feedback-form input,
.feedback-form textarea,
.feedback-form select,
.feedback-reply-form textarea {
	width: 100%;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 0.85rem 1rem;
	font: inherit;
	color: var(--text-main);
	background: white;
	resize: vertical;
}

.feedback-field textarea,
.feedback-form textarea,
.feedback-reply-form textarea {
	min-height: 110px;
}

.feedback-field-card {
	padding: 1rem 1.1rem;
	border-radius: var(--radius-lg);
	background: #f8fafc;
	border: 1px solid var(--border-color);
}

.feedback-field-card ul {
	padding-left: 1.15rem;
	color: var(--text-muted);
	font-size: 0.875rem;
	line-height: 1.7;
}

.feedback-field-card.accent {
	background: #ecfeff;
	border-color: #a5f3fc;
}

.feedback-tab {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	padding: 1rem 0.8rem;
	border: none;
	border-radius: 20px 0 0 20px;
	background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
	color: white;
	box-shadow: var(--shadow-lg);
	cursor: pointer;
	z-index: 120;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.72rem;
	font-weight: 700;
}

.feedback-tab i {
	font-size: 1rem;
	transform: rotate(90deg);
}

.feedback-tab-badge {
	min-width: 24px;
	height: 24px;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: #f97316;
	color: white;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72rem;
	font-weight: 800;
	transform: rotate(180deg);
	writing-mode: initial;
}

.feedback-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: min(620px, calc(100vw - 2rem));
	height: 100vh;
	background: #fff;
	border-left: 1px solid var(--border-color);
	box-shadow: var(--shadow-lg);
	z-index: 140;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.28s ease;
}

.feedback-panel.show {
	transform: translateX(0);
}

.feedback-draft-modal {
	position: fixed;
	inset: 0;
	z-index: 190;
	display: grid;
	place-items: center;
	padding: 1.5rem;
}

.feedback-draft-modal[hidden] {
	display: none;
}

.feedback-draft-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
}

.feedback-draft-dialog {
	position: relative;
	z-index: 1;
	width: min(760px, calc(100vw - 2rem));
	max-height: calc(100vh - 3rem);
	overflow: auto;
	border-radius: 26px;
	box-shadow: 0 30px 80px -32px rgba(15, 23, 42, 0.55);
}

.feedback-panel-header {
	padding: 1.4rem 1.5rem 1.1rem;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: flex-start;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.feedback-panel-header h2 {
	font-size: 1.2rem;
	margin: 0.2rem 0;
	color: var(--secondary-color);
}

.feedback-panel-header p,
.feedback-section-head span,
.feedback-thread-meta span,
.feedback-list-meta span,
.feedback-message-meta span,
.feedback-thread-top p {
	font-size: 0.8125rem;
	color: var(--text-muted);
	line-height: 1.5;
}

.feedback-kicker {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--primary-hover);
}

.feedback-panel-actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.feedback-close {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--border-color);
	background: white;
	color: var(--text-muted);
	cursor: pointer;
}

.feedback-panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 1.15rem 1.5rem 1.75rem;
	display: grid;
	gap: 1rem;
}

.feedback-controls {
	padding: 1rem;
	border-radius: var(--radius-lg);
	background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
	border: 1px solid var(--border-color);
	display: grid;
	gap: 0.9rem;
}

.feedback-control-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.feedback-control-field {
	display: grid;
	gap: 0.4rem;
}

.feedback-control-field-wide {
	grid-column: span 1;
}

.feedback-control-field input,
.feedback-control-field select {
	width: 100%;
	min-height: 42px;
	padding: 0.7rem 0.8rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
	background: white;
	font: inherit;
	color: var(--text-main);
}

.feedback-controls-actions {
	display: flex;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.feedback-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.feedback-summary-card {
	padding: 0.95rem;
	border-radius: var(--radius-lg);
	background: #f8fafc;
	border: 1px solid var(--border-color);
	display: grid;
	gap: 0.3rem;
}

.feedback-summary-card span,
.feedback-summary-card small {
	color: var(--text-muted);
	font-size: 0.75rem;
	line-height: 1.4;
}

.feedback-summary-card strong {
	font-size: 1.4rem;
	color: var(--secondary-color);
}

.feedback-summary-card.accent {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.feedback-summary-card.success {
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.feedback-section-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.feedback-section-head h3,
.feedback-thread-title-row h3 {
	font-size: 1rem;
	color: var(--secondary-color);
}

.feedback-list {
	display: grid;
	gap: 0.75rem;
}

.feedback-list-item {
	width: 100%;
	text-align: left;
	display: grid;
	grid-template-columns: 36px 1fr;
	gap: 0.85rem;
	padding: 0.9rem;
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-color);
	background: white;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.feedback-list-item:hover,
.feedback-list-item.active {
	border-color: #7dd3fc;
	box-shadow: 0 12px 24px -20px rgba(14, 165, 233, 0.55);
	transform: translateY(-1px);
}

.feedback-list-pin,
.feedback-marker {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: white;
	border: none;
}

.feedback-list-pin.status-open,
.feedback-marker.status-open,
.feedback-status-pill.status-open {
	background: #f97316;
}

.feedback-list-pin.status-review,
.feedback-marker.status-review,
.feedback-status-pill.status-review {
	background: #0ea5e9;
}

.feedback-list-pin.status-resolved,
.feedback-marker.status-resolved,
.feedback-status-pill.status-resolved {
	background: #10b981;
}

.feedback-list-copy {
	display: grid;
	gap: 0.45rem;
}

.feedback-list-copy strong {
	font-size: 0.94rem;
	color: var(--secondary-color);
}

.feedback-list-head,
.feedback-thread-title-row,
.feedback-thread-top {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	align-items: flex-start;
}

.feedback-list-copy p,
.feedback-thread-top p,
.feedback-message p {
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-main);
}

.feedback-status-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	color: white;
	white-space: nowrap;
}

.feedback-thread-card,
.feedback-inbox,
.feedback-blueprint {
	padding: 1rem;
	border-radius: var(--radius-lg);
	background: white;
	border: 1px solid var(--border-color);
}

.feedback-thread-card {
	display: grid;
	gap: 1rem;
}

.feedback-thread-card.draft {
	background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
	border-color: #bae6fd;
}

.feedback-draft-card {
	padding: 1.35rem;
	gap: 1.1rem;
}

.feedback-draft-head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: flex-start;
}

.feedback-draft-head h3 {
	margin-top: 0.25rem;
	font-size: 1.35rem;
	color: var(--secondary-color);
}

.feedback-draft-head p {
	margin-top: 0.35rem;
	font-size: 0.85rem;
	color: var(--text-muted);
}

.feedback-thread-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.feedback-thread-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding-top: 0.25rem;
	border-top: 1px dashed var(--border-color);
}

.feedback-screenshot {
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--border-color);
	background: #f8fafc;
	min-height: 170px;
}

.feedback-screenshot img {
	display: block;
	width: 100%;
	height: auto;
}

.feedback-shot-placeholder,
.feedback-empty-state,
.feedback-empty-thread {
	min-height: 170px;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 1.25rem;
	gap: 0.5rem;
	color: var(--text-muted);
}

.feedback-shot-placeholder i,
.feedback-empty-state i,
.feedback-empty-thread i {
	font-size: 1.6rem;
	color: var(--primary-color);
}

.feedback-message-list {
	display: grid;
	gap: 0.75rem;
}

.feedback-message {
	padding: 0.85rem 0.95rem;
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-color);
	background: #fff;
}

.feedback-message.client {
	background: #f8fafc;
}

.feedback-message.delivery {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.feedback-message-meta {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
	flex-wrap: wrap;
}

.feedback-form,
.feedback-reply-form {
	display: grid;
	gap: 0.9rem;
}

.feedback-form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.feedback-form-actions {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.feedback-history-block {
	border-top: 1px dashed var(--border-color);
	padding-top: 0.9rem;
	display: grid;
	gap: 0.75rem;
}

.feedback-history-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.82rem;
	color: var(--text-muted);
}

.feedback-history-head strong {
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.feedback-history-head span {
	min-width: 24px;
	height: 24px;
	padding: 0 0.45rem;
	border-radius: 999px;
	background: #e2e8f0;
	color: var(--secondary-color);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.feedback-history-list {
	display: grid;
	gap: 0.6rem;
}

.feedback-history-item,
.feedback-empty-inline {
	padding: 0.8rem 0.9rem;
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-color);
	background: #f8fafc;
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	align-items: flex-start;
}

.feedback-history-item strong,
.feedback-empty-inline {
	font-size: 0.88rem;
	color: var(--secondary-color);
}

.feedback-history-item p {
	margin-top: 0.2rem;
	font-size: 0.8rem;
	line-height: 1.5;
	color: var(--text-muted);
}

.feedback-history-item span {
	white-space: nowrap;
	font-size: 0.78rem;
	color: var(--text-muted);
}

.feedback-blueprint-list {
	display: grid;
	gap: 0.7rem;
	padding-left: 1rem;
}

.feedback-layer {
	position: absolute;
	inset: 0 0 auto 0;
	pointer-events: none;
	z-index: 20;
	min-height: 100%;
}

.feedback-marker {
	position: absolute;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 16px 26px -12px rgba(15, 23, 42, 0.55);
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	font-size: 0.82rem;
}

.feedback-marker:hover {
	transform: translate(-50%, -50%) scale(1.08);
}

.feedback-marker.pulse {
	animation: feedbackPulse 1.2s ease;
}

.feedback-capture-hint {
	position: fixed;
	left: 50%;
	top: 1.25rem;
	transform: translateX(-50%) translateY(-140%);
	transition: transform 0.25s ease;
	z-index: 150;
	width: min(760px, calc(100vw - 2rem));
}

.feedback-capture-hint.show {
	transform: translateX(-50%) translateY(0);
}

.feedback-capture-hint-inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 1rem;
	border-radius: 18px;
	background: rgba(15, 23, 42, 0.94);
	color: white;
	box-shadow: var(--shadow-lg);
}

.feedback-capture-hint-inner i {
	font-size: 1.1rem;
	color: #7dd3fc;
}

.feedback-capture-hint-inner strong {
	display: block;
	margin-bottom: 0.2rem;
}

.feedback-capture-hint-inner p {
	font-size: 0.85rem;
	color: #cbd5e1;
	line-height: 1.5;
}

.feedback-toast {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	max-width: min(420px, calc(100vw - 2rem));
	padding: 0.9rem 1rem;
	border-radius: 18px;
	background: #ffffff;
	color: var(--secondary-color);
	font-size: 0.875rem;
	line-height: 1.5;
	border: 1px solid var(--border-color);
	box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.45);
	transform: translateY(140%);
	transition: transform 0.24s ease, opacity 0.24s ease;
	opacity: 0;
	z-index: 160;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.feedback-toast.show {
	transform: translateY(0);
	opacity: 1;
}

.feedback-toast i {
	margin-top: 0.05rem;
	font-size: 1rem;
	flex-shrink: 0;
}

.feedback-toast span {
	flex: 1;
}

.feedback-toast-info {
	border-color: #bae6fd;
	background: #f0f9ff;
}

.feedback-toast-info i {
	color: #0284c7;
}

.feedback-toast-success {
	border-color: #a7f3d0;
	background: #ecfdf5;
}

.feedback-toast-success i {
	color: #059669;
}

.feedback-toast-error {
	border-color: #fecaca;
	background: #fef2f2;
}

.feedback-toast-error i {
	color: #dc2626;
}

body.feedback-capture-mode .content-area {
	cursor: crosshair;
}

body.feedback-draft-open {
	overflow: hidden;
}

body.feedback-capture-mode .content-area>*:not(.feedback-layer) {
	-webkit-user-select: none;
	user-select: none;
}

@keyframes feedbackPulse {
	0% {
		box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5);
	}

	70% {
		box-shadow: 0 0 0 16px rgba(14, 165, 233, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
	}
}

@media (max-width: 1180px) {

	.feedback-demo-grid,
	.feedback-summary {
		grid-template-columns: 1fr;
	}

	.feedback-panel {
		width: min(100vw, 520px);
	}
}

@media (max-width: 860px) {

	.feedback-form-grid,
	.feedback-control-grid,
	.feedback-form-row {
		grid-template-columns: 1fr;
	}

	.feedback-thread-top,
	.feedback-draft-head,
	.feedback-list-head,
	.feedback-history-item,
	.feedback-message-meta,
	.feedback-section-head,
	.feedback-form-actions,
	.feedback-controls-actions,
	.feedback-panel-header,
	.feedback-capture-hint-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.topbar-date,
	.search-box kbd {
		display: none;
	}

	.feedback-tab {
		top: auto;
		bottom: 1rem;
		right: 1rem;
		transform: none;
		writing-mode: initial;
		text-orientation: mixed;
		padding: 0.9rem 1rem;
		border-radius: 999px;
		letter-spacing: normal;
		text-transform: none;
	}

	.feedback-tab i,
	.feedback-tab-badge {
		transform: none;
	}

	.feedback-panel {
		width: 100vw;
	}

	.feedback-draft-modal {
		padding: 0.75rem;
	}

	.feedback-draft-dialog {
		width: min(100vw, 100%);
		max-height: calc(100vh - 1.5rem);
	}
}

/* Dashboard Grid System */
.dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 1.5rem;
}

.dashboard-title h1 {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--secondary-color);
	margin-bottom: 0.25rem;
}

.dashboard-title p {
	color: var(--text-muted);
	font-size: 0.875rem;
}

.dashboard-actions {
	display: flex;
	gap: 0.75rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s;
	font-family: inherit;
}

.btn-primary {
	background-color: var(--primary-color);
	color: white;
}

.btn-primary:hover {
	background-color: var(--primary-hover);
}

.btn-outline {
	background-color: white;
	border-color: var(--border-color);
	color: var(--text-main);
}

.btn-outline:hover {
	background-color: var(--bg-main);
	border-color: #cbd5e1;
}

/* Stat Cards */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.stat-card {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	box-shadow: var(--shadow-sm);
}

.stat-info h3 {
	font-size: 0.875rem;
	color: var(--text-muted);
	font-weight: 500;
	margin-bottom: 0.5rem;
}

.stat-value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--secondary-color);
	margin-bottom: 0.5rem;
}

.stat-trend {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.75rem;
	font-weight: 500;
}

.stat-trend.positive {
	color: var(--success-color);
}

.stat-trend.negative {
	color: var(--danger-color);
}

.stat-trend.neutral {
	color: var(--text-muted);
}

.stat-icon {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
}

.stat-icon.blue {
	background: var(--info-light);
	color: var(--info-color);
}

.stat-icon.green {
	background: var(--success-light);
	color: var(--success-color);
}

.stat-icon.orange {
	background: var(--warning-light);
	color: var(--warning-color);
}

.stat-icon.purple {
	background: #f3e8ff;
	color: #a855f7;
}

/* Dashboard Grids */
.dashboard-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.dashboard-grid.equal {
	grid-template-columns: 1fr 1fr;
}

.dashboard-grid.triple {
	grid-template-columns: repeat(3, 1fr);
}

/* Cards / Panels */
.panel {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
}

.panel-header {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.panel-header h2 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--secondary-color);
}

.panel-action {
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 0.875rem;
	cursor: pointer;
	text-decoration: none;
}

.panel-action:hover {
	color: var(--primary-color);
}

.panel-body {
	padding: 1.25rem;
	flex: 1;
}

/* Tables */
.table-container {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th {
	text-align: left;
	padding: 0.75rem 1rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border-color);
	font-weight: 600;
}

td {
	padding: 1rem;
	border-bottom: 1px solid var(--border-color);
	font-size: 0.875rem;
	vertical-align: middle;
}

tr:last-child td {
	border-bottom: none;
}

tr:hover td {
	background-color: var(--bg-main);
}

.text-right {
	text-align: right;
}

/* Badges / Status */
.status-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.625rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 500;
}

.status-badge.success {
	background: var(--success-light);
	color: var(--success-color);
}

.status-badge.warning {
	background: var(--warning-light);
	color: var(--warning-color);
}

.status-badge.danger {
	background: var(--danger-light);
	color: var(--danger-color);
}

.status-badge.info {
	background: var(--info-light);
	color: var(--info-color);
}

.status-badge.neutral {
	background: var(--bg-main);
	color: var(--text-muted);
	border: 1px solid var(--border-color);
}

/* Lists */
.list-group {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.list-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.list-item-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--radius-md);
	background: var(--bg-main);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
	flex-shrink: 0;
}

.list-item-content {
	flex: 1;
}

.list-item-title {
	font-weight: 500;
	font-size: 0.875rem;
	margin-bottom: 0.25rem;
	display: flex;
	justify-content: space-between;
}

.list-item-desc {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

/* Quick Add Modal */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(15, 23, 42, 0.5);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s;
}

.modal-overlay.show {
	opacity: 1;
	visibility: visible;
}

.modal {
	background: white;
	border-radius: var(--radius-xl);
	width: 100%;
	max-width: 600px;
	box-shadow: var(--shadow-lg);
	transform: translateY(20px);
	transition: all 0.3s;
}

.modal-overlay.show .modal {
	transform: translateY(0);
}

.modal-header {
	padding: 1.5rem;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h2 {
	font-size: 1.25rem;
	font-weight: 600;
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.25rem;
	color: var(--text-muted);
	cursor: pointer;
	padding: 0.25rem;
}

.modal-close:hover {
	color: var(--danger-color);
}

.quick-add-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	padding: 2rem;
}

.quick-add-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	background: none;
	border: none;
	cursor: pointer;
	padding: 1rem;
	border-radius: var(--radius-lg);
	transition: all 0.2s;
}

.quick-add-item i {
	font-size: 2rem;
	color: var(--primary-color);
	padding: 1rem;
	background-color: var(--primary-light);
	border-radius: var(--radius-md);
	transition: all 0.2s;
}

.quick-add-item span {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-main);
}

.quick-add-item:hover {
	background-color: var(--bg-main);
}

.quick-add-item:hover i {
	background-color: var(--primary-color);
	color: white;
	transform: scale(1.05);
}

/* Utilities */
.text-danger {
	color: var(--danger-color);
}

.text-success {
	color: var(--success-color);
}

.text-warning {
	color: var(--warning-color);
}

.text-info {
	color: var(--info-color);
}

.avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--bg-main);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.75rem;
	color: var(--primary-color);
	border: 1px solid var(--border-color);
}

/* Checkbox/Progress */
.progress-bar {
	width: 100%;
	height: 6px;
	background-color: var(--bg-main);
	border-radius: 3px;
	overflow: hidden;
	margin-top: 0.5rem;
}

.progress-value {
	height: 100%;
	background-color: var(--primary-color);
	border-radius: 3px;
}

/* Responsiveness */
@media (max-width: 1024px) {
	.dashboard-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-grid.equal,
	.dashboard-grid.triple {
		grid-template-columns: 1fr;
	}

	.quick-add-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.sidebar {
		position: fixed;
		left: -100%;
		height: 100vh;
	}

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

	.mobile-toggle {
		display: block;
	}

	.search-box {
		width: 200px;
	}

	.topbar-date {
		display: none;
	}
}

@media (max-width: 480px) {
	.search-box {
		display: none;
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}
}

/* ====== NOWE STYLE ZAAWANSOWANE DLA DASHBOARDÓW ====== */
.col-span-2 {
	grid-column: span 2;
}

.col-span-3 {
	grid-column: span 3;
}

/* Oś czasu (Timeline) dla ostatnich modyfikacji */
.timeline {
	position: relative;
	padding-left: 1.5rem;
	margin-top: 0.5rem;
}

.timeline::before {
	content: '';
	position: absolute;
	left: 0.4rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--border-color);
}

.timeline-item {
	position: relative;
	padding-bottom: 1.5rem;
}

.timeline-item::before {
	content: '';
	position: absolute;
	left: -1.35rem;
	top: 0.2rem;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--primary-color);
	border: 2px solid white;
	z-index: 1;
}

.timeline-item.warning::before {
	background: var(--warning-color);
}

.timeline-item.success::before {
	background: var(--success-color);
}

.timeline-item.danger::before {
	background: var(--danger-color);
}

.timeline-time {
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-bottom: 0.2rem;
}

/* Animowany pulsujący wskaźnik (Alert) */
.pulse-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 5px;
	background: var(--danger-color);
	box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
	animation: pulse 1.5s infinite;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
	}

	70% {
		box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
	}
}

/* Kalendarz Startowy / Widget */
.calendar-widget {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem;
	align-items: center;
	padding: 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	margin-bottom: 0.5rem;
	background: var(--bg-light);
}

.calendar-date {
	text-align: center;
	background: white;
	border-radius: var(--radius-sm);
	padding: 0.5rem;
	min-width: 60px;
	border-left: 3px solid var(--primary-color);
	box-shadow: var(--shadow-sm);
}

.calendar-date .day {
	display: block;
	font-size: 0.75rem;
	color: var(--text-muted);
	text-transform: uppercase;
	font-weight: 600;
}

.calendar-date .num {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-dark);
}

.calendar-details h4 {
	margin: 0 0 0.2rem 0;
	font-size: 0.9rem;
}

.calendar-details p {
	margin: 0;
	font-size: 0.8rem;
	color: var(--text-muted);
}

/* Prosty Kanban / Lejek */
.kanban-board {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 1rem;
}

.kanban-col {
	flex: 1;
	min-width: 250px;
	background: var(--bg-light);
	border-radius: var(--radius-lg);
	padding: 1rem;
}

.kanban-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	font-weight: 600;
}

.kanban-card {
	background: white;
	padding: 1rem;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	margin-bottom: 0.75rem;
	border-left: 3px solid var(--primary-color);
}

.kanban-card h4 {
	margin: 0 0 0.5rem 0;
	font-size: 0.9rem;
}

.kanban-card .meta {
	font-size: 0.75rem;
	color: var(--text-muted);
	display: flex;
	justify-content: space-between;
}

/* ============================================================
   NEW VIEW COMPONENTS — Mockup styles
   ============================================================ */

/* --- Data Table (alias for table-container style) --- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 0.75rem 1rem; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-color); font-weight: 600; }
.data-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); font-size: 0.875rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-main); }
.data-table code { font-family: monospace; font-size: 0.82rem; background: var(--bg-main); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* --- Avatar / Name Cell --- */
.avatar-sm { width: 32px; height: 32px; min-width: 32px; border-radius: 50%; background: var(--primary-light); color: var(--primary-color); font-weight: 700; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; }
.client-name-cell { display: flex; align-items: center; gap: 0.75rem; }
.client-name-cell strong { display: block; font-size: 0.88rem; }
.client-name-cell small { color: var(--text-muted); font-size: 0.78rem; }

/* --- Type / Segment Pills --- */
.type-pill { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; background: var(--bg-main); color: var(--text-muted); border: 1px solid var(--border-color); white-space: nowrap; }
.trips-badge { display: inline-block; background: var(--primary-light); color: var(--primary-color); border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.75rem; font-weight: 600; }
.pill-sm { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.72rem; background: var(--bg-main); border: 1px solid var(--border-color); }
.segment-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.segment-tag { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid var(--border-color); }

/* --- Inline Select --- */
.inline-select { padding: 0.3rem 0.5rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.82rem; background: var(--bg-card); cursor: pointer; }

/* --- Dashboard Grid Variants --- */
.dashboard-grid-3-1 { display: grid; grid-template-columns: 3fr 1fr; gap: 1.5rem; }

/* --- Pipeline / Funnel --- */
.pipeline-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; flex-wrap: wrap; }
.pipeline-stage { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 1.25rem; background: var(--bg-main); border-radius: 10px; border: 1px solid var(--border-color); flex: 1; min-width: 120px; }
.pipeline-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.pipeline-info { display: flex; flex-direction: column; }
.pipeline-label { font-size: 0.8rem; color: var(--text-muted); }
.pipeline-count { font-weight: 700; font-size: 1.05rem; }
.pipeline-arrow { color: var(--text-muted); font-size: 1rem; padding: 0 0.25rem; }
.pipeline-blue { background: var(--primary-light); color: var(--primary-color); }
.pipeline-purple { background: #ede9fe; color: #7c3aed; }
.pipeline-orange { background: var(--warning-light); color: var(--warning-color); }
.pipeline-success { background: var(--success-light); color: var(--success-color); }
.pipeline-red { background: var(--danger-light); color: var(--danger-color); }

/* --- Group / Trip Cards --- */
.group-code-cell strong { display: block; font-size: 0.85rem; }
.group-code-cell small { color: var(--text-muted); font-size: 0.75rem; }
.pax-cell { text-align: center; font-weight: 600; }
.mini-progress { height: 6px; border-radius: 3px; background: var(--border-color); margin-top: 4px; overflow: hidden; }
.mini-progress-fill { height: 100%; background: var(--primary-color); border-radius: 3px; }
.big-progress { height: 10px; border-radius: 5px; background: var(--border-color); overflow: hidden; margin: 0.4rem 0; }
.big-progress-fill { height: 100%; border-radius: 5px; background: var(--primary-color); }

.group-card-detail { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; margin-top: 1.5rem; }
.group-card-hero { background: linear-gradient(135deg, var(--primary-color), #3b82f6); color: white; padding: 1.5rem; position: relative; }
.group-card-hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.group-card-code { font-size: 0.8rem; opacity: 0.8; letter-spacing: 0.05em; }
.group-card-title { font-size: 1.3rem; font-weight: 700; margin: 0.25rem 0 0.5rem; }
.group-card-meta { font-size: 0.85rem; opacity: 0.85; display: flex; gap: 1.25rem; }
.group-card-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-color); }
.group-tab { padding: 0.75rem 1.25rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 0.5rem; }
.group-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.tab-badge { background: var(--danger-color); color: white; border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.7rem; font-weight: 700; }
.group-card-body { padding: 1.5rem; }
.group-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.group-info-col { display: flex; flex-direction: column; gap: 0.75rem; }
.group-status-col { display: flex; flex-direction: column; gap: 0.75rem; }
.group-status-cards { display: grid; gap: 0.75rem; }

/* --- Alert List --- */
.alert-list { display: flex; flex-direction: column; gap: 0.5rem; }
.alert-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; background: var(--warning-light); border-radius: 8px; font-size: 0.85rem; }
.alert-item.danger { background: var(--danger-light); color: var(--danger-color); }
.alert-days { font-weight: 700; font-size: 1.2rem; min-width: 2rem; text-align: center; }
.alert-banner { background: var(--danger-light); color: var(--danger-color); padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.88rem; display: flex; align-items: center; gap: 0.75rem; border-left: 4px solid var(--danger-color); }

/* --- Info Table (key-value) --- */
.info-table { width: 100%; }
.info-table td, .info-row { padding: 0.45rem 0; font-size: 0.875rem; }
.info-table td:first-child { color: var(--text-muted); width: 45%; }
.info-row { display: flex; gap: 0.75rem; }
.info-row span { color: var(--text-muted); min-width: 140px; font-size: 0.82rem; }

/* --- Form Mockup --- */
.form-mockup { display: flex; flex-direction: column; gap: 1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-field span { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); }
.form-field input, .form-field select, .form-field textarea { padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.88rem; background: var(--bg-card); width: 100%; box-sizing: border-box; font-family: inherit; }
.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 0.5rem; }

/* --- Room / Booking --- */
.room-list { display: flex; flex-direction: column; gap: 0.5rem; }
.room-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }
.room-row:last-child { border-bottom: none; }
.room-badge { background: var(--primary-light); color: var(--primary-color); padding: 0.2rem 0.5rem; border-radius: 6px; font-size: 0.78rem; font-weight: 600; }
.room-pill { background: var(--bg-main); border: 1px solid var(--border-color); padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.75rem; margin-left: 0.35rem; }

/* --- Document / Notes --- */
.doc-path-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.doc-path-item { font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.req-doc-list { display: flex; flex-direction: column; gap: 0.4rem; }
.req-doc { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border-color); }
.req-count { font-weight: 600; color: var(--warning-color); }
.notes-list { display: flex; flex-direction: column; gap: 0.75rem; }
.note-item { background: var(--bg-main); border-radius: 8px; padding: 0.75rem; font-size: 0.85rem; border-left: 3px solid var(--primary-color); }
.note-group { color: var(--text-muted); font-size: 0.75rem; margin-bottom: 0.25rem; }

/* --- Urgent row --- */
.urgent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger-color); display: inline-block; }
.row-urgent td { background: #fff5f5 !important; }
.row-urgent:hover td { background: #ffecec !important; }

/* --- Teczka Pilota --- */
.teczka-sections { display: flex; flex-direction: column; gap: 0.5rem; }
.teczka-section { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.9rem; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.875rem; }
.teczka-preview { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
.teczka-header-block { background: linear-gradient(135deg, var(--primary-color), #3b82f6); color: white; padding: 2rem; text-align: center; }
.teczka-logo-placeholder { width: 72px; height: 72px; margin: 0 auto 1rem; background: rgba(255,255,255,0.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.teczka-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem; }
.teczka-alert { background: var(--warning-light); color: var(--warning-color); padding: 0.75rem 1rem; margin: 1rem 1.5rem; border-radius: 8px; font-size: 0.85rem; }
.version-list { display: flex; flex-direction: column; gap: 0.5rem; }
.version-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }
.version-row:last-child { border-bottom: none; }
.version-badge { padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.75rem; background: var(--primary-light); color: var(--primary-color); font-weight: 600; }

/* --- Pack Summary --- */
.pack-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1rem 0; }
.pack-summary-item { text-align: center; padding: 1rem; background: var(--bg-main); border-radius: 10px; border: 1px solid var(--border-color); }
.pack-summary-item strong { display: block; font-size: 1.6rem; font-weight: 700; color: var(--primary-color); }
.pack-summary-item small { font-size: 0.78rem; color: var(--text-muted); }

/* === EMAIL / POCZTA === */
.email-list { display: flex; flex-direction: column; }
.email-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background 0.15s; }
.email-row:hover { background: var(--bg-main); }
.email-row.unread { background: #f0f6ff; }
.email-avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary-color); font-weight: 700; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; }
.email-meta { flex: 1; min-width: 0; }
.email-from { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.email-subject { font-size: 0.9rem; margin-bottom: 0.15rem; }
.email-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; min-width: 80px; }
.email-tag { background: var(--primary-light); color: var(--primary-color); padding: 0.1rem 0.45rem; border-radius: 6px; font-size: 0.7rem; font-weight: 500; }
.email-time { font-size: 0.75rem; color: var(--text-muted); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); }

.mail-folder-list { display: flex; flex-direction: column; gap: 0.15rem; }
.mail-folder { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.75rem; border-radius: 6px; font-size: 0.875rem; cursor: pointer; color: var(--text-muted); transition: background 0.15s; }
.mail-folder:hover { background: var(--bg-main); }
.mail-folder.active { background: var(--primary-light); color: var(--primary-color); font-weight: 600; }
.mail-folder i { width: 16px; text-align: center; }
.folder-badge { margin-left: auto; background: var(--primary-color); color: white; border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.7rem; font-weight: 700; }
.folder-badge.warn { background: var(--warning-color); }

/* === SMS === */
.sms-history { display: flex; flex-direction: column; gap: 0.75rem; }
.sms-history-item { border: 1px solid var(--border-color); border-radius: 8px; padding: 0.85rem 1rem; font-size: 0.875rem; }
.sms-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }
.sms-time { font-size: 0.75rem; color: var(--text-muted); }
.sms-recipient { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.4rem; }
.sms-preview { font-size: 0.85rem; }

/* === INTERNAL CHAT === */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 0; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; height: 520px; }
.chat-sidebar { border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
.chat-search { padding: 0.75rem; border-bottom: 1px solid var(--border-color); }
.chat-search input { width: 100%; padding: 0.45rem 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.85rem; background: var(--bg-main); box-sizing: border-box; }
.chat-list { flex: 1; overflow-y: auto; }
.chat-thread { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.85rem 0.9rem; cursor: pointer; border-bottom: 1px solid var(--border-color); transition: background 0.15s; }
.chat-thread:hover { background: var(--bg-main); }
.chat-thread.active { background: var(--primary-light); }
.chat-thread-info { flex: 1; min-width: 0; }
.chat-thread-info strong { font-size: 0.85rem; display: block; }
.chat-thread-info p { font-size: 0.78rem; color: var(--text-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; font-size: 0.72rem; color: var(--text-muted); }
.chat-badge { background: var(--primary-color); color: white; border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.7rem; font-weight: 700; }

.chat-main { display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; }
.chat-msg { display: flex; }
.chat-msg.me { justify-content: flex-end; }
.chat-msg-bubble { max-width: 70%; padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.875rem; line-height: 1.5; position: relative; }
.chat-msg.other .chat-msg-bubble { background: var(--bg-main); border-radius: 4px 12px 12px 12px; }
.chat-msg.me .chat-msg-bubble { background: var(--primary-color); color: white; border-radius: 12px 4px 12px 12px; }
.chat-msg-bubble p { margin: 0 0 0.25rem; }
.msg-time { font-size: 0.7rem; opacity: 0.65; }
.chat-input-area { display: flex; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--border-color); }
.chat-input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.88rem; background: var(--bg-main); }

/* === CALENDAR === */
.calendar-timeline { display: flex; flex-direction: column; gap: 0; }
.cal-event-row { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border-color); }
.cal-event-row:last-child { border-bottom: none; }
.cal-date-col { min-width: 52px; text-align: center; }
.cal-day { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }
.cal-num { display: block; font-weight: 700; font-size: 1rem; }
.cal-event-dot { width: 10px; height: 10px; min-width: 10px; border-radius: 50%; }
.cal-event-dot.tone-blue { background: var(--primary-color); }
.cal-event-dot.tone-orange { background: var(--warning-color); }
.cal-event-dot.tone-red { background: var(--danger-color); }
.cal-event-dot.tone-purple { background: #7c3aed; }
.cal-event-dot.tone-green { background: var(--success-color); }
.cal-event-info { flex: 1; }
.cal-event-label { display: block; font-size: 0.88rem; font-weight: 500; }
.cal-event-time { display: block; font-size: 0.78rem; color: var(--text-muted); }
.cal-legend { display: flex; flex-direction: column; gap: 0.5rem; }
.cal-legend-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; }
.cal-upcoming { display: flex; flex-direction: column; gap: 0.75rem; }
.cal-upcoming-item { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.85rem; }
.cal-upcoming-item.urgent { color: var(--danger-color); }
.cal-upcoming-item i { margin-top: 2px; }
.cal-upcoming-item div strong { display: block; }
.cal-upcoming-item div p { margin: 0; font-size: 0.78rem; color: var(--text-muted); }
.cal-upcoming-item.urgent div p { color: var(--danger-color); opacity: 0.8; }

/* === SOCIAL MEDIA === */
.social-post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.social-post-card { border: 1px solid var(--border-color); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; background: var(--bg-card); }
.social-post-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.social-post-body { font-size: 0.88rem; flex: 1; }
.social-post-img-placeholder { background: var(--bg-main); border: 1px dashed var(--border-color); border-radius: 8px; padding: 0.6rem; font-size: 0.78rem; color: var(--text-muted); text-align: center; }
.social-post-actions { display: flex; gap: 0.5rem; }

/* === REPORTS === */
.report-channel-list { display: flex; flex-direction: column; gap: 0.65rem; }
.report-channel-row { display: flex; align-items: center; gap: 0.75rem; }
.report-channel-label { min-width: 200px; font-size: 0.85rem; }
.report-channel-bar-wrap { flex: 1; height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; }
.report-channel-bar { height: 100%; background: var(--primary-color); border-radius: 4px; }
.report-channel-val { min-width: 80px; font-size: 0.82rem; font-weight: 600; }

.chart-placeholder { padding: 1rem 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 220px; padding: 0 1rem; border-bottom: 2px solid var(--border-color); }
.chart-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 0.3rem; }
.chart-bar { width: 100%; background: var(--primary-color); border-radius: 4px 4px 0 0; opacity: 0.8; transition: opacity 0.2s; }
.chart-bar:hover { opacity: 1; }
.chart-bar-label { font-size: 0.72rem; color: var(--text-muted); }
.chart-note { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.75rem; font-style: italic; }

/* === SETTINGS === */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.setting-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.setting-card-header { display: flex; align-items: center; gap: 0.85rem; padding: 1.25rem; border-bottom: 1px solid var(--border-color); background: var(--bg-main); }
.setting-card-header strong { font-size: 1rem; }
.setting-card-body { padding: 1.25rem; }


/* ============================================================
   MISSING UTILITY CLASSES — patch
   ============================================================ */

/* btn-ghost */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    background: var(--bg-main);
    color: var(--text-main);
}

/* btn-danger */
.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}
.btn-danger:hover {
    background-color: #dc2626;
}

/* status badge extra tones */
.status-badge.blue {
    background: var(--info-light);
    color: var(--info-color);
}
.status-badge.purple {
    background: #ede9fe;
    color: #7c3aed;
}
.status-badge.orange {
    background: var(--warning-light);
    color: #92400e;
}
.status-badge.red {
    background: var(--danger-light);
    color: var(--danger-color);
}
.status-badge.green {
    background: var(--success-light);
    color: var(--success-color);
}

/* selected table row */
tr.selected-row td {
    background: var(--primary-light) !important;
}

/* dashboard-grid fallback for single child */
.dashboard-grid > .panel { min-width: 0; }

/* ============================================================
   DEMO INTERACTION SYSTEM — toast & modal styles
   ============================================================ */

/* Demo action toast (distinct from feedback toast) */
.demo-action-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.demo-action-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.demo-action-toast.type-success { border-left: 4px solid var(--success-color); }
.demo-action-toast.type-info    { border-left: 4px solid var(--info-color); }
.demo-action-toast.type-warning { border-left: 4px solid var(--warning-color); }
.demo-action-toast.type-error   { border-left: 4px solid var(--danger-color); }
.demo-action-toast .dat-icon { font-size: 1rem; }
.demo-action-toast.type-success .dat-icon { color: var(--success-color); }
.demo-action-toast.type-info    .dat-icon { color: #60a5fa; }
.demo-action-toast.type-warning .dat-icon { color: var(--warning-color); }
.demo-action-toast.type-error   .dat-icon { color: var(--danger-color); }

/* Demo modal */
.demo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.demo-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.demo-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.2s;
}
.demo-modal-overlay.show .demo-modal {
    transform: scale(1);
}
.demo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.demo-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.demo-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
}
.demo-modal-close:hover { background: var(--bg-main); color: var(--text-main); }
.demo-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.demo-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-main);
}
/* spinner for loading demo */
.demo-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 1rem 0;
}
.demo-loading::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* email row open state */
.email-row.open { background: #f0f9ff; }

/* row hover hint */
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:active td { background: var(--primary-light) !important; }

/* ============================================================
   PATCH 2 — Missing CSS classes discovered in second audit
   ============================================================ */

/* --- group-stat-big (grupy.js) --- */
.group-stat-big {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.group-stat-big strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.2rem 0;
}
.group-stat-big small { font-size: 0.75rem; }
.group-stat-big .big-progress > div { height: 100%; border-radius: 5px; background: var(--primary-color); }
.group-stat-big.accent-green { border-left: 4px solid var(--success-color); }
.group-stat-big.accent-green strong { color: var(--success-color); }
.group-stat-big.accent-green .big-progress > div { background: var(--success-color); }
.group-stat-big.accent-orange { border-left: 4px solid var(--warning-color); }
.group-stat-big.accent-orange strong { color: var(--warning-color); }
.group-stat-big.accent-orange .big-progress > div { background: var(--warning-color); }

/* --- group-name in table (grupy.js) --- */
.group-code-cell .group-name {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* --- doc-path-icon variants (finanse.js) --- */
.doc-path-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.doc-path-icon.online  { background: #dbeafe; color: var(--primary-color); }
.doc-path-icon.scan    { background: #ede9fe; color: #7c3aed; }
.doc-path-icon.paper   { background: #d1fae5; color: var(--success-color); }

/* doc-path-item full layout */
.doc-path-list { display: flex; flex-direction: column; gap: 0.65rem; }
.doc-path-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.65rem 0.75rem; border-radius: 8px; border: 1px solid var(--border-color); font-size: 0.85rem; transition: background 0.15s; }
.doc-path-item.active { border-color: var(--primary-color); background: #f0f9ff; }
.doc-path-item strong { display: block; font-size: 0.88rem; }
.doc-path-item p { margin: 0.15rem 0 0; color: var(--text-muted); font-size: 0.78rem; }

/* --- req-count variants (finanse.js) --- */
.req-count { font-weight: 600; font-size: 0.82rem; padding: 0.1rem 0.4rem; border-radius: 6px; }
.req-count.ok   { background: var(--success-light); color: var(--success-color); }
.req-count.warn { background: var(--warning-light); color: var(--warning-color); }

/* --- teczka-section active (logistyka.js) --- */
.teczka-section.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* --- alert-item extra variants (grupy.js) --- */
.alert-item.info    { background: #dbeafe; color: var(--primary-color); }
.alert-item.warning { background: var(--warning-light); color: var(--warning-color); }

/* --- room-row variants (rezerwacje.js) --- */
.room-row.warning { background: var(--warning-light); border-radius: 6px; }
.room-row.empty   { opacity: 0.5; font-style: italic; }
.room-badge.warn  { background: var(--warning-light); color: var(--warning-color); }
.room-badge.empty { background: var(--border-color); color: var(--text-muted); }

/* --- version-badge old variant (logistyka.js) --- */
.version-badge.old { background: var(--bg-main); color: var(--text-muted); border: 1px solid var(--border-color); }

/* --- pack-summary inline (logistyka.js) --- */
.pack-summary span { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; }

/* --- segment-tag active (crm.js) --- */
.segment-tag.active { background: var(--primary-color); color: white; border-color: var(--primary-color); font-weight: 600; }

/* --- pipeline-icon (zapytania.js) --- */
.pipeline-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.pipeline-label { font-size: 0.78rem; color: var(--text-muted); }
.pipeline-count { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.pipeline-info  { display: flex; flex-direction: column; gap: 0.1rem; }

/* --- form-field label wrapper (rezerwacje.js) --- */
label.form-field { display: flex; flex-direction: column; gap: 0.35rem; }

/* --- chat-thread group highlight --- */
.chat-thread.group .avatar-sm { font-size: 0.75rem; }

/* --- mail folder active --- */
.mail-folder-list { display: flex; flex-direction: column; gap: 0.25rem; }
.mail-folder { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.75rem; border-radius: 8px; font-size: 0.875rem; cursor: pointer; color: var(--text-muted); }
.mail-folder:hover { background: var(--bg-main); color: var(--text-main); }
.mail-folder.active { background: var(--primary-light); color: var(--primary-color); font-weight: 600; }

/* --- email-list + email-row (komunikacja.js) --- */
.email-list { display: flex; flex-direction: column; }
.email-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background 0.15s; }
.email-row:last-child { border-bottom: none; }
.email-row:hover { background: var(--bg-main); }
.email-row.unread { border-left: 3px solid var(--primary-color); }
.email-row.open { background: #f0f9ff; }
.email-avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary-color); font-weight: 700; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; }
.email-meta { flex: 1; min-width: 0; }
.email-from { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 2px; }
.email-subject { font-size: 0.88rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; }
.email-time { font-size: 0.75rem; color: var(--text-muted); }
.email-tag { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 4px; background: var(--primary-light); color: var(--primary-color); font-weight: 600; }

/* --- chat thread items --- */
.chat-thread { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border-color); transition: background 0.15s; }
.chat-thread:hover { background: var(--bg-main); }
.chat-thread.active { background: var(--primary-light); }
.chat-thread-info { flex: 1; min-width: 0; }
.chat-thread-info strong { display: block; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-info p { margin: 0; font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; font-size: 0.72rem; color: var(--text-muted); }
.chat-badge { background: var(--primary-color); color: white; border-radius: 999px; padding: 0.05rem 0.4rem; font-size: 0.7rem; font-weight: 700; }
.chat-search { padding: 0.65rem; border-bottom: 1px solid var(--border-color); }
.chat-search input { width: 100%; padding: 0.4rem 0.65rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.82rem; background: var(--bg-main); }
.msg-time { font-size: 0.7rem; opacity: 0.65; display: block; margin-top: 0.25rem; }

/* --- notif-tabs / segment tabs --- */
.notif-tab { padding: 0.5rem 1rem; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.notif-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.notif-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 0.75rem; }

/* --- dashboard-grid-3-1 --- */
.dashboard-grid-3-1 { grid-template-columns: 3fr 1fr; }
@media (max-width: 1024px) { .dashboard-grid-3-1 { grid-template-columns: 1fr; } }

/* --- tab-badge --- */
.tab-badge { background: var(--primary-color); color: white; border-radius: 999px; padding: 0.05rem 0.4rem; font-size: 0.68rem; font-weight: 700; }

/* --- group-card-tabs background --- */
.group-card-tabs { background: white; }
.group-card-tabs .group-tab { background: none; border: none; border-bottom: 2px solid transparent; }

/* --- accent-days (alert) --- */
.alert-days { font-size: 0.78rem; font-weight: 600; paddiing: 0.15rem 0.4rem; }

/* --- inline-select (shared) --- */
.inline-select { padding: 0.35rem 0.65rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.82rem; background: var(--bg-card); color: var(--text-main); }


/* ===================================================
   CSS PATCH 3 — layout fixes + kalkulator + misc
   =================================================== */

/* req-doc — fix icon + text + badge spacing */
.req-doc { gap: 0.75rem; justify-content: flex-start; }
.req-doc > div { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.req-doc > div strong { font-size: 0.85rem; }
.req-doc > div small { color: var(--text-muted); font-size: 0.75rem; }
.req-doc > i { width: 20px; flex-shrink: 0; text-align: center; }

/* teczka logo — rectangular accent banner */
.teczka-logo-placeholder {
  width: auto; height: auto; border-radius: 8px;
  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em;
  padding: 0.45rem 1.1rem; margin: 0 auto 1rem;
  border: 2px solid rgba(255,255,255,0.6);
  display: inline-flex; align-items: center; justify-content: center;
}

/* teczka header meta grid — readability on gradient */
.teczka-meta-grid { text-align: left; }
.teczka-meta-grid > div { background: rgba(255,255,255,0.12); border-radius: 6px; padding: 0.5rem 0.75rem; }
.teczka-meta-grid span { display: block; font-size: 0.72rem; opacity: 0.75; margin-bottom: 0.1rem; }
.teczka-meta-grid strong { display: block; font-size: 0.88rem; font-weight: 600; }
.teczka-header-block h1 { font-size: 1.5rem; font-weight: 800; margin: 0.75rem 0 0.25rem; letter-spacing: 0.03em; }
.teczka-header-block h2 { font-size: 0.95rem; font-weight: 400; opacity: 0.9; margin: 0 0 1.25rem; }

/* pipeline stage — interactive highlight */
.pipeline-stage { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.pipeline-stage:hover { border-color: var(--primary-color); box-shadow: 0 0 0 2px var(--primary-light); }
.pipeline-stage.selected { border-color: var(--primary-color); background: var(--primary-light); }

/* kalkulator oferty */
.kalkulator-line { display: flex; justify-content: space-between; align-items: baseline; padding: 0.45rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.875rem; }
.kalkulator-line:last-of-type { border-bottom: none; }
.kalkulator-line.subtotal { font-style: italic; color: var(--text-muted); }
.kalkulator-line.total { border-top: 2px solid var(--border-color); border-bottom: none; font-weight: 700; font-size: 1rem; margin-top: 0.5rem; padding-top: 0.6rem; }
.kalkulator-line.total span:last-child { color: var(--primary-color); font-size: 1.15rem; }
.kalkulator-hint { font-size: 0.78rem; color: var(--text-muted); margin: 0.5rem 0 1rem; font-style: italic; }

/* zapytanie detail — context card */
.zapytanie-detail-wrap { background: var(--bg-main); border: 1px solid var(--primary-color); border-radius: 12px; padding: 1.25rem; margin-bottom: 0; }

/* segment-tag */
.segment-tag { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 99px; font-size: 0.78rem; font-weight: 500; background: var(--bg-main); border: 1px solid var(--border-color); cursor: pointer; transition: all 0.15s; user-select: none; }
.segment-tag:hover { border-color: var(--primary-color); color: var(--primary-color); }
.segment-tag.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* email row open state */
.email-row.open { background: var(--primary-light); }
.email-row:hover { background: var(--bg-main); cursor: pointer; }

/* chat layout responsive */
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); height: 260px; overflow-y: auto; }
}

/* group-card-tabs inside hero fix */
.group-card-hero .group-card-tabs { background: rgba(255,255,255,0.95); margin: 1rem -1.5rem -1.5rem; border-radius: 0 0 0 0; }

/* alert-banner variants */
.alert-banner.warning { background: var(--warning-light); color: var(--warning-color); border-left-color: var(--warning-color); }
.alert-banner.info { background: var(--primary-light); color: var(--primary-color); border-left-color: var(--primary-color); }

/* notes-list in CRM kartoteka */
.kartoteka-col { display: flex; flex-direction: column; gap: 0.75rem; }
.kartoteka-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
@media (max-width: 1100px) { .kartoteka-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 750px) { .kartoteka-grid { grid-template-columns: 1fr; } }

/* chart placeholder */
.chart-placeholder { padding-top: 1rem; }
.chart-note { text-align: center; font-size: 0.78rem; color: var(--text-muted); padding: 0.75rem; }

/* === CSS Patch 4 — Trip timeline (CRM kartoteka) === */
.trip-timeline { display: flex; flex-direction: column; gap: 0.55rem; }
.trip-timeline-row { display: flex; align-items: center; gap: 0.75rem; }
.trip-year-badge { padding: 0.15rem 0.55rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; white-space: nowrap; min-width: 3rem; text-align: center; }
.trip-timeline-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.trip-timeline-label { font-size: 0.875rem; }
.kartoteka-col { display: flex; flex-direction: column; }
