/**
 * Peppibar Module - Modern CSS Styles
 *
 * Clean, modern interface styling for Peppibar module
 *
 * @package    Peppibar
 * @author     Dazax.io
 * @license    GPL-3.0+
 */

/* ==========================================
   BADGE COLORS FOR PEPPOL STATUSES
   ========================================== */

.badge-peppibar-draft {
	background-color: #6c757d;
	color: #fff;
}

.badge-peppibar-sending {
	background-color: #17a2b8;
	color: #fff;
}

.badge-peppibar-sent {
	background-color: #007bff;
	color: #fff;
}

.badge-peppibar-delivered {
	background-color: #28a745;
	color: #fff;
}

.badge-peppibar-failed {
	background-color: #dc3545;
	color: #fff;
}

.badge-peppibar-received {
	background-color: #28a745;
	color: #fff;
}

.badge-peppibar-accepted {
	background-color: #28a745;
	color: #fff;
}

.badge-peppibar-rejected {
	background-color: #ffc107;
	color: #000;
}

/* ==========================================
   MODERN STAT CARDS (DASHBOARD)
   ========================================== */

.peppibar-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 15px;
	margin: 20px 0;
}

.peppibar-stat-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
	height: 100%;
}

.peppibar-stat-card-link:hover {
	text-decoration: none;
	color: inherit;
}

.peppibar-stat-card {
	background: #fff;
	padding: 18px 20px;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	border: 1px solid #e8ecef;
	transition: all 0.2s ease;
	position: relative;
	height: 100%;
	cursor: default;
}

.peppibar-stat-card-link .peppibar-stat-card {
	cursor: pointer;
}

