/**
 * Vytis Tours staff portal — aligned with public WordPress site (Elementor: El Messiri + Karla)
 */
:root {
	--vfd-font-heading: "El Messiri", Georgia, serif;
	--vfd-font-body: "Karla", -apple-system, BlinkMacSystemFont, sans-serif;
	--vfd-sidebar-bg: #ffffff;
	--vfd-sidebar-text: #3d3d3d;
	--vfd-sidebar-active: #0a0a0a;
	--vfd-sidebar-hover: #f4f4f4;
	--vfd-sidebar-border: #ebebeb;
	--vfd-main-bg: #f5f5f5;
	--vfd-card-bg: #ffffff;
	--vfd-border: #e0e0e0;
	--vfd-accent: #0a0a0a;
	--vfd-accent-hover: #262626;
	--vfd-text: #0a0a0a;
	--vfd-text-muted: #626262;
	--vfd-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	--vfd-radius: 20px;
	--vfd-radius-sm: 12px;
	--vfd-radius-pill: 999px;
	/* Flash / alert banners (staff + public invoice — one look) */
	--vfd-flash-radius: 8px;
	/* Success: light card + dark text + slim accent (no green, no solid black bar) */
	--vfd-success-bg: var(--vfd-card-bg);
	--vfd-success-border: var(--vfd-border);
	--vfd-success-text: var(--vfd-text);
	--vfd-error-bg: #fff5f5;
	--vfd-error-border: #fecaca;
	--vfd-error-text: #991b1b;
	--vfd-info-bg: #eff6ff;
	--vfd-info-border: #93c5fd;
	--vfd-info-text: #1e3a8a;
}

* {
	box-sizing: border-box;
}

.vfd-crm-body {
	margin: 0;
	font-family: var(--vfd-font-body);
	font-size: 15px;
	background: var(--vfd-main-bg);
	color: var(--vfd-text);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.vfd-crm-app {
	display: flex;
	min-height: 100vh;
}

/* Sidebar */
.vfd-crm-sidebar {
	width: 272px;
	background: var(--vfd-sidebar-bg);
	color: var(--vfd-sidebar-text);
	border-right: 1px solid var(--vfd-sidebar-border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.vfd-crm-sidebar-header {
	padding: 28px 24px 24px;
	border-bottom: 1px solid var(--vfd-sidebar-border);
}

.vfd-crm-logo {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--vfd-font-heading);
	font-weight: 600;
	font-size: 1.35rem;
	color: var(--vfd-sidebar-active);
	letter-spacing: 0.02em;
}

.vfd-crm-logo svg {
	flex-shrink: 0;
	opacity: 0.85;
	stroke: var(--vfd-sidebar-active);
}

.vfd-crm-logo-img {
	flex-shrink: 0;
	display: block;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.vfd-crm-logo-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.2;
}

.vfd-crm-logo-tagline {
	display: block;
	font-family: var(--vfd-font-body);
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--vfd-text-muted);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-top: 6px;
}

.vfd-crm-nav {
	flex: 1;
	padding: 20px 14px;
}

.vfd-crm-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: var(--vfd-radius-sm);
	color: var(--vfd-sidebar-text);
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
	margin-bottom: 4px;
	font-size: 0.95rem;
	font-weight: 500;
	border: none;
	cursor: pointer;
}

.vfd-crm-nav-item:hover {
	background: var(--vfd-sidebar-hover);
	color: var(--vfd-sidebar-active);
}

.vfd-crm-nav-item.active {
	background: var(--vfd-accent);
	color: #fff;
}

.vfd-crm-nav-item.active svg {
	stroke: #fff;
}

.vfd-crm-sidebar-footer {
	padding: 16px 14px 24px;
	border-top: 1px solid var(--vfd-sidebar-border);
}

.vfd-crm-sidebar-footer .vfd-crm-nav-item {
	font-size: 0.875rem;
	color: var(--vfd-text-muted);
}

.vfd-crm-sidebar-footer .vfd-crm-nav-item:hover {
	color: var(--vfd-text);
}

