/* ── Compact header bar ────────────────────────────────────────────────── */

.custom-header {
	background: linear-gradient(135deg, #9c6644 0%, #7d5035 100%);
	color: white;
	margin-bottom: 15px;
	padding: 8px 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 1400px;
	margin: 0 auto;
}

.dashboard-btn {
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: white;
	text-decoration: none;
	padding: 4px 10px;
	border-radius: 5px;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	white-space: nowrap;
	background: transparent;
}

.dashboard-btn:hover {
	background-color: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.5);
	color: white;
}

.header-title-area {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	justify-content: center;
}

.company-logo {
	max-height: 32px;
	max-width: 64px;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
}

.header-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.header-subtitle {
	font-size: 0.75rem;
	font-style: italic;
	margin: 2px 0 0;
	opacity: 0.85;
	text-align: center;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
}

.welcome-text {
	font-size: 0.8rem;
	opacity: 0.9;
}

.username {
	font-weight: bold;
	font-size: 0.8rem;
}

.help-btn {
	background-color: rgba(255, 255, 255, 0.15);
	border-radius: 5px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: white;
	cursor: pointer;
	font-size: 0.85rem;
	padding: 4px 8px;
	transition: all 0.2s ease;
	line-height: 1;
}

.help-btn:hover {
	background-color: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.4);
}

.theme-toggle-btn {
	background-color: rgba(255, 255, 255, 0.15);
	border-radius: 5px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: white;
	cursor: pointer;
	font-size: 0.85rem;
	padding: 4px 8px;
	transition: all 0.2s ease;
	line-height: 1;
}

.theme-toggle-btn:hover {
	background-color: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.4);
}

.logout-btn {
	background-color: rgba(255, 255, 255, 0.15);
	border-radius: 5px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: white;
	cursor: pointer;
	font-size: 0.75rem;
	padding: 4px 10px;
	transition: all 0.2s ease;
	text-decoration: none;
}