.peppibar-stat-card-link:hover .peppibar-stat-card {
	border-color: #d0d5dd;
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.peppibar-stat-card.success {
	border-left: 3px solid #28a745;
}

.peppibar-stat-card.danger {
	border-left: 3px solid #dc3545;
}

.peppibar-stat-card.warning {
	border-left: 3px solid #ffc107;
}

.peppibar-stat-card.info {
	border-left: 3px solid #17a2b8;
}

.peppibar-stat-label {
	font-size: 11px;
	font-weight: 600;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
}

.peppibar-stat-label i {
	margin-right: 6px;
	font-size: 13px;
	opacity: 0.7;
}

.peppibar-stat-value {
	font-size: 24px;
	font-weight: 600;
	color: #212529;
	margin: 0;
	line-height: 1.2;
}

.peppibar-stat-footer {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f0;
	font-size: 11px;
	color: #6c757d;
}

/* ==========================================
   MODERN TABLES
   ========================================== */

.peppibar-table-wrapper {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	margin: 20px 0;
	border: 1px solid #e8ecef;
}

.peppibar-table-header {
	padding: 20px;
	background: #f8f9fa;
	border-bottom: 1px solid #e8ecef;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.peppibar-table-title {
	font-size: 16px;
	font-weight: 600;
	color: #212529;
	margin: 0;
}

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

table.peppibar-table thead {
	background: #f8f9fa;
}

table.peppibar-table thead th {
	padding: 16px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
	color: #495057;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #e8ecef;
}

table.peppibar-table tbody tr {
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s ease;
}

table.peppibar-table tbody tr:hover {
	background-color: #f8f9fa;
}

table.peppibar-table tbody tr:last-child {
	border-bottom: none;
}

table.peppibar-table tbody td {
	padding: 16px;
	color: #495057;
	font-size: 14px;
	vertical-align: middle;
}

/* ==========================================
   ACTIVITY LOG
   ========================================== */

.peppibar-activity-log {
	background: #fff;
	border-radius: 6px;
	padding: 15px;
	margin: 20px 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	border: 1px solid #e8ecef;
}

.peppibar-activity-item {
	padding: 12px 14px;
	margin-bottom: 10px;
	background: #f8f9fa;
	border-left: 3px solid #007bff;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.peppibar-activity-item:hover {
	background: #e9ecef;
	border-left-width: 4px;
}

.peppibar-activity-item:last-child {
	margin-bottom: 0;
}

.activity-date {
	font-size: 11px;
	color: #6c757d;
	margin-bottom: 4px;
	display: block;
}

.activity-message {
	color: #495057;
	font-size: 13px;
}

/* ==========================================
   PEPPOL ID DISPLAY
   ========================================== */

.peppibar-peppol-id {
	font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
	font-size: 13px;
	background-color: #f8f9fa;
	padding: 4px 10px;
	border-radius: 6px;
	border: 1px solid #dee2e6;
	display: inline-block;
}

/* ==========================================
   STATUS INDICATORS
   ========================================== */

.peppibar-status-indicator {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
}

.peppibar-status-indicator.success {
	background-color: #28a745;
	box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.peppibar-status-indicator.danger {
	background-color: #dc3545;
	box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.peppibar-status-indicator.warning {
	background-color: #ffc107;
	box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
}

.peppibar-status-indicator.info {
	background-color: #17a2b8;
	box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

/* ==========================================
   UBL VIEWER
   ========================================== */

.peppibar-ubl-viewer {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
	margin: 15px 0;
}

.peppibar-ubl-viewer pre {
	margin: 0;
	white-space: pre-wrap;
	word-wrap: break-word;
	font-size: 12px;
	font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
	max-height: 400px;
	overflow-y: auto;
	line-height: 1.5;
}

/* ==========================================
   MESSAGES & ALERTS
   ========================================== */

.peppibar-error,
.peppibar-success,
.peppibar-warning,
.peppibar-info {
	padding: 16px 20px;
	border-radius: 8px;
	margin: 15px 0;
	display: flex;
	align-items: flex-start;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.peppibar-error i,
.peppibar-success i,
.peppibar-warning i,
.peppibar-info i {
	margin-right: 12px;
	font-size: 20px;
	margin-top: 2px;
}

.peppibar-error {
	color: #721c24;
	background-color: #f8d7da;
	border-left: 4px solid #dc3545;
}

.peppibar-success {
	color: #155724;
	background-color: #d4edda;
	border-left: 4px solid #28a745;
}

.peppibar-warning {
	color: #856404;
	background-color: #fff3cd;
	border-left: 4px solid #ffc107;
}

.peppibar-info {
	color: #0c5460;
	background-color: #d1ecf1;
	border-left: 4px solid #17a2b8;
}

.peppibar-error-title {
	font-weight: 600;
	margin-bottom: 6px;
}

/* ==========================================
   SMP SEARCH RESULTS
   ========================================== */

.peppibar-smp-result {
	padding: 16px;
	margin-bottom: 12px;
	border: 1px solid #e8ecef;
	border-radius: 8px;
	background: #fff;
	transition: all 0.3s ease;
}

.peppibar-smp-result:hover {
	background-color: #f8f9fa;
	box-shadow: 0 4px 8px rgba(0,0,0,0.08);
	transform: translateX(4px);
}

.peppibar-smp-result-name {
	font-weight: 600;
	margin-bottom: 8px;
	color: #212529;
	font-size: 15px;
}

.peppibar-smp-result-id {
	font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
	font-size: 12px;
	color: #6c757d;
	background: #f8f9fa;
	padding: 4px 8px;
	border-radius: 4px;
	display: inline-block;
}

/* ==========================================
   CERTIFICATE STATUS
   ========================================== */

.peppibar-cert-expiry {
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
	display: inline-block;
}

.peppibar-cert-expiry.danger {
	background: #f8d7da;
	color: #721c24;
}

.peppibar-cert-expiry.warning {
	background: #fff3cd;
	color: #856404;
}

.peppibar-cert-expiry.success {
	background: #d4edda;
	color: #155724;
}

/* ==========================================
   EXPORT HISTORY
   ========================================== */

.peppibar-export-item {
	padding: 16px;
	margin-bottom: 12px;
	border-left: 4px solid #007bff;
	background-color: #f8f9fa;
	border-radius: 0 8px 8px 0;
	transition: all 0.3s ease;
}

.peppibar-export-item:hover {
	background-color: #e9ecef;
	transform: translateX(4px);
}

.peppibar-export-item.sent {
	border-left-color: #28a745;
}

.peppibar-export-period {
	font-weight: 600;
	margin-bottom: 6px;
	color: #212529;
}

.peppibar-export-stats {
	font-size: 13px;
	color: #6c757d;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */

.peppibar-loading {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid rgba(0, 123, 255, 0.2);
	border-radius: 50%;
	border-top-color: #007bff;
	animation: peppibar-spin 0.8s linear infinite;
}

@keyframes peppibar-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.peppibar-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #6c757d;
}

.peppibar-empty-state i {
	font-size: 48px;
	color: #dee2e6;
	margin-bottom: 15px;
	display: block;
}

.peppibar-empty-state h3 {
	font-size: 15px;
	color: #495057;
	margin-bottom: 6px;
	font-weight: 600;
}

.peppibar-empty-state p {
	font-size: 13px;
	color: #6c757d;
	margin-top: 6px;
}

/* ==========================================
   RESPONSIVE GRID
   ========================================== */

@media (max-width: 768px) {
	.peppibar-stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.peppibar-stat-card {
		padding: 15px;
	}

	.peppibar-stat-value {
		font-size: 20px;
	}

	.peppibar-stat-label {
		font-size: 10px;
	}

	.peppibar-smp-result-id,
	.peppibar-peppol-id {
		word-break: break-all;
	}

	table.peppibar-table thead th,
	table.peppibar-table tbody td {
		padding: 12px 8px;
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.peppibar-stats-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
	.peppibar-tabs,
	.butAction,
	.butActionDelete {
		display: none !important;
	}

	.peppibar-stat-card {
		box-shadow: none;
		border: 1px solid #dee2e6;
		page-break-inside: avoid;
	}

	.peppibar-table-wrapper {
		box-shadow: none;
		border: 1px solid #dee2e6;
	}
}

/* ==========================================
   UTILITIES
   ========================================== */

.peppibar-text-center {
	text-align: center;
}

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

.peppibar-mt-20 {
	margin-top: 20px;
}

.peppibar-mb-20 {
	margin-bottom: 20px;
}

.peppibar-p-20 {
	padding: 20px;
}

/* ==========================================
   DASHBOARD PAGE SPECIFIC
   ========================================== */

.peppibar-dashboard-welcome {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 30px;
	border-radius: 12px;
	margin-bottom: 30px;
	box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.peppibar-dashboard-welcome h2 {
	margin: 0 0 10px 0;
	font-size: 24px;
	font-weight: 600;
}

.peppibar-dashboard-welcome p {
	margin: 0;
	opacity: 0.9;
	font-size: 14px;
}

/* ==========================================
   ORGANIZATION PAGE SPECIFIC
   ========================================== */

.peppibar-org-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 20px 0;
}

@media (max-width: 992px) {
	.peppibar-org-grid {
		grid-template-columns: 1fr;
	}
}

.peppibar-org-card {
	background: #fff;
	border: 1px solid #e8ecef;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.peppibar-org-card-header {
	background: #f8f9fa;
	padding: 16px 20px;
	border-bottom: 1px solid #e8ecef;
	font-weight: 600;
	color: #212529;
	display: flex;
	align-items: center;
}

.peppibar-org-card-header i {
	margin-right: 10px;
	color: #667eea;
}

.peppibar-org-card-body {
	padding: 20px;
}

/* ==========================================
   IMPORT WIZARD (import_invoice.php)
   ========================================== */

.peppibar-import-wizard {
	max-width: 1200px;
	margin: 0 auto;
}

.peppibar-wizard-steps {
	display: flex;
	justify-content: space-between;
	margin-bottom: 30px;
	padding: 20px 0;
	border-bottom: 2px solid #e5e7eb;
}

.peppibar-wizard-step {
	flex: 1;
	text-align: center;
	position: relative;
	padding: 10px;
}

.peppibar-wizard-step-number {
	display: inline-block;
	width: 40px;
	height: 40px;
	line-height: 40px;
	border-radius: 50%;
	background: #e5e7eb;
	color: #6b7280;
	font-weight: bold;
	margin-bottom: 8px;
}

.peppibar-wizard-step.active .peppibar-wizard-step-number {
	background: #667eea;
	color: white;
}

.peppibar-wizard-step.completed .peppibar-wizard-step-number {
	background: #10b981;
	color: white;
}

.peppibar-wizard-step-label {
	font-size: 13px;
	color: #6b7280;
}

.peppibar-wizard-step.active .peppibar-wizard-step-label {
	color: #111827;
	font-weight: 600;
}

.peppibar-import-card {
	background: white;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	margin-bottom: 20px;
}

.peppibar-import-card h3 {
	margin-top: 0;
	color: #111827;
	border-bottom: 2px solid #667eea;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.peppibar-data-preview {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 15px;
	margin-bottom: 20px;
}

.peppibar-data-preview-row {
	display: flex;
	padding: 8px 0;
	border-bottom: 1px solid #e5e7eb;
}

.peppibar-data-preview-row:last-child {
	border-bottom: none;
}

.peppibar-data-preview-label {
	flex: 0 0 200px;
	font-weight: 600;
	color: #374151;
}

.peppibar-data-preview-value {
	flex: 1;
	color: #6b7280;
}

.peppibar-match-score {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

.peppibar-match-score-high {
	background: #d1fae5;
	color: #065f46;
}

.peppibar-match-score-medium {
	background: #fef3c7;
	color: #92400e;
}

.peppibar-match-score-low {
	background: #fee2e2;
	color: #991b1b;
}

.peppibar-missing-fields {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 6px;
	padding: 15px;
	margin: 15px 0;
}

.peppibar-missing-field {
	padding: 8px 0;
}

.peppibar-missing-field label {
	display: inline-block;
	min-width: 200px;
	font-weight: 600;
}

.peppibar-btn-import {
	display: inline-block;
	background: #10b981;
	color: white;
	padding: 8px 14px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: background-color 0.2s;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	vertical-align: middle;
	margin: 2px;
}

.peppibar-btn-import:hover {
	background: #059669;
	color: white;
	text-decoration: none;
}

.peppibar-btn-secondary {
	display: inline-block;
	background: #6b7280;
	color: white;
	padding: 8px 14px;
	border-radius: 4px;
	border: none;
	font-weight: 500;
	cursor: pointer;
	font-size: 13px;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	vertical-align: middle;
	transition: background-color 0.2s;
	margin: 2px;
}

.peppibar-btn-secondary:hover {
	background: #4b5563;
	color: white;
	text-decoration: none;
}

.peppibar-btn-details {
	display: inline-block;
	background: #6366f1;
	color: white;
	padding: 8px 14px;
	border-radius: 4px;
	border: none;
	font-weight: 500;
	cursor: pointer;
	font-size: 13px;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	vertical-align: middle;
	transition: background 0.2s;
	margin: 2px;
}

.peppibar-btn-details:hover {
	background: #4f46e5;
	color: white;
	text-decoration: none;
}

/* Comparison Modal Styles */
.peppibar-comparison-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.5);
}

.peppibar-comparison-modal-content {
	background-color: #fefefe;
	margin: 2% auto;
	padding: 0;
	border: 1px solid #888;
	width: 90%;
	max-width: 1400px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.peppibar-comparison-modal-header {
	padding: 20px;
	background-color: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
	border-radius: 8px 8px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.peppibar-comparison-modal-header h3 {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.peppibar-comparison-modal-close {
	color: #aaa;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	background: none;
	border: none;
}

.peppibar-comparison-modal-close:hover,
.peppibar-comparison-modal-close:focus {
	color: #000;
}

.peppibar-comparison-modal-body {
	padding: 20px;
	max-height: 70vh;
	overflow-y: auto;
}

.peppibar-comparison-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
}

.peppibar-comparison-table th {
	background-color: #f8f9fa;
	padding: 12px;
	text-align: left;
	font-weight: 600;
	border: 1px solid #dee2e6;
	color: #495057;
}

.peppibar-comparison-table td {
	padding: 12px;
	border: 1px solid #dee2e6;
	vertical-align: top;
}

.peppibar-comparison-table tr.peppibar-match-ok {
	background-color: #d1fae5;
}

.peppibar-comparison-table tr.peppibar-match-diff {
	background-color: #fee2e2;
}

.peppibar-comparison-table tr.peppibar-match-empty {
	background-color: #f3f4f6;
}

.peppibar-match-icon {
	text-align: center;
	font-size: 20px;
	font-weight: bold;
	width: 60px;
}

.peppibar-match-icon.ok {
	color: #059669;
}

.peppibar-match-icon.diff {
	color: #dc2626;
}

.peppibar-match-icon.empty {
	color: #9ca3af;
}

/* ==========================================
   RECEIVE INVOICES PAGE (receive_invoices.php)
   ========================================== */

/* Already prefixed classes are moved as-is, non-prefixed get prefixed */

.peppibar-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.5);
}

.peppibar-modal-content {
	background-color: #fefefe;
	margin: 2% auto;
	padding: 0;
	border: 1px solid #888;
	width: 90%;
	max-width: 1200px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.peppibar-modal-header {
	padding: 20px;
	background-color: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
	border-radius: 8px 8px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.peppibar-modal-header h3 {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.peppibar-modal-close {
	color: #aaa;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	background: none;
	border: none;
}

.peppibar-modal-close:hover,
.peppibar-modal-close:focus {
	color: #000;
}

.peppibar-modal-body {
	padding: 0;
}

.peppibar-tabs {
	display: flex;
	border-bottom: 2px solid #dee2e6;
	background-color: #f8f9fa;
}

.peppibar-tab {
	padding: 15px 25px;
	cursor: pointer;
	border: none;
	background: none;
	font-size: 14px;
	font-weight: 500;
	color: #666;
	transition: all 0.3s;
	border-bottom: 3px solid transparent;
}

.peppibar-tab:hover {
	color: #17a2b8;
	background-color: #e9ecef;
}

.peppibar-tab.active {
	color: #17a2b8;
	border-bottom-color: #17a2b8;
	background-color: white;
}

.peppibar-tab-content {
	display: none;
	padding: 20px;
	max-height: 70vh;
	overflow-y: auto;
}

.peppibar-tab-content.active {
	display: block;
}

.peppibar-invoice-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.peppibar-invoice-section {
	background: #f8f9fa;
	border-radius: 6px;
	padding: 15px;
}

.peppibar-invoice-section h4 {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #333;
	border-bottom: 2px solid #17a2b8;
	padding-bottom: 8px;
}

.peppibar-invoice-field {
	display: flex;
	margin-bottom: 8px;
}

.peppibar-invoice-label {
	font-weight: 600;
	color: #666;
	min-width: 140px;
}

.peppibar-invoice-value {
	color: #333;
}

.peppibar-invoice-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	background: white;
	border-radius: 6px;
	overflow: hidden;
}

.peppibar-invoice-table th {
	background: #17a2b8;
	color: white;
	padding: 12px;
	text-align: left;
	font-weight: 600;
}

.peppibar-invoice-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #dee2e6;
}

.peppibar-invoice-table tr:last-child td {
	border-bottom: none;
}

.peppibar-invoice-table tr:nth-child(even) {
	background-color: #f8f9fa;
}

.peppibar-invoice-totals {
	background: #f8f9fa;
	border-radius: 6px;
	padding: 15px;
	margin-top: 20px;
}

.peppibar-invoice-total-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #dee2e6;
}

.peppibar-invoice-total-row:last-child {
	border-bottom: none;
	font-weight: bold;
	font-size: 18px;
	color: #17a2b8;
	margin-top: 10px;
	padding-top: 15px;
	border-top: 2px solid #17a2b8;
}

.peppibar-xml-viewer {
	background-color: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 15px;
	font-family: 'Courier New', monospace;
	font-size: 12px;
	white-space: pre-wrap;
	overflow-x: auto;
}

.peppibar-btn-matching {
	display: inline-block;
	padding: 8px 14px;
	background-color: #6366f1;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s;
	white-space: nowrap;
	text-align: center;
	line-height: 1.2;
	vertical-align: middle;
	margin: 2px;
}

.peppibar-btn-matching:hover {
	background-color: #4f46e5;
	color: white;
	text-decoration: none;
}

.peppibar-btn-view {
	display: inline-block;
	padding: 8px 14px;
	background-color: #17a2b8;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s;
	white-space: nowrap;
	text-align: center;
	line-height: 1.2;
	vertical-align: middle;
	margin: 2px;
}

.peppibar-btn-view:hover {
	background-color: #138496;
	color: white;
	text-decoration: none;
}

.peppibar-btn-view.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.peppibar-received-card {
	margin-bottom: 20px;
}

.peppibar-stats-row {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
}

.peppibar-stat-box {
	flex: 1;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 8px;
	padding: 15px;
	color: white;
	text-align: center;
}

.peppibar-stat-box h3 {
	margin: 0;
	font-size: 28px;
	font-weight: bold;
}

.peppibar-stat-box p {
	margin: 5px 0 0 0;
	font-size: 13px;
	opacity: 0.9;
}

.peppibar-comparison-score {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 600;
	font-size: 16px;
	margin: 15px 0;
}

.peppibar-comparison-score.high {
	background-color: #d1fae5;
	color: #065f46;
}

.peppibar-comparison-score.medium {
	background-color: #fef3c7;
	color: #92400e;
}

.peppibar-comparison-score.low {
	background-color: #fee2e2;
	color: #991b1b;
}

.peppibar-comparison-section {
	margin: 20px 0;
	padding: 20px;
	background-color: #f8f9fa;
	border-radius: 8px;
}

.peppibar-comparison-section h4 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 16px;
}

.peppibar-no-match-message {
	padding: 40px;
	text-align: center;
	color: #6b7280;
}

.peppibar-no-match-message i {
	font-size: 48px;
	margin-bottom: 20px;
	color: #d1d5db;
}

.peppibar-update-proposals {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.peppibar-update-proposal-item {
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 12px 15px;
	transition: all 0.2s ease;
}

.peppibar-update-proposal-item:hover {
	border-color: #6366f1;
	box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

.peppibar-update-proposal-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	margin-bottom: 8px;
}

.peppibar-update-proposal-label input[type="checkbox"] {
	margin: 0 10px 0 0;
	cursor: pointer;
	width: 18px;
	height: 18px;
}

.peppibar-update-field-name {
	font-weight: 600;
	color: #374151;
}

.peppibar-update-field-preview {
	display: flex;
	align-items: center;
	margin-left: 28px;
	font-size: 14px;
}

.peppibar-update-field-before {
	color: #6b7280;
	padding: 4px 8px;
	background: #f3f4f6;
	border-radius: 4px;
}

.peppibar-update-field-after {
	color: #059669;
	font-weight: 500;
	padding: 4px 8px;
	background: #d1fae5;
	border-radius: 4px;
}

.peppibar-btn-update {
	background-color: #10b981;
	color: white;
	padding: 8px 14px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: background-color 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	line-height: 1.2;
	vertical-align: middle;
}

.peppibar-btn-update:hover:not(:disabled) {
	background-color: #059669;
	color: white;
	text-decoration: none;
}

.peppibar-btn-update:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.peppibar-btn-update i {
	font-size: 13px;
}

/* Note: comparison-table, match-icon classes already defined in import_invoice section */
.peppibar-comparison-table tr.peppibar-match-partial {
	background-color: #fef3c7;
}

/* ==========================================
   DEBUG PAGES (admin/debug/*.php)
   ========================================== */

.peppibar-debug-form {
	background: white;
	border: 2px solid #17a2b8;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 25px;
}

.peppibar-debug-form h3 {
	color: #17a2b8;
	margin-top: 0;
}

.peppibar-debug-form input[type="text"] {
	width: 100%;
	max-width: 500px;
	padding: 10px;
	font-size: 16px;
	border: 1px solid #dee2e6;
	border-radius: 4px;
}

.peppibar-debug-form button {
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 500;
	background: #17a2b8;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	margin-top: 15px;
	text-decoration: none;
	line-height: 1.2;
	vertical-align: middle;
}

.peppibar-debug-form button:hover {
	background: #138496;
	color: white;
	text-decoration: none;
}

.peppibar-debug-output {
	background: white;
	border: 2px solid #dee2e6;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 25px;
}

.peppibar-debug-section {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #dee2e6;
}

.peppibar-debug-section:last-child {
	border-bottom: none;
}

.peppibar-debug-section h4 {
	color: #17a2b8;
	margin-top: 0;
	margin-bottom: 15px;
}

.peppibar-debug-info {
	background: #f8f9fa;
	border-left: 4px solid #17a2b8;
	padding: 15px;
	margin-bottom: 15px;
}

.peppibar-debug-warning {
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	padding: 15px;
	margin-bottom: 15px;
	color: #856404;
}

.peppibar-debug-error {
	background: #f8d7da;
	border-left: 4px solid #dc3545;
	padding: 15px;
	margin-bottom: 15px;
	color: #721c24;
}

.peppibar-debug-success {
	background: #d4edda;
	border-left: 4px solid #28a745;
	padding: 15px;
	margin-bottom: 15px;
	color: #155724;
}

.peppibar-debug-code {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	padding: 15px;
	font-family: 'Courier New', monospace;
	font-size: 14px;
	overflow-x: auto;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.peppibar-debug-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.peppibar-debug-table th,
.peppibar-debug-table td {
	padding: 10px;
	text-align: left;
	border: 1px solid #dee2e6;
}

.peppibar-debug-table th {
	background: #f8f9fa;
	font-weight: bold;
}

.peppibar-debug-field-name {
	font-family: 'Courier New', monospace;
	color: #e83e8c;
	font-weight: bold;
}

/* Debug index page */
.peppibar-debug-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.peppibar-debug-tool-card {
	background: white;
	border: 2px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
	transition: all 0.3s;
	cursor: pointer;
}

.peppibar-debug-tool-card:hover {
	border-color: #17a2b8;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.peppibar-debug-tool-icon {
	font-size: 36px;
	color: #17a2b8;
	margin-bottom: 15px;
}

.peppibar-debug-tool-title {
	font-size: 18px;
	font-weight: bold;
	color: #333;
	margin-bottom: 10px;
}

.peppibar-debug-tool-desc {
	color: #666;
	font-size: 14px;
	line-height: 1.5;
}

/* Debug test pages (test_*.php) */
.peppibar-debug-section-title {
	font-size: 16px;
	font-weight: bold;
	color: #17a2b8;
	margin-bottom: 10px;
}

.peppibar-debug-line {
	padding: 8px 12px;
	margin: 5px 0;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-size: 13px;
}

.peppibar-debug-line.success {
	background: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}

.peppibar-debug-line.error {
	background: #f8d7da;
	color: #721c24;
	border-left: 4px solid #dc3545;
}

.peppibar-debug-line.warning {
	background: #fff3cd;
	color: #856404;
	border-left: 4px solid #ffc107;
}

.peppibar-debug-line.info {
	background: #d1ecf1;
	color: #0c5460;
	border-left: 4px solid #17a2b8;
}

.peppibar-debug-line.code {
	background: #f5f5f5;
	color: #333;
	border-left: 4px solid #6c757d;
	white-space: pre-wrap;
	overflow-x: auto;
}

.peppibar-debug-back-btn {
	display: inline-block;
	padding: 8px 14px;
	background: #6c757d;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	margin-bottom: 15px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	vertical-align: middle;
}

.peppibar-debug-back-btn:hover {
	background: #5a6268;
	color: white;
	text-decoration: none;
}

/* ==========================================
   MIGRATIONS PAGE (admin/migrations.php)
   ========================================== */

.peppibar-migration-list {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	margin-top: 20px;
}

.peppibar-migration-item {
	border-bottom: 1px solid #dee2e6;
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.peppibar-migration-item:last-child {
	border-bottom: none;
}

.peppibar-migration-info {
	flex: 1;
}

.peppibar-migration-version {
	font-size: 18px;
	font-weight: bold;
	color: #333;
	margin-bottom: 5px;
}

.peppibar-migration-file {
	font-family: 'Courier New', monospace;
	font-size: 13px;
	color: #666;
}

.peppibar-migration-actions {
	margin-left: 20px;
}

.peppibar-apply-btn {
	padding: 8px 14px;
	background: #28a745;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	vertical-align: middle;
}

.peppibar-apply-btn:hover {
	background: #218838;
	color: white;
	text-decoration: none;
}

.peppibar-view-btn {
	padding: 8px 14px;
	background: #17a2b8;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	margin-right: 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	vertical-align: middle;
}

.peppibar-view-btn:hover {
	background: #138496;
	color: white;
	text-decoration: none;
}

.peppibar-info-box {
	background: #d1ecf1;
	border: 1px solid #bee5eb;
	border-radius: 6px;
	padding: 15px;
	margin: 20px 0;
	color: #0c5460;
}

.peppibar-warning-box {
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 6px;
	padding: 15px;
	margin: 20px 0;
	color: #856404;
}

/* ==========================================
   EXPERT PAGE (pages/expert.php)
   ========================================== */

.peppibar-expert-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 25px;
	margin-top: 30px;
}

.peppibar-expert-category {
	margin-bottom: 40px;
}

.peppibar-expert-category:not(:first-child) {
	margin-top: 60px;
}

.peppibar-expert-category-title {
	font-size: 22px;
	font-weight: bold;
	color: #17a2b8;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #17a2b8;
}

.peppibar-expert-tool-card {
	background: white;
	border: 2px solid #dee2e6;
	border-radius: 8px;
	padding: 25px;
	transition: all 0.3s;
	cursor: pointer;
	height: 100%;
}

.peppibar-expert-tool-card:hover {
	border-color: #17a2b8;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	transform: translateY(-3px);
}

.peppibar-expert-tool-icon {
	font-size: 42px;
	color: #17a2b8;
	margin-bottom: 15px;
}

.peppibar-expert-tool-title {
	font-size: 18px;
	font-weight: bold;
	color: #333;
	margin-bottom: 10px;
}

.peppibar-expert-tool-desc {
	color: #666;
	font-size: 14px;
	line-height: 1.6;
}

.peppibar-expert-warning {
	background: #fff3cd;
	border: 2px solid #ffc107;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 30px;
}

.peppibar-expert-warning i {
	font-size: 32px;
	color: #856404;
	margin-right: 15px;
}

.peppibar-expert-warning-title {
	font-size: 18px;
	font-weight: bold;
	color: #856404;
	margin-bottom: 15px;
}

.peppibar-expert-warning-text {
	color: #856404;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 15px;
}

.peppibar-expert-checkbox-container {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 15px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 4px;
	cursor: pointer;
}

.peppibar-expert-checkbox-container:hover {
	background: rgba(255, 255, 255, 0.8);
}

.peppibar-expert-checkbox-container input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

.peppibar-expert-checkbox-label {
	font-size: 15px;
	font-weight: bold;
	color: #856404;
	cursor: pointer;
}

.peppibar-expert-content {
	display: none;
}

.peppibar-expert-content.visible {
	display: block;
}

/* ==========================================
   DUPLICATE INVOICE COMPARISON STYLES
   ========================================== */

/* Row with matching data - orange background (warning: possible duplicate) */
.peppibar-comparison-row-match td {
	background-color: #fed7aa !important;
	color: #78350f;
}

/* Row with different data - green background (good: different invoices) */
.peppibar-comparison-row-diff td {
	background-color: #d1fae5 !important;
	color: #065f46;
}

/* Row with reference (always red - this is the problem) */
.peppibar-comparison-row-ref td {
	background-color: #fee2e2 !important;
	color: #7f1d1d;
}

/* Status cell icons - match = warning (orange) */
.peppibar-comparison-status-match {
	color: #ea580c;
	font-weight: bold;
}

/* Status cell icons - diff = success (green) */
.peppibar-comparison-status-diff {
	color: #059669;
	font-weight: bold;
}

/* Status cell icons - ref = error (red) */
.peppibar-comparison-status-ref {
	color: #dc2626;
	font-weight: bold;
}