/* Main */
.vfd-crm-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.vfd-crm-header {
	background: var(--vfd-card-bg);
	padding: 22px 36px;
	border-bottom: 1px solid var(--vfd-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: var(--vfd-shadow);
}

.vfd-crm-title {
	margin: 0;
	font-family: var(--vfd-font-heading);
	font-size: 1.75rem;
	font-weight: 600;
	color: var(--vfd-text);
	line-height: 1.2;
}

.vfd-crm-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.vfd-crm-user {
	font-size: 0.875rem;
	color: var(--vfd-text-muted);
	background: var(--vfd-main-bg);
	padding: 8px 14px;
	border-radius: var(--vfd-radius-pill);
}

.vfd-crm-content {
	flex: 1;
	padding: 32px 36px 48px;
	overflow-y: auto;
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
}

.vfd-crm-view {
	animation: vfd-fadeIn 0.2s ease;
}

.vfd-crm-hidden {
	display: none !important;
}

@keyframes vfd-fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Dashboard filter */
.vfd-crm-dashboard-filter {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 28px;
}

.vfd-crm-dashboard-filter label {
	font-size: 0.875rem;
	font-weight: 600;
	font-family: var(--vfd-font-heading);
	color: var(--vfd-text);
}

.vfd-crm-dashboard-filter select {
	padding: 10px 16px;
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius-sm);
	background: var(--vfd-card-bg);
	font-family: var(--vfd-font-body);
	font-size: 0.9rem;
	min-width: 170px;
}

/* Stats */
.vfd-crm-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.vfd-crm-stat-card {
	background: var(--vfd-card-bg);
	border-radius: var(--vfd-radius);
	padding: 26px 24px;
	box-shadow: var(--vfd-shadow);
	border: 1px solid var(--vfd-border);
}

.vfd-crm-stat-value {
	display: block;
	font-family: var(--vfd-font-heading);
	font-size: 2rem;
	font-weight: 600;
	color: var(--vfd-text);
	line-height: 1.15;
}

.vfd-crm-stat-label {
	font-size: 0.875rem;
	color: var(--vfd-text-muted);
	margin-top: 6px;
}

/* Charts */
.vfd-crm-charts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 24px;
	margin-bottom: 32px;
}

.vfd-crm-chart-box {
	background: var(--vfd-card-bg);
	border-radius: var(--vfd-radius);
	padding: 26px 24px;
	box-shadow: var(--vfd-shadow);
	border: 1px solid var(--vfd-border);
}

.vfd-crm-chart-box h3 {
	margin: 0 0 20px;
	font-family: var(--vfd-font-heading);
	font-size: 1.1rem;
	font-weight: 600;
}

.vfd-crm-chart-wrap {
	position: relative;
	height: 280px;
}

.vfd-crm-chart-wrap canvas {
	max-height: 280px !important;
}

/* Forms grid */
.vfd-crm-forms-section h3 {
	margin: 0 0 20px;
	font-family: var(--vfd-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
}

.vfd-crm-forms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.vfd-crm-form-card {
	background: var(--vfd-card-bg);
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius);
	padding: 22px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: var(--vfd-shadow);
}

.vfd-crm-form-card-name {
	font-weight: 600;
	font-family: var(--vfd-font-heading);
	color: var(--vfd-text);
}

.vfd-crm-form-card-type {
	font-size: 0.7rem;
	color: var(--vfd-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-top: 4px;
}

.vfd-crm-form-card-count {
	background: var(--vfd-accent);
	color: #fff;
	padding: 6px 16px;
	border-radius: var(--vfd-radius-pill);
	font-size: 0.875rem;
	font-weight: 600;
	font-family: var(--vfd-font-body);
}

/* Toolbar */
.vfd-crm-toolbar {
	display: flex;
	gap: 16px;
	margin-bottom: 24px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.vfd-crm-toolbar-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vfd-crm-toolbar-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--vfd-text-muted);
}

.vfd-crm-toolbar select {
	padding: 10px 16px;
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius-sm);
	background: var(--vfd-card-bg);
	font-family: var(--vfd-font-body);
	font-size: 0.9rem;
	min-width: 180px;
}

.vfd-crm-search-row {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-bottom: 20px;
}

.vfd-crm-search-input {
	min-width: min(100%, 320px);
	flex: 1;
	max-width: 420px;
	padding: 10px 16px;
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius-sm);
	background: var(--vfd-card-bg);
	font-family: var(--vfd-font-body);
	font-size: 0.9rem;
}

