:root {
	font-family:
		Inter,
		system-ui,
		-apple-system,
		Segoe UI,
		Roboto,
		sans-serif;
	color-scheme: light;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f4f6f8;
	color: #1f2937;
}

.header {
	padding: 16px 20px;
	background: #111827;
	color: #fff;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.header h1 {
	margin: 0;
	font-size: 20px;
}

.api-config {
	display: flex;
	gap: 8px;
	align-items: center;
}
.api-config input {
	min-width: 320px;
	max-width: 55vw;
	padding: 8px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
}
.api-config button,
#reloadAll {
	padding: 8px 12px;
	border: 0;
	border-radius: 8px;
	background: #2563eb;
	color: #fff;
	cursor: pointer;
}

.tabs {
	display: flex;
	gap: 8px;
	padding: 12px 20px;
}
.tab {
	border: 1px solid #cbd5e1;
	background: #fff;
	padding: 8px 14px;
	border-radius: 10px;
	cursor: pointer;
}
.tab.active {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
}

main {
	padding: 0 20px 24px;
}

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

.panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
	margin-bottom: 12px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px;
}

.filter-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.filter-item label {
	font-size: 12px;
	color: #64748b;
	font-weight: 600;
}

.filter-item input,
.filter-item select {
	padding: 8px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #fff;
}

.filter-actions {
	justify-content: flex-end;
}

#clearFilters {
	margin-top: auto;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
	cursor: pointer;
}

.status-message {
	margin: 0 0 12px;
	color: #334155;
	font-size: 14px;
}

.status-message.error {
	color: #b91c1c;
}

.empty-state {
	grid-column: 1 / -1;
	background: #fff;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	padding: 18px;
	color: #475569;
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.card-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.favorite {
	border: 1px solid #d1d5db;
	background: #fff;
	border-radius: 8px;
	width: 32px;
	height: 32px;
	cursor: pointer;
	font-size: 18px;
}
.favorite.active {
	color: #f59e0b;
}

.portal {
	font-size: 12px;
	color: #64748b;
	font-weight: 600;
}

.title {
	margin: 0;
	font-size: 15px;
	line-height: 1.3;
}
.price {
	margin: 0;
	font-weight: 700;
}

.actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.status-select {
	flex: 1;
	padding: 6px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
}
.delete {
	border: 1px solid #fecaca;
	background: #fff1f2;
	color: #be123c;
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
	font-weight: 600;
}
.link {
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
}

.kanban {
	display: grid;
	grid-template-columns: repeat(4, minmax(220px, 1fr));
	gap: 12px;
}
.column {
	background: #e5e7eb;
	border-radius: 12px;
	padding: 10px;
	min-height: 450px;
}
.column h3 {
	margin: 0 0 8px;
	font-size: 14px;
}
.dropzone {
	min-height: 390px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dropzone.drag-over {
	outline: 2px dashed #2563eb;
	border-radius: 10px;
}

@media (max-width: 1080px) {
	.kanban {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.api-config input {
		min-width: 220px;
	}
	.kanban {
		grid-template-columns: 1fr;
	}
	.filters {
		grid-template-columns: 1fr;
	}
}

/* Toasts */
.toasts-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 380px;
	pointer-events: auto;
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 16px;
	background: #fff;
	border: 2px solid #10b981;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	animation: slideIn 0.3s ease-out;
	pointer-events: auto;
}

.toast.toast-new {
	border-color: #10b981;
	background: linear-gradient(to right, #ecfdf5 0%, #fff 100%);
}

.toast-content {
	flex: 1;
	margin: 0;
	font-size: 14px;
}

.toast-content strong {
	display: block;
	color: #059669;
	font-weight: 600;
	font-size: 12px;
	margin-bottom: 4px;
}

.toast-content p {
	margin: 0 0 4px 0;
	color: #1f2937;
	font-size: 13px;
	font-weight: 500;
}

.toast-price {
	color: #10b981;
	font-weight: 600;
}

.toast-close {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	background: transparent;
	color: #9ca3af;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	transition: color 0.2s;
}

.toast-close:hover {
	color: #6b7280;
}

.toast.fade-out {
	animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
	from {
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOut {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(400px);
		opacity: 0;
	}
}

@media (max-width: 640px) {
	.toasts-container {
		right: 10px;
		left: 10px;
		max-width: none;
	}
}