.logout-btn:hover {
	background-color: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive: stack on narrow screens */
@media (max-width: 768px) {
	.custom-header {
		padding: 6px 12px;
	}

	.header-bar {
		flex-wrap: wrap;
		gap: 6px;
	}

	.header-title-area {
		order: -1;
		flex-basis: 100%;
		justify-content: center;
	}

	.header-title {
		font-size: 0.95rem;
	}

	.company-logo {
		max-height: 26px;
		max-width: 52px;
	}
}

@media (max-width: 480px) {
	.header-title {
		font-size: 0.85rem;
	}

	.welcome-text {
		display: none;
	}

	.header-subtitle {
		display: none;
	}
}

/* Print styles */
@media print {
	.custom-header {
		display: none;
	}
}

/* ── Light theme: override Bootstrap CSS variables for darker secondary text ── */

:root {
	--bs-secondary-color: #555;
	--bs-secondary-color-rgb: 85, 85, 85;
}

/* ── Dark theme: override Bootstrap CSS variables ────────────────────────── */
body.theme-dark {
	background-color: #1e1e1e;
	color: #e0e0e0;

	/* Bootstrap core variables */
	--bs-body-color: #e0e0e0;
	--bs-body-color-rgb: 224, 224, 224;
	--bs-body-bg: #1e1e1e;
	--bs-body-bg-rgb: 30, 30, 30;
	--bs-emphasis-color: #fff;
	--bs-emphasis-color-rgb: 255, 255, 255;
	--bs-secondary-color: rgba(224, 224, 224, 0.75);
	--bs-secondary-color-rgb: 224, 224, 224;
	--bs-secondary-bg: #333;
	--bs-secondary-bg-rgb: 51, 51, 51;
	--bs-tertiary-color: rgba(224, 224, 224, 0.5);
	--bs-tertiary-bg: #2d2d2d;
	--bs-tertiary-bg-rgb: 45, 45, 45;
	--bs-border-color: #444;
	--bs-border-color-translucent: rgba(255, 255, 255, 0.15);
	--bs-heading-color: #d4a574;
	--bs-link-color: #d4a574;
	--bs-link-color-rgb: 212, 165, 116;
	--bs-link-hover-color: #e0c090;
	--bs-link-hover-color-rgb: 224, 192, 144;
}

/* Dark theme: Bootstrap table variables */
body.theme-dark .table {
	--bs-table-color: #e0e0e0;
	--bs-table-bg: #2d2d2d;
	--bs-table-border-color: #444;
	--bs-table-striped-color: #e0e0e0;
	--bs-table-striped-bg: #333;
	--bs-table-hover-color: #e0e0e0;
	--bs-table-hover-bg: #3a3a3a;
	--bs-table-active-color: #e0e0e0;
	--bs-table-active-bg: #444;
}

/* Dark theme: Bootstrap card variables */
body.theme-dark .card {
	--bs-card-bg: #2d2d2d;
	--bs-card-color: #e0e0e0;
	--bs-card-border-color: #444;
	--bs-card-cap-bg: #333;
}

/* Cards */
body.theme-dark .customer-card,
body.theme-dark .inventory-card,
body.theme-dark .material-card,
body.theme-dark .order-card,
body.theme-dark .dash-card,
body.theme-dark .card,
body.theme-dark .form-section,
body.theme-dark .system-section,
body.theme-dark .ai-section,
body.theme-dark .detail-section,
body.theme-dark .report-card,
body.theme-dark .supplier-card,
body.theme-dark .user-card {
	background-color: #2d2d2d;
	border-color: #444;
	color: #e0e0e0;
}

body.theme-dark .card.bg-light,
body.theme-dark .card.bg-light .card-body {
	background-color: #2d2d2d !important;
	color: #e0e0e0;
}

/* Tables */
body.theme-dark table,
body.theme-dark .table {
	color: #e0e0e0;
	border-color: #444;
}

body.theme-dark thead,
body.theme-dark thead th {
	background-color: #3a3a3a;
	border-color: #444;
	color: #e0e0e0;
}

body.theme-dark tbody tr {
	background-color: #2d2d2d;
	border-color: #444;
}

body.theme-dark tbody tr:nth-child(even) {
	background-color: #333;
}

body.theme-dark tbody tr:hover {
	background-color: #3a3a3a;
}

body.theme-dark td,
body.theme-dark th {
	border-color: #444 !important;
	color: #e0e0e0;
}

/* Form inputs */
body.theme-dark input[type="text"],
body.theme-dark input[type="email"],
body.theme-dark input[type="tel"],
body.theme-dark input[type="url"],
body.theme-dark input[type="number"],
body.theme-dark input[type="password"],
body.theme-dark input[type="search"],
body.theme-dark input[type="date"],
body.theme-dark textarea,
body.theme-dark select {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0e0e0;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
	color: #888;
}

/* Modals */
body.theme-dark .modal-content {
	background-color: #2d2d2d;
	color: #e0e0e0;
	border-color: #444;
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer {
	border-color: #444;
}

/* Secondary text and labels */
body.theme-dark .text-muted,
body.theme-dark small,
body.theme-dark .card-subtitle {
	color: #aaa !important;
}

/* Borders and dividers */
body.theme-dark hr,
body.theme-dark .border,
body.theme-dark [class*="border-"] {
	border-color: #444 !important;
}

/* Dropdown menus */
body.theme-dark .dropdown-menu {
	background-color: #2d2d2d;
	border-color: #444;
}

body.theme-dark .dropdown-item {
	color: #e0e0e0;
}

body.theme-dark .dropdown-item:hover {
	background-color: #3a3a3a;
	color: #e0e0e0;
}

/* List groups */
body.theme-dark .list-group-item {
	background-color: #2d2d2d;
	border-color: #444;
	color: #e0e0e0;
}

/* Alerts */
body.theme-dark .alert-info {
	background-color: #1a3a4a;
	border-color: #1d6a8a;
	color: #9ecfea;
}

body.theme-dark .alert-warning {
	background-color: #3a2f00;
	border-color: #6a5500;
	color: #e0c040;
}

body.theme-dark .alert-danger {
	background-color: #3a1a1a;
	border-color: #6a2020;
	color: #e08080;
}

body.theme-dark .alert-success {
	background-color: #1a3a1a;
	border-color: #2a6a2a;
	color: #80c080;
}

/* ── Dark theme: page-level containers & text ───────────────────────────── */

body.theme-dark .container,
body.theme-dark .settings-content,
body.theme-dark .reports-main,
body.theme-dark .tab-content,
body.theme-dark #receiptContent,
body.theme-dark #listContainer,
body.theme-dark .cp-container {
	background-color: #2d2d2d;
	color: #e0e0e0;
	border-color: #444;
}

body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark .section h2,
body.theme-dark .reports-header h2,
body.theme-dark .reports-sidebar h3,
body.theme-dark #reportConfig h3,
body.theme-dark .results-header h3,
body.theme-dark .welcome-content h3,
body.theme-dark .modal-title,
body.theme-dark .import-results h4 {
	color: #d4a574;
}

body.theme-dark .section h2 {
	border-bottom-color: #d4a574;
}

body.theme-dark p,
body.theme-dark label,
body.theme-dark form label,
body.theme-dark .parameter-group label,
body.theme-dark .form-group-compact label,
body.theme-dark .filter-group label {
	color: #ccc;
}

body.theme-dark .menu-description,
body.theme-dark .reports-header p,
body.theme-dark #selectedReportDescription,
body.theme-dark .results-info,
body.theme-dark .contact-info,
body.theme-dark .supplier-info,
body.theme-dark .order-meta,
body.theme-dark .property-label,
body.theme-dark .material-specs,
body.theme-dark .usage-details,
body.theme-dark .timeline-date,
body.theme-dark .no-logo,
body.theme-dark .import-note,
body.theme-dark .import-meta,
body.theme-dark .import-help,
body.theme-dark .no-materials-message,
body.theme-dark .no-usage,
body.theme-dark .no-data,
body.theme-dark .text-center p,
body.theme-dark .loading-spinner p,
body.theme-dark form small,
body.theme-dark .website-subtitle,
body.theme-dark .register-link,
body.theme-dark .hardness-display,
body.theme-dark .usage-count,
body.theme-dark .material-id,
body.theme-dark .supplier-id {
	color: #999;
}

body.theme-dark .property-value,
body.theme-dark .conflict-name {
	color: #ddd;
}

/* ── Dark theme: Settings page ──────────────────────────────────────────── */

body.theme-dark .settings-nav {
	background-color: #252525;
	border-right-color: #444;
}

body.theme-dark .settings-nav li {
	color: #e0e0e0;
}

body.theme-dark .settings-nav li:hover {
	background-color: #3a3a3a;
}

body.theme-dark .settings-nav li.active {
	background-color: #3a3a3a;
	border-left-color: #d4a574;
	color: #fff;
}

body.theme-dark .settings-nav li.admin-only {
	border-left-color: #e74c3c;
	background: linear-gradient(to right, #3a2020, #252525);
}

body.theme-dark .settings-nav li.admin-only:hover {
	background: linear-gradient(to right, #4a2525, #3a3a3a);
}

body.theme-dark .settings-nav li.admin-only.active {
	background: linear-gradient(to right, #4a2525, #3a3a3a);
	border-left-color: #e74c3c;
}

body.theme-dark .system-section {
	background-color: #333;
	border-color: #444;
}

body.theme-dark .system-section h3 {
	color: #d4a574;
	border-bottom-color: #555;
}

body.theme-dark .logo-section {
	background-color: #333;
	border-color: #555;
}

body.theme-dark .logo-preview {
	background-color: #3a3a3a;
	border-color: #555;
}

body.theme-dark .admin-actions {
	background-color: #3a3520;
	border-color: #554d20;
}

/* ── Dark theme: Import UI ──────────────────────────────────────────────── */

body.theme-dark .import-preview-header {
	background-color: #1e2a3a;
	border-color: #2a4060;
	color: #c0d0e8;
}

body.theme-dark .import-table-section {
	border-color: #444;
}

body.theme-dark .import-table-header {
	background-color: #333;
}

body.theme-dark .import-table-name {
	color: #d4a574;
}

body.theme-dark .conflict-row {
	border-top-color: #444;
}

body.theme-dark .conflict-row:hover {
	background-color: #333;
}

body.theme-dark .conflict-id {
	background-color: #3a3530;
	color: #d4a574;
}

body.theme-dark .existing-name {
	color: #888;
}

body.theme-dark .count-new {
	background-color: #1a3a1a;
	color: #80c080;
}

body.theme-dark .count-conflict {
	background-color: #3a2f00;
	color: #e0c040;
}

body.theme-dark .results-table th {
	background-color: #3a3530;
	color: #d4a574;
}

body.theme-dark .results-table td {
	border-bottom-color: #444;
}

/* ── Dark theme: Dashboard / Index page ─────────────────────────────────── */

body.theme-dark .menu-item {
	background-color: #2d2d2d;
	border-color: #444;
	color: #e0e0e0;
}

body.theme-dark .menu-item:hover {
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

body.theme-dark .menu-title,
body.theme-dark .menu-icon {
	color: #d4a574;
}

body.theme-dark .welcome-content i,
body.theme-dark .feature i,
body.theme-dark .loading-spinner i {
	color: #d4a574;
}

/* ── Dark theme: Login, Register, Change-Password ───────────────────────── */

body.theme-dark .login-section {
	background-color: #2d2d2d;
	border-color: #444;
	color: #e0e0e0;
}

body.theme-dark .login-title,
body.theme-dark .website-title {
	color: #d4a574;
}

body.theme-dark .register-form {
	background-color: #2d2d2d;
	box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
	color: #e0e0e0;
}

body.theme-dark .register-link a,
body.theme-dark .back-link {
	color: #d4a574;
}

body.theme-dark .website-link-container {
	background: linear-gradient(135deg, #2d2d2d, #333);
	border-color: #555;
}

/* ── Dark theme: Form sections & filter controls ────────────────────────── */

body.theme-dark .form-section,
body.theme-dark .filter-controls,
body.theme-dark .stock-info,
body.theme-dark .business-terms,
body.theme-dark .no-parameters,
body.theme-dark .order-detail-header {
	background-color: #333;
	border-color: #444;
	color: #e0e0e0;
}

body.theme-dark .form-section h5,
body.theme-dark .material-name,
body.theme-dark .company-name,
body.theme-dark .company-name-cell strong {
	color: #d4a574 !important;
}

body.theme-dark .form-control {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0e0e0;
}

body.theme-dark .form-control:focus {
	border-color: #d4a574;
	box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.2);
}

/* ── Dark theme: Reports page ───────────────────────────────────────────── */

body.theme-dark .reports-sidebar {
	background-color: #252525;
	border-color: #444;
}

body.theme-dark .category-header {
	color: #ccc;
	border-bottom-color: #444;
}

body.theme-dark .report-item {
	color: #e0e0e0;
}

body.theme-dark .report-item:hover {
	background-color: #3a3a3a;
	border-color: #d4a574;
}

body.theme-dark .report-item.selected {
	background-color: #9c6644;
	color: white;
	border-color: #7d5035;
}

body.theme-dark .welcome-section {
	color: #e0e0e0;
}

body.theme-dark .report-controls {
	border-top-color: #444;
}

body.theme-dark .format-selection select {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0e0e0;
}

body.theme-dark .table-container {
	border-color: #444;
}

body.theme-dark #reportCategories {
	background-color: #2d2d2d;
	border-color: #444;
}

body.theme-dark #reportCategories::-webkit-scrollbar-track {
	background: #2d2d2d;
}

body.theme-dark #reportCategories::-webkit-scrollbar-thumb {
	background: #d4a574;
}

/* ── Dark theme: Orders page ────────────────────────────────────────────── */

body.theme-dark .order-cancelled {
	background-color: #2d2020;
	opacity: 0.8;
}

body.theme-dark .nav-tabs .nav-link {
	color: #ccc;
}

body.theme-dark .nav-tabs .nav-link.active {
	color: #d4a574;
	background-color: #2d2d2d;
	border-color: #444 #444 #2d2d2d;
}

body.theme-dark .stat-value,
body.theme-dark .order-value,
body.theme-dark .cost-display,
body.theme-dark .material-cost-amount,
body.theme-dark .supplier-stats .stat-number,
body.theme-dark .price-tag {
	color: #d4a574 !important;
}

body.theme-dark .timeline::before {
	background-color: #555;
}

/* ── Dark theme: Inventory & Materials extras ───────────────────────────── */

body.theme-dark .materials-used-item,
body.theme-dark .material-usage-item {
	background-color: #333;
	border-color: #444;
}

body.theme-dark .material-cost-total {
	background-color: #1e2a3a;
	border-color: #2a4060;
	color: #c0d0e8;
}

body.theme-dark .materials-used-list {
	background-color: #2d2d2d;
	border-color: #444;
}

body.theme-dark .material-item {
	border-bottom-color: #444;
}

body.theme-dark .material-item:hover {
	background-color: #333;
}

body.theme-dark .stone-type {
	background: linear-gradient(135deg, #333, #3a3a3a);
	border-color: #555;
	color: #ccc;
}

body.theme-dark .badge.bg-light {
	background-color: #3a3a3a !important;
	color: #ccc !important;
	border-color: #555;
}

body.theme-dark .card.bg-light,
body.theme-dark .card.bg-light .card-body {
	background: linear-gradient(135deg, #2d2d2d, #333) !important;
	border-color: #444;
}

body.theme-dark .card.bg-light h6 {
	color: #aaa;
}

body.theme-dark .input-group-text {
	background-color: #3a3a3a;
	border-color: #555;
	color: #ccc;
}

body.theme-dark .discontinued {
	background-color: #252525;
}

body.theme-dark .quality-grade,
body.theme-dark .badge-rating {
	background-color: #333;
	border-color: #555;
	color: #ccc;
}

body.theme-dark .material-cost-info {
	background-color: #1e2a3a;
	border-color: #2a4060;
	color: #9ecfea;
}

/* ── Dark theme: Suppliers table ────────────────────────────────────────── */

body.theme-dark .table-responsive {
	box-shadow: 0 0 0 1px #444;
}

body.theme-dark .card-title {
	color: #e0e0e0;
}

body.theme-dark .card-subtitle {
	color: #aaa;
}

/* ── Dark theme: Users page ─────────────────────────────────────────────── */

body.theme-dark table {
	background-color: #2d2d2d;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.theme-dark tr:nth-child(even) {
	background-color: #333;
}

body.theme-dark tr:hover {
	background-color: #3a3a3a;
}

body.theme-dark th {
	background-color: #9c6644;
	color: white;
}

body.theme-dark td {
	border-bottom-color: #444;
	color: #e0e0e0;
}

body.theme-dark .search-box {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0e0e0;
}

body.theme-dark .modal {
	background-color: rgba(0, 0, 0, 0.7);
}

body.theme-dark .close-btn {
	color: #aaa;
}

body.theme-dark .close-btn:hover {
	color: #e0e0e0;
}

/* ── Dark theme: Buttons ────────────────────────────────────────────────── */

body.theme-dark button:disabled {
	background-color: #444;
	color: #888;
}

body.theme-dark .btn-secondary,
body.theme-dark .btn-cancel {
	background-color: #555;
	color: #e0e0e0;
}

body.theme-dark .btn-secondary:hover,
body.theme-dark .btn-cancel:hover {
	background-color: #666;
}

body.theme-dark .btn-outline {
	background-color: #2d2d2d;
	color: #d4a574;
	border-color: #d4a574;
}

body.theme-dark .btn-outline:hover {
	background-color: #9c6644;
	color: white;
}

body.theme-dark .btn-group .btn:not(.active) {
	background-color: #2d2d2d;
	border-color: #555;
	color: #ccc;
}

body.theme-dark .btn-group .btn:not(.active):hover {
	background-color: #3a3a3a;
	border-color: #777;
	color: #e0e0e0;
}

/* ── Dark theme: footer ─────────────────────────────────────────────────── */

body.theme-dark footer {
	background-color: #1a1a1a;
}

/* ── Dark theme: Notification toasts ────────────────────────────────────── */

body.theme-dark .settings-message.success,
body.theme-dark .system-settings-message.success {
	background-color: #1a3a1a;
	color: #80c080;
	border-color: #2a6a2a;
}

body.theme-dark .settings-message.error,
body.theme-dark .system-settings-message.error {
	background-color: #3a1a1a;
	color: #e08080;
	border-color: #6a2020;
}

body.theme-dark .system-settings-message.warning {
	background-color: #3a2f00;
	color: #e0c040;
	border-color: #6a5500;
}

/* ── Dark theme: Loading overlays ───────────────────────────────────────── */

body.theme-dark .loading-overlay {
	background-color: rgba(30, 30, 30, 0.8);
}

/* ── Dark theme: Material type badges (keep distinctive colors, darken) ── */

body.theme-dark .material-type-stone {
	background-color: #1a2a3a;
	color: #6aaaee;
}

body.theme-dark .material-type-metal {
	background-color: #3a2a1a;
	color: #ee8844;
}

body.theme-dark .material-type-wire {
	background-color: #2a1a3a;
	color: #bb77dd;
}

body.theme-dark .material-type-findings {
	background-color: #1a2a1a;
	color: #66bb66;
}

body.theme-dark .material-type-beads {
	background-color: #3a1a2a;
	color: #dd6699;
}

body.theme-dark .material-type-tools {
	background-color: #2a3a1a;
	color: #88bb44;
}

body.theme-dark .material-type-other {
	background-color: #333;
	color: #bbb;
}

/* ── Dark theme: Order status badges (keep semantics, soften bg) ──────── */

body.theme-dark .bg-pending {
	background-color: #3a2f00;
	color: #e0c040;
}

body.theme-dark .bg-processing {
	background-color: #1a3a4a;
	color: #9ecfea;
}

body.theme-dark .bg-shipped {
	background-color: #1a2a4a;
	color: #99bbee;
}

body.theme-dark .bg-delivered {
	background-color: #1a3a1a;
	color: #80c080;
}

body.theme-dark .bg-cancelled {
	background-color: #3a1a1a;
	color: #e08080;
}

/* ── Dark theme: Checkbox & radio labels ────────────────────────────────── */

body.theme-dark .res-option {
	color: #e0e0e0;
}

body.theme-dark .twofa label,
body.theme-dark .twofa p {
	color: #aaa;
}

/* ── Dark theme: Bootstrap card components ──────────────────────────────── */

body.theme-dark .card-body {
	background-color: #2d2d2d;
	color: #e0e0e0;
}

body.theme-dark .card-header {
	background-color: #333;
	border-bottom-color: #444;
	color: #e0e0e0;
}

body.theme-dark .card-footer {
	background-color: #2d2d2d;
	border-top-color: #444;
	color: #e0e0e0;
}

body.theme-dark .card-footer.bg-transparent {
	background-color: transparent !important;
}

body.theme-dark .card-text {
	color: #ddd;
}

/* ── Dark theme: Bootstrap form controls ────────────────────────────────── */

body.theme-dark .form-select {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0e0e0;
}

body.theme-dark .form-select:focus {
	border-color: #d4a574;
	box-shadow: 0 0 0 0.2rem rgba(212, 165, 116, 0.25);
}

body.theme-dark .form-label {
	color: #ccc;
}

body.theme-dark .form-check-label {
	color: #e0e0e0;
}

/* ── Dark theme: Bootstrap outline buttons ──────────────────────────────── */

body.theme-dark .btn-outline-primary {
	color: #d4a574;
	border-color: #d4a574;
}

body.theme-dark .btn-outline-primary:hover,
body.theme-dark .btn-outline-primary.active {
	background-color: #9c6644;
	border-color: #9c6644;
	color: white;
}

body.theme-dark .btn-outline-secondary {
	color: #ccc;
	border-color: #666;
}

body.theme-dark .btn-outline-secondary:hover,
body.theme-dark .btn-outline-secondary.active {
	background-color: #555;
	border-color: #555;
	color: #fff;
}

body.theme-dark .btn-outline-danger {
	color: #e08080;
	border-color: #a04040;
}

body.theme-dark .btn-outline-danger:hover {
	background-color: #a04040;
	border-color: #a04040;
	color: white;
}

body.theme-dark .btn-light {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0e0e0;
}

body.theme-dark .btn-light:hover {
	background-color: #444;
	border-color: #666;
	color: #fff;
}

/* ── Dark theme: Bootstrap table row variants ───────────────────────────── */

body.theme-dark .table-danger,
body.theme-dark .table-danger > td,
body.theme-dark .table-danger > th {
	background-color: #3a2020 !important;
	color: #e08080;
}

body.theme-dark .table-secondary,
body.theme-dark .table-secondary > td,
body.theme-dark .table-secondary > th {
	background-color: #333 !important;
	color: #aaa;
}

body.theme-dark .table-light,
body.theme-dark .table-light > td,
body.theme-dark .table-light > th {
	background-color: #2d2d2d !important;
	color: #aaa;
}

body.theme-dark .table-hover tbody tr:hover {
	background-color: #3a3a3a !important;
	color: #e0e0e0;
}

body.theme-dark .table-hover tbody tr:hover td {
	color: #e0e0e0;
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) {
	background-color: #333;
	color: #e0e0e0;
}

/* ── Dark theme: Bootstrap utility class overrides ──────────────────────── */

body.theme-dark .bg-white {
	background-color: #2d2d2d !important;
}

body.theme-dark .bg-light {
	background-color: #333 !important;
}

body.theme-dark .text-dark {
	color: #e0e0e0 !important;
}

body.theme-dark .text-body {
	color: #e0e0e0 !important;
}

body.theme-dark .border {
	border-color: #444 !important;
}

body.theme-dark .border-bottom {
	border-bottom-color: #444 !important;
}

body.theme-dark .border-top {
	border-top-color: #444 !important;
}

body.theme-dark .rounded {
	border-color: #444;
}

/* ── Dark theme: Bootstrap modal body ───────────────────────────────────── */

body.theme-dark .modal-body {
	background-color: #2d2d2d;
	color: #e0e0e0;
}

body.theme-dark .modal-header {
	background-color: #333;
}

/* Keep brown-themed modal headers brown */
body.theme-dark .modal-header[style],
body.theme-dark .modal-header:not(.bg-danger):not(.bg-warning) {
	background: linear-gradient(135deg, #9c6644, #7d5035);
	color: white;
}

/* ── Dark theme: Bootstrap badges ───────────────────────────────────────── */

body.theme-dark .badge.bg-secondary {
	background-color: #555 !important;
	color: #ddd;
}

body.theme-dark .badge.bg-info {
	background-color: #1a3a4a !important;
	color: #9ecfea;
}

body.theme-dark .badge.bg-success {
	background-color: #1a3a1a !important;
	color: #80c080;
}

body.theme-dark .badge.bg-danger {
	background-color: #3a1a1a !important;
	color: #e08080;
}

body.theme-dark .badge.bg-warning {
	background-color: #3a2f00 !important;
	color: #e0c040;
}

/* ── Dark theme: Pagination ─────────────────────────────────────────────── */

body.theme-dark .page-link {
	background-color: #2d2d2d;
	border-color: #444;
	color: #d4a574;
}

body.theme-dark .page-link:hover {
	background-color: #3a3a3a;
	border-color: #555;
	color: #e0c090;
}

body.theme-dark .page-item.active .page-link {
	background-color: #9c6644;
	border-color: #9c6644;
	color: white;
}

body.theme-dark .page-item.disabled .page-link {
	background-color: #252525;
	border-color: #444;
	color: #666;
}

/* ── Dark theme: Customer list items ────────────────────────────────────── */

body.theme-dark .customer-list-item {
	background-color: #2d2d2d;
	border-color: #444;
	color: #e0e0e0;
}

body.theme-dark .customer-list-item:hover {
	background-color: #333;
}

/* ── Dark theme: Searchable dropdowns & dynamic containers ──────────────── */

body.theme-dark .searchable-dropdown {
	background-color: #2d2d2d;
	border-color: #444;
	color: #e0e0e0;
}

/* ── Dark theme: Bootstrap nav-tabs ─────────────────────────────────────── */

body.theme-dark .nav-tabs {
	border-bottom-color: #444;
}

body.theme-dark .nav-tabs .nav-link:hover {
	border-color: #555 #555 #444;
}

/* ── Dark theme: Supplier table sticky column fix ───────────────────────── */

body.theme-dark .table td:last-child,
body.theme-dark .table tr:hover td:last-child {
	background-color: inherit;
}

/* ── Dark theme: Order table cancelled rows ─────────────────────────────── */

body.theme-dark #ordersTableBody tr.cancelled-order td {
	opacity: 0.6;
	color: #999;
}

/* ── Dark theme: Index / Main menu page ─────────────────────────────────── */

body.theme-dark .custom-header {
	background: linear-gradient(135deg, #5a3a28 0%, #3d2518 100%);
}

body.theme-dark .menu-section h2 {
	color: #d4a574;
	border-bottom-color: #d4a574;
}

body.theme-dark .menu-button {
	background-color: #9c6644;
}

body.theme-dark .menu-button:hover {
	background-color: #7d5035;
}

body.theme-dark .menu-button.disabled {
	background-color: #444;
	color: #888;
}