.vfd-crm-tbody-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* Buttons */
.vfd-crm-btn {
	padding: 12px 24px;
	background: var(--vfd-accent);
	color: #fff;
	border: 2px solid var(--vfd-accent);
	border-radius: var(--vfd-radius-pill);
	font-family: var(--vfd-font-body);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vfd-crm-btn:hover {
	background: var(--vfd-accent-hover);
	border-color: var(--vfd-accent-hover);
	color: #fff;
}

.vfd-crm-btn-secondary {
	background: transparent;
	color: var(--vfd-text);
	border: 2px solid var(--vfd-border);
}

.vfd-crm-btn-secondary:hover {
	background: var(--vfd-sidebar-hover);
	border-color: #c4c4c4;
	color: var(--vfd-text);
}

.vfd-crm-btn-danger {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #fff;
}

.vfd-crm-btn-danger:hover {
	background: #991b1b;
	border-color: #991b1b;
	color: #fff;
}

.vfd-crm-btn-danger:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

@keyframes vfd-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Submit loading (forms-dashboard layout + shared pages) */
.vfd-btn-spinner {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.45em;
	vertical-align: -0.14em;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	animation: vfd-spin 0.65s linear infinite;
	flex-shrink: 0;
}

.vfd-crm-btn-secondary.is-loading .vfd-btn-spinner,
.vfd-crm-nav-item.is-loading .vfd-btn-spinner {
	border-color: rgba(10, 10, 10, 0.14);
	border-top-color: var(--vfd-text);
}

.vfd-crm-btn.is-loading,
.vfd-crm-nav-item.is-loading {
	pointer-events: none;
	cursor: wait;
	opacity: 0.9;
}

.vfd-login-submit.is-loading {
	pointer-events: none;
	cursor: wait;
	opacity: 0.9;
}

/* Tables */
.vfd-crm-table-wrap {
	background: var(--vfd-card-bg);
	border-radius: var(--vfd-radius);
	box-shadow: var(--vfd-shadow);
	border: 1px solid var(--vfd-border);
	overflow-x: auto;
}

.vfd-crm-table {
	width: 100%;
	border-collapse: collapse;
}

.vfd-crm-table th {
	text-align: left;
	padding: 14px 22px;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--vfd-text-muted);
	background: var(--vfd-main-bg);
	border-bottom: 1px solid var(--vfd-border);
	font-family: var(--vfd-font-body);
}

.vfd-crm-table td {
	padding: 16px 22px;
	border-bottom: 1px solid var(--vfd-border);
	font-size: 0.9rem;
}

.vfd-crm-table tbody tr:hover {
	background: #fafafa;
}

.vfd-crm-table tbody tr:last-child td {
	border-bottom: none;
}

/* Invoice list: compact actions column + modal dialogs for quick actions */
.vfd-crm-table--invoices .vfd-invoice-list-actions {
	vertical-align: middle;
	min-width: 9.5rem;
	max-width: 15rem;
	box-sizing: border-box;
}

.vfd-invoice-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}

.vfd-invoice-actions__links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.vfd-invoice-actions__links .vfd-crm-link {
	padding: 6px 14px;
	font-size: 0.75rem;
}

.vfd-crm-link--secondary {
	background: var(--vfd-card-bg);
	color: var(--vfd-text);
	border: 1px solid var(--vfd-border);
	font-weight: 600;
}

.vfd-crm-link--secondary:hover {
	background: var(--vfd-sidebar-hover);
	color: var(--vfd-text);
}

.vfd-inv-actions-open {
	cursor: pointer;
	font-family: var(--vfd-font-body);
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--vfd-text);
	padding: 6px 12px;
	border-radius: var(--vfd-radius-pill);
	border: 1px solid var(--vfd-border);
	background: var(--vfd-card-bg);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	user-select: none;
	transition: border-color 0.15s, background 0.15s;
}

.vfd-inv-actions-open:hover {
	background: var(--vfd-sidebar-hover);
	border-color: #c4c4c4;
}

.vfd-inv-actions-open:focus-visible {
	outline: 2px solid var(--vfd-text);
	outline-offset: 2px;
}

.vfd-inv-actions-open__hint {
	font-size: 0.65rem;
	font-weight: 600;
	color: var(--vfd-text-muted);
}

/* Native modal: full-width fields, no cramped popover */
.vfd-inv-actions-dialog {
	margin: auto;
	padding: 0;
	max-width: min(26rem, calc(100vw - 24px));
	width: 100%;
	border: none;
	border-radius: var(--vfd-radius);
	background: var(--vfd-card-bg);
	color: var(--vfd-text);
	box-shadow: var(--vfd-shadow), 0 24px 64px rgba(0, 0, 0, 0.18);
	font-family: var(--vfd-font-body);
}

.vfd-inv-actions-dialog::backdrop {
	background: rgba(15, 23, 42, 0.4);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.vfd-inv-actions-dialog__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 22px 16px;
	border-bottom: 1px solid var(--vfd-border);
}

.vfd-inv-actions-dialog__title {
	margin: 0;
	font-family: var(--vfd-font-heading);
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.25;
}

.vfd-inv-actions-dialog__meta {
	margin: 6px 0 0;
	font-size: 0.8rem;
	color: var(--vfd-text-muted);
	line-height: 1.4;
}

.vfd-inv-actions-dialog__close-form {
	margin: 0;
	flex-shrink: 0;
}

.vfd-inv-actions-dialog__x {
	cursor: pointer;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius-sm);
	background: var(--vfd-main-bg);
	color: var(--vfd-text);
	font-size: 1.35rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, border-color 0.15s;
}

.vfd-inv-actions-dialog__x:hover {
	background: var(--vfd-sidebar-hover);
	border-color: #c4c4c4;
}

.vfd-inv-actions-dialog__body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.vfd-inv-actions-dialog__section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vfd-inv-actions-dialog__label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--vfd-text-muted);
}

.vfd-inv-actions-dialog__current {
	margin: 0;
	font-size: 0.88rem;
	color: var(--vfd-text);
}

.vfd-inv-actions-dialog__form {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vfd-inv-actions-dialog__date {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	font-size: 1rem;
	font-family: var(--vfd-font-body);
	border: 1px solid var(--vfd-border);
	border-radius: 10px;
	background: var(--vfd-card-bg);
	color: var(--vfd-text);
	min-height: 46px;
}

.vfd-inv-actions-dialog__body .vfd-crm-btn {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 16px;
	font-size: 0.88rem;
	font-weight: 600;
	border-width: 1px;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.vfd-crm-link {
	display: inline-block;
	padding: 8px 16px;
	background: var(--vfd-accent);
	color: #fff;
	text-decoration: none;
	border-radius: var(--vfd-radius-pill);
	font-size: 0.8rem;
	font-weight: 600;
	transition: background 0.15s;
}

.vfd-crm-link:hover {
	background: var(--vfd-accent-hover);
	color: #fff;
}

.vfd-crm-view-btn {
	cursor: pointer;
	border: none;
	font: inherit;
}

.vfd-crm-table td a[href^="mailto:"] {
	color: var(--vfd-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.vfd-crm-table td a[href^="mailto:"]:hover {
	color: var(--vfd-accent-hover);
}

.vfd-crm-status-select {
	padding: 8px 12px;
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius-sm);
	background: var(--vfd-card-bg);
	font-family: var(--vfd-font-body);
	font-size: 0.8rem;
	min-width: 120px;
	cursor: pointer;
}

.vfd-crm-status-select.vfd-crm-status-updated {
	border-color: var(--vfd-accent);
	background: rgba(10, 10, 10, 0.04);
}

.vfd-crm-detail-status select {
	margin-left: 6px;
}

.vfd-crm-preview {
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--vfd-text-muted);
}

/* Submissions list: single-line rows, tighter columns */
.vfd-crm-table.vfd-crm-table--submissions {
	table-layout: fixed;
	width: 100%;
}

.vfd-crm-table.vfd-crm-table--submissions th,
.vfd-crm-table.vfd-crm-table--submissions td {
	padding: 10px 12px;
	vertical-align: middle;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-date {
	width: 9.5rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-name {
	width: 8.5rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-email {
	width: 11rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-phone {
	width: 8.5rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-status {
	width: 7.5rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-form {
	width: 10rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-source {
	width: 5.5rem;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-actions {
	width: 12rem;
	overflow: visible;
	text-overflow: clip;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-col-preview {
	width: auto;
	min-width: 7rem;
}

.vfd-crm-table.vfd-crm-table--submissions td > a {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: bottom;
}

.vfd-crm-table.vfd-crm-table--submissions .vfd-crm-status-select {
	min-width: 0;
	width: 100%;
	max-width: 7.25rem;
	vertical-align: middle;
}

.vfd-crm-actions-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
}

.vfd-crm-actions-inline .vfd-crm-link {
	padding: 6px 12px;
	font-size: 0.75rem;
}

.vfd-crm-btn-delete {
	padding: 6px 12px;
	background: transparent;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: var(--vfd-radius-pill);
	font-family: var(--vfd-font-body);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vfd-crm-btn-delete:hover {
	background: #fef2f2;
	border-color: #f87171;
	color: #991b1b;
}

.vfd-crm-pagination {
	margin-top: 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.vfd-crm-pagination-info,
.vfd-crm-pagination-page {
	font-size: 0.875rem;
	color: var(--vfd-text-muted);
}

.vfd-crm-pagination-btns {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vfd-crm-pagination-btn {
	padding: 8px 18px;
	font-size: 0.875rem;
}

.vfd-crm-pagination-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.vfd-crm-loading {
	text-align: center;
	padding: 48px;
	color: var(--vfd-text-muted);
}

.vfd-crm-error {
	background: var(--vfd-error-bg);
	border: 1px solid var(--vfd-error-border);
	color: var(--vfd-error-text);
	padding: 16px 20px;
	border-radius: var(--vfd-flash-radius);
	margin-bottom: 24px;
	font-size: 0.9rem;
	line-height: 1.5;
}

/**
 * Public invoice / proposal pages use .inv-msg.* (forms-dashboard is linked on those pages).
 * Keeps success/error/info aligned with .vfd-crm-success / .vfd-crm-error.
 */
.inv-msg {
	padding: 16px 20px;
	border-radius: var(--vfd-flash-radius);
	margin-bottom: 20px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.vfd-crm-success,
.inv-msg.success {
	background: var(--vfd-success-bg);
	border: 1px solid var(--vfd-success-border);
	color: var(--vfd-success-text);
	font-weight: 500;
	box-shadow: var(--vfd-shadow), inset 4px 0 0 var(--vfd-accent);
}

.vfd-crm-success {
	padding: 16px 20px;
	border-radius: var(--vfd-flash-radius);
	margin-bottom: 24px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.inv-msg.error {
	background: var(--vfd-error-bg);
	border: 1px solid var(--vfd-error-border);
	color: var(--vfd-error-text);
}

.inv-msg.info {
	background: var(--vfd-info-bg);
	border: 1px solid var(--vfd-info-border);
	color: var(--vfd-info-text);
}

/* Modal */
.vfd-crm-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
}

.vfd-crm-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

.vfd-crm-modal--confirm {
	z-index: 100001;
}

.vfd-crm-modal--confirm .vfd-crm-modal-content {
	max-width: 420px;
}

.vfd-crm-confirm-text {
	margin: 0;
	font-size: 0.95rem;
	color: var(--vfd-text);
	line-height: 1.5;
}

.vfd-crm-modal-error {
	margin: 14px 0 0;
	padding: 12px 14px;
	background: #fff5f5;
	border: 1px solid #fecaca;
	border-radius: var(--vfd-radius-sm);
	color: #991b1b;
	font-size: 0.875rem;
}

.vfd-crm-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

.vfd-crm-modal-content {
	position: relative;
	background: var(--vfd-card-bg);
	border-radius: var(--vfd-radius);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--vfd-border);
}

.vfd-crm-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--vfd-border);
}

.vfd-crm-modal-header h2 {
	margin: 0;
	font-family: var(--vfd-font-heading);
	font-size: 1.2rem;
	font-weight: 600;
}

.vfd-crm-modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--vfd-text-muted);
	padding: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}

.vfd-crm-modal-close:hover {
	background: var(--vfd-main-bg);
	color: var(--vfd-text);
}

.vfd-crm-modal-body {
	padding: 24px;
	overflow-y: auto;
	flex: 1;
}

.vfd-crm-modal-footer {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding: 16px 24px;
	border-top: 1px solid var(--vfd-border);
}

.vfd-crm-detail-meta {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--vfd-border);
	font-size: 0.875rem;
	color: var(--vfd-text-muted);
}

.vfd-crm-detail-fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.vfd-crm-detail-field {
	padding: 12px 0;
	border-bottom: 1px solid var(--vfd-border);
}

.vfd-crm-detail-field:last-child {
	border-bottom: none;
}

.vfd-crm-detail-field-label {
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--vfd-text-muted);
	margin-bottom: 6px;
	font-weight: 600;
}

.vfd-crm-detail-field-value {
	font-size: 0.95rem;
	color: var(--vfd-text);
	word-break: break-word;
	white-space: pre-wrap;
}

@media (max-width: 900px) {
	.vfd-crm-charts {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.vfd-crm-sidebar {
		width: 76px;
	}
	.vfd-crm-logo-text,
	.vfd-crm-nav-item span {
		display: none;
	}
	.vfd-crm-nav-item {
		justify-content: center;
		padding: 14px;
	}
	.vfd-crm-content {
		padding: 20px 16px 32px;
	}
	.vfd-crm-header {
		padding: 16px 20px;
	}
	.vfd-crm-title {
		font-size: 1.35rem;
	}
}

/* —— Staff invoice show: workflow progress —— */
.vfd-inv-progress {
	margin-bottom: 28px;
	padding: 22px 24px;
	background: var(--vfd-card-bg);
	border: 1px solid var(--vfd-border);
	border-radius: var(--vfd-radius);
	box-shadow: var(--vfd-shadow);
}

.vfd-inv-progress__bar {
	height: 5px;
	border-radius: 3px;
	background: var(--vfd-main-bg);
	margin-bottom: 22px;
	overflow: hidden;
}

.vfd-inv-progress__bar::after {
	content: '';
	display: block;
	height: 100%;
	width: var(--vfd-inv-progress-pct, 0%);
	max-width: 100%;
	background: var(--vfd-accent);
	border-radius: 3px;
	transition: width 0.35s ease;
}

.vfd-inv-progress__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch;
}

.vfd-inv-progress__step {
	flex: 1 1 11rem;
	min-width: 10rem;
	max-width: 20rem;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 14px 14px 14px 12px;
	border-radius: var(--vfd-radius-sm);
	border: 1px solid var(--vfd-border);
	background: var(--vfd-main-bg);
	box-sizing: border-box;
}

.vfd-inv-progress__step--complete {
	border-color: #d4d4d4;
	background: #fafafa;
}

.vfd-inv-progress__step--current {
	border-color: var(--vfd-accent);
	background: rgba(10, 10, 10, 0.03);
	box-shadow: inset 4px 0 0 var(--vfd-accent);
}

.vfd-inv-progress__step--upcoming {
	opacity: 0.72;
}

.vfd-inv-progress__marker {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
	border: 2px solid var(--vfd-border);
	background: var(--vfd-card-bg);
	color: var(--vfd-text-muted);
}

.vfd-inv-progress__step--complete .vfd-inv-progress__marker {
	background: var(--vfd-accent);
	border-color: var(--vfd-accent);
	color: #fff;
}

.vfd-inv-progress__step--current .vfd-inv-progress__marker {
	border-color: var(--vfd-accent);
	color: var(--vfd-accent);
	background: var(--vfd-card-bg);
}

.vfd-inv-progress__check {
	font-size: 0.85rem;
	line-height: 1;
}

.vfd-inv-progress__num {
	font-variant-numeric: tabular-nums;
}

.vfd-inv-progress__text {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vfd-inv-progress__label {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--vfd-text);
	line-height: 1.3;
}

.vfd-inv-progress__hint {
	font-size: 0.72rem;
	color: var(--vfd-text-muted);
	line-height: 1.45;
}

.vfd-inv-workflow-card {
	margin-bottom: 24px;
}

.vfd-inv-workflow-card__eyebrow {
	margin: 0 0 10px;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--vfd-text-muted);
}
